Attributes
Attribute management.
The Attributes Model
An attribute is represented by the following schema:
Scheme
- Name
id- Type
- integer
- Description
- Name
description- Type
- string
- Description
- Name
attribute- Type
- string
- Description
- Name
expression- Type
- string
- Description
- Name
type- Type
- string
- Description
- String | Number | Boolean
GET/attributes/computed
Retrieve a list of attributes
Without any params, returns a list of Attributes the user has access to
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Query Parameters
- Name
all- Type
- boolean
- Description
- Can only be used by administrators or managers to retrieve all
Geofenceobjects.
- Name
userId- Type
- integer
- Description
- Standard users can use this only with their own
userId
- Name
deviceId- Type
- integer
- Description
- Standard users can use this only with their own
deviceIds they have access to
- Name
groupId- Type
- integer
- Description
- Standard users can use this only with their own
groupIds they have access to
- Name
refresh- Type
- boolean
- Description
- Name
limit- Type
- integer
- Description
- Limit the number of returned results
- Name
offset- Type
- integer
- Description
- Offset for pagination
- Name
keyword- Type
- string
- Description
- Search keyword filter
Responses
- Name
200- Type
- success
- Description
- Name
application/json- Type
- response schema
- Description
Arrayof Attribute
Request
GET
/attributes/computedcurl --location 'https://gw.onemap8.com/api/attributes/computed?all=<boolean>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
[
{
"id": 0,
"description": "string",
"attribute": "string",
"expression": "string",
"type": "string"
},
{
...
}
]
POST/attributes/computed
Create an attribute
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Request body schema
- Name
application/json- Type
- schema required
- Description
Body schema
- Name
id- Type
- integer
- Description
- Name
description- Type
- string
- Description
- Name
attribute- Type
- string
- Description
- Name
expression- Type
- string
- Description
- Name
type- Type
- string
- Description
- String | Number | Boolean
Responses
- Name
200- Type
- success
- Description
- Name
application/json- Type
- response schema
- Description
Request
POST
/attributes/computedcurl --location 'https://gw.onemap8.com/api/attributes/computed' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": "<integer>",
"description": "<string>",
"attribute": "<string>",
"expression": "<string>",
"type": "<string>"
}'
Response
{
"id": 0,
"description": "string",
"attribute": "string",
"expression": "string",
"type": "string"
}
PUT/attributes/computed/{id}
Update an attribute
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Request body schema
- Name
application/json- Type
- schema required
- Description
Body schema
- Name
id- Type
- integer
- Description
- Name
description- Type
- string
- Description
- Name
attribute- Type
- string
- Description
- Name
expression- Type
- string
- Description
- Name
type- Type
- string
- Description
- String | Number | Boolean
Responses
- Name
200- Type
- success
- Description
- Name
application/json- Type
- response schema
- Description
Request
PUT
/attributes/computed/{id}curl --location --request PUT 'https://gw.onemap8.com/api/attributes/computed/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": "<integer>",
"description": "<string>",
"attribute": "<string>",
"expression": "<string>",
"type": "<string>"
}'
Response
{
"id": 0,
"description": "string",
"attribute": "string",
"expression": "string",
"type": "string"
}
DELETE/attributes/computed/{id}
Delete an attribute
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Responses
- Name
204- Type
- success
- Description
- No content
Request
DELETE
/attributes/computed/{id}curl --location --request DELETE 'https://gw.onemap8.com/api/attributes/computed/<integer>' \
--header 'Authorization: Basic {your_access_token}'
Response
No content
POST/attributes/computed/test
Evaluate a Computed Attribute against the latest Device Position
Admin only. Returns the computed value without persisting the attribute.
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Query Parameters
- Name
deviceId- Type
- integer required
- Description
Request body schema
- Name
application/json- Type
- schema
- Description
Body schema
- Name
id- Type
- integer
- Description
- Unique computed attribute identifier
- Name
description- Type
- string
- Description
- Human readable name of the attribute
- Name
attribute- Type
- string
- Description
- Attribute name used in expressions
- Name
expression- Type
- string
- Description
- Expression that defines how the attribute is calculated
- Name
type- Type
- string
- Description
- String|Number|Boolean
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- OK
- Name
204- Type
- success
- Description
- Computation produced no value
- Name
400- Type
- error
- Description
- Bad request
- Name
401- Type
- error
- Description
- Unauthorized
Request
POST
/attributes/computed/testcurl --location --request POST 'https://gw.onemap8.com/api/attributes/computed/test?deviceId=<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": 0,
"description": "<string>",
"attribute": "<string>",
"expression": "<string>",
"type": "<string>"
}'
Response
OK
GET/attributes/computed/{id}
Fetch an Attribute
Authorizations
BasicAuth or ApiKey
- Name
BasicAuth- Type
- scheme
- Description
- HTTP Authorization Scheme: basic
- Name
ApiKey- Type
- scheme
- Description
- HTTP Authorization Scheme: bearer
Path parameters
- Name
id- Type
- integer required
- Description
Response schema
- Name
application/json- Type
- schema
- Description
Responses
- Name
200- Type
- success
- Description
- Attribute
- Name
401- Type
- error
- Description
- Unauthorized
- Name
404- Type
- error
- Description
- Not found
Request
GET
/attributes/computed/{id}curl --location 'https://gw.onemap8.com/api/attributes/computed/<integer>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'
Response
{
"id": 0,
"description": "<string>",
"attribute": "<string>",
"expression": "<string>",
"type": "<string>"
}