Error code

Precondition required

Updating or deleting an entry, type, trait, or asset, and replacing an asset's file, must say which version it changes, so that one person's write never silently overwrites another's.

Ø100 · 20 teethfree one way, locked the otherABC
Fig. 03 Ratchet and pawlThe wheel turns freely one way, and the pawl stops it turning back.
Code
PRECONDITION_REQUIRED
Management API
428

What to do

Read the resource, and send its ETag in an If-Match header with the write.

The response

Every refusal is an application/problem+json document. Its detail says what went wrong in that request; its type is this page.

{
  "code": "PRECONDITION_REQUIRED",
  "type": "https://coho-cms.com/errors/precondition-required",
  "title": "Precondition required",
  "status": 428,
  "detail": "What went wrong in this request, in a sentence.",
  "instance": "/v1/projects/…"
}

Every code

The error codes, in a table with a filter.