eCMRhub.docs

Save a draft

POST
/rest/v1/rpc/save_draft

Creates a draft or saves a new revision. Send the revision you started from; a newer one on the server answers 409 VERSION_CONFLICT. The operation id makes a retry safe.

Authorization

apikeybearerAuth
headerapikey<token>
headerAuthorizationBearer <JWT>

Request Body

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

Response Body

Success

application/json
  1. response
[key: string]?unknown
Example Request
curl -X POST 'https://api-ecmr-dev.lucaspiera.com/rest/v1/rpc/save_draft' \  -H 'Content-Type: application/json' \  -d '{  "operation_id": "cb4ede3c-a5d1-45e3-a9d2-fe83accbce52",  "draft_id": "d998e5e8-954a-4a68-bb9e-7305e87278c0",  "base_revision": 0,  "data": {    "property1": null,    "property2": null  }}'
Example Response
{  "property1": null,  "property2": null}