A file's details
files.file.get
GET/api/v1/households/{household_id}/queries/files.file.get
- Query
- Rigel runs it
The file's name, kind, and the type and size of each copy, or null when there is no such file.
Parameters#
| Field | Description |
|---|---|
household_idpathstringrequired | The household's ID. |
file_idquerystringrequired | A file ID, such as fil_01JC0000000000000000000000. |
Response#
200 The answer.
| Field | Description |
|---|---|
fileobject or nullrequired | The file, or null when it doesn't exist. |
file.idstringrequired | A file ID, such as fil_01JC0000000000000000000000. |
file.namestringrequired | The file's name as uploaded, used for downloads. |
file.kindone of: image, pdf, video, audio, otherrequired | What the file is: image, pdf, video, audio, or other (anything else, which is only ever offered as a download). |
file.originalobject or nullrequired | The bytes as uploaded, or null until the original is stored. |
file.original.typestringrequired | The original's media type, such as image/heic. |
file.original.sizeintegerrequired | The original's size in bytes. |
file.displayobject or nullrequired | The image that stands for the file on screen, or null when it has none. |
file.display.typestringrequired | The display copy's media type: image/jpeg, image/webp or image/png. |
file.display.sizeintegerrequired | The display copy's size in bytes. |
file.display.widthintegerrequired | The display copy's width in pixels. |
file.display.heightintegerrequired | The display copy's height in pixels. |
file.created_atstring (date-time)required | When the file was first stored. |
Errors#
Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.
| Status | Code | When |
|---|---|---|
400 | validation_failed | A field is missing, misspelled or out of range. details.fields lists each problem. |
401 | unauthenticated | The request has no valid session. |
404 | not_found | The household doesn't exist, or you aren't a member of it. |
Examples#
These are real. Each was recorded from a sample household, the Okafors, running through the whole API when this site was built.
Get a file's details
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CS96RRJQEBVXVCKMMR0T' \
-H "Cookie: rigel_session=$RIGEL_SESSION"const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CS96RRJQEBVXVCKMMR0T", {
headers: {
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
});
const data = await response.json();GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CS96RRJQEBVXVCKMMR0T HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CS9RX30EMT6B4SRF0FT9
{
"file": {
"id": "fil_01M6V9CS96RRJQEBVXVCKMMR0T",
"name": "pantry-middle-shelf.png",
"kind": "image",
"original": {
"type": "image/png",
"size": 655
},
"display": {
"type": "image/png",
"size": 342,
"width": 96,
"height": 64
},
"created_at": "2026-11-07T15:17:52.045Z"
}
}Ask for a file that was removed
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CSA07VXEA2WJV6NA8D4F' \
-H "Cookie: rigel_session=$RIGEL_SESSION"const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CSA07VXEA2WJV6NA8D4F", {
headers: {
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
});
const data = await response.json();GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CSA07VXEA2WJV6NA8D4F HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSA6W9F1Z77ENXHVF71H
{
"file": null
}For Rigel#
Rigel's tool for this query is files_file_get. Rigel runs this on its own, then says what it did. The agent guide has the rest.