Update Asset Endpoint
This endpoint is called to update values in a selected asset. It involves a process of three sequential requests, being:
- Create new asset update item
- Publish data endpoint
- Submit data endpoint
With this process you enable editing in an existing asset, update the value(s) of your desired field(s), and submit this to save the new values into your ecosystem
Using the Get flow data endpoint gives you access to all the variables you need to fill in the variables required. Click here to learn how to use the Get flow data endpoint.
Create new asset update item
Request:
POST https://api.idiana.io/api/v3/entity/{entity_id}/startHeaders:
accept: "application/json, text/plain, */*"
authorization: bearer {bearer}Publish work data
Request:
PATCH https://api.idiana.io/api/v3/work/update/{entity_id}/{update_id}Data:
{
"operation": "set",
"jsonPath": "{datapath}",
"data": {
"value": "{data_value}"
},
"sectionName": "{section_name}",
"version": 1
}Headers:
accept: "application/json, text/plain, */*"
authorization: bearer {bearer}
content type: "application/json-patch+json"Submit work data
Request:
POST https://api.idiana.io/api/v3/flow/submit/{work_id}?eventName=untitledstep/generated-{section_id}/submituntitledstep/generated-{section_id}Data:
Headers:
accept: "application/json, text/plain, */*"
authorization: bearer {bearer}
content-type: "application/json"Example
Create new asset update item
Request:
curl -X 'POST' \
'https://api.idiana.io/api/v3/entity/d909e1c1-7363-5f6f-923e-07e2bc214967/start' \
-H accept: "application/json, text/plain, */*"Response:
Publish work data:
Request:
curl -X 'PATCH' \
'https://api.idiana.io/api/v3/work/update/25a9dbb5-0ea6-4030-ae95-7e8d17cb1149/99a71265-2c12-47ef-b2a7-a45355d1b616' \
-H accept: "application/json, text/plain, */*"
-H content type: "application/json-patch+json"Data:
{
"operation": "set",
"jsonPath": "$.details.details.name",
"data": {
"value": "Susan1"
},
"sectionName": "tutorials/entity/entity/generated-6e43874a-ee07-4fc7-94d8-0f1644b98f9d/untitledstep__generated-4abc62f3-3e74-4524-818e-7be6a019dfdb/untitledtask__generated-962a3fd8-83b3-4ece-924d-d2fd2d610ca6",
"version": 1
}Response:
Submit data:
Request:
curl -X 'POST' \
'https://api.idiana.io/api/v3/flow/submit/25a9dbb5-0ea6-4030-ae95-7e8d17cb1149?eventName=untitledstep/generated-4abc62f3-3e74-4524-818e-7be6a019dfdb/submituntitledstep/generated-4abc62f3-3e74-4524-818e-7be6a019dfdb' \
-H accept: "application/json, text/plain, */*"
-H content-type: "application/json"Data:
Response: