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.
run retrieve all collections first -> and then look at the output for the collection id.
curl --location --request GET 'http://localhost/webapi/v3/collections?view=Full' \ --header 'Authorization: Bearer BearerTokenGoesHere'
Where do you run this? Just any command line? And where do I find the bearer token?
try going through the postman collection. order of operations should be:
1) retrieve token.
2) call collections endpoint.
if you are using a packaged macro and they don't provide it - i'd recommend going thorugh the alteryx server postman collection to:
1) see the authentication flow
2) send your token to the collection endpoint.
you should then able to replicate it in alteryx.
Postman collection is something separate from Alteryx? If I make an account, then I can follow those steps?
Postman is a great external api collection/testing program. we use it to build out our api logic - which we can then transfer to alteryx workflows.
Alteryx Server has a swagger -> you should be able to test collections there as well.
I followed this example here exactly, but while in the video their workflow completed with msg HTTP 200, I got HTTP/1.1 404 Not FoundContent-Length: 0Server: Microsoft-HTTPAPI/2.0
I will look at Postman and see if that can help. I've looked at the swagger page before, but haven't got it to work still.
Alteryx Server Series 2022: How to Build Gallery API (youtube.com)
community user id?
Hey @JohnLight
It might be easier to run through the full process here to get collections.
Step 1, get you api keys from your profile (not in admin)
Step 2: confirm the api url by using the inbuilt swagged documentation
Step 3: use those keys along with the api url to login with the server api tool
Step 4: Use the /v3/collections/{collectionid} endpoint. To find the collectionId, in your browser take the alphanumeric string from the end of the collection url when in that collection
This is all based on the assumption that you have permissions to use the API. Check your permissions in your user profile