Welcome to the wonderful World of Skynamo Analytics!
Skynamo has a brand-new reporting API specifically designed to get your Skynamo data for the purpose of reporting.
How to get access?
The good things in life are never free, and the same goes for access to the Skynamo Reporting.
Log a request for access with Skynamo Support (support@skynamo.com) or your Customer Success Member. They will be able to provide you with a quote.
The following information will be required:
- Customer Name
- Skynamo Instance Name
- Email address of contact person who will be working with the API connection.
- Indication that you will be accessing the Skynamo Reporting API through Qlik.
After the above has been done, approved, and paid you will be provided with:
- Credentials to access your Skynamo data through the reporting API (Client ID, Client Secret).
I have access, now what?
Skynamo Reporting API
For more information on using the Reporting API and examples go to the Swagger documentation:
https://analytics-api.svc.skynamo.me/swagger/index.html
Please note: To select version 2.
The provided credentials can be used in a cURL request (see below) to get an access token to Login by clicking on Authorize. Thereafter, you can try out the available GET requests.
curl --request POST \
--url https://login.skynamo.me/oauth/token \
--header ‘content-type: application/json’ \
--data ‘{"client_id":"XXXX","client_secret":"XXX","audience":"https://analytics.skynamo.com/",
"grant_type":"client_credentials"}’
Please click here to test if the API credentials will receive information.
Working with the data in Qlik
Accessing Skynamo Reporting API using Qlik
- Open the Qlik hub, login and add a new analytics app.
- Add a REST connector
- Click on “Files and other sources”.
- In the search bar type in “REST” and click on the REST connector.
- Click on “Files and other sources”.
- Complete details to create REST connection.
- Provide the connection with a name (e.g. SkynamoUX_GetUsers).
- Set the URL value based on the endpoint that you want to do a GET request for. The Users Endpoint example URL:
- Leave Method on “GET”.
- Leave Authentication Schema on “Anonymous”.
- Add Query parameters, as indicated in Swagger document under the Parameters section for the related endpoint. The Users Endpoint example Query Parameters:
- Get an access_token using the credentials (Client ID, Client Secret) provided to access the Skynamo Reporting API. - You can use the below article to use Postman to get the access_token
curl --request POST \
--url https://login.skynamo.me/oauth/token \
--header ‘content-type: application/json’ \
--data ‘{"client_id":"XXXX","client_secret":"XXX","audience":"https://analytics.skynamo.com/",
"grant_type":"client_credentials"}’ - Add Query header to contain the access_token returned by the cURL request. Please note, the access_token is only valid for 24 hours.
- Add Query header to contain the access_token. The Users Endpoint example Query Headers: Authorization= Bearer <access_token returned by cURL request>
- Click on “Test Connection” to verify that the connection is successful
- Click on Create
- Select the data to load and click “Next”. In this example root will contain the users data.
- Apply either the recommended associations or do them manually. This is all done in the “Prepare” tab in “Data Manager”.
- Add visuals
- Navigate to “Analyze” tab and click on “Edit sheet”
- Add visuals from “Charts”, select data, and when ready click on “Done editing”
- Interact with the visuals by clicking on the chart and watch the data in the table be filtered.
Handling refresh of access tokens
As mentioned in the previous section the access_token is only valid for 24 hours. The following describes a process of adding a REST connector to get the access_token and using the returned value in the REST connector implementing the GET request.
- Open the Qlik hub, login and add a new analytics app.
- Add a REST connector
- Click on “Files and other sources”.
- In the search bar type in “REST” and click on the REST connector.
- Complete details to create REST connection.
- Provide the connection with a name (e.g. SkynamoReportingAPI – Get Token).
- Set the URL value as indicated in the provided cURL request:
- Set the Method to “POST” and complete “Request body” as indicated:
- Leave Authentication Schema on “Anonymous”
- No Query parameters are required.
- Add Query header to contain the content-type and the value application/json
- Click on “Test Connection” to verify that the connection is successful
- Click on Create
- Update data load script of SkynamoReportingAPI – GetToken connection.
- Click on the arrow on the Prepare tab menu item and select “Data load editor”.
- The existing connectors are shown in the right hand “Data connections” panel. Click on the “Select data” icon for the SkynamoReportingAPI – GetToken connection.
Ensure that root is selected and click on “Insert script”. - Add the following at the end of the script:
LET vAccessTokenValue = Peek('access_token');
trace $(vAccessTokenValue);
- Update data load script of SkynamoUX_GetUsers connection to dynamically set the access_token.
- Click on the arrow on the Prepare tab menu item and select “Data load editor”.
- The two REST connectors are shown in the right hand “Data connections” panel. Click on the “Select data” icon for the SkynamoUX_GetUsers connection.
- Ensure that root is selected and click on “Insert script”.
- Alter the SQL query to end with a ‘WITH CONNECTION’ clause to override the current connection’s settings. Add the following in the location indicated in the screenshot:
This is before the change:
Remove the below semicolon and add the 'WITH' clause
WITH CONNECTION (
HTTPHEADER "Authorization" "Bearer $(vAccessTokenValue)"
);
- Click on “Load data” to run the changes to the script and refresh the data.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article