Skip to content

Reference

Assets

The assets endpoints of the HTTP API.

GET /assets/image

Fetch a remote image through the server and return it.

The image’s domain must be on the outbound allowlist, and the address must be https. The image is read up to 5 MiB, must be a PNG, JPEG, GIF, WebP, AVIF or SVG whose bytes match its declared type, and is cached for 1 hour. The response forbids scripts, so an SVG opened directly never runs script. Service accounts cannot call this endpoint.

Parameters

Name In Type Description
url (required) query string

Responses

Status Description Body
200 The image, with the content type the server verified. image/png, image/jpeg, image/gif, image/webp, image/avif, image/svg+xml
400 The url is missing or longer than 2000 bytes (invalid_request), or is not an https address with a domain name (invalid_asset_url). Error
401 Authentication is missing or invalid. Error
403 The caller is a service account (forbidden), or the image’s domain is not on the outbound allowlist (outbound_domain_not_allowed, with the domain in the message). Error
500 The server failed to handle the request. Error
502 The image could not be fetched, points to a private address, is larger than 5 MiB, has an unsupported content type or does not match its declared type (asset_unavailable). Error

GET /assets/geojson

Fetch a remote GeoJSON file through the server and return it as JSON.

The file’s domain must be on the outbound allowlist, and the address must be https. The file is read up to 5 MiB, may be served as application/geo+json, application/json or text/plain, must be a JSON object whose type is a GeoJSON type, and is cached for 1 hour. Service accounts cannot call this endpoint.

Parameters

Name In Type Description
url (required) query string

Responses

Status Description Body
200 The GeoJSON object, re-encoded with its numbers unchanged. object
400 The url is missing or longer than 2000 bytes (invalid_request), or is not an https address with a domain name (invalid_asset_url). Error
401 Authentication is missing or invalid. Error
403 The caller is a service account (forbidden), or the file’s domain is not on the outbound allowlist (outbound_domain_not_allowed, with the domain in the message). Error
500 The server failed to handle the request. Error
502 The file could not be fetched, points to a private address, is larger than 5 MiB, has an unsupported content type or is not a GeoJSON object (asset_unavailable). Error

Generated from api/openapi.yaml at bac0fe39. Report a problem.

/observeOpen source under Apache-2.0.Grafana is a trademark of Grafana Labs. SlashObserve is not affiliated with or endorsed by Grafana Labs.

Search pages and headings.