0

When I make my call, I use the URI formula https://developer.api.autodesk.com/construction/admin/v1/projects/:projectId/users/:userId, where projectId is the ID of the project (gotten from GET accounts/{accountId}/projects) and userId is the user ID (gotten from GET projects/{projectId}/users). For the user ID, I have tried the id, autodeskId, and analyticsId and all of them produce the same result. I have also tried to use three different user IDs (from all three previously mentioned fields as well) and I always get the same 404 Not Found error.

For the user ID, I have tried the id, autodeskId, and analyticsId and all of them produce the same result. I have also tried to use three different user IDs (from all three previously mentioned fields as well) and I always get the same 404 Not Found error. All of this has been tried on an ACC project, not BIM360. Here is an example of one of the versions I tried.

Dim page As String = "https://developer.api.autodesk.com/construction/admin/v1/folders/" & AccProjectID & "/users/" & AccAccountID

        Dim ErrorDetected As Boolean = False

        Try
            Using client As HttpClient = New HttpClient()
                'Read access token as bearer and make the Content Type "application/json"
                client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", AccAccessToken)
                client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json"))
                client.DefaultRequestHeaders.Add("User-Id", AdminAccAccountID)

                'Send the info and get status response back
                Dim RestContent As New Http.StringContent(JsonData, Encoding.UTF8, "application/json")
                Dim RestResponse As Http.HttpResponseMessage = Await client.PostAsync(page, RestContent)
                Dim Result = RestResponse.StatusCode.ToString
            End Using

        Catch ex As Exception
            ErrorDetected = True
        End Try

1 Answer 1

0

The URI https://developer.api.autodesk.com/construction/admin/v1/projects/:projectId/users/:userId should be only available for GET and PATCH request, not for POST, that should be the issue.

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.