REST API
POST /v1/exams/{exam_id}/archive
Archive an exam
/v1/exams/{exam_id}/archive Sets the archived flag (no new version).
Path parameters #
-
exam_idstring requiredThe exam's document id.
Responses #
-
200 Successful Response
-
document_idstring required -
workspace_idstring required -
resourceenum("patients" | "exams" | "templates") required -
security_group_idstring required -
encrypted_keysobject required -
encrypted_indexobject -
streamsobject -
metaobject -
created_atstring required -
created_bystring required -
updated_atstring required -
updated_byobject -
is_archivedboolean -
is_deletedboolean
-
-
400 The vault refused the request as invalid.
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
401 No client certificate, or the SDK session was rejected or expired (`session_expired`).
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
402 The workspace has no credit for this.
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
403 CN not allowed, permission denied, or no key for the data's security group (`group_key_unavailable`).
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
404 Not found — also a node read under a group it does not belong to.
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
409 A pending or newer version, a replay, or an upload that never reached storage.
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
422 The body or query failed validation (`invalid_request`).
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
429 Rate limited, after the SDK's own backoff gave up.
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
500 An envelope did not open (`crypto_error`, no detail on purpose).
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
502 The vault failed, or answered outside the protocol (`protocol_error`).
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
curl --cert client.crt --key client.key \
-X POST "https://api.imgexam.com/v1/exams/<exam_id>/archive" \
-H "Content-Type: application/json"import httpx
response = httpx.post(
"https://api.imgexam.com/v1/exams/<exam_id>/archive",
cert=("client.crt", "client.key"),
)
response.raise_for_status()
print(response.json()){
"document_id": "string",
"workspace_id": "string",
"resource": "patients",
"security_group_id": "string",
"encrypted_keys": {},
"encrypted_index": {},
"streams": {},
"meta": {},
"created_at": "string",
"created_by": "string",
"updated_at": "string",
"updated_by": {},
"is_archived": false,
"is_deleted": false
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}