Search code examples
autodesk-forgeautodesk-bim360

BIM 360 issue "Assigned To"


How can I change "Assigned To" from specific user to unspecified? I used {name: '-'} mainly for my UI which is obviously not enough to be used as input, perhaps {id: '', name: '-'} or {id: null, name: '-'}?


Solution

  • Update 2023-Jun

    BIM360 issues API just released v2 API. Now it supports filtering assignedTo, assignedToType and displayId (in v1 called identifier). See here for the announcement: https://aps.autodesk.com/blog/bim-360-issues-version-2-api-released-1

    • Find the unassigned issues
    curl --location --request GET 'https://developer.api.autodesk.com/issues/v2/containers/:issueContainerId/issues?filter[assignedTo]=null&filter[assignedToType]=null' \
    --header 'Authorization: Bearer '
    
    • Find an issue by its displayId (in v1 called identifier)
    curl --location --request GET 'https://developer.api.autodesk.com/issues/v2/containers/:issueContainerId/issues?filter[displayId]=14' \
    --header 'Authorization: Bearer '
    

    =========

    We can specify null values to both assigned_to and assigned_to_type to remove the user from the issue and make it be unspecified.

    curl --location --request PATCH 'https://developer.api.autodesk.com/issues/v1/containers/:issueContainerId/quality-issues/:issueId' \
    --header 'Authorization: Bearer ' \
    --header 'Content-Type: application/vnd.api+json' \
    --data-raw '{
        "data": {
            "type": "quality_issues",
            "id": "{{issueId}}",
            "attributes": {
                "assigned_to": null,
                "assigned_to_type": null
            }
        }
    }'
    

    API ref: https://forge.autodesk.com/en/docs/bim360/v1/reference/http/field-issues-:id-PATCH/