Time Series Data Delete Service

About Time Series Data Delete Service

The Time Series Data Delete service enables you to permanently delete time series data for a list of asset tags over a period of time. The time interval can range from as little as an hour to days, months, or even years.

Note: Your Time Series Data permissions must include access to the Delete Timeseries scope and to the asset tags that identify the data to be deleted.

Time Series Data Delete Service

The Time Series Data Delete service provides two endpoints: v2/time_series/delete and v2/time_series/delete/status.

Delete Time Series Data

The v2/time_series/delete endpoint enables you to delete time series data based on:
  • Start time,
  • End time,
  • List of asset tags, and
  • Data source.
Table 1. v2/time_series/delete
URIhttps://apm-timeseries-services-/v2/time_series/delete
MethodDELETE
Request JSON Fields
startTime
(required) The startTime field sets the beginning of the time range.

Supported formats include:

  • Unix Epoch time in milliseconds
  • ISO 8601 format — For example, yyyy-MM-dd'T'HH:mm:ss.SSS or yyyy-MM-dd'T'HH:mm:ss.SSS±hhmm

Start time must be the beginning of the hour; for example, 03:00:00.000. Any value other than zero for minutes, seconds, and milliseconds causes an error.

The minimum start time is 1945-07-03T04:00:00.000 GMT.

Note: On dedicated clusters, start time is not restricted to the beginning of the hour. Minutes, seconds, and milliseconds can be any values within the hour; for example, 03:12:22.072. The minimum start time on dedicated clusters is 1945-07-03T03:38:06.720 GMT.
endTime
(required) The endTime field sets the end of the time range.

Supported formats include:

  • Unix Epoch time in milliseconds
  • ISO 8601 format — For example, yyyy-MM-dd'T'HH:mm:ss.SSS or yyyy-MM-dd'T'HH:mm:ss.SSS±hhmm

End time must be the last millisecond of the hour; for example, 11:59:59.999. Any value other than 59:59.999 for minutes, seconds, and milliseconds causes an error.

The maximum end time is 2214-12-26T10:59:59.999 GMT.

Note: On dedicated clusters, the minutes, seconds, and milliseconds of end time are not restricted to 59:59.999. Any values within the hour can be used; for example, 09:33.152. The maximum end time on dedicated clusters is 2214-12-26T11:38:49.200 GMT.
tagList
(required) The tagList field is a comma-separated list of tag source keys. When querying time series data, you need to refer to a tag by the tag source key as configured in the asset model. All tags must be associated with corresponding GE Digital APM assets and ensure a time series link is provided for retrieving the time series data in the data store. The value of the time series link should match the raw tag name ingested in the Time Series Data data source. You can query as many as 100 tags per request. To add a tag to the asset model, refer to the Add a Tag Instance to an Instance documentation. To update the reserved attribute value, refer to the About Reserved Attributes for an Asset Instance documentation.
dataSource
(required) The dataSource field specifies the name of the data source. The default value is defined by the data source configuration.
Sample Request
DELETE /v2/time_series/delete HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: <Authorization>
Tenant: <tenant>
Host: api.example.com

{
  "startTime" : "2016-02-09T15:00:00.000Z",
  "endTime" : "2016-02-09T16:00:00.000Z",
  "tagList" : [ {
    "tagId" : "<Tag Id>",
    "attributes" : {
      "kay1" : [ "value1" ],
      "key2" : [ "value2" ]
    }
  },
  {
    "tagId" : "<Tag Id>",
    "attributes" : {
      "kay1" : [ "value1" ],
      "key2" : [ "value2" ]
    }
  } ],
"dataSource" : "<data source name>"
}
Response JSON Fields
apmCorrelationID
The apmCorrelationID field provides a standard-format UUID that you can use to check the status of the delete operation. See the Check the Status of a Delete Request section below.
statusCode
The value of the statusCode field is the HTTP response code. If the request is accepted, HTTP response code 202 Accepted is returned. Otherwise, statusCode contains an error response code.
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json

{
    "apmCorrelationId": "5623038b-e06f-44de-9d81-bc3336fb4b67",
    "statusCode": 202
}

Check the Status of a Delete Request

The v2/time_series/delete/status endpoint enables you to check the status of an HTTP DELETE request made with the Time Series Data Delete service.

Table 2. v2/time_series/delete/status
URIhttps://apm-timeseries-services-/v2/time_series/delete/status
MethodGET
Query Parameters
apmCorrelationID
(required) The apmCorrelationID field specifies a standard-format UUID generated by Time Series Data in response to a DELETE request. See the Delete Time Series Data section above.
Sample Request
https://apm-timeseries-services-/v2/time_series/delete/status?apmCorrelationID=5623038b-e06f-44de-9d81-bc3336fb4b67
Sample Response
{  
    "Job status": "Deletion completed without error",  
    "Submit date": "<Date submitted>",  
    "Completion date": "<Date completed>"
}

or

{ 
    "Job status": "Deletion failed", 
    "Submit date": "<Date submitted>", 
    "Error code": "<error code>", 
    "Error message": "<Message text>"
}