148 lines
5.9 KiB
YAML
148 lines
5.9 KiB
YAML
IdempotencyKey:
|
|
name: Idempotency-Key
|
|
in: header
|
|
required: true
|
|
description: |-
|
|
Client-generated key that makes a retried mutating command safe; a UUID v4 is recommended. The value is sent without quotes. The server scopes the key by caller and operation and fingerprints the request by method, path, and body.
|
|
|
|
Stored for 24 hours after the first request and replayed with the same status, headers, and body: the final 2xx outcome and final deterministic 4xx business outcomes of the command, such as 404 not_found or 409 state_conflict. A replay does not repeat the side effect.
|
|
|
|
Not stored, so a retry with the same key is evaluated again: 400 validation_failed, 413, and 415 for the request itself, 401 and 403, 409 idempotency_in_progress, 412 version_conflict and 428 precondition_required (nothing changed; read the resource again and retry), 422 idempotency_key_reused, 429, and every 5xx.
|
|
|
|
Order of checks: authentication (401), request validation (400, 413, 415), authorization (403), then the key. A stored or running request with a different fingerprint returns 422 idempotency_key_reused before any other key check; a running request with the same fingerprint returns 409 idempotency_in_progress; a stored outcome with the same fingerprint is replayed. Only after that does the server check If-Match, so a retry of a completed change replays its outcome instead of failing on the version it has just changed. After 24 hours the key may be accepted as new.
|
|
schema:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 255
|
|
pattern: "^[A-Za-z0-9._:-]+$"
|
|
example: 5f0c6a8e-3b0e-4c47-9f4c-2a8f9e5d7c11
|
|
IfMatch:
|
|
name: If-Match
|
|
in: header
|
|
required: false
|
|
description: |-
|
|
Strong entity tag of the resource version the client last read, copied from the ETag response header. An operation that changes a versioned resource says in its own description that it requires If-Match.
|
|
|
|
On such an operation, a missing If-Match returns 428 precondition_required. An If-Match that does not equal the current ETag returns 412 version_conflict and changes nothing; read the resource again before retrying. Only one strong entity tag is accepted; weak tags, lists, and `*` fail validation with 400. The parameter is optional in the schema so that a missing header reaches the application, which answers 428.
|
|
schema:
|
|
type: string
|
|
minLength: 3
|
|
maxLength: 130
|
|
pattern: '^"[A-Za-z0-9._~-]{1,128}"$'
|
|
example: '"v7"'
|
|
PageLimit:
|
|
name: limit
|
|
in: query
|
|
required: false
|
|
description: >-
|
|
Maximum number of items in the page. The server may return fewer items
|
|
even when more remain; use `page.has_more` to detect the end.
|
|
schema:
|
|
type: integer
|
|
format: int32
|
|
minimum: 1
|
|
maximum: 100
|
|
default: 20
|
|
PageCursor:
|
|
name: cursor
|
|
in: query
|
|
required: false
|
|
description: >-
|
|
Opaque `page.next_cursor` value from the previous page of the same listing.
|
|
Omit it to read the first page. A malformed or foreign cursor returns 400
|
|
with code validation_failed.
|
|
schema:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 512
|
|
pattern: "^[A-Za-z0-9_-]+$"
|
|
AssessmentAttemptId:
|
|
name: attempt_id
|
|
in: path
|
|
required: true
|
|
description: >-
|
|
Identifier of an assessment attempt of the current candidate. An attempt
|
|
of another candidate and an unknown identifier both answer 404
|
|
not_found, so identifiers cannot be enumerated.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
|
OrganizationId:
|
|
name: org_id
|
|
in: path
|
|
required: true
|
|
description: >-
|
|
Identifier of an organization. Access comes only from an active
|
|
membership of the session account in this organization, checked by the
|
|
server on every request; the identifier itself grants nothing. An
|
|
organization without such a membership and an unknown identifier both
|
|
answer 404 not_found, so organizations cannot be enumerated.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|
|
NeedId:
|
|
name: need_id
|
|
in: path
|
|
required: true
|
|
description: >-
|
|
Identifier of a need of the organization in the path. A need of another
|
|
organization and an unknown identifier both answer 404 not_found.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
|
|
SupportCaseId:
|
|
name: case_id
|
|
in: path
|
|
required: true
|
|
description: >-
|
|
Identifier of a case of the current account. A case of another account
|
|
and an unknown identifier both answer 404 not_found, so identifiers
|
|
cannot be enumerated.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 01928f7a-6e7f-7a8b-9c0d-1e2f3a4b5c6d
|
|
InvitationId:
|
|
name: invitation_id
|
|
in: path
|
|
required: true
|
|
description: >-
|
|
Identifier of an invitation of the organization in the path. An
|
|
invitation of another organization and an unknown identifier both answer
|
|
404 not_found.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
|
|
MyInvitationId:
|
|
name: invitation_id
|
|
in: path
|
|
required: true
|
|
description: >-
|
|
Identifier of an invitation addressed to the current candidate. A draft,
|
|
an invitation addressed to another candidate, and an unknown identifier
|
|
all answer 404 not_found, so identifiers cannot be enumerated.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
|
|
HiddenOrganizationId:
|
|
name: org_id
|
|
in: path
|
|
required: true
|
|
description: >-
|
|
Identifier of the organization that the current candidate hides or stops
|
|
hiding the profile from. It names the target of a candidate's own
|
|
setting and grants the candidate nothing about the organization. Hiding
|
|
answers the same 404 not_found for an organization that does not exist
|
|
and for one that the candidate cannot see, so organizations cannot be
|
|
enumerated; lifting the hiding answers 204 for any well-formed
|
|
identifier.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
|