Start Free Trial

Alteryx Designer Desktop Discussions

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

Help creating an API request

craigja
11 - Bolide

Hi,

 

Have no idea what Im doing!  I want to query an API that I have access to but am having no luck....  The response is :

Unknown HTTP API endpoint

The first bit of the document has:

2.1 Introduction
The following preparation is required to use the DSB REST API Web Service:
• Users should follow and adhere to the REST architectural constraints called RESTful APIs.
• Web service methods are transmitted over the internet using HTTPS (HTTP secure over SSL) protocol through port 443
• DSB operations will provide authentication parameters: username and password
o Users should attach basic authentication parameters to each of the REST methods’ header according to RFC-7617 having:
key = “Authorization”
value = Basic base64(username + “:” + password)
The username and password are concatenated with a colon separator and encoded in base64
For instance: If the user wishes to send the user-id "Aladdin" and password "open sesame", it would use the following header field:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

 

So I took my username:password and ran that string through the Base64 tool in Alteryx to get a string like above.  I then took that string and pasted it into a text input tool along with the URL: https://prod.anna-dsb.com/api/

So I now have the Text Input tool with 2 fields, a Password and URL field

 

Next I connected the Download tool up and used the URL field from my text file and in Headers tab, added 'Authorisation' as a name and then selected the password field from my text file

 

Further on the doc talks about retrieving the JSON schemas - this seems like an easy thing to try first:

3.2 Obtain JSON schemas
To obtain the JSON schemas user needs to invoke GET /schemas?names that will return the list of schema names. Using each of these names the user may invoke GET
/schemas?schemaName=<NAME> that will return the JSON schema for that name.

 

So in the Payload tab of the Download tool, I checked Use following for Query String/Body and entered '/schemas?names' 

 

But when I click Run I get the error at the top - Unknown API Endpoint.

 

Any ideas what I'm doing wrong?

2 REPLIES 2
FinnCharlton
13 - Pulsar

Try adding the /schemas?names after the URL instead of in the payload, i.e. use the URL: https://prod.anna-dsb.com/api/schemas?names

craigja
11 - Bolide

Sorry for the late reply!  

Labels
Top Solution Authors