REST API
GET /v1/drives/{sg}/nodes
List drive nodes
/v1/drives/{sg}/nodes One page of files and folders in security group sg, each with its name decrypted (null when this process holds no key for the group).
Path parameters #
-
sgstring requiredThe security group (the drive).
Query parameters #
-
exam_idstringOnly files linked to this exam.
-
parent_idstringFolder node id.
-
include_pendingbooleanInclude uploads not finished yet.
-
limitintegerPage size, 1–200.
-
cursorstringThe `next_cursor` of the previous page.
Responses #
-
200 Successful Response
-
itemsobject[] required -
next_cursorobject
-
-
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 GET "https://api.imgexam.com/v1/drives/<sg>/nodes?exam_id=<string>&parent_id=<string>&include_pending=<boolean>&limit=<integer>&cursor=<string>" \
-H "Content-Type: application/json"import httpx
response = httpx.get(
"https://api.imgexam.com/v1/drives/<sg>/nodes",
cert=("client.crt", "client.key"),
params={"exam_id": <string>, "parent_id": <string>, "include_pending": <boolean>, "limit": <integer>, "cursor": <string>},
)
response.raise_for_status()
print(response.json()){
"items": [
{
"node": {
"node_id": "string",
"workspace_id": "string",
"security_group_id": "string",
"kind": "file",
"status": "pending",
"exam_id": {},
"parent_id": {},
"mode": {},
"media_kind": {},
"declared_size": {},
"size": {},
"mime_type": {},
"encrypted_name": {
"salt": "string",
"nonce": "string",
"ciphertext": "string"
},
"encrypted_keys": {},
"storage_path": {},
"optimized_variants": [
{
"kind": null,
"storage_bucket": null,
"storage_path": null,
"storage_size": null,
"storage_mime_type": null,
"created_at": null
}
],
"processing_status": {},
"processing_error": {},
"total_size": {},
"created_by": "string",
"created_at": "string",
"completed_at": {},
"is_deleted": false
},
"name": {}
}
],
"next_cursor": {}
}{
"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": {}
}
}