> For the complete documentation index, see [llms.txt](https://docs.stellic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stellic.com/stellic-partner-api/audits/check-an-audit-s-publishing-status.md).

# Check an audit's publishing status

Use this endpoint after [`POST /audits/{audit_id}/publish`](/stellic-partner-api/audits/publish-a-draft-audit.md) to know when the background work has finished and which step is still running. Send the ID you published; it accepts an audit in any status. Student progress reflects the new requirements once `publishing_in_progress` is `false`.

## GET /audits/{audit\_id}/publishing\_status

>

```json
{"openapi":"3.0.0","info":{"title":"Stellic for Developers","version":"1.0"},"tags":[{"name":"Audits","description":"Read, draft, edit, and publish an audit's requirement tree. Edits go to a draft; publishing recomputes student progress in the background."}],"servers":[{"url":"https://{institution}.stellic.com/partnerapi/v1","variables":{"institution":{"default":"{institution}","description":"Your institution's Stellic subdomain: the part before `.stellic.com` in the URL you use to sign in. It becomes the host in every request, as in `https://{institution}.stellic.com/partnerapi/v1/...`. Replace the `{institution}` placeholder with your subdomain before sending."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Personal Access Token issued by your Stellic integration partner. Send it as `Authorization: Bearer <token>` on every request. One token per institution; do not share across environments."}},"schemas":{"PublishingStatusResponse":{"allOf":[{"$ref":"#/components/schemas/AuditSummary"},{"type":"object","properties":{"background_tasks":{"type":"array","description":"The tasks queued by the most recent publish. Empty for an audit that has never been published.","items":{"$ref":"#/components/schemas/PublishingBackgroundTask"}},"publishing_in_progress":{"type":"boolean","description":"`true` from the moment publish returns until every background task is `completed`."}}}]},"AuditSummary":{"type":"object","properties":{"id":{"type":"integer","description":"Internal database ID of the audit. Use it on the `/audits/` endpoints."},"name":{"type":"string","description":"Audit name. A draft created from a published audit carries the published name plus a `-draft` suffix until it is published."},"status":{"type":"string","description":"One of `draft`, `review`, `published`. Other statuses exist internally but are not served.","enum":["draft","review","published"]}}},"PublishingBackgroundTask":{"type":"object","properties":{"name":{"type":"string","description":"One of `update_req_tree`, `update_course_req`, `build_audits_and_update_index`."},"description":{"type":"string"},"status":{"type":"string","description":"One of `not_started`, `started`, `completed`, `failed`, `partial_success`.","enum":["not_started","started","completed","failed","partial_success"]},"start_time":{"type":"string","nullable":true},"end_time":{"type":"string","nullable":true},"task_id":{"type":"string","nullable":true,"description":"Identifier of the background job. Useful when reporting a stuck publish to your integration partner."},"created_time":{"type":"string","nullable":true},"reapplied":{"type":"boolean","description":"`true` when the platform re-ran this task after a failure."}}}}},"paths":{"/audits/{audit_id}/publishing_status":{"get":{"tags":["Audits"],"parameters":[{"name":"audit_id","in":"path","required":true,"description":"Internal numeric ID of the audit you published (the same ID you sent to `POST /audits/{audit_id}/publish`). Any status is accepted.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Current state of the audit and of the background tasks its last publish queued. `publishing_in_progress` stays `true` until every task in `background_tasks` reaches `completed`. Task `status` is one of `not_started`, `started`, `completed`, `failed`, `partial_success`. Timestamps are `YYYY-MM-DD HH:MM:SS.ffffff+00:00` strings or `null`. `background_tasks` is empty for an audit that has never been published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishingStatusResponse"}}}},"401":{"description":"Missing or invalid Bearer token.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"403":{"description":"Your IP address isn't on the allowlist for this endpoint. Contact Stellic to add it; the response includes the `client_ip` Stellic saw. Also returned, with only `error` set, when the audit belongs to a compliance requirement (`Compliance requirements are not available via the API.`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"client_ip":{"type":"string"}}}}}},"404":{"description":"No audit has this ID: `{\"detail\": \"No Audit matches the given query.\"}`.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}}}}}
```

#### Notes

* **Wait on `publishing_in_progress`.** It turns `false` only when every task in `background_tasks` is `completed`. A `failed` or `partial_success` task keeps it `true`. Stellic retries a failed task once (`reapplied: true`). If it stays failed, contact Stellic with the audit `id` and the task's `task_id`.
* **A failed student-records task blocks the next publish.** Until `update_req_tree` completes, publishing a new draft of this audit returns a 400.
* **`background_tasks` is empty until the audit is published.**
* **Poll every 10 to 30 seconds.** Large programs can take minutes.
* **An unknown ID returns a 404,** `{"detail": "No Audit matches the given query."}`. A compliance requirement's audit returns a 403.

#### Related APIs

* [`POST /audits/{audit_id}/publish`](/stellic-partner-api/audits/publish-a-draft-audit.md) to start a publish.
* [`POST /audits/{audit_id}/draft`](/stellic-partner-api/audits/get-or-create-a-draft-of-a-published-audit.md) to start the next round of edits.
