Preview what a request would send
Módulo Settings
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`.
- Requiere la capacidad home.dashboard.read.
- Alcances de OAuth: home.
- Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
- Estados de error: 400, 401, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Cuerpo de la solicitud: AuroraPreviewRequest
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| feature | "drafting" | "summaries" | Sí | The feature whose request is previewed. |
| kind | "record_activity" | "project_week" | "gate_readiness" | No | For summaries, what is summarized. |
| subject_collection | string | No | For summaries, the collection summarized.Restricciones: pattern ^[a-z][a-z0-9-]*$ |
| subject_id | string (uuid) | No | Identifier of the record or project summarized. |
| items | array of object | Sí | The 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"
}
]
}Respuesta 200: AuroraPreview
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| records | array of AuroraPreviewRecord | Sí | Each record the request names, in order, with the gate readiness a gate summary adds. |
| vocabulary_terms | integer | Sí | Verbiage library terms a draft follows.Restricciones: range 0 to any |
{
"records": [],
"vocabulary_terms": 12
}Ejemplos de código
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"}]}'