Swagger¶
The Swagger UI page of the rs-server frontend documents all the RS-Python web service endpoints and lets you call them directly from your browser, without writing Python code or running Prefect flows:
- on the reference platform: https://rspy.ops.rs-python.eu/docs
- the corresponding OpenAPI specification: https://rspy.ops.rs-python.eu/openapi.json
Replace ops.rs-python.eu by the domain name of your own platform. The endpoints are grouped by service:
| Section | Endpoints | Description |
|---|---|---|
| ADGS stations | /auxip/... |
Search the auxiliary data of the AUXIP instances (documentation). |
| CADIP stations | /cadip/... |
Search the sessions of the CADIP stations (documentation). |
| PRIP stations | /prip/... |
Search the products of the PRIP instances (documentation). |
| Catalog | /catalog/... |
Read and update the catalog (documentation). |
| Staging service | /processes, /jobs |
Stage products into the catalog and follow the staging jobs (documentation). |
| Processing service | /dpr/processes, /dpr/jobs |
Read the processors task tables and follow or cancel the DPR jobs (documentation). |
| OSAM service | /storage/... |
Get your S3 credentials; synchronise the object storage accounts (administrators only) (documentation). |
| Authentication | /auth/me |
Show your user name and roles. |
The required rights for each endpoint are listed in Endpoints and permissions.
Log in¶
- Click the Login link at the top of the page and log in with your Keycloak account. You are now authenticated with an OAuth2 session cookie. Alternatively, click one of the lock icons and enter your API key.
- To check that you are logged in, expand the
GET /auth/meendpoint, click Try it out then Execute: the response shows your user name and your roles.
Examples¶
Search a station¶
- Expand
GET /cadip/collectionsand execute it: the response lists the CADIP collections you can read. - Expand
GET /cadip/collections/{collection_id}/items, enter one of the collection identifiers, e.g.sgs, and adatetimeinterval, then execute it: the response is a STACFeatureCollectionof sessions. - Expand
GET /cadip/collections/{collection_id}/items/{session_id}and enter one of the session identifiers to read its details.
You can also copy the request URL displayed by Swagger, e.g. https://rspy.ops.rs-python.eu/cadip/collections/sgs/items,
into your browser address bar: as you are logged in, you can then click on the links of the JSON responses to
navigate between the collections and the items. The STAC browsers offer a more
user-friendly interface for the same purpose.
Search the catalog¶
Execute GET /catalog/collections to list the collections you can read. The first time, the list may be empty:
your collections are created when you stage or process products. See Browse products for the
search parameters.
Get your S3 credentials¶
Execute GET /storage/account/credentials to get your personal object storage credentials, then use them as
described in Download the assets.
Follow a job¶
The staging and processing jobs are usually started by the Prefect flows. To follow a job, execute
GET /jobs/{job_id} (staging) or GET /dpr/jobs/{job_id} (processing) with the job identifier written in the flow
logs. A DPR job can be cancelled with DELETE /dpr/jobs/{job_id}, see
Cancel a DPR run.
Call an endpoint with your API key¶
Outside of the Swagger page, pass your API key in the x-api-key HTTP header, e.g.: