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.
Solved! Go to Solution.
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.
@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
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.
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.
Oh I see, sorry for misunderstanding. I'll try it out.
@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).
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.