Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to get API to get information from the server

JohnLight
8 - Asteroid

I'm trying to get data from the server using the server api tool, and I'm getting this error (see attachment). The URL I'm using the just the gallery url, and I got the key and secret key from the gallery profile as well, so I don't believe those are the issues. I have the API access permission checked under the gallery profile as well. Any help would be appreciated.

 

I posted this in the server discussions as well, but there hasn't been a response yet, so I thought I'd try here.

44 REPLIES 44
apathetichell
19 - Altair

405 means you are using the wrong http action in the download tool. are you using GET? if so - try POST. If you are using POST - try GET.

OllieClarke
15 - Aurora
15 - Aurora

@JohnLight Your base url should be the api url, not the gallery url.

 

It's a server setting, but by default it will be "<serveraddress>/webapi" rather than "<serveraddress>/gallery"

 

Try that?

 

Ollie

JohnLight
8 - Asteroid

Yes, I'm doing GET. How would POST work since I'm trying to get information from the server, not post from the workflow to the server? I'm not super familiar with these APIs.

JohnLight
8 - Asteroid

I got the same error, ran it with webapi/ and webapi without the "/." Where do I find the setting for this URL, in case it has been changed from the default for some reaso?

apathetichell
19 - Altair

No - 400 is a different error. Do you see in the download tool where you have a GET? Toggle that to POST.

Most oauth2/token flows start with POST. not GET. this is a pretty standard flow. you are posting certain information to the server - it is verifying something and returning it to you. It views this as a post action. see:

https://stackoverflow.com/questions/50768635/get-or-post-for-token-generation - for example.

JohnLight
8 - Asteroid

Oh I see, sorry for misunderstanding. I'll try it out.

JohnLight
8 - Asteroid

Do you know what should be here? I copied parts of the URL of the collection I'm trying to get information from, but it isn't working. I'm getting the 400 error, using POST.

apathetichell
19 - Altair

@OllieClarke would be more knowledgeable than me about this - my memory is that collectionid isn't collection name but more of an internal identifier. you can probably find it in the URL of the server and it's probably an alphanumeric string. There's probably a way to also match collection name (display) with something internal. Are you trying to upload a workflow or run one? I'd suggest a list activity first (get all collections for example).

JohnLight
8 - Asteroid

Yes, I just want to get the information about the schedules of the workflows that are running in the server. I tried the alphanumeric portion of the URL and got the 400 error as well.

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels