Skip to content
Developers
Get an API token

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

PUT/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.

Send a Novi API token as a bearer token on every request. Authentication
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

  • collectionstringRequired

    Saved 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"
  • idstringRequired

    Format uuid

    Document UUID.

Header parameters

  • If-MatchstringRequired

    Current document etag, including quotes.

Request bodyRequired

application/json

Replacement content.

  • namestringRequired

    1 to 100 characters

    Document name.

  • bodyobjectRequired

    JSON 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 as designs[] 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.
  • visibilitystringOptional

    Default "tenant"

    Audience: private answers only its creator, tenant every user of the tenant.

    "private""tenant"
  • plan_idstring or nullOptional

    Format uuid

    Attached plan UUID; omitted or null detaches.

Responses

200 OK

Updated document.

  • idstringRequired

    Format uuid

    Document id.

  • collectionstringRequired

    Collection.

    "filter-sets""completion-designs""type-curves""views""settings""assumption-sets""column-mappings""plan-views"
  • namestringRequired

    Name.

  • visibilitystringRequired

    Recorded audience.

    "private""tenant"
  • plan_idstring or nullRequired

    Format uuid

    Attached plan UUID.

  • created_atstringRequired

    Format date-time

    Creation time.

  • updated_atstringRequired

    Format date-time

    Last update.

  • created_bystring or nullRequired

    The creator's email; null for older documents. A private document with none answers the whole tenant.

  • etagstringRequired

    Current ETag including quotes; send as If-Match when replacing.

  • bodyobjectRequired

    Saved JSON content.

  • versionintegerOptional

    ≥ 1

    assumption-sets only: 1 when created, one more on each PUT. POST /plans assumption_set.version names it.

  • model_setstringOptional

    pattern ^[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

StatusWhen
404

No such well, grid, plan or route.

409

The request conflicts with the state of the plan or resource it names, and message says how: for example a plan still running or failed, a stale If-Match, an Idempotency-Key reused with another body, or a server without a state store.

413

The request body is over 64 MB.

Shared errors400401403500What they mean