Regions
The regions a workspace's data can live in, with the addresses its data is sent to and queried at.
Contains: Credential
Region object
A region is a place a workspace's data can live, with the addresses its data is sent to and queried at.
idstringThe region's id.
namestringThe region's name.
sort_order integerWhere the region sorts in a list of regions.
ingest_uri stringThe address agents send this region's log data to.
query_uri stringThe address this region's data is queried at.
bigquery_location string or nullThe BigQuery location this region's workspace datasets are created in, such as US. list-regions returns it only when named in fields; a workspace's region always carries it.
List regions
/regions Returns every region a workspace's data can live in, in sort order, with the addresses its data is sent to and queried at.
- Request
- Response
- curl
- PowerShell
- Python
curl -X GET \ "https://engine.sparklogs.app/app-api/regions" \ -H "Authorization: Bearer $SPARKLOGS_TOKEN"Invoke-RestMethod -Method Get ` -Uri "https://engine.sparklogs.app/app-api/regions" ` -Headers @{ Authorization = "Bearer $env:SPARKLOGS_TOKEN" }import os import requests response = requests.get( "https://engine.sparklogs.app/app-api/regions" , headers={"Authorization": f"Bearer {os.environ['SPARKLOGS_TOKEN']}"},)response.raise_for_status(){ "message": "regions retrieved", "regions": [ { "id": "us-central", "name": "United States", "sort_order": 1, "ingest_uri": "https://ingest-usc1.engine.sparklogs.app", "query_uri": "https://query-usc1.engine.sparklogs.app" } ]}Access
- Works with
- Signed-in person, Personal token, OAuth token, Workspace token
Needs no privilege: every caller gets the same list of regions.
Behavior
- Retry
- Safe to send again
Query parameters
fieldsarray of stringComma-separated top-level fields of each object to return instead of the default set.
Sent by default: idnamesort_orderingest_uriquery_uri
Sent only when named in fields: bigquery_location
Response 200
Every one of the regions you can see.
messagestringrequiredWhat the call did, as a short phrase for a person to read. Its wording may change: act on the HTTP status.
Errors
400APP_API_ERR_BAD_PARAMETERS A query parameter it does not take, one given twice, or fields naming a field it does not have.NoPlus the errors every call can return.