Reference
HTTP status codes
What each status code from the API means.
Errors are RFC 7807 problem details (application/problem+json), with title, status and detail, and, for
validation problems, an errors list with every problem found.
| Status | When |
|---|---|
| 200 OK | A read, or a replacement of something that existed. |
| 201 Created | A new entity, field, view, form, workflow, dashboard, index or resource. Comes with Location (and an ETag for entities and resources). |
| 202 Accepted | A workflow run was queued. |
| 204 No Content | A delete, or an update that removed an entity's last perspective (so deleted it). |
| 206 Partial Content | A Range request for a resource. |
| 304 Not Modified | If-None-Match matched the current version. |
| 400 Bad Request | Validation failed (errors lists every problem); an invalid query (with parameter and 1-based position); malformed JSON; an invalid schema change; an invalid view, form, workflow or dashboard; a data source that can't run; a plugin that can't be installed. |
| 401 Unauthorized | A missing, expired or invalid token. Also for a resource that isn't public, whether it exists or not, when the caller isn't signed in. |
| 403 Forbidden | The caller's roles don't allow it. Includes filtering, sorting or selecting on a field they can't read, and writing to the reserved webparts/ and forms/ resource folders. |
| 404 Not Found | The entity, field, perspective, index, role, view, form, workflow or dashboard doesn't exist, or the caller can't see it (its existence isn't revealed). |
| 409 Conflict | A version conflict with _version in the body (with expectedVersion and currentVersion); a duplicate id; a relationship would be broken (errors says why); a view that's out of date; a file and folder with the same resource name. |
| 412 Precondition Failed | A version conflict with If-Match; a resource's If-Match or If-None-Match: * failed. |
| 413 Content Too Large | A resource larger than MaxFileBytes. |
| 507 Insufficient Storage | A resource upload would pass MaxBytesPerUser or MaxTotalBytes. |
Handling conflicts
A 409 or 412 on a write usually means someone else saved first. Read the entity again, apply your change to the
new version, and save with the new ETag. The portal tells the user and lets them discard their changes to see the
other version.