eCMRhub.docs

Delete a draft

POST
/rest/v1/rpc/delete_draft

Deletes a draft that was not issued. An issued document cannot be deleted (409 DRAFT_ISSUED). May need a person's approval.

Authorization

apikeybearerAuth
headerapikey<token>
headerAuthorizationBearer <JWT>

Header Parameters

x-ecmr-approval?string

Id of the approval a person gave for exactly this request. Omitted: a connection that requires approval gets 428 APPROVAL_REQUIRED and the approval to ask for.

Formatuuid

Request Body

application/json
  1. body
operation_id*string
Formatuuid
draft_id*string
Formatuuid
base_revision*integer
Range0 <= value

Response Body

Success

application/json
  1. response
id*string
Formatuuid
deleted*boolean
Example Request
curl -X POST 'https://api-ecmr-dev.lucaspiera.com/rest/v1/rpc/delete_draft' \  -H 'Content-Type: application/json' \  -d '{  "operation_id": "cb4ede3c-a5d1-45e3-a9d2-fe83accbce52",  "draft_id": "d998e5e8-954a-4a68-bb9e-7305e87278c0",  "base_revision": 0}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "deleted": true}