Publish Data Endpoint
This endpoint is called to update the data on a specific work item. Five variables are required, the ‘work_id’, the ‘update_id’ (a unique GUID) and ‘section_name’ where the data is stored, the ‘data_path’ and the desired ‘data_value’. The bearer token is also required in authorization.
Request:
PATCH https://api.idiana.io/api/v3/work/update/{work_id}/{update_id}
Data:
{
"operation": "set",
"jsonPath": {data_path},
"data": {
"value": {data_value}
},
"sectionName": {section_name},
"version": 1
}
Headers:
accept: "application/json, text/plain, */*"
authorization: bearer {bearer}
content-type: "application/json-path+json"
Example
Request:
curl -X 'PATCH' \
'https://api.idiana.io/api/v3/work/update/578bbf3f-3c45-4ad2-ad6c-8c11f06cd1f1/b176d0de-55e0-4629-bdff-ca773d57f034 \
-H 'accept: "application/json, text/plain, */*"
-H 'content-type: "application/json-patch+json"
Data:
{
"operation":"set",
"jsonPath":"$.somedatapath.value",
"data":{
"value":42
},
"sectionName":"sectionName/sectionName",
"version":1
}
Response:
{'id': '00000000-0000-0000-0000-000000000000', 'displayName': None, 'workCode': None, 'lastModified': '0001-01-01T00:00:00+00:00', 'data': {}, 'schemaVersion': 2, 'steps': [], 'activeStepId': '00000000-0000-0000-0000-000000000000', 'activeStepName': None, 'attachments': None, 'users': {}, 'company': None, 'flowId': '00000000-0000-0000-0000-000000000000', 'entityType': None, 'workVersion': 1, 'workRevision': 1, 'cardLayout': None, 'summaryCardLayout': None, 'createdBy': None, 'createdDate': '0001-01-01T00:00:00+00:00', 'activeLocks': [], 'chains': {}, 'firstStepData': None, 'dataMap': None, 'lastModifiedBy': '00000000-0000-0000-0000-000000000000', 'lastModifiedByUri': None, 'lastModifiedTicks': 638301878978491202, 'imageUrl': None, 'canEdit': False, 'workState': 0, 'workStateName': 'Ok', 'workStateColor': None, 'entityPath': None, 'productPath': None, 'flowType': None, 'flowOriginId': '00000000-0000-0000-0000-000000000000', 'printerContext': None, 'fields': None, 'date': '0001-01-01T00:00:00+00:00', 'canDelete': False, 'actions': None, 'relationships': None, 'currentState': '', 'previousState': '', 'workGridProperties': None, 'status': 'Created', 'roleName': None, 'rowId': None, 'expansionIndex': -1, 'flags': None, 'flowDisplayName': None}