Evo Discovery
Before you can make Seequent Evo API requests you need to know:
- The URL of your Evo hub
- The ID of your organisation
The Evo Discovery endpoint provides this information.
How to perform an Evo discovery request
-
Choose the Evo service codes for the APIs to be queried:
- Block Model API → blockmodel
- File API → file
- Geoscience Object API → geoscienceobject
-
Perform a GET request:
- Use your access token as a bearer token in the Authorization header of your API request.
- Include each Evo service code as a query parameter, eg.
service=file&service=blockmodel
. Multiple services must be separated by the&
symbol.
Request
In this example we are performing an Evo discovery request and are searching for three Evo services.
The request URL looks like this:
https://discover.api.seequent.com/evo/identity/v2/discovery?service=blockmodel&service=file&service=geoscienceobject
import json
import requests
# Enter your token here
token = ""
# Define the auth header
auth_header = { "Authorization": f"Bearer {token}" }
# Define the Evo services
services = ["blockmodel", "file", "geoscienceobject"]
# Define the query params
params = [("service", service) for service in services]
# Define the discovery URL
discovery_url = "https://discover.api.seequent.com/evo/identity/v2/discovery"
# Make the request
response = requests.get(discovery_url, headers=auth_header, params=params)
print(json.dumps(response.json(), indent=4))
Response
The JSON response body will include the discovery
section which includes four sub-sections:
hubs
organizations
services
service_access
Follow these steps to find your org ID and a hub URL:
-
In the
organizations
section copy theid
value. This is your org ID."organizations": [
{
"id": "d0ea331e-814e-4e24-a1b8-cd563c5b1d31",
"display_name": "Test organisation"
}
] -
Search the
service_access
section an element that includes services that you want to access. For example, if you need to access the Block Model API find an item inservice_access
that includesblockmodel
in theservices
list. Make a note of the correspondinghub_code
value."service_access": [
...
{
"hub_code": "au",
"org_id": "d0ea331e-814e-4e24-a1b8-cd563c5b1d31",
"services": [
"blockmodel",
"file",
"geoscienceobject"
]
},
...
] -
Search the
hubs
section for the matchinghub_code
from the previous step and copy the correspondingurl
value. This is the hub URL."hubs": [
...
{
"code": "au",
"display_name": "Australia East",
"url": "https://au.api.seequent.com"
},
...
] -
With the hub URL and org ID found, you can now perform Seequent Evo API requests.