API referenceDrafts
Issue a draft
POST
Issues one immutable document from a complete draft revision. Issuing the same draft again returns the same document. May need a person's approval.
apikeybearerAuthheader
apikey<token>header
AuthorizationBearer <JWT>x-ecmr-approval?stringId 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.
Format
uuidapplication/json- body
draftId*stringFormat
uuidrevision*integerRange
1 <= valueSuccess
application/json- response
state is a server-derived value from the type state machine. It is never writable directly.
id*stringFormat
uuidtenantId*stringFormat
uuidtype*reference*stringLength
1 <= length <= 200currentVersionId*stringFormat
uuidstate*stringLength
1 <= length <= 200createdAt*stringFormat
date-timecurl -X POST 'https://api-ecmr-dev.lucaspiera.com/functions/v1/publish' \ -H 'Content-Type: application/json' \ -d '{ "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488", "revision": 1}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0", "type": { "name": "string", "version": "string" }, "reference": "string", "currentVersionId": "7d3c5b66-ff6d-477a-9982-96f00519947f", "state": "string", "createdAt": "2019-08-24T14:15:22Z"}