Skip to content

Preview what a request would send

Settings module

POST/aurora/previewaurora.preview

Reads the records a drafting or summary request names, as the request would (the caller's permissions, Restricted columns, masked values and excluded tables removed), and returns what would be sent. A gate readiness summary adds the project's gate criteria. No model is called and nothing is metered (A95). Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requires the capability home.dashboard.read.
  • OAuth scopes: home.
  • Send an Idempotency-Key header. A replay with the same key returns the original response.
  • Error statuses: 400, 401, 409, 422, 429. Errors are RFC 9457 problem details.

Request body: AuroraPreviewRequest

aurora.preview: AuroraPreviewRequest
FieldTypeRequiredDescription
feature"drafting" | "summaries"YesThe feature whose request is previewed.
kind"record_activity" | "project_week" | "gate_readiness"NoFor summaries, what is summarized.
subject_collectionstringNoFor summaries, the collection summarized.Constraints: pattern ^[a-z][a-z0-9-]*$
subject_idstring (uuid)NoIdentifier of the record or project summarized.
itemsarray of objectYesThe records the request names: a draft's context or a summary's items, read with the caller's permissions.
{
  "feature": "drafting",
  "kind": "gate_readiness",
  "subject_collection": "projects",
  "subject_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "items": [
    {
      "collection": "sops",
      "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
    }
  ]
}

Response 200: AuroraPreview

aurora.preview: AuroraPreview
FieldTypeRequiredDescription
recordsarray of AuroraPreviewRecordYesEach record the request names, in order, with the gate readiness a gate summary adds.
vocabulary_termsintegerYesVerbiage library terms a draft follows.Constraints: range 0 to any
{
  "records": [],
  "vocabulary_terms": 12
}

Code samples

curl -X POST "$XOS_BASE_URL/aurora/preview" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"feature":"drafting","kind":"gate_readiness","subject_collection":"projects","subject_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","items":[{"collection":"sops","id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}]}'
const { data } = await xos.aurora.preview({
    "feature": "drafting",
    "kind": "gate_readiness",
    "subject_collection": "projects",
    "subject_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
    "items": [
      {
        "collection": "sops",
        "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
      }
    ]
  });
response = xos.aurora.preview({"feature": "drafting", "kind": "gate_readiness", "subject_collection": "projects", "subject_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "items": [{"collection": "sops", "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}]})
xos aurora preview --data '{"feature":"drafting","kind":"gate_readiness","subject_collection":"projects","subject_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","items":[{"collection":"sops","id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}]}'