8 Feb 2021

API of Create Custom Attributes Definitions is now available

Default blog image

1

Follow @Xiaodong Liang

A little late announcement ? One more high-demanded API, create custom attributes definitions is now available! It is with the category of Document Management API. Last year, the API to get/set custom attribute values, get definitions were exposed. In the other blog, we introduced those APIs. As promised, now you can create the definitions.

The API reference can be found at:

https://forge.autodesk.com/en/docs/bim360/v1/reference/http/document-management-custom-attribute-definitions-POST/

The usage is straightforward. Get the folder urn, specify the payload of definition. Same to UI, three definition types:

  • String, the payload format is:
{
        "name": "my-column-text",
        "type": "string" 
}
  • Date, the payload format is:
{
        "name": "my-column-date",
        "type": "date" 
}
  • Array, the payload format must contain the array values.
{
        "name": "my-column-array",
        "type": "array",
        "arrayValues": [
          "created_by_api_value1",
          "created_by_api_value2",
          "created_by_api_value3"
        ]
}

In one call, only one definition can be created.

patch/delete definitions are on the way. Please watch the blog and change log to get latest information.

Related Article