- 09 Jul 2024
- 3 Minutes to read
- DarkLight
API EndPoint
- Updated on 09 Jul 2024
- 3 Minutes to read
- DarkLight
Retrieving a Signal File from Jornaya via API
Activate Signal Data file can be retrieved programmatically via an API endpoint. The API download process retrieves a .csv file.
Step 1: Obtaining an API Token
Access to a Jornaya account is guarded by an API Access Token, which is used as the Bearer Token when performing a query. An API Access token is required to retrieve a file from Jornaya using the API endpoint.
Log in to the myJornaya User Interface to retrieve the information needed to perform the API call.
Unable to log in?
Email support@jornaya.com
Navigate to the "Manage API tokens" page from the top right button or using this URL - https://app.jornaya.com/activate/access-tokens
Create a new token by clicking the "Add API Token" button in the top left of the page. Confirm the new record on the page contains today’s date in the "Created" column. If an API token already exists, any can be used.
Deleted Token
If an access token is deleted, any processes currently using that token will cease to work.
Step 2: Obtain Activate Instance ID
Each Activate Instance has a unique instance ID. The Activate instance ID is needed in the API call to retrieve an Activate Signal File. The Instance ID can be accessed in two different ways:
From myJornaya
Click on the “Activate” tab at the top and then on the specific Activate instance desired or use the URL:
Copy the ID from the URL in the browser window (in bold):
Example:
https://app.jornaya.com/activate/2bcf2c83-5687-xxxx-xxxx-558059e6ea4
Via an API Call
Perform a query against the "List Available Activate Instances" Endpoint with the API access token as shown in the below example.
Type: GET
URL: https://app.jornaya.com/api/v1/activate
Sample Request
https://app.jornaya.com/api/v1/activate --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
See the “List Available Activate Instances“ section of the Manage API Tokens page for a sample response.
Step 3: Retrieve the Download URL to access results
Using the API access token and Activate Instance ID, perform a query using the GET Runs URL Endpoint as follows:
URL: https://app.jornaya.com/api/v1/activate/{activate_instance_id}/runs/{run_date}
Type: GET
Insert your Account and Instance specific ID in place of "{activate_instance_id}"
"run_date" format is: YYYY-MM-DD
Tip!
To receive the most recent results you may use “latest” as the value for the "{run_date}"
Sample Request 1 (using a date value):
https://app.jornaya.com/api/v1/activate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/runs/2020-11-26 --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Sample Request 2 (using "latest" as the date value):
https://app.jornaya.com/api/v1/activate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/runs/latest --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 4: Retrieve the Activate file
After making the API request to retrieve an Activate run, you will recieve the download url in the response. Use this URL to retrieve the Activate results
Sample Response:
{
"url": “https://jornaya-prod-us-east-1-aida-insights.s3.amazonaws.com…"
}
Step 5: (optional) Recieve a list of recent runs for Jornaya Activate
Instead of specifying a date, an API call can also be made to receive a list of recent runs for an Activate Instance, which can then be used to retrieve a specific download URL. To do so, perform a GET query following the same steps in Step 3, above, but removing the "{run_date}" value.
Example request:
https://app.jornaya.com/api/v1/activate/{activate_instance_id}/runs
Example Response:
[
{
"date": "2020-01-02",
"_links": {
"self": {
"href": "https://app.jornaya.com/api/v1/activate/cf7a7e31-4fa5-4ac4-a300-f33db167fa10/runs/2020-01-02""
}
}
},
{
"date": "2021-01-01,
"_links": {
"self": {
"href": "https://app.jornaya.com/api/v1/activate/cf7a7e31-4fa5-4ac4-a300-f33db167fa10/runs/2021-01-01""
}
}
}
]