REST call action menu item broken with latest shotgun server update

Hi,

I recently updated to 8.18.0.6402 and it seems to have broken our action menu items that call to a webserver.
for instance I have a test AMI that has “http://our.webserver:9999/” under the URL field.
Calling this for a selected entity will yield this 400 error:

Bad Request
The browser (or proxy) sent a request that this server could not understand.

Up until the update, this worked fine. Any idea what could have changed? Is the URL signature different now?

Thanks!

Anyone?

Hi @StarkRavenSimone

Sorry for the late response. Do you use AMI in URL field? Do you use local install?

Thanks

Loney

Hi Loney,

I’m using an http address in the url field like: “http://our.webserver:9999/”

Calling this for a selected entity will yield this 400 error:

Bad Request

The browser (or proxy) sent a request that this server could not understand.

Hi @StarkRavenSimone,

I don’t know the real error message. 400 error normally is Request Parameters invalid. Could you get more debug information? What rest api url and what parameters used?

thanks

Loney

for all intents and purposes the url is nearly identical in form to the one provided in the url field of the AMI. This is basically done as a “hello world” test. I can enter the url directly in my browser and it works as expected.

URL in browser is HTTP Get. It doesn’t have data or you put all data as url parameter. In code, it could be HTTP Post which will include data. Could you check the code to confirm if it is HTTP Get or Post?

Thanks

Loney

Its a Get call.

Let me describe it again. Please correct me if there is anything wrong.

  1. You put your flask server url (http://our.webserver:9999) as AMI in Shotgun.
  2. When you click the AMI, it send request to your flask server.
  3. In flask server, there is some call shotgun rest api.

Where do you get 400 error? Step 2 or 3? If it happens on 3, what shotgun rest api you are using?

All correct except that the flask server in this example is not calling to the shotgun api in any way. We do have one AMI in production that does some interaction with the API but for the sake of testing this example call is literally just drawing “hello world” in an html page. I get the 400 error after I click the AMI and it opens up a new browser tab.

Something went wrong with the way the REST action menu items work between 8.11 and and 8.18 because it definitely worked before we upgraded.

When you click AMI menu, it is HTTP post. Shotgun will post data to your server other than get. If the server just a hello world html. Do you mind to share the code to me? I could have a test.

Loney

As a matter of fact, I got it to work. I think somehow “light payload” had gotten checked and since the back-end code was expecting a key from that payload it threw a not obvious error.
Sorry for all the misdirection and thanks for your help!

Great! You know where to find us when you have any question. :slight_smile: