This section describes the ingestion event operations for Rackspace Metrics.
POST /{version}/{tenantId}/events
Submits an annotation to the Rackspace Metrics database.
This table shows the possible response codes for this operation:
Response Code | Name | Description |
---|---|---|
200 | Success | This status code is returned when the annotations have been successfully uploaded to the database. |
401 | Unauthorized | The request header has an invalid authentication token. |
415 | Unsupported Media Type | The Content-Type request header contains media type that is unsupported. Supported media type: application/json |
500 | Internal Server Error | The system encountered an unexpected condition. |
503 | Service unavailable | The system is experiencing heavy load or another system failure. |
This table shows the URI parameters for the request:
Name | Type | Description |
---|---|---|
{tenantId} | String (Required) | Specifies a subscriber to the Rackspace Metrics service. |
X-Auth-Token | String (Required) | Specifies the authentication token for the tenant. |
This table shows the body parameters for the request:
Name | Type | Description |
---|---|---|
what | String (Required) | Provides a description of the purpose of the annotation. |
when | Long (Required) | Specifies a timestamp in epoch time in milliseconds. |
tags | String (Optional) | Specifies a tag for the annotation, which is can be used for filtering. |
data | String (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'
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/.