Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

How to use Alteryx Gallery API: POST /v1/workflows/{appId}/jobs/

deanthoms
6 - Meteoroid

Hi Everyone,

 

I have been testing using the Alteryx Gallery APIs and have hit a wall. 

 

I am successfully able to hit the "GET/v1/workflows/{appId}/questions" endpoint to return the questions that my app id requests. However, I keep getting a HTTP response code of "500" when I attempt to use the "POST /v1/workflows/{appId}/jobs/" endpoint.

 

I am sure that I must be doing something dumb, but for the life of me cannot figure out what that is. Perhaps I am not passing the json body to the POST API correctly?

 

Below are screenshots of the response for the GET request (to illustrate the questions from the app), and my current structure for the POST API's json body. 

 

Can anyone steer me in the right direction?

 

 

GET Response:

deanthoms_0-1614694553350.png

....

deanthoms_1-1614694577571.png

 

 

POST API Json Body:

{
"questions": [
{
"name": "Drop Down (13)",
"value": "624",
"name": "Text Box (15)",
"value": "2"
}
],
"priority": "Low"
}

 

 

5 REPLIES 5
deanthoms
6 - Meteoroid

I finally got it to work! Turns out you don't need to pass questions or priority... The syntax below worked for me.

 

{
"name": "Drop Down (13)",
"value": "572",
"name": "Text Box (15)",
"value": "5"
}

 

Now to figure out why the response body of the results only displays the headers and not the data...

fmvizcaino
17 - Castor
17 - Castor

Great to have your response here.

It will help a lot of users struggling with the API calls.

 

I would suggest you to mark your answer as correct.

 

Best,

Fernando Vizcaino

pringleb
7 - Meteor

How did you get the oauth_signature?

RuHRoW
6 - Meteoroid

you've probably moved on by now but I had the same question so posting link here for solution I found:
Alteryx Private Gallery API Runner

great macro to use out of the box or you can just take out the part for the oauth_signature

pringleb
7 - Meteor

I'll take a look at it.  I'm not sure we can use it yet because our Gallery is on an old version, but hopeful this will work when we upgrade.

 

Thanks!