0

I am following the instructions from the docs here: https://aps.autodesk.com/en/docs/bim360/v1/tutorials/rfis/retrieve-rfis-container-id/

I am using a 3 legged token created using the official SDK:

const clientId = AutodeskService.getClientId();
const clientSecret = AutodeskService.getClientSecret();
const redirectUri = AutodeskService.getRedirectUri();
if (!clientId || !clientSecret) {
  throw new Error('Autodesk client ID or secret is not set. Please configure it in the environment variables.');
}
const authenticationClient = new AuthenticationClient({ sdkManager });
const threeLeggedCredentials = await authenticationClient.getThreeLeggedToken(clientId, code, redirectUri, {
  clientSecret,
});

I have been able to query the /projects endpoint using a variety of methods

curl -X GET \
  'https://developer.api.autodesk.com/project/v1/hubs/<hubId>/projects?filter%5Battributes.name%5D=Daniels%20Demo%20Project' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json'

The api responds Correctly but without the rfiContainerId:

{
    "jsonapi":
    {
        "version": "1.0"
    },
    "links":
    {
        "self":
        {
            "href": "https://developer.api.autodesk.com/project/v1/hubs/b.a728fd9f-ea99-4216-b9dd-f32fec673e9b/projects?filter%5Battributes.name%5D=Daniels%20Demo%20Project"
        }
    },
    "data":
    [
        {
            "type": "projects",
            "id": "b.f172a231-e7cd-4ecd-a0ae-ec9f83663252",
            "attributes":
            {
                "name": "Daniels Demo Project",
                "scopes":
                [
                    "b360project.f172a231-e7cd-4ecd-a0ae-ec9f83663252",
                    "O2tenant.62703643"
                ],
                "extension":
                {
                    "type": "projects:autodesk.bim360:Project",
                    "version": "1.0",
                    "schema":
                    {
                        "href": "https://developer.api.autodesk.com/schema/v1/versions/projects:autodesk.bim360:Project-1.0"
                    },
                    "data":
                    {
                        "projectType": "ACC"
                    }
                }
            },
            "links":
            {
                "self":
                {
                    "href": "https://developer.api.autodesk.com/project/v1/hubs/b.a728fd9f-ea99-4216-b9dd-f32fec673e9b/projects/b.f172a231-e7cd-4ecd-a0ae-ec9f83663252"
                },
                "webView":
                {
                    "href": "https://acc.autodesk.com/docs/files/projects/f172a231-e7cd-4ecd-a0ae-ec9f83663252"
                }
            },
            "relationships":
            {
                "hub":
                {
                    "data":
                    {
                        "type": "hubs",
                        "id": "b.a728fd9f-ea99-4216-b9dd-f32fec673e9b"
                    },
                    "links":
                    {
                        "related":
                        {
                            "href": "https://developer.api.autodesk.com/project/v1/hubs/b.a728fd9f-ea99-4216-b9dd-f32fec673e9b"
                        }
                    }
                },
                "rootFolder":
                {
                    "data":
                    {
                        "type": "folders",
                        "id": "urn:adsk.wipprod:fs.folder:co.Iy1dzrnGR3Sp847-h6MAlA"
                    },
                    "meta":
                    {
                        "link":
                        {
                            "href": "https://developer.api.autodesk.com/data/v1/projects/b.f172a231-e7cd-4ecd-a0ae-ec9f83663252/folders/urn:adsk.wipprod:fs.folder:co.Iy1dzrnGR3Sp847-h6MAlA"
                        }
                    }
                },
                "topFolders":
                {
                    "links":
                    {
                        "related":
                        {
                            "href": "https://developer.api.autodesk.com/project/v1/hubs/b.a728fd9f-ea99-4216-b9dd-f32fec673e9b/projects/b.f172a231-e7cd-4ecd-a0ae-ec9f83663252/topFolders"
                        }
                    }
                }
            }
        }
    ]
}

When requesting the code, I use the scopes "data:read account:read". I don't believe scopes are used for product specific access: https://aps.autodesk.com/en/docs/oauth/v2/developers_guide/scopes/

The appId I am using has all the required APIs enabled: enter image description here

I have created multiple projects but all resulted in the same response. RFIs are enabled on the project and I created a few demo RFIs.

This appears to be a change, because just a few months ago I was able to query the same endpoint and it returned the containerIds that I need:

"rfis":
{
    "data":
    {
        "type": "rfisContainerId",
        "id": "6928ef9b-ff11-4b32-a94c-b4eac7c577ae"
    },
    "meta":
    {
        "link":
        {
            "href": "https://developer.api.autodesk.com/bim360/rfis/v1/containers/6928ef9b-ff11-4b32-a94c-b4eac7c577ae/rfis"
        }
    }
},

I expect the project response to contain the rfiContainerId which is necessary to query RFIS:

"rfis":
{
    "data":
    {
        "type": "rfisContainerId",
        "id": "6928ef9b-ff11-4b32-a94c-b4eac7c577ae"
    },
    "meta":
    {
        "link":
        {
            "href": "https://developer.api.autodesk.com/bim360/rfis/v1/containers/6928ef9b-ff11-4b32-a94c-b4eac7c577ae/rfis"
        }
    }
},
3
  • Unfortunately, this confirmed to be a recent issue, the team is working on the fix.. Commented Jun 30 at 21:01
  • Hi Daniel, could you retry? Our engineering team deployed a hotfix just now. Commented Jul 1 at 10:48
  • Thankyou @ZhongWu and Eason Kang, the API is now returning the expected response. I never thought I would get a response from Autodesk engineers, so I'm very grateful. Commented Jul 3 at 0:56

1 Answer 1

0

It looked like a temporary glitch in the Autodesk hubs api. I am able to successfully query the data now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.