Surfy API

Surfy API (1.0.0)

Download OpenAPI specification:Download

License: Apache 2.0

Surfy API documentation

get the jwt token (open id)

get the jwt token using api credentials created inside surfy using open id style

Authorizations:
BearerAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "client_id": "demo",
  • "client_secret": "mypassword"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "token": "string",
  • "access_token": "string",
  • "expires_in": 0
}

get the jwt token

get the jwt token using api credentials created inside surfy

Authorizations:
BearerAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "clientId": "demo",
  • "clientSecret": "mypassword"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "token": "string",
  • "access_token": "string",
  • "expires_in": 0
}

fetch entity

fetch one entity depending on the provided query node

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
queryNode
object

query node object

Responses

Request samples

Content type
application/json
{
  • "queryNode": {
    }
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Building 1"
}

update one entity

update one entity depending on the provided variables

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
id
number

id of the entity to update

objectTypeName
string (objectTypeName)

camelized object type name

variables
object

properties to create

Responses

Request samples

Content type
application/json
{
  • "objectTypeName": "building",
  • "id": 1,
  • "variables": {
    }
}

Response samples

Content type
application/json
{
  • "id": 1
}

create one entity

create one entity depending on the provided variables

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
objectTypeName
string (objectTypeName)

camelized object type name

variables
object

properties to create

Responses

Request samples

Content type
application/json
{
  • "objectTypeName": "building",
  • "variables": {
    }
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "new building name"
}

fetch entities

fetch the list of entities depending on the provided query node

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
queryNode
object

query node object

Responses

Request samples

Content type
application/json
{
  • "queryNode": {
    }
}

Response samples

Content type
application/json
{
  • "totalCount": 1,
  • "entities": [
    ]
}

delete one entity

delete one entity using id

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
id
number

id of the entity to delete

objectTypeName
string (objectTypeName)

camelized object type name

Responses

Request samples

Content type
application/json
{
  • "objectTypeName": "building",
  • "id": 1
}

Response samples

Content type
application/json
{
  • "result": true
}

create multiple entities

create multiples entities depending on the provided entities

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
objectTypeName
string (objectTypeName)

camelized object type name

entities
object

entities to create

Responses

Request samples

Content type
application/json
{
  • "objectTypeName": "building",
  • "entities": {
    }
}

Response samples

Content type
application/json
{
  • "result": true,
  • "entities": [
    ]
}

update multiple entities

update multiples entities depending on the provided entities

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
objectTypeName
string (objectTypeName)

camelized object type name

Array of objects (IEntity)

entities to update

Array
id
required
number <int32> (id)
name
string (name)

Responses

Request samples

Content type
application/json
{
  • "objectTypeName": "building",
  • "entities": [
    ]
}

Response samples

Content type
application/json
{
  • "result": true,
  • "entities": [
    ]
}

generate impact on entities

re calculate the calculated data for the objectype

Authorizations:
BearerAuth
header Parameters
authorization
required
string
Example: Bearer ${jwtToken}

authorization bearer with jwt token

x-tenant
required
string
Example: demo

tenant to use

Request Body schema: application/json
ids
Array of integers

ids of the objects to impact, leave empty array to impact all

objectTypeName
string

object type name

Responses

Request samples

Content type
application/json
{
  • "queryNode": {
    }
}

Response samples

Content type
application/json
{
  • "totalCount": 1,
  • "entities": [
    ]
}