Files
lincodex/api/labd/components/responses.yml
T

68 lines
2.2 KiB
YAML

Problem:
description: >-
Any error response. The body is a Problem whose `status` equals the HTTP
status and whose `code` is one of ProblemCode.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
validation_failed:
summary: The template is unknown
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
errors:
- in: body
pointer: /template_id
code: invalid
message: The value does not match the contract.
state_conflict:
summary: The lab is not ready
value:
type: urn:lincodex:problem:state_conflict
title: State conflict
status: 409
code: state_conflict
detail: The lab is not ready.
lab_unavailable:
summary: The checker could not reach a node
value:
type: urn:lincodex:problem:lab_unavailable
title: Lab unavailable
status: 503
code: lab_unavailable
detail: The lab could not be evaluated. Nothing was checked.
LabPoolBusy:
description: >-
The lab does not fit the memory budget or the lab limit of the
provisioner, or the provisioner is draining; code lab_pool_busy. Nothing
was stored and no capacity was reserved. Retry with the same lab ID after
Retry-After.
headers:
Retry-After:
description: Number of seconds to wait before retrying the request.
required: true
schema:
type: integer
format: int32
minimum: 0
maximum: 3600
example: 30
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
lab_pool_busy:
summary: No capacity for another lab
value:
type: urn:lincodex:problem:lab_pool_busy
title: Lab pool busy
status: 503
code: lab_pool_busy
detail: No capacity for another lab. Retry later with the same lab ID.