Download OpenAPI specification:Download
Surfy API documentation
get the jwt token using api credentials created inside surfy using open id style
client_id | string the client id is the tenant |
client_secret | string the client secret can be found or created inside the api section of surfy app |
{- "client_id": "demo",
- "client_secret": "mypassword"
}
{- "ok": true,
- "token": "string",
- "access_token": "string",
- "expires_in": 0
}
get the jwt token using api credentials created inside surfy
clientId | string the client id is the tenant |
clientSecret | string the client secret can be found or created inside the api section of surfy app |
{- "clientId": "demo",
- "clientSecret": "mypassword"
}
{- "ok": true,
- "token": "string",
- "access_token": "string",
- "expires_in": 0
}
fetch one entity depending on the provided query node
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
queryNode | object query node object |
{- "queryNode": {
- "name": "building",
- "_": [
- "id",
- "name"
], - "filters": [
- {
- "operator": "eq",
- "column": "id",
- "value": 1
}
]
}
}
{- "id": 1,
- "name": "Building 1"
}
update one entity depending on the provided variables
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
id | number id of the entity to update |
objectTypeName | string (objectTypeName) camelized object type name |
variables | object properties to create |
{- "objectTypeName": "building",
- "id": 1,
- "variables": {
- "name": "new building name"
}
}
{- "id": 1
}
create one entity depending on the provided variables
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
objectTypeName | string (objectTypeName) camelized object type name |
variables | object properties to create |
{- "objectTypeName": "building",
- "variables": {
- "id": "64",
- "name": "new building name"
}
}
{- "id": 1,
- "name": "new building name"
}
fetch the list of entities depending on the provided query node
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
queryNode | object query node object |
{- "queryNode": {
- "name": "building",
- "_": [
- "id",
- "name"
]
}
}
{- "totalCount": 1,
- "entities": [
- {
- "id": 1,
- "name": "Building 1"
}
]
}
delete one entity using id
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
id | number id of the entity to delete |
objectTypeName | string (objectTypeName) camelized object type name |
{- "objectTypeName": "building",
- "id": 1
}
{- "result": true
}
create multiples entities depending on the provided entities
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
objectTypeName | string (objectTypeName) camelized object type name |
entities | object entities to create |
{- "objectTypeName": "building",
- "entities": {
- "name": "new building name"
}
}
{- "result": true,
- "entities": [
- {
- "id": 1,
- "name": "new building name"
}
]
}
update multiples entities depending on the provided entities
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
objectTypeName | string (objectTypeName) camelized object type name | ||||
Array of objects (IEntity) entities to update | |||||
Array
|
{- "objectTypeName": "building",
- "entities": [
- {
- "id": 1,
- "name": "new building name"
}
]
}
{- "result": true,
- "entities": [
- {
- "id": 1,
- "name": "new building name"
}
]
}
re calculate the calculated data for the objectype
authorization required | string Example: Bearer ${jwtToken} authorization bearer with jwt token |
x-tenant required | string Example: demo tenant to use |
ids | Array of integers ids of the objects to impact, leave empty array to impact all |
objectTypeName | string object type name |
{- "queryNode": {
- "objectTypeName": "building",
- "ids": [
- 1,
- 2,
- 3
]
}
}
{- "totalCount": 1,
- "entities": [
- {
- "id": 1,
- "name": "Building 1"
}
]
}