0

I'm setting up an automated system to convert and visualise 3D models through the Forge APIs. The actual conversion and visualisation is pretty straight forward, but keeping track of the process is not as simple.

Autodesk recommends using webhooks, but documentation of this is quite sparse.

My main problem is that I'm unable to debug the webhooks. I get no indication to weather a hook has been posted or not.

I've read all of the similar questions here on stack overflow, in the FAQ and in the documentation (among others: Why is webhook workflow not taken into consideration when creating modelderivative job?).

I'm processing a conversion for a model with 'modelId'. And want to listen to the events 'extraction.updated'.

I'm registering a hook with a POST like this:

{
    "callbackUrl":"https://my-service.com/callbacks/modelId",
    "scope":{
        "workflow":"modelId"
    }
}

My job is registered like this:

{
    "input":{
        "urn":"{theUrnForTheModel}"
    },
    "output":{
        "formats":[
            {
                "type":"svf",
                "views":[
                    "3d",
                    "2d"
                ]
            }
        ]
    },
    "misc":{
        "workflow":"modelId"
    }
}

From what I can see the hooks never fire. I don't get any errors or indications that something fail on my server.

Am I required to post hookAttribute when creating the hook? This is documented as not mandatory. Am I required to have a fixes endpoint on my end, or is it ok to include the specific model id in the url?

j_sve
  • 29
  • 4
  • Did you ever get this to work? - I have the same problem right now - I don't receive any webhook callback - I even tried adding a requestbin endpoint as well, and it does not receive anything either – Søren Pedersen Aug 29 '19 at 12:41

1 Answers1

0

A few points to check:

  1. What's the response on POST hook? Should return 201
  2. Which verb does your /callbacks/modelId accepts? Should accept POST
  3. Have you tried extraction.finished event?
Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
  • 1. I think the documentation suggested 202 or 2XX. I've tried 200, 201 and 202. 2. It accepts POST 3. I have not. Shouldn't both fire? – j_sve May 16 '19 at 12:44
  • as for #1, I’m asking the if the hook is created successfully. About #3, if you can try it too... – Augusto Goncalves May 16 '19 at 13:59
  • I understand! For #1: yes the hooks are created successfully. I can list them through the GET on / hooks endpoint. I'll look into #3! Do you have any information about using different endpoints for each model? Does the hook need to be established minutes / hours befor the conversion starts, or is it ok to create it just seconds before like I am doing? Do you have any information about the hookAttribute? Is it true that it is not mandatory? – j_sve May 16 '19 at 14:10
  • the hook can be created right before, no problem. `hootAttribute` is optional. If you can list the hooks, then they are created. – Augusto Goncalves May 16 '19 at 14:13