Skip to main content
POST
/
v2
/
traces
/
{trace_id}
/
spans
/
{span_id}
/
annotation
Annotate a span
curl --request POST \
  --url https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "annotations": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "metadata": {
    "identity_id": "<string>"
  }
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    annotations: [{key: '<string>', value: '<string>'}],
    metadata: {identity_id: '<string>'}
  })
};

fetch('https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.orq.ai/v2/traces/{trace_id}/spans/{span_id}/annotation"

payload = {
    "annotations": [
        {
            "key": "<string>",
            "value": "<string>"
        }
    ],
    "metadata": { "identity_id": "<string>" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

trace_id
string
required

Unique identifier of the trace

span_id
string
required

Unique identifier of the span

Body

application/json
annotations
object[]
required
Required array length: 1 - 10 elements
metadata
object

Response

200

Span annotated