Record a fact about an item, a model or a property
maintenance.attribute.record
POST/api/v1/households/{household_id}/commands/maintenance.attribute.record
- Command
- Rigel runs it
- Applies offline
Records one fact with how it was established. Give exactly one of asset_id, model_id or property_id. The fact replaces the same owner's current fact with the same key and origin, so a research result never replaces what the household said. Give value (text), value_num (a number) or both; unit goes with a number. evidence says where it came from. Errors: no_value.
Parameters#
| Field | Description |
|---|---|
household_idpathstringrequired | The household's ID. |
Idempotency-Keyheaderstringoptional | The command's ID. Reuse it when retrying the same command. |
Request body#
JSON, as application/json.
| Field | Description |
|---|---|
asset_idstringoptional | The item the fact is about. |
model_idstringoptional | The model the fact is about, true of every item of it. |
property_idstringoptional | The property the fact is about, such as year built. |
keystringrequired | What the fact is about, in snake_case, the same key everywhere: filter_size, capacity_gal, year_built. Reuse an existing key rather than inventing a synonym. |
valuestringoptional | The fact as text, exactly as found. |
value_numnumberoptional | The fact as a number, in the unit given. |
unitstringoptional | The unit of value_num, in snake_case: gallons, btu_per_hour, inches. |
originone of: homeowner, label, research, generalrequired | How the fact was established, strongest first: homeowner (someone in the household said or entered it), label (read off this unit's rating plate or sticker), research (found for this exact model in a manual, spec sheet or maker's page), general (typical for the category, not this model). |
evidenceobjectoptional | Where the fact came from: a photo, a page, a person. |
evidence.file_idstringoptional | A photo, manual or invoice already uploaded to the household's files. |
evidence.urlstring (uri)optional | A web address. |
evidence.said_by_person_idstringoptional | Who said it, when the source is something a person said. |
evidence.locatorstringoptional | Where in the source: "p. 14", "rating plate". |
evidence.excerptstringoptional | The exact text the value was read from. |
Response#
200 The command was applied.
| Field | Description |
|---|---|
resultobjectrequired | What the command returned, such as the IDs it created. |
result.attribute_idstringrequired | The new fact. |
versionintegerrequired | The household version after the command. |
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 | asset_not_found | An item that isn't there. |
404 | model_not_found | A model that isn't there. |
404 | property_not_found | A property that isn't there. |
404 | not_found | The household doesn't exist, or you aren't a member of it. |
409 | no_value | No value. |
409 | idempotency_key_reused | The Idempotency-Key was already used for a different command. |
Examples#
These are real. Each scenario is one of the command's test cases, run on a household when this site was built, and the response is what the API returned.
Records a fact about an item
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01JC0000000000000000000001",
key: "filter_size",
value: "16x25x1",
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0N3V66HRNMZTDTSY4
{
"result": {
"attribute_id": "atr_01JC4N0000MBGE5RJ6Q7V6V6T8"
},
"version": 1
}A number with a unit, about a model, with evidence
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"model_id": "eqm_01JC0000000000000000000001",
"key": "capacity",
"value_num": 80000,
"unit": "btu_per_hour",
"origin": "research",
"evidence": {
"url": "https://example.com/manual.pdf",
"locator": "p. 4"
}
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
model_id: "eqm_01JC0000000000000000000001",
key: "capacity",
value_num: 80000,
unit: "btu_per_hour",
origin: "research",
evidence: {
url: "https://example.com/manual.pdf",
locator: "p. 4",
},
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"model_id": "eqm_01JC0000000000000000000001",
"key": "capacity",
"value_num": 80000,
"unit": "btu_per_hour",
"origin": "research",
"evidence": {
"url": "https://example.com/manual.pdf",
"locator": "p. 4"
}
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DW31ATBF9PFFXG2P
{
"result": {
"attribute_id": "atr_01JC4N0000VGW1STJ6TGXRB7FY"
},
"version": 1
}A fact about a property
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC0000000000000000000001",
"key": "year_built",
"value_num": 1987,
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC0000000000000000000001",
key: "year_built",
value_num: 1987,
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC0000000000000000000001",
"key": "year_built",
"value_num": 1987,
"origin": "homeowner"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0FDWHPTC4J8YTCK02
{
"result": {
"attribute_id": "atr_01JC4N0000MBGE5RJ6Q7V6V6T8"
},
"version": 1
}Supersedes the same owner's current fact with the same key and origin
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01JC0000000000000000000001",
key: "filter_size",
value: "16x25x1",
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0JG45TZ9JSQ9TCV5J
{
"result": {
"attribute_id": "atr_01JC4N0000MBGE5RJ6Q7V6V6T8"
},
"version": 1
}Other origins, other keys and other owners stay current; old history isn't touched
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01JC0000000000000000000001",
key: "filter_size",
value: "16x25x1",
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R08QX2GDH35VMPH53C
{
"result": {
"attribute_id": "atr_01JC4N0000MBGE5RJ6Q7V6V6T8"
},
"version": 1
}No value
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01JC0000000000000000000001",
key: "filter_size",
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"origin": "homeowner"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R02CG9EXY4P72XVAEZ
{
"error": {
"code": "no_value",
"message": "Give the fact's value, as text or as a number. No changes were applied.",
"details": {},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R02CG9EXY4P72XVAEZ"
}
}An item that isn't there
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "x",
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01JC0000000000000000000001",
key: "filter_size",
value: "x",
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"asset_id": "ast_01JC0000000000000000000001",
"key": "filter_size",
"value": "x",
"origin": "homeowner"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0GE1DZDTQQAZTMEGF
{
"error": {
"code": "asset_not_found",
"message": "That item isn't in the house records any more. No changes were applied.",
"details": {
"asset_id": "ast_01JC0000000000000000000001"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0GE1DZDTQQAZTMEGF"
}
}A model that isn't there
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"model_id": "eqm_01JC0000000000000000000001",
"key": "filter_size",
"value": "x",
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
model_id: "eqm_01JC0000000000000000000001",
key: "filter_size",
value: "x",
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"model_id": "eqm_01JC0000000000000000000001",
"key": "filter_size",
"value": "x",
"origin": "homeowner"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0XNHR704RBV6BVSEC
{
"error": {
"code": "model_not_found",
"message": "That model isn't recorded any more. No changes were applied.",
"details": {
"model_id": "eqm_01JC0000000000000000000001"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0XNHR704RBV6BVSEC"
}
}A property that isn't there
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"property_id": "prp_01JC0000000000000000000001",
"key": "year_built",
"value_num": 1987,
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01JC0000000000000000000001",
key: "year_built",
value_num: 1987,
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"property_id": "prp_01JC0000000000000000000001",
"key": "year_built",
"value_num": 1987,
"origin": "homeowner"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R052538NQAW54ECDW0
{
"error": {
"code": "property_not_found",
"message": "That property isn't there any more. No changes were applied.",
"details": {
"property_id": "prp_01JC0000000000000000000001"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R052538NQAW54ECDW0"
}
}Record a fact about the house
Every fact says how it was established.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSV9E17C698BCMXBGQ61' \
-d '{
"property_id": "prp_01M6V9CSTXS6P4CG6RNTNT60FA",
"key": "year_built",
"value_num": 1998,
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSV9E17C698BCMXBGQ61",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01M6V9CSTXS6P4CG6RNTNT60FA",
key: "year_built",
value_num: 1998,
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSV9E17C698BCMXBGQ61
{
"property_id": "prp_01M6V9CSTXS6P4CG6RNTNT60FA",
"key": "year_built",
"value_num": 1998,
"origin": "homeowner"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSV9PYMY3XMNDCNB54QH
{
"result": {
"attribute_id": "atr_01M6V9CSV9CTQKPG4R3BT8JJHW"
},
"version": 172
}Record a fact someone said
evidence points at the person, file or page it came from.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSVBTYK87R7GQAFMRHH1' \
-d '{
"property_id": "prp_01M6V9CSTXS6P4CG6RNTNT60FA",
"key": "heating",
"value": "Forced-air gas furnace",
"origin": "homeowner",
"evidence": {
"said_by_person_id": "per_01M6V9CS6RX26JK5KVYGRN22D2"
}
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSVBTYK87R7GQAFMRHH1",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
property_id: "prp_01M6V9CSTXS6P4CG6RNTNT60FA",
key: "heating",
value: "Forced-air gas furnace",
origin: "homeowner",
evidence: {
said_by_person_id: "per_01M6V9CS6RX26JK5KVYGRN22D2",
},
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSVBTYK87R7GQAFMRHH1
{
"property_id": "prp_01M6V9CSTXS6P4CG6RNTNT60FA",
"key": "heating",
"value": "Forced-air gas furnace",
"origin": "homeowner",
"evidence": {
"said_by_person_id": "per_01M6V9CS6RX26JK5KVYGRN22D2"
}
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSVB45X4NXB308JDSYW3
{
"result": {
"attribute_id": "atr_01M6V9CSVBF91AZQYQC909EHV0"
},
"version": 173
}Record a fact found by research
A research fact never replaces what the household said or the label showed.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSW43DCF1MAW4X7H4Z3S' \
-d '{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "fuel",
"value": "natural gas",
"origin": "research"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSW43DCF1MAW4X7H4Z3S",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
key: "fuel",
value: "natural gas",
origin: "research",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSW43DCF1MAW4X7H4Z3S
{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "fuel",
"value": "natural gas",
"origin": "research"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSW47S04NHY04EK2DT00
{
"result": {
"attribute_id": "atr_01M6V9CSW490A53PGQKYRG7RBM"
},
"version": 184
}Record a fact read off the label
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSW5K5GE119P1FZAC94J' \
-d '{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "fuel",
"value": "natural gas",
"origin": "label",
"evidence": {
"locator": "rating plate",
"excerpt": "NATURAL GAS"
}
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSW5K5GE119P1FZAC94J",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
key: "fuel",
value: "natural gas",
origin: "label",
evidence: {
locator: "rating plate",
excerpt: "NATURAL GAS",
},
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSW5K5GE119P1FZAC94J
{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "fuel",
"value": "natural gas",
"origin": "label",
"evidence": {
"locator": "rating plate",
"excerpt": "NATURAL GAS"
}
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSW565MFN08PHSYZ5ZEG
{
"result": {
"attribute_id": "atr_01M6V9CSW5DANGBHC842K65T0A"
},
"version": 185
}Record a number with its unit
Give value_num and unit for a measurement.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSW783D1Y358QA8VBZQM' \
-d '{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "afue",
"value_num": 96,
"unit": "percent",
"origin": "label"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSW783D1Y358QA8VBZQM",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
key: "afue",
value_num: 96,
unit: "percent",
origin: "label",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSW783D1Y358QA8VBZQM
{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "afue",
"value_num": 96,
"unit": "percent",
"origin": "label"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSW713Y3FB2EH41GZKXR
{
"result": {
"attribute_id": "atr_01M6V9CSW7YVWP9VJJ42SFK57E"
},
"version": 186
}Record what someone measured
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSW8VK37TCHXAW3RSC9C' \
-d '{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSW8VK37TCHXAW3RSC9C",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
key: "filter_size",
value: "16x25x1",
origin: "homeowner",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSW8VK37TCHXAW3RSC9C
{
"asset_id": "ast_01M6V9CSVCMZFAP6ZN5WANZ6M8",
"key": "filter_size",
"value": "16x25x1",
"origin": "homeowner"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSW89PM5MKCHY0TB5DB0
{
"result": {
"attribute_id": "atr_01M6V9CSW8XX8EG50TW7K8DJT3"
},
"version": 187
}Record a capacity
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CSWAHEHM5XN30WQFC689' \
-d '{
"asset_id": "ast_01M6V9CSVGS9W2A8K5MDGN7GGD",
"key": "tank_capacity",
"value_num": 50,
"unit": "gal",
"origin": "label"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CSWAHEHM5XN30WQFC689",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
asset_id: "ast_01M6V9CSVGS9W2A8K5MDGN7GGD",
key: "tank_capacity",
value_num: 50,
unit: "gal",
origin: "label",
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/maintenance.attribute.record HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSWAHEHM5XN30WQFC689
{
"asset_id": "ast_01M6V9CSVGS9W2A8K5MDGN7GGD",
"key": "tank_capacity",
"value_num": 50,
"unit": "gal",
"origin": "label"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSWAXC3XD540G96WEZ99
{
"result": {
"attribute_id": "atr_01M6V9CSWAZMSF3H0CBRG9691X"
},
"version": 188
}For Rigel#
Rigel's tool for this command is maintenance_attribute_record. Rigel runs this on its own, then says what it did. The agent guide has the rest.