Download OpenAPI specification:Download
The Galeva API is organized around REST. The JSON requests and responses should be fairly intuitive and easy to use. Download the OpenAPI specification and import into http://editor.swagger.io/ to generate SDKs in your language of choice. Download the Postman Collection and import into Postman to test the Galeva API.
Login to your Galeva instance as a user. You will receive an accesstoken with which you will authenticate all other APIs.
Login with username and password
string | |
password | string |
OK
Unauthorized
Internal Server Error
{- "email": "peter@galeva.com",
- "firstname": "Peter",
- "lastname": "Joy",
- "role": "8",
- "assignedroles": [
- "8"
], - "dateformat": "DD-MON-YYYY",
- "accesstoken": "Gbd32z783i5j7bvTh",
- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Logout from current user. Logging out from the app and the API are equivalent.
Authorization required | string accesstoken |
Content-Type required | string application/x-www-form-urlencoded |
OK
Unauthorized
Internal Server Error
{- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Update the password of a user.
Content-Type required | string application/x-www-form-urlencoded |
Updated password object
string | |
password | string |
newPassword | string |
OK
Unauthorized
Internal Server Error
{- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Retrieve the definiton of an entity including attribute list and attribute parameters. Create entity definition in the app at https://app.galeva.com
entity required | string Example: entity=CUSTOMER Entity Name |
Authorization required | string accesstoken |
OK
Bad Request
Unauthorized
Internal Server Error
{- "entity": "CUSTOMER",
- "attributes": [
- "CUSTOMER_ID",
- "FIRSTNAME",
- "LASTNAME"
], - "definition": {
- "CUSTOMER_ID": {
- "canBeNull": false,
- "dataType": "number",
- "unique": false,
- "idColumn": true
}, - "FIRSTNAME": {
- "canBeNull": false,
- "dataType": "string",
- "unique": false,
- "idColumn": false
}, - "LASTNAME": {
- "canBeNull": false,
- "dataType": "string",
- "unique": false,
- "idColumn": false
}
}, - "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Create a row in an entity.
Authorization required | string accesstoken |
Content-Type required | string application/json |
Create a row with values for every attribute in the entity.
entity | string |
row | object |
Created
Bad Request
Unauthorized
Internal Server Error
{- "entity": "CUSTOMER",
- "row": {
- "firstname": "Mike",
- "lastname": "Johnson",
- "email": "mikejohnson@email.com",
- "address": [
- 35,
- 36
]
}
}
{- "statuscode": 201,
- "status": "Created",
- "message": "Success",
- "rowid": "56"
}
Retrieve values of a row from the specified attributes.
entity required | string Example: entity=ADDRESS Entity Name |
rowid required | integer Example: rowid=34 Row ID |
attributes required | string Example: attributes=* Attribute Names |
Authorization required | string accesstoken |
OK
Bad Request
Unauthorized
Internal Server Error
{- "row": {
- "ADDRESS_ID": "34",
- "STREET": "3600 Scheffer Ave",
- "CITY": "St. Paul",
- "STATE": "MN",
- "ZIP": "55116"
}, - "entity": "ADDRESS",
- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Update one or more values in a row.
Authorization required | string accesstoken |
Content-Type required | string application/json |
Update attribute values of a row to new values
entity | string |
rowid | integer |
row | object |
OK
Bad Request
Unauthorized
Internal Server Error
{- "entity": "ADDRESS",
- "rowid": 34,
- "row": {
- "STREET": {
- "oldvalue": "3600 Scheffer Ave S",
- "newvalue": "4580 Fridley St"
}, - "CITY": {
- "oldvalue": "St. Paul",
- "newvalue": "Minneapolis"
}, - "ZIP": {
- "oldvalue": 55116,
- "newvalue": 55432
}
}
}
{- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Delete a row.
entity required | string Example: entity=CUSTOMER Entity name |
rowid required | integer Example: rowid=23 Row ID |
Authorization required | string accesstoken |
OK
Bad Request
Unauthorized
Internal Server Error
{- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Execute complex database queries involving multiple entities, attributes, joins, and filters. Attribute type operators: 1. STRING =, <>, LIKE, NOT LIKE, IN, NOT IN 2. NUMBER =, <>, <, <=, >, >=, IN, NOT IN, BETWEEN 3. DATE with formats DD, MON, DD-MON, DD-YYYY: =,<> 4. DATE with all other supported formats: =, <>, <, <=, >, >=, BETWEEN
Authorization required | string accesstoken |
Content-Type required | string application/json |
Enter column names, filter conditions, join conditions, and number of rows.
attributes | object |
filters | object |
join | Array of strings |
rowcount | integer |
OK
Bad Request
Unauthorized
Internal Server Error
{- "attributes": {
- "CUSTOMER": [
- "FIRSTNAME",
- "LASTNAME"
], - "ADDRESS": [
- "STREET",
- "CITY",
- "STATE",
- "ZIP"
]
}, - "filters": {
- "CUSTOMER": {
- "FIRSTNAME": {
- "condition": "=",
- "value": "Mike"
}, - "LASTNAME": {
- "condition": "=",
- "value": "Johnson"
}
}, - "ADDRESS": {
- "STATE": {
- "condition": "=",
- "value": "MN"
}
}
}, - "join": [
- "CUSTOMER",
- "inner",
- "ADDRESS"
], - "rowcount": 50
}
{- "rowcount": 2,
- "rows": [
- [
- "CUSTOMER_ID",
- "FIRSTNAME",
- "LASTNAME",
- "ADDRESS_ID",
- "STREET",
- "CITY",
- "STATE",
- "ZIP"
], - [
- "547",
- "Mike",
- "Johnson",
- "398",
- "3645 Scheffer Ave",
- "St. Paul",
- "MN",
- "55016"
], - [
- "832",
- "Mike",
- "Johnson",
- "701",
- "6312 Fridley St",
- "Minneapolis",
- "MN",
- "55432"
]
], - "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Execute database queries involving a single entity. Returns 20 rows at a time based on a filter against at most one attribute. Easily page through data by passing N (next) and P (previous) parameters. Attribute type operators: 1. STRING =, <>, LIKE, NOT LIKE, IN, NOT IN 2. NUMBER =, <>, <, <=, >, >=, IN, NOT IN, BETWEEN 3. DATE with formats DD, MON, DD-MON, DD-YYYY: =,<> 4. DATE with all other supported formats: =, <>, <, <=, >, >=, BETWEEN
entity required | string Example: entity=CUSTOMER Entity name |
filter | string Example: filter=FIRSTNAME = Mike Filter conditions |
from required | integer Example: from=240 Row ID from which rows should be retrieved. F = First page. L = Last page. N35 = 20 rows after the 35th row. P43 = 20 rows prior to the 43rd row. |
header required | string Example: header=N Y = include entity definition. N = do not include entity definition. |
Authorization required | string accesstoken |
OK
Bad Request
Unauthorized
Internal Server Error
{- "rows": [
- [
- "43",
- "Mike",
- "Johnson",
- "mikejohnson@gmail.com"
], - [
- "290",
- "Mike",
- "Warren",
- "mikewarren@yahoo.com"
], - [
- "413",
- "Mike",
- "Stockton",
- "stocktonm@mikesphoto.com"
], - [
- "420",
- "Mike",
- "Dogg",
- "mikedogg@mikedogg.com"
]
], - "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Intended for batch processing large numbers of rows. Execute complex database queries involving multiple entities, attributes, joins, and filters. GET /rows/set will retrieve rows in batches. Attribute type operators: 1. STRING =, <>, LIKE, NOT LIKE, IN, NOT IN 2. NUMBER =, <>, <, <=, >, >=, IN, NOT IN, BETWEEN 3. DATE with formats DD, MON, DD-MON, DD-YYYY: =,<> 4. DATE with all other supported formats: =, <>, <, <=, >, >=, BETWEEN
Authorization required | string accesstoken |
Content-Type required | string application/json |
Enter attribute names, filter conditions, join conditions, and number of rows.
attributes | object |
filters | object |
join | Array of strings |
Set Created
Bad Request
Unauthorized
Internal Server Error
{- "attributes": {
- "CUSTOMER": [
- "FIRSTNAME",
- "LASTNAME"
], - "ADDRESS": [
- "STREET",
- "CITY",
- "STATE",
- "ZIP"
]
}, - "filters": {
- "ADDRESS": {
- "STATE": {
- "condition": "=",
- "value": "MN"
}
}
}, - "join": [
- "CUSTOMER",
- "inner",
- "ADDRESS"
]
}
{- "rowcount": 32911,
- "dataId": 29348293847928376,
- "statuscode": 201,
- "status": "Created",
- "message": "Set Created. Pass dataId into GET /rows/set."
}
Retrieve the results of a created set.
batchsize required | string Example: batchsize=4 Batch size |
dataId required | integer Example: dataId=29348293847928376 dataId received as response to POST rows/set |
from required | string Example: from=2500 Position of the total set from which batch must be retrived. |
Authorization required | string accesstoken |
OK
Bad Request
Unauthorized
Internal Server Error
{- "rows": [
- [
- "43",
- "Mike",
- "Johnson",
- "mikejohnson@gmail.com"
], - [
- "290",
- "Mike",
- "Warren",
- "mikewarren@yahoo.com"
], - [
- "413",
- "Mike",
- "Stockton",
- "stocktonm@mikesphoto.com"
], - [
- "420",
- "Mike",
- "Dogg",
- "mikedogg@mikedogg.com"
]
], - "dataId": 29348293847928376,
- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Execute an atomic transaction involving multiple operations that must all either succeed together or fail together.
Authorization required | string accesstoken |
Content-Type required | string application/json |
Enter each operation as objects. Allowed operations are create, update, delete, link, and unlink.
operation number | object |
OK
Bad Request
Unauthorized
Internal Server Error
{- "1": {
- "operation": "create",
- "entity": "CUSTOMER",
- "row": {
- "FIRSTNAME": "Mike",
- "LASTNAME": "Johnson",
- "EMAIL": "mikejohnson@gmail.com"
}
}, - "2": {
- "operation": "update",
- "entity": "ADDRESS",
- "rowid": 34,
- "row": {
- "STREET": {
- "oldvalue": "3600 Scheffer Ave S",
- "newvalue": "4580 Fridley St"
}, - "CITY": {
- "oldvalue": "St. Paul",
- "newvalue": "Minneapolis"
}, - "ZIP": {
- "oldvalue": 55116,
- "newvalue": 55432
}
}
}, - "3": {
- "operation": "delete",
- "entity": "ADDRESS",
- "rowid": [
- 49,
- 50
]
}, - "4": {
- "operation": "link",
- "entity1": "CUSTOMER",
- "rowid1": 76,
- "entity2": "ORDERS",
- "rowids2": [
- 4564,
- 8786,
- 1323
]
}, - "5": {
- "operation": "unlink",
- "entity1": "CUSTOMER",
- "rowid1": 76,
- "entity2": "ORDERS",
- "rowids2": [
- 6786,
- 1934,
- 5874
]
}
}
{- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Retrieve the definition of the relation between two entities. Relation definition is created in the app: https://app.galeva.com
entity1 required | string Example: entity1=CUSTOMER Entity Name |
entity2 required | string Example: entity2=ADDRESS Entity Name |
Authorization required | string accesstoken |
OK
Bad Request
Unauthorized
Internal Server Error
{- "entity1": "CUSTOMER",
- "entity2": "ADDRESS",
- "relation": "1:M",
- "unlinkAllowed": true,
- "mandatory": false,
- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Link rows in either a one-to-one or one-to-many relationship. For a many-to-many relationship, create a one-to-many relationship in the reverse order.
Authorization required | string accesstoken |
Content-Type required | string application/json |
Provide entity names and row IDs.
entity1 | string |
rowid1 | integer |
entity2 | string |
rowid2 | Array of integers |
OK
Bad Request
Unauthorized
Internal Server Error
{- "entity1": "CUSTOMER",
- "rowid1": 76,
- "entity2": "ORDERS",
- "rowids2": [
- 4564,
- 8786,
- 1323
]
}
{- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}
Remove relations between different entities by unlinking rows.
Authorization required | string accesstoken |
Content-Type required | string application/json |
Provide entity names and row IDs.
entity1 | string |
rowid1 | integer |
entity2 | string |
rowid2 | Array of integers |
OK
Bad Request
Unauthorized
Internal Server Error
{- "entity1": "CUSTOMER",
- "rowid1": 76,
- "entity2": "ORDERS",
- "rowids2": [
- 6786,
- 1934,
- 5874
]
}
{- "statuscode": 200,
- "status": "OK",
- "message": "Success"
}