Skip to content

Attributes

The Attributes API enables the management of computed attributes, including creation, retrieval, updates, and deletion of attribute records.

Data Schema

Field Type Description
id integer Attribute ID
description string Attribute description
attribute string Attribute name
expression string Computation expression
type string Attribute type

Fetch Attributes

Retrieves computed attributes based on specified parameters.

🛠 Endpoint:

GET /attributes/computed

Authorization:

  • Requires Basic Authentication (basicAuth)

Query Parameters:

Parameter Type Description
all boolean Fetch all attributes (admin/manager only)
userId integer Filter by user ID (for own attributes)
deviceId integer Filter by device ID (requires access)
groupId integer Filter by group ID (requires access)
refresh boolean Force refresh of attributes data

cURL Request:

curl -u username:password -X GET "https://itsochvts.com/api/attributes/computed" \
-H "Content-Type: application/json" \
-H "Cookie: JSESSIONID=your_session_id"
200 OK - Response Body
[
  {
    "id": 0,
    "description": "string",
    "attribute": "string",
    "expression": "string",
    "type": "string"
  }
]

Create Attribute

Creates a new computed attribute.

🛠 Endpoint:

POST /attributes/computed

Authorization:

  • Requires Basic Authentication (basicAuth)

Request Body:

{
  "id": 0,
  "description": "string",
  "attribute": "string",
  "expression": "string",
  "type": "string"
}

cURL Request:

curl -u username:password -X POST "https://itsochvts.com/api/attributes/computed" \
-H "Content-Type: application/json" \
-H "Cookie: JSESSIONID=your_session_id" \
-d '{
  "id": 0,
  "description": "string",
  "attribute": "string",
  "expression": "string",
  "type": "string"
}'
200 OK - Response Body
{
  "id": 0,
  "description": "string",
  "attribute": "string",
  "expression": "string",
  "type": "string"
}

Update Attribute

Updates an existing computed attribute.

🛠 Endpoint:

PUT /attributes/computed/{id}

Authorization:

  • Requires Basic Authentication (basicAuth)

Path Parameters:

Parameter Type Description
id integer ID of attribute to update

Request Body:

{
  "id": 0,
  "description": "string",
  "attribute": "string",
  "expression": "string",
  "type": "string"
}

cURL Request:

curl -u username:password -X PUT "https://itsochvts.com/api/attributes/computed/0" \
-H "Content-Type: application/json" \
-H "Cookie: JSESSIONID=your_session_id" \
-d '{
  "id": 0,
  "description": "string",
  "attribute": "string",
  "expression": "string",
  "type": "string"
}'
200 OK - Response Body
{
  "id": 0,
  "description": "string",
  "attribute": "string",
  "expression": "string",
  "type": "string"
}

Delete Attribute

Deletes a computed attribute.

🛠 Endpoint:

DELETE /attributes/computed/{id}

Authorization:

  • Requires Basic Authentication (basicAuth)

Path Parameters:

Parameter Type Description
id integer ID of attribute to delete

cURL Request:

curl -u username:password -X DELETE "https://itsochvts.com/api/attributes/computed/0" \
-H "Content-Type: application/json" \
-H "Cookie: JSESSIONID=your_session_id"
204 No Content