Update a PCO’s Custom Attributes
This tutorial demonstrates how to update a PCO’s custom attributes.
Before You Begin
- Register an app
- Acquire a 3-legged OAuth token with
data:readanddata:writescopes. - Verify that you have access to the relevant BIM 360 account and BIM 360 project.
- Retrieve the project ID for your project. To obtain a project ID, use GET projects.
- Create PCOs and add custom attributes in the BIM 360 Project Admin module. See the `Help documentation <https://help.autodesk.com/view/BIM360D/ENU/?guid=BIM360D_Cost_Management_about_cost_management_html> for more information.
Step 1: Get a PCO in BIM 360 Cost Management
Find the ID of the PCO you want to update by calling GET change-orders/:changeOrder. In this example, assume that the container ID is e94b9bc8-1775-4d76-9b1d-c613e120ccff. Add the include=attributes query string parameter to include the custom attributes in the response.
Request
Response
Note the PCO ID (results[0].id) in the first part of the response - 55254a50-44d9-11e9-99d7-79aa05d3109e, and the custom attribute definition ID (9240df60-61b5-11e8-9d14-7f96380922a0).
Step 2: Update the Custom Attribute Value
Use the container ID (e94b9bc8-1775-4d76-9b1d-c613e120ccff), PCO ID (55254a50-44d9-11e9-99d7-79aa05d3109e), and custom attribute definition ID (9240df60-61b5-11e8-9d14-7f96380922a0) to call POST property-values:batch-update to update the custom attribute value.
Request
For change orders including PCOs, the associationType is FormInstance, and the PCO ID is associationId. For other modules, the associationType is the module name, for example, Budget, or Contract, and the associationId is always the empty UUID 00000000-0000-0000-0000-000000000000.
Response
You get the full content of the updated custom attribute value.
Multiple custom attributes can be updated altogether.
Congratulations! You have successfully updated the PCO’s custom attribute value.
Imported from the Autodesk Platform Services documentation: https://aps.autodesk.com/en/docs/acc/v1/tutorials/cost/cost-update-custom-attribute.