Ingestion events

Ingestion events

This section describes the ingestion event operations for Rackspace Metrics.

Send an annotation

POST /{version}/{tenantId}/events

Submits an annotation to the Rackspace Metrics database.

This table shows the possible response codes for this operation:

Response CodeNameDescription
200SuccessThis status code is returned when the annotations have been successfully uploaded to the database.
401UnauthorizedThe request header has an invalid authentication token.
415Unsupported Media TypeThe Content-Type request header contains media type that is unsupported. Supported media type: application/json
500Internal Server ErrorThe system encountered an unexpected condition.
503Service unavailableThe system is experiencing heavy load or another system failure.

Request

This table shows the URI parameters for the request:

NameTypeDescription
{tenantId}String (Required)Specifies a subscriber to the Rackspace Metrics service.
X-Auth-TokenString (Required)Specifies the authentication token for the tenant.

This table shows the body parameters for the request:

NameTypeDescription
whatString (Required)Provides a description of the purpose of the annotation.
whenLong (Required)Specifies a timestamp in epoch time in milliseconds.
tagsString (Optional)Specifies a tag for the annotation, which is can be used for filtering.
dataString (Optional)Specifies additional data for the annotation.

Example Send an annotation: JSON request

curl https://global.metrics-ingest.api.rackspacecloud.com/v2.0/tenant-id/events -X POST -d
'{
"what": "app03 deployment",
"when": 1452105873000,
"tags": "deployment",
"data": "deploying prod"
}'
-H 'X-Auth-Token: $AUTH_TOKEN'
-H 'Content-Type: application/json'
-H 'Accept: application/json'

Response

This operation does not return a response body if successful (status code 200). If a validation error occured (status code 207 or 400), the response contains the errors encountered.

Note

The value for the when field is the epoch time in milliseconds. To convert the date strings to and from epoch time, you can use the date method on a Macintosh computer or use an epoch conversion tool by visiting http://www.epochconverter.com/.