Skip to content
Rigel docs
Open Rigel

Take a card off the dashboard

dashboard.card.dismiss

POST/api/v1/households/{household_id}/commands/dashboard.card.dismiss

  • Command
  • Rigel runs it
  • Applies offline

Takes the card off the dashboard. A card for everyone is gone for everyone. Dismissing a card that's already dismissed changes nothing. Fails with card_not_found if there's no such card.

Parameters#

Take a card off the dashboard: parameters
FieldDescription
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.

Take a card off the dashboard: request body fields
FieldDescription
card_idstringrequired

A dashboard card ID, such as dcd_01JC0000000000000000000000.

Response#

200 The command was applied.

Take a card off the dashboard: response fields
FieldDescription
resultobjectrequired

What the command returned, such as the IDs it created.

result.card_idstringrequired

The card that was dismissed.

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.

Take a card off the dashboard: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404card_not_foundA card that isn't there.
404not_foundThe household doesn't exist, or you aren't a member of it.
409idempotency_key_reusedThe 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.

Takes a card off

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000QQQQQQQQQQQQQQQQ' \
  -d '{
  "card_id": "dcd_01JC00000000000000000000A1"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000QQQQQQQQQQQQQQQQ",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    card_id: "dcd_01JC00000000000000000000A1",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000QQQQQQQQQQQQQQQQ

{
  "card_id": "dcd_01JC00000000000000000000A1"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0JACCC9RJXBZ7FNB0

{
  "result": {
    "card_id": "dcd_01JC00000000000000000000A1"
  },
  "version": 1
}

Dismissing a card for one person works the same

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000RRRRRRRRRRRRRRRR' \
  -d '{
  "card_id": "dcd_01JC00000000000000000000A1"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000RRRRRRRRRRRRRRRR",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    card_id: "dcd_01JC00000000000000000000A1",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000RRRRRRRRRRRRRRRR

{
  "card_id": "dcd_01JC00000000000000000000A1"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DVERM69MQH1MC97D

{
  "result": {
    "card_id": "dcd_01JC00000000000000000000A1"
  },
  "version": 1
}

Dismissing twice changes nothing

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000TTTTTTTTTTTTTTTT' \
  -d '{
  "card_id": "dcd_01JC00000000000000000000A1"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000TTTTTTTTTTTTTTTT",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    card_id: "dcd_01JC00000000000000000000A1",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000TTTTTTTTTTTTTTTT

{
  "card_id": "dcd_01JC00000000000000000000A1"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MKA65BRTGDNYJNZ2

{
  "result": {
    "card_id": "dcd_01JC00000000000000000000A1"
  },
  "version": 1
}

A card that isn't there

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01JC4N0000SSSSSSSSSSSSSSSS' \
  -d '{
  "card_id": "dcd_01JC00000000000000000000A1"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01JC4N0000SSSSSSSSSSSSSSSS",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    card_id: "dcd_01JC00000000000000000000A1",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/dashboard.card.dismiss HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000SSSSSSSSSSSSSSSS

{
  "card_id": "dcd_01JC00000000000000000000A1"
}
Response, 404
HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0GN5GGB7RX3DXCWQ4

{
  "error": {
    "code": "card_not_found",
    "message": "That card isn't on the dashboard. No changes were applied.",
    "details": {},
    "recovery": "Read the current state, then send a command that fits it.",
    "request_id": "req_01K9D9S2R0GN5GGB7RX3DXCWQ4"
  }
}

Dismiss a card

Request, curl
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/dashboard.card.dismiss' \
  -H "Cookie: rigel_session=$RIGEL_SESSION" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: cmd_01M6V9CSQ4KYP58EMTNGDJNQ4C' \
  -d '{
  "card_id": "dcd_01M6V9CSPNCSXZ7E2W3DCNP2HZ"
}'
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/dashboard.card.dismiss", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Idempotency-Key": "cmd_01M6V9CSQ4KYP58EMTNGDJNQ4C",
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
  body: JSON.stringify({
    card_id: "dcd_01M6V9CSPNCSXZ7E2W3DCNP2HZ",
  }),
});
const data = await response.json();
Request, HTTP
POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/dashboard.card.dismiss HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CSQ4KYP58EMTNGDJNQ4C

{
  "card_id": "dcd_01M6V9CSPNCSXZ7E2W3DCNP2HZ"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSQ41WHB7EFR0QPQN0NM

{
  "result": {
    "card_id": "dcd_01M6V9CSPNCSXZ7E2W3DCNP2HZ"
  },
  "version": 132
}

For Rigel#

Rigel's tool for this command is dashboard_card_dismiss. Rigel runs this on its own, then says what it did. The agent guide has the rest.

Rigel is in early access, and sign-up is by invitation. Open Rigel