API EndPoint
  • 25 Apr 2024
  • 2 Minutes to read
  • Dark
    Light

API EndPoint

  • Dark
    Light

Article Summary

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.

  1. Log in to the myJornaya User Interface to retrieve the information needed to perform the API call.

Unable to log in?

  1. Navigate to the "Manage API tokens" page from the top right button or using this URL - https://app.jornaya.com/activate/access-tokens

    manage_API_pointer.png

  1. 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.
     

    add api token.png

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

  1. Click on the “Activate” tab at the top and then on the specific Activate instance desired or use the URL:

https://app.jornaya.com/activate/

  1. 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""
            }
        }
    }
]


Was this article helpful?