[
{
"name": "Section1",
"description": "",
"type": "FIELDCONTAINER",
"displayOrder": 1,
"collapsed": false,
"sectionType": "FIELDCONTAINER",
"fields": [
{
"link": "/api/v3/workspaces/64/views/1/fields/FPL_ITEMS_AND_BOMS",
"urn": "urn:adsk.plm:tenant.workspace.view.field:TENANT_NAME.64.1.FPL_ITEMS_AND_BOMS",
"title": "FPL Items And BOMs ",
"deleted": false,
"type": "FIELD"
},
{
"link": "/api/v3/workspaces/64/views/1/fields/FPL_ITEMS_AND_BOMS_DESC",
"urn": "urn:adsk.plm:tenant.workspace.view.field:TENANT_NAME.64.1.FPL_ITEMS_AND_BOMS_DESC",
"title": "FPL Items And BOMs Desc",
"deleted": false,
"type": "FIELD"
},
{
"link": "/api/v3/workspaces/64/views/1/fields/FLOAT",
"urn": "urn:adsk.plm:tenant.workspace.view.field:TENANT_NAME.64.1.FLOAT",
"title": "Float",
"deleted": false,
"type": "FIELD"
},
{
"link": "/api/v3/workspaces/64/views/1/fields/BOM_UOM",
"urn": "urn:adsk.plm:tenant.workspace.view.field:TENANT_NAME.64.1.BOM_UOM",
"title": "BOM UOM",
"deleted": false,
"type": "FIELD"
}
],
"sectionLocked": false,
"pimSection": false,
"__self__": "/api/v3/workspaces/64/sections/250",
"urn": "urn:adsk.plm:tenant.workspace.section:TENANT_NAME.64.250",
"matrices": [
]
}
]
I have four fields in this workspace, in a single section.
With this information, you need to structure the payload for a POST the following way:
POST https://TENANT_NAME.autodeskplm.com/api/v3/workspaces/:wsId:/items
Accept: application/json
Authorization: Bearer BEARER_TOKEN
And, with that, you can pass the following body (again, just a sample):
{
"sections": [
{
"link": "/api/v3/workspaces/64/sections/250",
"fields": [
{
"__self__": "/api/v3/workspaces/64/views/1/fields/FPL_ITEMS_AND_BOMS",
"value": {
"title": "4",
"link": "4"
},
"title": "FPL Items And BOMs "
},
{
"__self__": "/api/v3/workspaces/64/views/1/fields/FPL_ITEMS_AND_BOMS_DESC",
"value": {
"link": "/api/v3/workspaces/57/items/7830",
"urn": "urn:adsk.plm:tenant.workspace.item:TENANT_NAME.57.7830",
"title": "NU000133 - Manual Creation of Item to be revised1",
"deleted": false,
"version": "[REV:sA]"
},
"title": "FPL Items And BOMs Desc"
},
{
"__self__": "/api/v3/workspaces/64/views/1/fields/FLOAT",
"value": "123",
"title": "Float"
},
{
"__self__": "/api/v3/workspaces/64/views/1/fields/BOM_UOM",
"value": {
"link": "/api/v3/lookups/BOM-UOM/options/1",
"title": "Each"
},
"title": "BOM UOM"
}
]
}
]
}
While it might look a bit daunting, the payload is structured in a way that you pass a list of fields inside the section(s) with their values. If you need to know about validators and other info for the fields, you can do the following before building the payload:
GET https://TENANT_NAME.autodeskplm.com/api/v3/workspaces/:wsView:/views/1/fields
These are just general pointers, but I hope you can get the idea. Some people find it easier to open the Network panel in Chrome/Firefox, and when saving the information, look at the network traffic for requests. It's basically the same you'd be doing in an external app.
Hope this helps.
- Giliar