The Bulbthings API follows the JSON:API specification. The API is organized around clear resource-oriented endpoints, and uses HTTP response codes to indicate API errors. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application. JSON is returned by all API responses, including errors.
API key (required)
Bulbthings uses API keys to authenticate requests. You can create and manage API keys from your dashboard. Keep your keys secure and do not share them in publicly accessible areas such as GitHub, client-side code, and so forth. Keys must be provided via HTTP request headers: Authorization: Bearer your-api-key
.
Workspace scope (recommended)
If you are only making requests for a single Bulbthings workspace, it is recommended you provide a companyId
query parameter to all of your requests, for example GET https://api.bulbthings.com/entities?companyId=your-workspace-id
. This will automatically restrict the data you read/write to the specified workspace and avoid having to manually filter results. The companyId
workspace identifier can be found in the developer settings page of your dashboard.
Account objects represent the users of the platform. They can either be a human or an application bot.
Returns a list of accounts.
include | string Enum: "companies" "memberships" "keys" "settings" "unitSettings" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const accounts = await bulbthings.accounts.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "John Doe",
- "email": "example@gmail.com",
- "currentPassword": "myCurrentSecretPassword",
- "password": "myNewSecretPassword",
- "isVerified": false,
- "isBot": false,
- "locale": "en-GB",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "meta": {
- "timezone": "Europe/London"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Invite a user to join Bulbthings. This operation will return the existing invite if the email was already used. ⚠️ You also need to create a Membership
for the user to have access to a workspace.
required | object | ||||||||||||||
|
{- "data": {
- "attributes": {
- "label": "John Doe",
- "email": "example@gmail.com",
- "locale": "en-GB",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "meta": {
- "timezone": "Europe/London"
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "John Doe",
- "email": "example@gmail.com",
- "currentPassword": "myCurrentSecretPassword",
- "password": "myNewSecretPassword",
- "isVerified": false,
- "isBot": false,
- "locale": "en-GB",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "meta": {
- "timezone": "Europe/London"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing account using its unique identifier.
id required | string <uuid> The identifier of the account to be retrieved. |
include | string Enum: "companies" "memberships" "keys" "settings" "unitSettings" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "John Doe",
- "email": "example@gmail.com",
- "currentPassword": "myCurrentSecretPassword",
- "password": "myNewSecretPassword",
- "isVerified": false,
- "isBot": false,
- "locale": "en-GB",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "meta": {
- "timezone": "Europe/London"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Accounts can only update themselves.
required | object | ||||||||||||||
|
{- "data": {
- "attributes": {
- "label": "John Doe",
- "email": "example@gmail.com",
- "locale": "en-GB",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "meta": {
- "timezone": "Europe/London"
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "John Doe",
- "email": "example@gmail.com",
- "currentPassword": "myCurrentSecretPassword",
- "password": "myNewSecretPassword",
- "isVerified": false,
- "isBot": false,
- "locale": "en-GB",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "meta": {
- "timezone": "Europe/London"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an account using its unique identifier.
id required | string <uuid> The identifier of the account to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Acknowledgements are objects used to record that a user has seen a notification event.
Create an acknowledgement
required | object | ||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "accountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "eventId": "b89511a0-7770-4a06-b554-fe3eb868046b"
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "accountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "eventId": "b89511a0-7770-4a06-b554-fe3eb868046b",
- "createdAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing acknowledgement using its unique identifier.
id required | string <uuid> The identifier of the acknowledgement to be retrieved. |
include | string Enum: "company" "account" "event" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "accountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "eventId": "b89511a0-7770-4a06-b554-fe3eb868046b",
- "createdAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an acknowledgement using its unique identifier.
id required | string <uuid> The identifier of the acknowledgement to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Action types describe the possible actions that can be triggered in the system. Actions are physical or abstract operations, for example turning on/off a machine, sending an email or validating a quotation. To control the display of actions, use entity type mappings.
Returns a list of action types.
include | string Value: "entityTypes" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const actionTypes = await bulbthings.actionTypes.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "schema": {
- "title": "Set temperature",
- "description": "Set the room temperature to the specified value (in degrees Celsius).",
- "type": "object",
- "properties": {
- "temperature": {
- "type": "number"
}
}, - "required": [
- "temperature"
]
}, - "meta": {
- "useGeoPosition": true,
- "requireScan": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an action type
required | object | ||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "schema": {
- "title": "Set temperature",
- "description": "Set the room temperature to the specified value (in degrees Celsius).",
- "type": "object",
- "properties": {
- "temperature": {
- "type": "number"
}
}, - "required": [
- "temperature"
]
}, - "meta": {
- "useGeoPosition": true,
- "requireScan": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "schema": {
- "title": "Set temperature",
- "description": "Set the room temperature to the specified value (in degrees Celsius).",
- "type": "object",
- "properties": {
- "temperature": {
- "type": "number"
}
}, - "required": [
- "temperature"
]
}, - "meta": {
- "useGeoPosition": true,
- "requireScan": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing action type using its unique identifier.
id required | string <uuid> The identifier of the action type to be retrieved. |
include | string Value: "entityTypes" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "schema": {
- "title": "Set temperature",
- "description": "Set the room temperature to the specified value (in degrees Celsius).",
- "type": "object",
- "properties": {
- "temperature": {
- "type": "number"
}
}, - "required": [
- "temperature"
]
}, - "meta": {
- "useGeoPosition": true,
- "requireScan": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an action type
required | object | ||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "schema": {
- "title": "Set temperature",
- "description": "Set the room temperature to the specified value (in degrees Celsius).",
- "type": "object",
- "properties": {
- "temperature": {
- "type": "number"
}
}, - "required": [
- "temperature"
]
}, - "meta": {
- "useGeoPosition": true,
- "requireScan": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "schema": {
- "title": "Set temperature",
- "description": "Set the room temperature to the specified value (in degrees Celsius).",
- "type": "object",
- "properties": {
- "temperature": {
- "type": "number"
}
}, - "required": [
- "temperature"
]
}, - "meta": {
- "useGeoPosition": true,
- "requireScan": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an action type using its unique identifier.
id required | string <uuid> The identifier of the action type to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Actions represent operations being asked by a user. Think of it as issue tickets: creating an Action
is like someone opening a ticket to ask for an operation to be executed. The action creation emits events that can be listened to by Bulbthings, thirdparties, or your servers in order to triggered all the necessary code and operations. During the lifeycle of the action, whatever client handling the operation will update its status until it reaches the completed
or failed
states.
Returns a list of actions.
include | string Enum: "actionType" "account" "entity" "events" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const actions = await bulbthings.actions.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "actionTypeId": "setRoomTemperature",
- "accountId": "a4976b38-5606-4f06-ad90-00e646978e8d",
- "label": "Click me",
- "input": {
- "temperature": 20
}, - "status": "requested",
- "requestedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "meta": null
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an action
required | object | ||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "actionTypeId": "setRoomTemperature",
- "accountId": "a4976b38-5606-4f06-ad90-00e646978e8d",
- "label": "Click me",
- "input": {
- "temperature": 20
}, - "status": "requested",
- "meta": null
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "actionTypeId": "setRoomTemperature",
- "accountId": "a4976b38-5606-4f06-ad90-00e646978e8d",
- "label": "Click me",
- "input": {
- "temperature": 20
}, - "status": "requested",
- "requestedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "meta": null
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing action using its unique identifier.
id required | string <uuid> The identifier of the action to be retrieved. |
include | string Enum: "actionType" "account" "entity" "events" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "actionTypeId": "setRoomTemperature",
- "accountId": "a4976b38-5606-4f06-ad90-00e646978e8d",
- "label": "Click me",
- "input": {
- "temperature": 20
}, - "status": "requested",
- "requestedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "meta": null
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an action
required | object | ||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "actionTypeId": "setRoomTemperature",
- "accountId": "a4976b38-5606-4f06-ad90-00e646978e8d",
- "label": "Click me",
- "input": {
- "temperature": 20
}, - "status": "requested",
- "meta": null
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "actionTypeId": "setRoomTemperature",
- "accountId": "a4976b38-5606-4f06-ad90-00e646978e8d",
- "label": "Click me",
- "input": {
- "temperature": 20
}, - "status": "requested",
- "requestedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "meta": null
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an action using its unique identifier.
id required | string <uuid> The identifier of the action to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Association types describe the different kinds of relationships that exist between entities. An association type is defined between a source and a target entity type and can be shared between multiple targets in the case of overlapping associations.
Returns a list of association types.
include | string Enum: "sourceEntityType" "targetEntityType" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const associationTypes = await bulbthings.associationTypes.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "sourceEntityTypeId": "asset",
- "targetEntityTypeId": "user",
- "sourceIsShared": true,
- "targetIsShared": true,
- "meta": {
- "category": "Assignment",
- "sourceSectionLabel": "Assigned users",
- "sourceActionLabel": "Assign to user",
- "targetSectionLabel": "Assigned assets",
- "targetActionLabel": "Assign asset",
- "sourceShouldBeCreated": true,
- "targetShouldBeCreated": true,
- "isImportantForSource": true,
- "isImportantForTarget": true,
- "isSourcePartOfTarget": true,
- "hasPeriod": true,
- "hasQuantity": true,
- "displayInList": true,
- "displayInSourceList": true,
- "displayInTargetList": true,
- "displayInCalendar": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an association type
required | object | ||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "sourceEntityTypeId": "asset",
- "targetEntityTypeId": "user",
- "sourceIsShared": true,
- "targetIsShared": true,
- "meta": {
- "category": "Assignment",
- "sourceSectionLabel": "Assigned users",
- "sourceActionLabel": "Assign to user",
- "targetSectionLabel": "Assigned assets",
- "targetActionLabel": "Assign asset",
- "sourceShouldBeCreated": true,
- "targetShouldBeCreated": true,
- "isImportantForSource": true,
- "isImportantForTarget": true,
- "isSourcePartOfTarget": true,
- "hasPeriod": true,
- "hasQuantity": true,
- "displayInList": true,
- "displayInSourceList": true,
- "displayInTargetList": true,
- "displayInCalendar": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "sourceEntityTypeId": "asset",
- "targetEntityTypeId": "user",
- "sourceIsShared": true,
- "targetIsShared": true,
- "meta": {
- "category": "Assignment",
- "sourceSectionLabel": "Assigned users",
- "sourceActionLabel": "Assign to user",
- "targetSectionLabel": "Assigned assets",
- "targetActionLabel": "Assign asset",
- "sourceShouldBeCreated": true,
- "targetShouldBeCreated": true,
- "isImportantForSource": true,
- "isImportantForTarget": true,
- "isSourcePartOfTarget": true,
- "hasPeriod": true,
- "hasQuantity": true,
- "displayInList": true,
- "displayInSourceList": true,
- "displayInTargetList": true,
- "displayInCalendar": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing association type using its unique identifier.
id required | string <uuid> The identifier of the association type to be retrieved. |
include | string Enum: "sourceEntityType" "targetEntityType" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "sourceEntityTypeId": "asset",
- "targetEntityTypeId": "user",
- "sourceIsShared": true,
- "targetIsShared": true,
- "meta": {
- "category": "Assignment",
- "sourceSectionLabel": "Assigned users",
- "sourceActionLabel": "Assign to user",
- "targetSectionLabel": "Assigned assets",
- "targetActionLabel": "Assign asset",
- "sourceShouldBeCreated": true,
- "targetShouldBeCreated": true,
- "isImportantForSource": true,
- "isImportantForTarget": true,
- "isSourcePartOfTarget": true,
- "hasPeriod": true,
- "hasQuantity": true,
- "displayInList": true,
- "displayInSourceList": true,
- "displayInTargetList": true,
- "displayInCalendar": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an association type
required | object | ||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "sourceEntityTypeId": "asset",
- "targetEntityTypeId": "user",
- "sourceIsShared": true,
- "targetIsShared": true,
- "meta": {
- "category": "Assignment",
- "sourceSectionLabel": "Assigned users",
- "sourceActionLabel": "Assign to user",
- "targetSectionLabel": "Assigned assets",
- "targetActionLabel": "Assign asset",
- "sourceShouldBeCreated": true,
- "targetShouldBeCreated": true,
- "isImportantForSource": true,
- "isImportantForTarget": true,
- "isSourcePartOfTarget": true,
- "hasPeriod": true,
- "hasQuantity": true,
- "displayInList": true,
- "displayInSourceList": true,
- "displayInTargetList": true,
- "displayInCalendar": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "sourceEntityTypeId": "asset",
- "targetEntityTypeId": "user",
- "sourceIsShared": true,
- "targetIsShared": true,
- "meta": {
- "category": "Assignment",
- "sourceSectionLabel": "Assigned users",
- "sourceActionLabel": "Assign to user",
- "targetSectionLabel": "Assigned assets",
- "targetActionLabel": "Assign asset",
- "sourceShouldBeCreated": true,
- "targetShouldBeCreated": true,
- "isImportantForSource": true,
- "isImportantForTarget": true,
- "isSourcePartOfTarget": true,
- "hasPeriod": true,
- "hasQuantity": true,
- "displayInList": true,
- "displayInSourceList": true,
- "displayInTargetList": true,
- "displayInCalendar": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an association type using its unique identifier.
id required | string <uuid> The identifier of the association type to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Entities have relationships by way of associations. An association is a relationship defined between a source and a target entity, possibly restricted to a period of time. When an association type is shareable, a ratio specifies how the relationship is split between the target entities.
Returns a list of associations.
include | string Enum: "associationType" "sourceEntity" "targetEntity" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const associations = await bulbthings.associations.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "associationTypeId": "assetsAssignedToUsers",
- "sourceEntityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "targetEntityId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "period": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "bounds": "[]"
}, - "ratio": "1",
- "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an association
required | object | ||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "associationTypeId": "assetsAssignedToUsers",
- "sourceEntityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "targetEntityId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "period": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "bounds": "[]"
}, - "ratio": "1",
- "quantity": 1
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "associationTypeId": "assetsAssignedToUsers",
- "sourceEntityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "targetEntityId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "period": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "bounds": "[]"
}, - "ratio": "1",
- "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing association using its unique identifier.
id required | string <uuid> The identifier of the association to be retrieved. |
include | string Enum: "associationType" "sourceEntity" "targetEntity" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "associationTypeId": "assetsAssignedToUsers",
- "sourceEntityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "targetEntityId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "period": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "bounds": "[]"
}, - "ratio": "1",
- "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an association
required | object | ||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "associationTypeId": "assetsAssignedToUsers",
- "sourceEntityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "targetEntityId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "period": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "bounds": "[]"
}, - "ratio": "1",
- "quantity": 1
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "associationTypeId": "assetsAssignedToUsers",
- "sourceEntityId": "07aa8ffb-1e59-4e5b-9b01-2de99814d7b8",
- "targetEntityId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "period": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "bounds": "[]"
}, - "ratio": "1",
- "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an association using its unique identifier.
id required | string <uuid> The identifier of the association to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Attribute types describe the different kinds of properties that can be added to entities.
Returns a list of attribute types.
include | string Value: "unit" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const attributeTypes = await bulbthings.attributeTypes.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "schema": {
- "type": "string",
- "title": "VIN",
- "maxLength": 17,
- "minLength": 17,
- "description": "Vehicle Identification Number"
}, - "timeSeriesOptions": {
- "type": "gauge",
- "interval": "P1M15D",
- "aligner": "last",
- "interpolation": "linear",
- "fill": "lastObservationCarriedForward"
}, - "isReadOnly": false,
- "unitId": "km",
- "meta": {
- "display": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "ranges": [
- {
- "schema": null,
- "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "displayValue": null
}
], - "numberFormat": {
- "minimumFractionDigits": 0,
- "maximumFractionDigits": 2
}
}, - "defaultUnits": {
- "britishImperial": "[mi_i]"
}
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an attribute type
required | object | ||||||||||||||
|
{- "data": {
- "attributes": {
- "schema": {
- "type": "string",
- "title": "VIN",
- "maxLength": 17,
- "minLength": 17,
- "description": "Vehicle Identification Number"
}, - "timeSeriesOptions": {
- "type": "gauge",
- "interval": "P1M15D",
- "aligner": "last",
- "interpolation": "linear",
- "fill": "lastObservationCarriedForward"
}, - "isReadOnly": false,
- "unitId": "km",
- "meta": {
- "display": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "ranges": [
- {
- "schema": null,
- "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "displayValue": null
}
], - "numberFormat": {
- "minimumFractionDigits": 0,
- "maximumFractionDigits": 2
}
}, - "defaultUnits": {
- "britishImperial": "[mi_i]"
}
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "schema": {
- "type": "string",
- "title": "VIN",
- "maxLength": 17,
- "minLength": 17,
- "description": "Vehicle Identification Number"
}, - "timeSeriesOptions": {
- "type": "gauge",
- "interval": "P1M15D",
- "aligner": "last",
- "interpolation": "linear",
- "fill": "lastObservationCarriedForward"
}, - "isReadOnly": false,
- "unitId": "km",
- "meta": {
- "display": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "ranges": [
- {
- "schema": null,
- "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "displayValue": null
}
], - "numberFormat": {
- "minimumFractionDigits": 0,
- "maximumFractionDigits": 2
}
}, - "defaultUnits": {
- "britishImperial": "[mi_i]"
}
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing attribute type using its unique identifier.
id required | string <uuid> The identifier of the attribute type to be retrieved. |
include | string Value: "unit" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "schema": {
- "type": "string",
- "title": "VIN",
- "maxLength": 17,
- "minLength": 17,
- "description": "Vehicle Identification Number"
}, - "timeSeriesOptions": {
- "type": "gauge",
- "interval": "P1M15D",
- "aligner": "last",
- "interpolation": "linear",
- "fill": "lastObservationCarriedForward"
}, - "isReadOnly": false,
- "unitId": "km",
- "meta": {
- "display": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "ranges": [
- {
- "schema": null,
- "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "displayValue": null
}
], - "numberFormat": {
- "minimumFractionDigits": 0,
- "maximumFractionDigits": 2
}
}, - "defaultUnits": {
- "britishImperial": "[mi_i]"
}
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an attribute type
required | object | ||||||||||||||
|
{- "data": {
- "attributes": {
- "schema": {
- "type": "string",
- "title": "VIN",
- "maxLength": 17,
- "minLength": 17,
- "description": "Vehicle Identification Number"
}, - "timeSeriesOptions": {
- "type": "gauge",
- "interval": "P1M15D",
- "aligner": "last",
- "interpolation": "linear",
- "fill": "lastObservationCarriedForward"
}, - "isReadOnly": false,
- "unitId": "km",
- "meta": {
- "display": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "ranges": [
- {
- "schema": null,
- "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "displayValue": null
}
], - "numberFormat": {
- "minimumFractionDigits": 0,
- "maximumFractionDigits": 2
}
}, - "defaultUnits": {
- "britishImperial": "[mi_i]"
}
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "schema": {
- "type": "string",
- "title": "VIN",
- "maxLength": 17,
- "minLength": 17,
- "description": "Vehicle Identification Number"
}, - "timeSeriesOptions": {
- "type": "gauge",
- "interval": "P1M15D",
- "aligner": "last",
- "interpolation": "linear",
- "fill": "lastObservationCarriedForward"
}, - "isReadOnly": false,
- "unitId": "km",
- "meta": {
- "display": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "ranges": [
- {
- "schema": null,
- "style": {
- "color": "#f9a400",
- "backgroundColor": "rgba(248, 165, 0, 0.2)"
}, - "displayValue": null
}
], - "numberFormat": {
- "minimumFractionDigits": 0,
- "maximumFractionDigits": 2
}
}, - "defaultUnits": {
- "britishImperial": "[mi_i]"
}
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an attribute type using its unique identifier.
id required | string <uuid> The identifier of the attribute type to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Catalog mappings define which entity types a catalog gives access to. Adding an entity type to a catalog automatically implies adding all of its ancestors and descendant types.
Returns a list of catalog mappings.
include | string Enum: "catalog" "entityType" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const catalogMappings = await bulbthings.catalogMappings.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "catalogId": "4a3c7421-7ed8-48bc-8f06-0671a42a32c8",
- "entityTypeId": "vehicle",
- "meta": {
- "isReadOnly": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create a catalog mapping
required | object | ||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "catalogId": "4a3c7421-7ed8-48bc-8f06-0671a42a32c8",
- "entityTypeId": "vehicle",
- "meta": {
- "isReadOnly": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "catalogId": "4a3c7421-7ed8-48bc-8f06-0671a42a32c8",
- "entityTypeId": "vehicle",
- "meta": {
- "isReadOnly": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing catalog mapping using its unique identifier.
id required | string <uuid> The identifier of the catalog mapping to be retrieved. |
include | string Enum: "catalog" "entityType" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "catalogId": "4a3c7421-7ed8-48bc-8f06-0671a42a32c8",
- "entityTypeId": "vehicle",
- "meta": {
- "isReadOnly": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update a catalog mapping
required | object | ||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "catalogId": "4a3c7421-7ed8-48bc-8f06-0671a42a32c8",
- "entityTypeId": "vehicle",
- "meta": {
- "isReadOnly": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "catalogId": "4a3c7421-7ed8-48bc-8f06-0671a42a32c8",
- "entityTypeId": "vehicle",
- "meta": {
- "isReadOnly": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete a catalog mapping using its unique identifier.
id required | string <uuid> The identifier of the catalog mapping to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Catalogs are bundles of entity types that can be used to customise the application for a workspace by only showing a set of entity type categories.
Returns a list of catalogs.
include | string Value: "entityTypes" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const catalogs = await bulbthings.catalogs.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Vehicle management catalog",
- "description": "Short text describing the catalog."
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create a catalog
required | object | ||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Vehicle management catalog",
- "description": "Short text describing the catalog."
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Vehicle management catalog",
- "description": "Short text describing the catalog."
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing catalog using its unique identifier.
id required | string <uuid> The identifier of the catalog to be retrieved. |
include | string Value: "entityTypes" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Vehicle management catalog",
- "description": "Short text describing the catalog."
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update a catalog
required | object | ||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Vehicle management catalog",
- "description": "Short text describing the catalog."
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Vehicle management catalog",
- "description": "Short text describing the catalog."
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete a catalog using its unique identifier.
id required | string <uuid> The identifier of the catalog to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Returns a list of codes.
include | string Value: "entity" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const codes = await bulbthings.codes.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "type": "qrcode",
- "value": "ABC1234"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create a code
required | object | ||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "type": "qrcode",
- "value": "ABC1234"
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "type": "qrcode",
- "value": "ABC1234"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing code using its unique identifier.
id required | string <uuid> The identifier of the code to be retrieved. |
include | string Value: "entity" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "type": "qrcode",
- "value": "ABC1234"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update a code
required | object | ||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "type": "qrcode",
- "value": "ABC1234"
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "type": "qrcode",
- "value": "ABC1234"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete a code using its unique identifier.
id required | string <uuid> The identifier of the code to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Returns a list of companies.
include | string Enum: "account" "catalog" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const companies = await bulbthings.companies.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "Company LTD",
- "accountId": "f326f347-820e-46ce-b883-3457af3d3eac",
- "catalogId": "67b60e97-0675-418c-8cc2-f8b10820ddef",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "locale": "en-GB",
- "meta": {
- "billingId": "cus_HRkHymvJYVcAWp",
- "features": [
- "stock",
- "financials"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create a company
required | object | ||||||||||||||||
|
{- "data": {
- "attributes": {
- "label": "Company LTD",
- "accountId": "f326f347-820e-46ce-b883-3457af3d3eac",
- "catalogId": "67b60e97-0675-418c-8cc2-f8b10820ddef",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "locale": "en-GB",
- "meta": {
- "billingId": "cus_HRkHymvJYVcAWp",
- "features": [
- "stock",
- "financials"
]
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "Company LTD",
- "accountId": "f326f347-820e-46ce-b883-3457af3d3eac",
- "catalogId": "67b60e97-0675-418c-8cc2-f8b10820ddef",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "locale": "en-GB",
- "meta": {
- "billingId": "cus_HRkHymvJYVcAWp",
- "features": [
- "stock",
- "financials"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing company using its unique identifier.
id required | string <uuid> The identifier of the company to be retrieved. |
include | string Enum: "account" "catalog" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "Company LTD",
- "accountId": "f326f347-820e-46ce-b883-3457af3d3eac",
- "catalogId": "67b60e97-0675-418c-8cc2-f8b10820ddef",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "locale": "en-GB",
- "meta": {
- "billingId": "cus_HRkHymvJYVcAWp",
- "features": [
- "stock",
- "financials"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update a company
required | object | ||||||||||||||||
|
{- "data": {
- "attributes": {
- "label": "Company LTD",
- "accountId": "f326f347-820e-46ce-b883-3457af3d3eac",
- "catalogId": "67b60e97-0675-418c-8cc2-f8b10820ddef",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "locale": "en-GB",
- "meta": {
- "billingId": "cus_HRkHymvJYVcAWp",
- "features": [
- "stock",
- "financials"
]
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "label": "Company LTD",
- "accountId": "f326f347-820e-46ce-b883-3457af3d3eac",
- "catalogId": "67b60e97-0675-418c-8cc2-f8b10820ddef",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "locale": "en-GB",
- "meta": {
- "billingId": "cus_HRkHymvJYVcAWp",
- "features": [
- "stock",
- "financials"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete a company using its unique identifier.
id required | string <uuid> The identifier of the company to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Mappings allow you to control how attributes, actions and relationships appear on entity profiles. Mappings apply to an entity type category, which means that all entities belonging to subcategories will also inherit them. You can also restrict mappings to a certain role for more granularity in what users see.
Returns a list of entity type mappings.
include | string Enum: "entityType" "associationType" "attributeType" "eventType" "actionType" "role" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const entityTypeMappings = await bulbthings.entityTypeMappings.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "vehicle",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "privateForAccountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "roleId": "d053d12a-ead1-421d-b48c-51645efc54db",
- "type": "attributeType",
- "associationTypeId": "assetsAssignedToUsers",
- "attributeTypeId": "mileage",
- "eventTypeId": "overheatingEngine",
- "actionTypeId": "lockDoors",
- "isInherited": false,
- "meta": {
- "isReadOnly": true,
- "isHidden": true,
- "isPublic": true,
- "isRequired": false,
- "isImportant": true,
- "order": 1.5,
- "displayInPreview": true,
- "excludedCompanies": [
- "f74175c3-84cc-4151-aa0b-d0470de27243"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an entity type mapping
required | object | ||||||||||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "vehicle",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "privateForAccountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "roleId": "d053d12a-ead1-421d-b48c-51645efc54db",
- "type": "attributeType",
- "associationTypeId": "assetsAssignedToUsers",
- "attributeTypeId": "mileage",
- "eventTypeId": "overheatingEngine",
- "actionTypeId": "lockDoors",
- "isInherited": false,
- "meta": {
- "isReadOnly": true,
- "isHidden": true,
- "isPublic": true,
- "isRequired": false,
- "isImportant": true,
- "order": 1.5,
- "displayInPreview": true,
- "excludedCompanies": [
- "f74175c3-84cc-4151-aa0b-d0470de27243"
]
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "vehicle",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "privateForAccountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "roleId": "d053d12a-ead1-421d-b48c-51645efc54db",
- "type": "attributeType",
- "associationTypeId": "assetsAssignedToUsers",
- "attributeTypeId": "mileage",
- "eventTypeId": "overheatingEngine",
- "actionTypeId": "lockDoors",
- "isInherited": false,
- "meta": {
- "isReadOnly": true,
- "isHidden": true,
- "isPublic": true,
- "isRequired": false,
- "isImportant": true,
- "order": 1.5,
- "displayInPreview": true,
- "excludedCompanies": [
- "f74175c3-84cc-4151-aa0b-d0470de27243"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing entity type mapping using its unique identifier.
id required | string <uuid> The identifier of the entity type mapping to be retrieved. |
include | string Enum: "entityType" "associationType" "attributeType" "eventType" "actionType" "role" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "vehicle",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "privateForAccountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "roleId": "d053d12a-ead1-421d-b48c-51645efc54db",
- "type": "attributeType",
- "associationTypeId": "assetsAssignedToUsers",
- "attributeTypeId": "mileage",
- "eventTypeId": "overheatingEngine",
- "actionTypeId": "lockDoors",
- "isInherited": false,
- "meta": {
- "isReadOnly": true,
- "isHidden": true,
- "isPublic": true,
- "isRequired": false,
- "isImportant": true,
- "order": 1.5,
- "displayInPreview": true,
- "excludedCompanies": [
- "f74175c3-84cc-4151-aa0b-d0470de27243"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an entity type mapping
required | object | ||||||||||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "vehicle",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "privateForAccountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "roleId": "d053d12a-ead1-421d-b48c-51645efc54db",
- "type": "attributeType",
- "associationTypeId": "assetsAssignedToUsers",
- "attributeTypeId": "mileage",
- "eventTypeId": "overheatingEngine",
- "actionTypeId": "lockDoors",
- "isInherited": false,
- "meta": {
- "isReadOnly": true,
- "isHidden": true,
- "isPublic": true,
- "isRequired": false,
- "isImportant": true,
- "order": 1.5,
- "displayInPreview": true,
- "excludedCompanies": [
- "f74175c3-84cc-4151-aa0b-d0470de27243"
]
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "vehicle",
- "entityId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "privateForAccountId": "5ed01c63-b82e-4361-b2d8-97e19f800071",
- "roleId": "d053d12a-ead1-421d-b48c-51645efc54db",
- "type": "attributeType",
- "associationTypeId": "assetsAssignedToUsers",
- "attributeTypeId": "mileage",
- "eventTypeId": "overheatingEngine",
- "actionTypeId": "lockDoors",
- "isInherited": false,
- "meta": {
- "isReadOnly": true,
- "isHidden": true,
- "isPublic": true,
- "isRequired": false,
- "isImportant": true,
- "order": 1.5,
- "displayInPreview": true,
- "excludedCompanies": [
- "f74175c3-84cc-4151-aa0b-d0470de27243"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an entity type mapping using its unique identifier.
id required | string <uuid> The identifier of the entity type mapping to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Entity types are the different categories of entities. Each type can have a parent and will inherit attribute types, association types and action types from it.
Returns a list of entity types.
include | string Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const entityTypes = await bulbthings.entityTypes.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Car",
- "description": "A description of the entity type.",
- "parentId": "asset",
- "path": [
- "asset",
- "vehicle",
- "car"
], - "meta": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "isRootType": false,
- "isAbstract": true,
- "features": [
- "maintenance"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an entity type
required | object | ||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Car",
- "description": "A description of the entity type.",
- "parentId": "asset",
- "meta": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "isRootType": false,
- "isAbstract": true,
- "features": [
- "maintenance"
]
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Car",
- "description": "A description of the entity type.",
- "parentId": "asset",
- "path": [
- "asset",
- "vehicle",
- "car"
], - "meta": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "isRootType": false,
- "isAbstract": true,
- "features": [
- "maintenance"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing entity type using its unique identifier.
id required | string <uuid> The identifier of the entity type to be retrieved. |
include | string Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Car",
- "description": "A description of the entity type.",
- "parentId": "asset",
- "path": [
- "asset",
- "vehicle",
- "car"
], - "meta": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "isRootType": false,
- "isAbstract": true,
- "features": [
- "maintenance"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an entity type
required | object | ||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Car",
- "description": "A description of the entity type.",
- "parentId": "asset",
- "meta": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "isRootType": false,
- "isAbstract": true,
- "features": [
- "maintenance"
]
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Car",
- "description": "A description of the entity type.",
- "parentId": "asset",
- "path": [
- "asset",
- "vehicle",
- "car"
], - "meta": {
- "icon": {
- "fontAwesome": "lightbulb"
}, - "isRootType": false,
- "isAbstract": true,
- "features": [
- "maintenance"
]
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an entity type using its unique identifier.
id required | string <uuid> The identifier of the entity type to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Entities are the main building blocks of asset management. They represent assets, users, organisations or even activities such as maintenances. The API allows you to create, delete, and update your entities. You can retrieve individual entities as well as a list of all your entities.
Returns a list of entities.
include | string Enum: "company" "entityType" "account" "associations" "avatarFile" "files" "codes" Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |
const entities = await bulbthings.entities.findAll({ page: { limit: 10 } });
{- "data": [
- {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "asset",
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Tesla Model S",
- "attributes": {
- "vin": "5GHOU0NE5PQZ10G94",
- "license": "ZNUOFR2",
- "mileage": {
- "km": 52815.72
}, - "gpsPosition": {
- "lat": 39.759,
- "long": 132.005
}, - "fuelLevelWarning": true,
- "registrationDate": "2016-07-11T04:31:19.903Z"
}, - "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "meta": {
- "hasStock": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Create an entity
required | object | ||||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "asset",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Tesla Model S",
- "quantity": 1,
- "status": "active",
- "meta": {
- "hasStock": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "asset",
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Tesla Model S",
- "attributes": {
- "vin": "5GHOU0NE5PQZ10G94",
- "license": "ZNUOFR2",
- "mileage": {
- "km": 52815.72
}, - "gpsPosition": {
- "lat": 39.759,
- "long": 132.005
}, - "fuelLevelWarning": true,
- "registrationDate": "2016-07-11T04:31:19.903Z"
}, - "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "meta": {
- "hasStock": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing entity using its unique identifier.
id required | string <uuid> The identifier of the entity to be retrieved. |
include | string Enum: "company" "entityType" "account" "associations" "avatarFile" "files" "codes" Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "asset",
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Tesla Model S",
- "attributes": {
- "vin": "5GHOU0NE5PQZ10G94",
- "license": "ZNUOFR2",
- "mileage": {
- "km": 52815.72
}, - "gpsPosition": {
- "lat": 39.759,
- "long": 132.005
}, - "fuelLevelWarning": true,
- "registrationDate": "2016-07-11T04:31:19.903Z"
}, - "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "meta": {
- "hasStock": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
⚠️ The attributes
property of an Entity
object is read-only. To update attributes you need to create a Measurement
object.
required | object | ||||||||||||||||||
|
{- "data": {
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "asset",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Tesla Model S",
- "quantity": 1,
- "status": "active",
- "meta": {
- "hasStock": true
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "companyId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "entityTypeId": "asset",
- "accountId": "66734b19-c230-4e90-aac4-a54d936c00d3",
- "avatarFileId": "43734b19-c230-4e90-aac4-a54d936c00d3",
- "label": "Tesla Model S",
- "attributes": {
- "vin": "5GHOU0NE5PQZ10G94",
- "license": "ZNUOFR2",
- "mileage": {
- "km": 52815.72
}, - "gpsPosition": {
- "lat": 39.759,
- "long": 132.005
}, - "fuelLevelWarning": true,
- "registrationDate": "2016-07-11T04:31:19.903Z"
}, - "quantity": 1,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "meta": {
- "hasStock": true
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Delete an entity using its unique identifier.
id required | string <uuid> The identifier of the entity to be deleted. |
{- "errors": [
- {
- "id": "string",
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}, - "status": "string",
- "code": "string",
- "title": "string",
- "detail": "string",
- "source": {
- "pointer": "string",
- "parameter": "string"
}, - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "jsonapi": {
- "version": "string",
- "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
Create an environment
required | object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "config": {
- "title": "string",
- "webUrl": "string",
- "iosAppUrl": "string",
- "androidAppUrl": "string",
- "longTitle": "string",
- "logo": "string",
- "primaryColor": "string",
- "primaryColorVariant": "string",
- "secondaryColor": "string",
- "secondaryColorVariant": "string",
- "masterAccountLabel": "string",
- "emailTemplate": "string",
- "emailFromAddress": "string",
- "mobileBrowserDisclaimer": {
- "title": "string",
- "content": "string"
}, - "registrationInviteEmail": {
- "title": "string",
- "subtitle": "string",
- "button": "string",
- "content": "string"
}, - "features": [
- "essentials",
- "disable-onboarding"
], - "helpMenuOptions": {
- "supportEmail": "string",
- "hasChatSupport": true,
- "tutorialLink": "string"
}
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "config": {
- "title": "string",
- "webUrl": "string",
- "iosAppUrl": "string",
- "androidAppUrl": "string",
- "longTitle": "string",
- "logo": "string",
- "primaryColor": "string",
- "primaryColorVariant": "string",
- "secondaryColor": "string",
- "secondaryColorVariant": "string",
- "masterAccountLabel": "string",
- "emailTemplate": "string",
- "emailFromAddress": "string",
- "mobileBrowserDisclaimer": {
- "title": "string",
- "content": "string"
}, - "registrationInviteEmail": {
- "title": "string",
- "subtitle": "string",
- "button": "string",
- "content": "string"
}, - "features": [
- "essentials",
- "disable-onboarding"
], - "helpMenuOptions": {
- "supportEmail": "string",
- "hasChatSupport": true,
- "tutorialLink": "string"
}
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Retrieve the details of an existing environment using its unique identifier.
id required | string <uuid> The identifier of the environment to be retrieved. |
include | string Comma-separated list of related resources to include in the response, for example: |
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "config": {
- "title": "string",
- "webUrl": "string",
- "iosAppUrl": "string",
- "androidAppUrl": "string",
- "longTitle": "string",
- "logo": "string",
- "primaryColor": "string",
- "primaryColorVariant": "string",
- "secondaryColor": "string",
- "secondaryColorVariant": "string",
- "masterAccountLabel": "string",
- "emailTemplate": "string",
- "emailFromAddress": "string",
- "mobileBrowserDisclaimer": {
- "title": "string",
- "content": "string"
}, - "registrationInviteEmail": {
- "title": "string",
- "subtitle": "string",
- "button": "string",
- "content": "string"
}, - "features": [
- "essentials",
- "disable-onboarding"
], - "helpMenuOptions": {
- "supportEmail": "string",
- "hasChatSupport": true,
- "tutorialLink": "string"
}
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Update an environment
required | object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
{- "data": {
- "attributes": {
- "config": {
- "title": "string",
- "webUrl": "string",
- "iosAppUrl": "string",
- "androidAppUrl": "string",
- "longTitle": "string",
- "logo": "string",
- "primaryColor": "string",
- "primaryColorVariant": "string",
- "secondaryColor": "string",
- "secondaryColorVariant": "string",
- "masterAccountLabel": "string",
- "emailTemplate": "string",
- "emailFromAddress": "string",
- "mobileBrowserDisclaimer": {
- "title": "string",
- "content": "string"
}, - "registrationInviteEmail": {
- "title": "string",
- "subtitle": "string",
- "button": "string",
- "content": "string"
}, - "features": [
- "essentials",
- "disable-onboarding"
], - "helpMenuOptions": {
- "supportEmail": "string",
- "hasChatSupport": true,
- "tutorialLink": "string"
}
}
}
}
}
{- "data": {
- "type": "string",
- "id": "string",
- "attributes": {
- "config": {
- "title": "string",
- "webUrl": "string",
- "iosAppUrl": "string",
- "androidAppUrl": "string",
- "longTitle": "string",
- "logo": "string",
- "primaryColor": "string",
- "primaryColorVariant": "string",
- "secondaryColor": "string",
- "secondaryColorVariant": "string",
- "masterAccountLabel": "string",
- "emailTemplate": "string",
- "emailFromAddress": "string",
- "mobileBrowserDisclaimer": {
- "title": "string",
- "content": "string"
}, - "registrationInviteEmail": {
- "title": "string",
- "subtitle": "string",
- "button": "string",
- "content": "string"
}, - "features": [
- "essentials",
- "disable-onboarding"
], - "helpMenuOptions": {
- "supportEmail": "string",
- "hasChatSupport": true,
- "tutorialLink": "string"
}
}
}, - "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}, - "included": [
- {
- "type": "string",
- "id": "string",
- "attributes": { },
- "relationships": { },
- "links": {
- "property1": "../dictionary",
- "property2": "../dictionary"
}
}
], - "meta": {
- "offset": 0,
- "limit": 10,
- "total": 100
}, - "links": {
- "property1": "../dictionary",
- "property2": "../dictionary",
- "first": "../dictionary",
- "last": "../dictionary",
- "prev": "../dictionary",
- "next": "../dictionary"
}
}
Returns a list of event types.
include | string Comma-separated list of related resources to include in the response, for example: |
object Return only specific fields in the response on a per-resource basis. Must be a comma-separated list that refers to the name(s) of the fields to be returned. For example: | |
filter | string Filtering expression formatted according to Bulbthings' Resource Query Language. |
group | string Aggregating expression formatted according to Bulbthings' Resource Query Language. |
sort | string Sorting expression formatted according to Bulbthings' Resource Query Language. |
object Page limit and offset to use when returning the list of results. |