Working with Attributes
Attributes are metadata that can be assigned to time series. They allow time series to be categorized, filtered, and grouped.
Listing All Attributes
Section titled “Listing All Attributes”GET /repositories/{repository}/attributes| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
name |
string |
— | Filter by attribute name. | |
description |
string |
— | Filter by description. | |
type |
string |
— | Filter by attribute type. | |
order |
string |
— | Sort results. Same behavior as for time series search results. | |
Range |
string |
— | Paginate results with the Range request header (e.g., attribute=0-49). Same behavior as for time series search results. |
Creating an Attribute
Section titled “Creating an Attribute”Request
POST /repositories/{repository}/attributesRequest Body
{ "name": "Location", "description": "Geographic location of the measurement", "type": { "identifier": 2, "storageInformation": { "repositoryName": "TSM_SQLSERVER" } }}Loading an Attribute
Section titled “Loading an Attribute”GET /repositories/{repository}/attributes/{attribute}In the endpoint GET /repositories/{repository}/attributes/{attribute}, the {attribute} path segment accepts the attribute name or an ID prefixed with id:.
Equivalent attribute loading requests
Section titled “ Equivalent attribute loading requests”Given the following attribute:
{ "identifier": 1012, "storageInformation": { "repositoryName": "TSM_SQLSERVER" }, "value": { "name": "MyAttribute", "description": "", "type": { "identifier": 4, "storageInformation": { "repositoryName": "TSM_SQLSERVER" } } }}Loading it by name:
GET /repositories/TSM_SQLSERVER/attributes/MyAttributeLoading it by ID:
GET /repositories/TSM_SQLSERVER/attributes/id:1012Updating an Attribute
Section titled “Updating an Attribute”PUT /repositories/{repository}/attributes/{attribute}This request uses the same body as the Attribute Creation.
Deleting an Attribute
Section titled “Deleting an Attribute”DELETE /repositories/{repository}/attributes/{attribute}To force deletion even when the attribute is still assigned to time series:
DELETE /repositories/{repository}/attributes/{attribute}?force=trueWas this page helpful?Thanks for your feedback!