Replace a saved document
Replaces a document's name, visibility, body and plan attachment, given its current ETag in If-Match.
Replace a saved document
/saved/{collection}/{id}Replaces a document's name, visibility, body and plan attachment, given its current ETag in If-Match. An omitted visibility becomes tenant; an omitted plan_id detaches it.
Errors
400 for an invalid collection or content (as createSavedDoc checks them), a missing If-Match, or a private visibility from anyone but the creator; 404 for an unknown or other-tenant document or plan, or another user's private document; 409 without a state store, or conflict for a stale If-Match, with details.etag the current ETag: read and reconcile before retrying.
Parameters
Path parameters
collectionstringRequiredSaved document collection; any other name is 400. assumption-sets takes a typed body, AssumptionSetBody; column-mappings takes { column_hints, formations? }. plan-views takes a PlanViewBody, checked as GET /plans checks its parameters.
"filter-sets""completion-designs""type-curves""views""settings""assumption-sets""column-mappings""plan-views"idstringRequiredFormat
uuidDocument UUID.
Header parameters
If-MatchstringRequiredCurrent document etag, including quotes.
Request body
application/json
Replacement content.
namestringRequired1 to 100 characters
Document name.
bodyobjectRequiredJSON object, at most 65,536 UTF-8 bytes; with plan_id, up to the 64 MB request body. What it holds depends on the collection.
completion-designs: one design asdesigns[]takes it (DesignInput), its formations unchecked against a dataset; any other body is a 400.assumption-sets: an AssumptionSetBody, checked on each save: any other key, a value out of range or a decline without eur (top level or on a formation) is a 400 naming it (body.<field>); plan_id is a 400.- A set on a model set the caller can't use isn't listed and answers 404.
column-mappings:{ column_hints, formations? }, checked on each save: any other key or a bad value is a 400 naming it (body.<field>).- column_hints (required): as POST /inventories/read takes them.
- formations: maps file names to GET /formations' names, at most 100, 1 to 100 characters each, no two equal in any case once trimmed. Unchecked against a dataset: an upload skips one its model set lacks, with a warning.
plan-views: a PlanViewBody (GET /plans filters, sort and columns), each field checked as the GET /plans parameter of that name (400 naming it, body.<field>); plan_id is a 400.
visibilitystringOptionalDefault
"tenant"Audience: private answers only its creator, tenant every user of the tenant.
"private""tenant"plan_idstring or nullOptionalFormat
uuidAttached plan UUID; omitted or null detaches.
Responses
200 OK
Updated document.
idstringRequiredFormat
uuidDocument id.
collectionstringRequiredCollection.
"filter-sets""completion-designs""type-curves""views""settings""assumption-sets""column-mappings""plan-views"namestringRequiredName.
visibilitystringRequiredRecorded audience.
"private""tenant"plan_idstring or nullRequiredFormat
uuidAttached plan UUID.
created_atstringRequiredFormat
date-timeCreation time.
updated_atstringRequiredFormat
date-timeLast update.
created_bystring or nullRequiredThe creator's email; null for older documents. A private document with none answers the whole tenant.
etagstringRequiredCurrent ETag including quotes; send as If-Match when replacing.
bodyobjectRequiredSaved JSON content.
versionintegerOptional≥ 1
assumption-sets only: 1 when created, one more on each PUT. POST /plans assumption_set.version names it.
model_setstringOptionalpattern ^[a-z0-9][a-z0-9-]{0,62}$
assumption-sets only: the body's model_set, the model set the set was made on.
Errors
| Status | When |
|---|---|
| 404 | No such well, grid, plan or route. |
| 409 | The request conflicts with the state of the plan or resource it names, and |
| 413 | The request body is over 64 MB. |
Shared errors400401403500What they mean