OpenFolia

Withdraw a release

POST
/releases/{releaseId}/withdraw

Marks the release withdrawn, with who, when and the reason (required), a release.withdraw audit event and a release.withdrawn outbox row, in one transaction. Nothing else changes: the tag stays (tags are immutable) and reads at it keep working, but the release no longer counts as a module’s latest release (meta.status.release), and every reader sees it withdrawn, with the reason, in GET /releases and GET /changelog. It cannot be undone. Needs the release.publish permission in a role whose scope covers the release’s product in every language, module type and audience, and content.read.

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Path Parameters

releaseId*string

The release’s ID (a UUID). One that names no release, malformed or not, is 404.

Formatuuid

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Request Body

application/vnd.api+json
  1. body
meta*

Response Body

application/vnd.api+json
  1. response
data*
Example Request
curl -X POST 'http://localhost:3000/releases/497f6eca-6276-4993-bfeb-53cbbbba6f08/withdraw' \  -H 'Content-Type: application/vnd.api+json' \  -d '{  "meta": {    "reason": "string"  }}'
Example Response
{  "data": {    "type": "Release",    "id": "string",    "attributes": {      "product": "string",      "productFacet": "string",      "revision": "string",      "tag": "string",      "tagObject": "string",      "commit": "string",      "notes": "string",      "notesByLanguage": {        "property1": "string",        "property2": "string"      },      "major": true,      "publishedBy": {        "kind": "user",        "id": "string"      },      "publishedAt": "2019-08-24T14:15:22Z",      "withdrawal": {        "by": {          "kind": "user",          "id": "string"        },        "at": "2019-08-24T14:15:22Z",        "reason": "string"      }    }  }}