GET
/
api
/
v1
/
documents
[
  {
    "$uri": "/api/v1/documents/a1b2c3d4e5f67890",
    "created_at": "2023-11-07T05:31:56Z",
    "downloaders": [],
    "filename": "<string>",
    "size": 123,
    "uploader": {
      "$ref": "/api/v1/users/a1b2c3d4e5f67890"
    }
  }
]

GET all Document instances. Returns a paginated list of Documents.

Query Parameters

page
integer
default:1

Page number. Defaults to 1. See Pagination for more details.

per_page
integer
default:50

Number of requested paginated records. Defaults to 50. See Pagination for more details.

sort
object

Optional Mongo-style JSON sort clause, e.g., sort={"created_at": true} to sort by created_at (descending)

where
object

Optional Mongo-style JSON filter clause, e.g., where={"$uri": {"$eq": "/api/v1/samples/0ee172af60e84f61"}}

Response

200 - application/json
Successful operation
$uri
string
Example:

"/api/v1/documents/a1b2c3d4e5f67890"

created_at
string

Timestamp for when the object was created on the One Codex platform, encoded as a RFC 3339 timestamp.

downloaders
object[]

An (optionally empty) array of references to users that the document has been shared with. These users are able to download (but not modify) the document.

filename
string

The document filename (e.g., "report.pdf")

size
integer

The size of the document in bytes.

uploader
object

A reference to the user that uploaded and owns the document, e.g., {"$ref": "/api/v1/users/5891ee65711c4d5e"}. Only document owners can modify a sample (with some exceptions in the case of organization accounts configured for multiple users - please contact us if you'd like to discuss this use case).