Get Tileset File
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tiles3d/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tiles3d/exampleServe one file of a published 3D Tiles tileset.
Point a client at the dataset’s tileset.url, this route’s
tileset.json; the relative URIs inside the tileset resolve to this
same route. Header credentials (X-Api-Key or Authorization)
authenticate every file of a private tileset. A query-string api_key
authenticates only the request it is on, so the tileset’s relative URIs
lose it unless the client carries it over, as CesiumJS does through
Resource query parameters. A browser page on any origin can read a
public tileset without credentials; one that sends credentials needs its
origin on the deployment’s CORS allowlist (CORS_ALLOWED_ORIGINS).
Every file carries the published tileset’s
ETag and asks the client to revalidate before each reuse. Once the caller
has access and the file exists, an If-None-Match naming the current
version answers 304 and an If-Match naming another answers 412. A
private or missing tileset and a missing file all answer 404, conditional
requests included, and a storage failure answers 502.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Responses
Section titled “ Responses ”The requested tileset file
Example generated
binaryThe caller already holds this version of the file
Unauthenticated — a credential was supplied and could not be resolved (expired, revoked, or malformed). Sending no credential at all is not an error on these operations; they answer anonymously with the public subset.
Not found
Precondition failed — the caller’s If-Match no longer matches the current representation
Validation error
Internal server error
Bad gateway — an upstream provider failed
Service unavailable — the database could not serve the request