OrdinateDB

Documentation

product Pre-releaseunwritten sections are marked
POST/v1/annotations/{id}/redact

Redact annotation content

operation ID: post_v1_annotations_by_id_redact

Overview

Redact annotation content. Annotations attach human context and evidence to operational data without changing the recorded series values.

When to use it

  • Use it when an application needs to redact annotation content.
  • Use it when an operator needs to add, find, revise, or preserve context around an event or time range.

Quick example

Set the base URL and replace generated identifiers or credentials with values from your installation.

cURL

curl --request POST \
  --url "$ORDINATE_URL/v1/annotations/00000000-0000-4000-8000-000000000001/redact" \
  --header "Authorization: Bearer $ORDINATE_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "reason": "string",
    "scope": "body"
  }'

Expected output · 200

New redaction version

Example 200 output

{
  "version": 0
}

The cURL request sends the smallest contract-derived body and asks OrdinateDB to redact annotation content. The documented 200 response is new redaction version.

How it works

Annotations are versioned records. Content can be revised or redacted while the API retains the documented history and attachment relationships.

Reference

Required capability
redact
Authorization scope
handler-resolved target

Parameters

NameInRequiredType and constraints
idpathyes
stringformat: uuid

Request body

application/json

authorobjectoptional
unknown fields rejected
kindstringrequired
principalstringrequired
unknown fields rejected
reasonstringrequired
scopestringrequired
unknown fields rejected

Example request body

{
  "reason": "string",
  "scope": "body"
}

Responses

200New redaction version

application/json

versionintegerrequired
format: int64
unknown fields rejected

Example 200 output

{
  "version": 0
}
400Malformed redaction

application/json

ErrorEnvelope
codestringrequired
correlation_idstringrequired
format: uuid
detailsobjectoptional
errorstringrequired

Example 400 output

{
  "error": "string",
  "code": "account-sealed",
  "correlation_id": "00000000-0000-4000-8000-000000000001"
}
401Authentication required

application/json

ErrorEnvelope
codestringrequired
correlation_idstringrequired
format: uuid
detailsobjectoptional
errorstringrequired

Example 401 output

{
  "error": "string",
  "code": "account-sealed",
  "correlation_id": "00000000-0000-4000-8000-000000000001"
}
403redact capability is not granted

application/json

ErrorEnvelope
codestringrequired
correlation_idstringrequired
format: uuid
detailsobjectoptional
errorstringrequired

Example 403 output

{
  "error": "string",
  "code": "account-sealed",
  "correlation_id": "00000000-0000-4000-8000-000000000001"
}
404Annotation not found

application/json

ErrorEnvelope
codestringrequired
correlation_idstringrequired
format: uuid
detailsobjectoptional
errorstringrequired

Example 404 output

{
  "error": "string",
  "code": "account-sealed",
  "correlation_id": "00000000-0000-4000-8000-000000000001"
}
503Model database is not configured or unavailable

application/json

ErrorEnvelope
codestringrequired
correlation_idstringrequired
format: uuid
detailsobjectoptional
errorstringrequired

Example 503 output

{
  "error": "string",
  "code": "account-sealed",
  "correlation_id": "00000000-0000-4000-8000-000000000001"
}

Code examples

These examples are generated from the source contract. Replace the base URL, credentials, identifiers, and minimal generated values for your instance.

JavaScript

const ordinateUrl = "http://localhost:8080";
const token = "<bearer-token>";

const response = await fetch(`${ordinateUrl}/v1/annotations/00000000-0000-4000-8000-000000000001/redact`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${token}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "reason": "string",
  "scope": "body"
})
});

if (!response.ok) {
  throw new Error(`OrdinateDB returned ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);