Create Asset Endpoint
This endpoint is called to create a new asset in a given asset type. To create a new asset, it involves a process of three sequential requests, being:
- Create new asset
- Publish data endpoint
- Submit data endpoint
With this process you create a new asset, fill in the value(s) in your desired field(s), and submit this to save the values and asset 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
Request:
POST https://api.idiana.io/api/v3/entity/create/{flow_origin_id}Headers:
accept: "application/json, text/plain, */*"
authorization: bearer {bearer}Publish work data
Request:
PATCH https://api.idiana.io/api/v3/work/update/{entity_id}/{section_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 asset
Request:
curl -X 'POST' \
'https://api.idiana.io/api/v3/entity/create/d4bde1bd-fff8-4d7e-9481-ed0b16d71282' \
-H accept: "application/json, text/plain, */*"Response:
Publish data
Request:
curl -X 'PATCH' \
'https://api.idiana.io/api/v3/work/update/d87330b2-e6da-4e77-8768-df5d79a8bb3c/f1a759c7-aa03-4260-86fa-95e48fa80ecc' \
-H accept: "application/json, text/plain, */*"
-H content-type: "application/json-patch+json"Data:
Response:
Submit data
Request:
curl -X 'POST' \
'https://api.idiana.io/api/v3/flow/submit/d87330b2-e6da-4e77-8768-df5d79a8bb3c?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: