TomTomTom
TomTomTom

Reputation: 58

Forge ARKit API - can't GET manifest after POST job

I've been working on Forge AR kit for several days. What I'm trying to do is to display and interact with APS(Forge) model in Unity. I followed this blog post step-by-step and refer to this document and meet some problems. Here's the details of my api calls (I test all api calls with Postman).

Get Token

I get token via Authentication API v2:

curl --location --request POST 'https://developer.api.autodesk.com/authentication/v2/token' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {My_Base_Code}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=data:read data:write data:create data:search bucket:create bucket:read bucket:update bucket:delete account:read account:write code:all'

Create Scene

curl --location --request PUT 'https://developer-api-beta.autodesk.io/arkit/v1/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVzdGJ1Y2tldF8yMDIzMDUyMi90ZXN0MS5ydnQ/scenes/test-scene' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {My_Token}' \
--data '{
    "prj":{
        "urn":"dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVzdGJ1Y2tldF8yMDIzMDUyMi90ZXN0MS5ydnQ"
    }
}'

I got following response with status 200:

{
    "prj": {
        "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVzdGJ1Y2tldF8yMDIzMDUyMi90ZXN0MS5ydnQ"
    }
}

When I call GET /arkit/v1/{urn}/scenes I received test-scene in the response.

Create Scene Assets

curl --location --request POST 'developer-api-beta.autodesk.io/modelderivative/v2/arkit/job' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {My_Token}' \
--data '{
  "input": {
    "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVzdGJ1Y2tldF8yMDIzMDUyMi90ZXN0MS5ydnQ"
  },
  "output": {
    "destination": {
      "region": "US"
    },
    "formats": [
      {
        "type": "arkit",
        "scene": "test-scene"
      }
    ]
  }
}'

I got status 200 with empty response body.

Check Scene Processing Status

curl --location --request GET 'developer-api-beta.autodesk.io/modelderivative/v2/arkit/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVzdGJ1Y2tldF8yMDIzMDUyMi90ZXN0MS5ydnQ/manifest' \
--header 'Authorization: Bearer {My_Token}' \
--header 'Content-Type: application/json'

I always get response with status 404 here. Is it because it's still processing? or did I miss something? Any help is appreciated!

Upvotes: 0

Views: 59

Answers (1)

Petr Broz
Petr Broz

Reputation: 9942

While your question seems to have been answered by @BugFinder already, let me add a couple more details on the project itself:

The Forge AR/VR Toolkit used to be an experimental project, and I'm afraid it's not being developed anymore. If you're interested in bringing your APS models into environments other than the Viewer, I'd suggest that you take a look at the forge-convert-utils project instead. It's a Node.js module and a CLI tool that converts SVF models from Autodesk Platform Services into the popular, open 3D exchange format glTF 2.0. The glTF content can then be easily loaded into Unity, Unreal Engine, and other environments. The benefits of using the forge-convert-utils approach are:

  • you have more control over the processing pipeline (i.e., you're not risking that a 3rd party pipeline will get sunset)
  • you're future-proofing your solution as the Model Derivative service is planning to add glTF as native output in the future

Upvotes: 1

Related Questions