Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

Exception during API migration implementation

Highlighted
7 - Meteor

I am working Alteryx API implementations using Python. i have executed all API endpoints(getting questions, executing the workflow, getting results of workflow, etc.) with the help of interactive api doc and Python.

 

I have stuck while Publishing workflow using API into another gallery(workflow migration). i am facing an issue - 

{"data":null,"exceptionName":"BadRequestException","innerExceptionMessage":"","message":"Must specify subscription key (oauth_consumer_key parameter)."}'.

 

Earlier while i was executing other endpoints Alteryx never asked me for subscription key.

For publishing, i am using,

  • .yxzp extended workflow as a example
  • URL - gallery/api/admin/v1/workflows/
  • admin API key & secret are used
  • passing file to upload in the files attribute in the requests.post method (e.g resp = requests.post(url, files ={'logo': file_to_publish}, headers = {
    'Content-Type': 'multipart/form-data','Accept': 'application/xml'}))
  • payload is file_to_publish

@JeffreyP and others Please help me to execute Publish endpoint? Could you please provide the artifacts(code/workflow) of the working prototype if you have?

 

Your reply is much appreciable.

Highlighted
Alteryx Partner

You need to be passing the "oauth_consumer_key"

 

See this post for a reference...https://community.alteryx.com/t5/Dev-Space/Server-2018-4-POST-api-admin-v1-workflows-UnknownError/m-...

 

Hope this helps. If so, please mark as solved so others can find it on the community

Highlighted
7 - Meteor

Your reply much helpful and followed Thanks!

 

Now i am facing an another issue

 {"data":null,"exceptionName":"UnknownException","innerExceptionMessage":"","message":"Unknown error.\\u000aIOException\\u000aRequestID: 82ff4537ef7046a3aee076b4e50bcdb4"}

 

What could be the reason? 

Highlighted
7 - Meteor

I have used MultiPartEncoder from the requests_toolbelt of python that has resolved my issue.