In this article
Bulk Register Timeseries IDs from Template
This endpoint is used to bulk register timeseries definition from a template definition. The template dictates which org to assign the new timeseries to as well as what metrics should be defined. Only 100 Ids can be registered at a time. Timeseries ID’s must be supplied by the user. User must have at leat read permissions on the template they intend to use. The newly created timeseries defintions will give owner permissions to the requestor and not copy the template permissions.
URL
https://{{HOST}}/timeseries/timeseries/bulkregister
Method
POST
Required IMS Scopes
- Read
- Write
Required ACL Permissions
- owner
- admin
- readwrite
- readonly
Versions Supported
- 2.0 (Default)
- 2.1
URL Query Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| v optional |
Version of the API to use | v=2.0 | string |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authentication | Bearer {access_token} required |
Retrieve access token |
| Content-Type | application/json required |
Description |
Request Body Params
| Type | Name | Description | Schema |
|---|---|---|---|
| string | templateTimeseriesId | ID of the timeseries to use as a template | |
| array | timeseriesIdsToRegister | IDs of new timeseries to register (limit=100) |
Example
Request
curl -X POST
'https://{{HOST}}/timeseries/timeseries/bulkregister'
-H 'Authorization: Bearer ACCESS_TOKEN'
-H 'Content-Type: application/json'
-d '{
"templateTimeseriesId" : "{{timeseries_id}}",
"timeseriesIdsToRegister" :
[
"007fd5f9-8498-4133-becc-286f4f9237ee"
]
}'
Response
[
{
"timeseriesId": "271b9b52-35a9-4041-9a5e-519f4d6e0b99",
"orgId": "jci.com",
"timeseriesType": "baseline",
"dag": [
{
"metric": "QuarterHourlyAverage",
"operations": [
{
"operation": "Aggregate",
"input": [
{
"timeseriesId": "271b9b52-35a9-4041-9a5e-519f4d6e0b99",
"metric": "Raw"
}
],
"output": [
{
"timeseriesId": "271b9b52-35a9-4041-9a5e-519f4d6e0b99",
"metric": "QuarterHourlyAverage"
}
],
"parameters": {
"function": "Average",
"interval": "QuarterHourly"
}
}
],
"processingType": "stream",
"dataType": "double",
"validateInputData": false
}
],
"ctsTriggers": [],
"status": "active"
}
]
Errors
| Error | Description |
|---|---|
| 400 | One or more timeseries ids already exists |
| 403 | User does not have access to template timeseries |
Response Body Parameters
| Name | Description | Schema |
|---|---|---|
| timeseriesId | ID of timeseries | string |
| orgId deprecated |
ID of organization | string |
| timeseriesType | type of timeseries | string |
| dag.metric | type of metric | string |
| dag.operations.operation | type of operation | string |
| dag.operations.input.timeseriesId | ID of input timeseries | string |
| dag.operations.input.metric | metric type of input timeseries | string |
| dag.operations.output.timeseriesId | ID of output timeseries | string |
| dag.operations.output.metric | metric type of output timeseries | string |
| dag.operations.parameters.function | function type of operation | string |
| dag.operations.parameters.interval | interval of operation | string |
| dag.processingType | procesing type of metric | string |
| dag.dataType | data type of metric | string |
| dag.validateInputData | if input data will be validated | boolean |
| ctstrigers | array | |
| status | status of timeseries | string |