Create a service annotation

POST /api/apm/services/{serviceName}/annotation

Create a new annotation for a specific service.

Path parameters

application/json; Elastic-Api-Version=2023-10-31

Body Required

Responses

  • 200 application/json; Elastic-Api-Version=2023-10-31

    Annotation created successfully

    Hide response attributes Show response attributes object
POST /api/apm/services/{serviceName}/annotation
curl \
 -X POST https://localhost:5601/api/apm/services/{serviceName}/annotation \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
Request examples
{
  "@timestamp": "string",
  "message": "string",
  "service": {
    "environment": "string",
    "version": "string"
  },
  "tags": [
    "string"
  ]
}
Response examples (200)
{
  "_id": "string",
  "_index": "string",
  "_source": {
    "@timestamp": "string",
    "annotation": "string",
    "event": {
      "created": "string"
    },
    "message": "string",
    "service": {
      "environment": "string",
      "name": "string",
      "version": "string"
    },
    "tags": [
      "string"
    ]
  }
}