Docs/Project Data

Project Data

These endpoints let API key owners and project members read aggregate stats and lists of sessions and uploads across the projects they have access to. They are designed for the dashboard and internal tooling, not for end-user clients.

Authentication

All project-data endpoints accept two authentication modes. Pass a dashboard JWT as a Bearer token to query across every project you own or belong to, or pass an API key (Bearer aptr_…) to scope the results to that key's project.

Recent sessions

Returns the most recently created upload sessions across every project the caller has access to. Useful for dashboard activity feeds.

GET/api/v1/sessions/recent

Query parameters

FieldTypeRequiredDescription
limitintegerNoNumber of records to return. Defaults to 10, maximum 50.

Response

Returns an array of session row objects (no pagination wrapper).

FieldTypeDescription
idstringSession UUID.
createdAtstringISO 8601 datetime when the session was created.
expiresAtstringISO 8601 datetime when the session expires.
statusstringOne of pending, active, expired, completed, failed.
projectIdstringUUID of the project this session belongs to.
projectNamestringDisplay name of the project.
imagesCountintegerTotal number of upload records on this session.
imagesDeliveredintegerNumber of uploads with at least one successful delivery.
imagesFailedintegerNumber of uploads where any destination failed.
destinationsCountintegerNumber of destinations the session is fanning out to.
tagsstring[] | nullSession tags, or null if none were set.
longPollingEnabledbooleanWhether long polling is enabled for this session.
curl https://api.apertur.ca/api/v1/sessions/recent?limit=10 \
  -H "Authorization: Bearer <jwt-token>"

List sessions

Paginated list of upload sessions across every project the caller has access to.

GET/api/v1/sessions

Query parameters

FieldTypeRequiredDescription
pageintegerNoPage number to return. Defaults to 1.
pageSizeintegerNoNumber of records per page. Defaults to 20, maximum 100.

Response

Returns a paginated wrapper. The data array contains session row objects with the same shape as /sessions/recent.

{
  "data": [/* array of session row objects */],
  "total": 134,
  "page": 1,
  "pageSize": 20,
  "totalPages": 7
}
FieldTypeDescription
idstringSession UUID.
createdAtstringISO 8601 datetime when the session was created.
expiresAtstringISO 8601 datetime when the session expires.
statusstringOne of pending, active, expired, completed, failed.
projectIdstringUUID of the project this session belongs to.
projectNamestringDisplay name of the project.
imagesCountintegerTotal number of upload records on this session.
imagesDeliveredintegerNumber of uploads with at least one successful delivery.
imagesFailedintegerNumber of uploads where any destination failed.
destinationsCountintegerNumber of destinations the session is fanning out to.
tagsstring[] | nullSession tags, or null if none were set.
longPollingEnabledbooleanWhether long polling is enabled for this session.
curl "https://api.apertur.ca/api/v1/sessions?page=1&pageSize=20" \
  -H "Authorization: Bearer <jwt-token>"

Recent uploads

Returns the most recently received upload records across every project the caller has access to, with per-destination delivery counts.

GET/api/v1/uploads/recent

Query parameters

FieldTypeRequiredDescription
limitintegerNoNumber of records to return. Defaults to 10, maximum 50.

Response

Returns an array of upload row objects (no pagination wrapper).

FieldTypeDescription
idstringUpload record UUID.
filenamestringOriginal filename of the uploaded file.
sizeBytesintegerFile size in bytes.
mimeTypestringDetected MIME type of the upload.
sourcestringOne of camera, gallery, url, google_drive, google_photos, dropbox, onedrive, box, instagram.
isEncryptedbooleanWhether the file is stored client-side encrypted.
createdAtstringISO 8601 datetime when the upload was received.
sessionIdstringUUID of the parent upload session.
projectIdstringUUID of the project this upload belongs to.
projectNamestringDisplay name of the project.
destinationsTotalintegerTotal number of destinations this upload is being delivered to.
destinationsDeliveredintegerNumber of destinations that have successfully received the upload.
destinationsFailedintegerNumber of destinations that have permanently failed.
destinationsBreakdownobject[]Array of { type, count } objects grouping delivery results by destination type.
statusstringDerived status: delivered, failed, partial, pending, or stored_only. See note below.

Upload status derivation

delivered = all destinations sent successfully. failed = at least one destination has finished and all of them failed. partial = mixed delivered and failed. pending = some destinations have not reported yet. stored_only = no destinations were dispatched (the image is stored on the server only).

curl https://api.apertur.ca/api/v1/uploads/recent?limit=10 \
  -H "Authorization: Bearer <jwt-token>"

List uploads

Paginated list of upload records across every project the caller has access to.

GET/api/v1/uploads

Query parameters

FieldTypeRequiredDescription
pageintegerNoPage number to return. Defaults to 1.
pageSizeintegerNoNumber of records per page. Defaults to 20, maximum 100.

Response

Returns a paginated wrapper. The data array contains upload row objects with the same shape as /uploads/recent.

{
  "data": [/* array of upload row objects */],
  "total": 482,
  "page": 1,
  "pageSize": 20,
  "totalPages": 25
}
FieldTypeDescription
idstringUpload record UUID.
filenamestringOriginal filename of the uploaded file.
sizeBytesintegerFile size in bytes.
mimeTypestringDetected MIME type of the upload.
sourcestringOne of camera, gallery, url, google_drive, google_photos, dropbox, onedrive, box, instagram.
isEncryptedbooleanWhether the file is stored client-side encrypted.
createdAtstringISO 8601 datetime when the upload was received.
sessionIdstringUUID of the parent upload session.
projectIdstringUUID of the project this upload belongs to.
projectNamestringDisplay name of the project.
destinationsTotalintegerTotal number of destinations this upload is being delivered to.
destinationsDeliveredintegerNumber of destinations that have successfully received the upload.
destinationsFailedintegerNumber of destinations that have permanently failed.
destinationsBreakdownobject[]Array of { type, count } objects grouping delivery results by destination type.
statusstringDerived status: delivered, failed, partial, pending, or stored_only. See note below.
curl "https://api.apertur.ca/api/v1/uploads?page=1&pageSize=20" \
  -H "Authorization: Bearer <jwt-token>"

Aggregate stats

Returns aggregate metrics across all projects the caller has access to, including this-month counts and the top projects by activity.

GET/api/v1/stats

Response

FieldTypeDescription
sessionsThisMonthintegerNumber of sessions created this calendar month.
sessionsTotalintegerAll-time total number of sessions.
imagesUploadedintegerAll-time total number of uploaded records.
imagesDeliveredintegerNumber of upload records with at least one successful delivery.
deliverySuccessRateintegerPercentage 0–100, computed from per-destination sent / (sent + failed).
totalProjectsintegerTotal number of projects the caller has access to.
activeKeysintegerNumber of API keys currently active across those projects.
topProjectsobject[]Array of up to 10 { id, name, sessions } objects ranked by session count this month.
curl https://api.apertur.ca/api/v1/stats \
  -H "Authorization: Bearer <jwt-token>"
Project Data | API Documentation | Apertur