Refresh Dataset
const url = 'https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/refresh';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/refresh \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Re-pull this dataset’s data from the origin it was imported from.
One request, no source pointer, no layer selection. The dataset keeps serving its current data throughout: the worker loads into an attempt-scoped staging table and swaps only once the new data is complete, so a refresh that fails leaves the live table and its freshness exactly as they were.
Two origin kinds take their own execution strategy, and neither moves any data. A dataset registered from an existing PostGIS table (#1265) has an origin that IS the table it serves from, so its refresh re-measures the live relation — recounting features, recomputing the extent, rebuilding the column schema snapshot and statistics. A dataset imported from a STAC item (#1266) is nothing but a pointer at somebody else’s COG, so its refresh re-reads the item document and follows the asset if the publisher moved it. Admission, the run row and the history they write are identical across all three.
Refuses with 409 dataset_busy while another refresh or re-upload is
active for this dataset — v1 rejects rather than queues (Decision 5b), and
the refusal comes from a partial unique index rather than a check, so two
simultaneous clicks cannot both be admitted.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body
Section titled “Request Body ”Body of a one-request refresh (#1220). Carries no source pointer.
Everything about WHERE the data comes from is read server-side from the dataset’s stored origin binding — that is the whole feature. A client cannot re-point a dataset through this door, and a client that has been shown the wrong URL cannot refresh from it.
Example generated
{ "token": "example"}Responses
Section titled “ Responses ”Successful Response
Accepted dispatch of a refresh run.
Returns the run id as well as the job id: the run is the durable history
row (GET /datasets/{id}/refresh-runs) and outlives the job, which the
retention purge eventually removes.
object
The origin this refresh re-pulled from
Api for this endpoint; cli for the CLI door
Example
{ "status": "pending"}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the database could not serve the request