autodesk-forgeautodesk-data-managementautodesk-construction-cloud

How can i check the review status of a model in ACC using ACC APIs?


I want to check the review status of a file or model using the ACC APIs.

Below i show a image of autodesk, source: https://help.autodesk.com/view/DOCS/ENU/?guid=BIM360D_Document_Management_About_Reviews_Reviews_FAQs_Reference_html

enter image description here

I tried with the GET projects/:project_id/items/:item_id Endpoint , with the parameter marked below in yellow, but even when the review status is Approved in ACC, the parameter "reviewStatus" is "NOT_IN_REVIEW".

enter image description here

I don't know where find this status.


Solution

  • We apologize for the inconvenience, but it's not recommended to use the reviewState returned in the Data Management API to check a document's review status. This method only works for PDF sheet extraction status.

    Instead, we can leverage the power of Reviews API, which is currently under private beta. Please follow this blog post to join the private beta program: https://aps.autodesk.com/blog/acc-reviews-api-call-beta-testing-participation

    Once you get the private beta access, you can get that info via this API call:

    curl -v 'https://developer.api.autodesk.com/construction/reviews/v1/projects/{{project_id_without_b_dot}}/versions/{{ecoded_file_version_urn}}/approval-status' \
    -h 'Authorization: Bearer eyJhbGciOi...mt-uiCw'
    

    Example response:

    {
        "results": [
            {
                "approvalStatus": {
                    "id": "f44e623d-f04f-47fe-8195-efc43d1d985b",
                    "label": "Approved",
                    "value": "APPROVED"
                },
                "review": {
                    "id": "a83b5e8e-d304-45c2-bb01-142fc22235c2",
                    "sequenceId": 8,
                    "status": "CLOSED"
                }
            },
        ],
        "pagination": {
            "totalResults": 1,
            "offset": 0,
            "limit": 50,
            "nextUrl": ""
        }
    }
    

    Yet, we must call the following API to get review details:

    curl -v 'https://developer.api.autodesk.com/construction/reviews/v1/projects/{{project_id_without_b_dot}}/reviews/{reviewId}' \
    -h 'Authorization: Bearer eyJhbGciOi...mt-uiCw'