Update Workflow Service
The Update Workflow to Service API endpoint is designed to update the downloaded time-stamp of a service. By specifying the workflow and service identifiers, this endpoint ensures that the service's versioning is effectively managed. Whilst its primary function is straightforward, updating the downloaded time plays a crucial role in maintaining accurate version control and aligning services with operational requirements. This simple yet essential feature supports smooth workflow integration and process consistency across an organisation.
Syntax: see 'CCall Structure
Type = 'PATCH'
'https://connect.cambrionix.com/api/workflows/v1/workflows/workflow-id/services/workflow-service-id' |
Output | Description |
---|---|
workflow-id | This is the id of the workflow as a unique 128-bit number |
workflow-service-id | This is the id of the workflow service as a unique 128-bit number |
In the data section of the request, leave this blank as the PATCH endpoint requires a body but no information is required for this endpoint.
{} |
Returns:
{ "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "organization": { "id": "organisation-id", "name": "organisation-name" }, "service": { "id": "workflow-service-id", "type": "service-type" }, "workflow": { "created": { "time": time, "user": { "id": "user-id", "detail": { "givenName": "given-name", "surname": "surname", "displayName": "display-name", "email": "account-email" } } }, "updated": { "time": time, "user": { "id": "user-id", "detail": { "givenName": "given-name", "surname": "surname", "displayName": "display-name", "email": "account-email" } } }, "ttl": time, "id": "workflow-id", "name": "workflow-name", "description": "workflow-description", "events": "string", "connections": [ { "id": "unique-connection-id", "type": "connection-type", "from": { "id": "unique-event-id" }, "to": { "id": "unique-event-id" } } ], "enabled": option-status, "published": option-status, "organization": { "id": "organisation-id", "name": "organisation-name" } }, "downloaded": { "time": time } } } } } |
Output | Description |
---|---|
time | The hub time, shown as an integer in ms |
user-id | This is the id of the user as a unique 128-bit number |
given-name | The first name of the user |
surname | The surname of the user |
display-name | The account name of the user |
account-email | The email of the user |
workflow-id | This is the id of the workflow as a unique 128-bit number |
workflow-name | This is the name of the workflow |
workflow-description | This is a description of the workflow |
unique-connection-id | This is the id of a unique connection as a unique 128-bit number |
connection-type | This is the type of connection e.g. success |
unique-event-id | This is the id of a unique event as a unique 128-bit number |
option-status | The status of the option (true/false) |
organisation-id | This is the id of the organisation as a unique 128-bit number |
organisation-name | This is the name of the organisation |
Example
curl -X 'PATCH' \
'https://connect.cambrionix.com/api/workflows/v1/workflows/00000000-0000-0000-0000-000000000002/services/00000000-0000-0000-0000-000000000003' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGcsEkywEG-STg' \
-H 'Content-Type: application/json' \
-d '{}'
Returns
{
"result": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"service": {
"id": "string",
"type": "workflow"
},
"workflow": {
"created": {
"time": 0,
"user": {
"id": "string",
"detail": {
"givenName": "string",
"surname": "string",
"displayName": "string",
"email": "string"
}
}
},
"updated": {
"time": 0,
"user": {
"id": "string",
"detail": {
"givenName": "string",
"surname": "string",
"displayName": "string",
"email": "string"
}
}
},
"ttl": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"events": "string",
"connections": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "success",
"from": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"to": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"enabled": true,
"published": true,
"organization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
},
"downloaded": {
"time": 0
}
}
}
Errors
If there is an error in the API method then JSON-RPC Error Object a will be returned