Call the REST API#
The REST API is versioned under /v1 and described by an OpenAPI document. Every capability
guide lists its routes.
Prerequisites#
A server URL, such as
https://geonemo.example.com.An API token: an API personal token, or the access token from
geonemo login(Sign in and tokens).
Steps#
Put the token in a shell variable, then call discovery to list the capabilities and endpoints the server advertises:
export TOKEN=<token> curl -H "Authorization: Bearer $TOKEN" \ https://geonemo.example.com/v1/discovery
Send the headers on every request:
Header
Value
AuthorizationBearer <token>X-GeoNemo-Project-IDYour project, default
defaultIdempotency-Key1 to 256 visible ASCII characters, on operations that create work
Read the response. Errors carry a JSON body
{"detail": ...}.
Conventions#
Topic |
Behavior |
|---|---|
Base path |
|
Health |
|
Reads |
|
Changes |
Other |
Paging |
Responses return |
Feeds |
|
Idempotency |
Repeating a key with the same request returns the first result; a different request with the same key returns 409 |
Status codes: 401 for a missing or invalid token, 403 for a missing scope, 404 for an unknown resource, 409 for a conflict, 422 for an invalid request.
OpenAPI#
Source |
Where |
|---|---|
Running server |
|
Repository |
|
Generate a client from either file with your usual tool.
Result#
You can call any route from any HTTP client. See REST API for every operation, grouped by tag.