Skip to main content

Overview

Query Service is a feature of the Earthmover platform which makes it easy to query your Arraylake data and integrate it into downstream applications via standards-compliant API endpoints. This page describes the administration and management aspects of the Query Service. For details on the APIs and protocols, see the following pages.

  • Environmental Data Retrieval (EDR) - allows you to extract points or areas of interest from gridded datasets and return results in JSON, CSV, or NetCDF. Ideal for simple timeseries extraction.
  • Web Map Service (WMS) - dynamically serves map tiles suitable for use in web-based slippy maps or GIS applications.
  • OPeNDAP - query datasets using the widely supported DAP protocol.
info

Query Service is currently in private beta. Features and capabilities may change with time.

In the following

  • {org} is the name of your Arraylake organization
  • {repo} is the name of the Repo
  • {branch|commit|tag} is the branch, commit, or tag within the Repo to use to fulfill the request
  • {path/to/group} is the path to group within the Repo that contains an xarray Dataset
  • {protocol} is one of the supported protocols (e.g. edr, wms, dap).

Turning on a service​

al compute enable {org} {protocol}

By default the service is only accessible to those with access to the Repo being queried. Provide the --is-public flag to open access to all users without authentication.

Turning off a service​

al compute disable {org} {service_name}

Choose the appropriate service_name from the output of al compute list {org}.

Status of Services​

al compute list {org}

Authentication​

All compute service endpoints support HTTP Basic Auth with username and password.

The Arraylake compute service uses your organization name as the username and an Arraylake API key as the password.

Authenticated queries can be made by embedding the credential username (org) and password (api token) into the base URl as follows

https://{username}:{password}.compute.earthmover.io/v1/services/{protocol/{org}/{repo}/{branch|commit|tag}/{path/to/group}/{protocol}/

Alternatively, the Authorization header can be used to pass the credentials:

Using curl

curl -u {username}:{password} "https://compute.earthmover.io/v1/services/{protocol}/{org}/{repo}/{branch|commit|tag}/{path/to/group}/{protocol}/"

Using Python

import requests
response = requests.get(
"https://compute.earthmover.io/v1/services/{protocol}/{org}/{repo}/{branch|commit|tag}/{path/to/group}/{protocol}/",
auth=("{username}", "{password}")
)