Request Format
Headers
All requests should include:multipart/form-data:
Request Body
Send JSON payloads for most endpoints:Query Parameters
Use query parameters for filtering, pagination, and opt-in expansions:Asset expansions with include
Asset responses are intentionally lean by default. Pass include when you need additional fields:
metadatafor camera, EXIF, GPS, and location fieldsfacesfor automatic and manual face boxespeoplefor deduplicated people recordsmetricsfor ML-generated quality scoresfile_datafor device IDs, timestamps, checksums, and file sizevariantsfor non-thumbnailasset_urlsrungs such assmall,preview,fullsize, andoriginal
include or send a comma-delimited value. For example, include=faces&include=people and include=faces,people are equivalent.
When present, each face row includes a source field so you can distinguish automatic detections from manual user-drawn boxes.
If your client renders anything larger than the thumbnail rung, start requesting include=variants now. The API reference already marks those larger asset_urls variants as opt-in, so sending the token keeps your integration aligned with the lean response model.
Response Format
Successful Responses
Successful requests return JSON with appropriate HTTP status codes:null or absent until you request them with include.
Asset timestamp fields
Gumnut uses different timestamps for different jobs:local_datetimeis the capture time in the device’s local wall-clock time.- If Gumnut knows the capture offset,
local_datetimeincludes it, for example2024-07-15T12:00:00-07:00. - If the source only records a wall-clock capture time and not its offset,
local_datetimeis returned without a timezone suffix, for example2024-07-15T12:00:00. created_atis when Gumnut created the asset record. It is not the capture time.file_data.file_created_atandfile_data.file_modified_atdescribe the uploaded file on the source device. Request them withinclude=file_datawhen you need file-level timestamps.
local_datetime when you want to group or filter by when an asset was captured. Use created_at when you need to track when the asset record arrived in Gumnut.
Status codes:
200 OK- Request succeeded201 Created- Resource created204 No Content- Request succeeded with no content
Error Responses
Errors return a consistent JSON structure:400 Bad Request- Invalid request401 Unauthorized- Authentication required403 Forbidden- Insufficient permissions404 Not Found- Resource not found429 Too Many Requests- Rate limit exceeded (see Rate Limiting)500 Internal Server Error- Server error
Best Practices
Error Handling
- Implement exponential backoff for retries on 429 and 5xx errors
- Handle rate limits gracefully using the
Retry-Afterheader (see Rate Limiting) - Log errors with the request ID for debugging
- Validate input before sending requests
Security
- Never expose API keys in client-side code
- Use HTTPS for all requests
- Implement proper authentication flows