From ff9e19567dc1b6374f27c443ef0e659f3ea4fcc8 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 16 May 2025 16:08:52 +0200 Subject: [PATCH 01/10] Generate /action_attempts route, add special handling for AA resource --- src/data/paths.yaml | 5 ++ src/lib/layout/action-attempt-resource.ts | 93 +++++++++++++++++++++++ src/lib/layout/api-route.ts | 20 +++-- src/lib/reference.ts | 3 +- 4 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 src/lib/layout/action-attempt-resource.ts diff --git a/src/data/paths.yaml b/src/data/paths.yaml index 4b9238aaa..99af5a94d 100644 --- a/src/data/paths.yaml +++ b/src/data/paths.yaml @@ -80,3 +80,8 @@ title: Enrollment Automations resources: - enrollment_automation + +/action_attempts: + title: Action Attempts + resources: + - action_attempt diff --git a/src/lib/layout/action-attempt-resource.ts b/src/lib/layout/action-attempt-resource.ts new file mode 100644 index 000000000..dfcca3ff6 --- /dev/null +++ b/src/lib/layout/action-attempt-resource.ts @@ -0,0 +1,93 @@ +import type { Blueprint } from '@seamapi/blueprint' + +import { + type ApiError, + type ApiRouteEvent, + type ApiRouteProperty, + type ApiRouteResource, + type ApiWarning, + mapBlueprintPropertyToRouteProperty, + type ResourceSampleContext, +} from './api-route.js' + +export function processActionAttemptResource( + blueprint: Blueprint, + resources: Array< + ApiRouteResource & { + warnings: ApiWarning[] + errors: ApiError[] + resourceSamples: ResourceSampleContext[] + } + >, + eventsByRoutePath: Map, +): void { + const blueprintActionAttemptDef = blueprint.actionAttempts[0] + if (blueprintActionAttemptDef == null) { + throw new Error( + 'Cannot process action attempt resource: blueprint.actionAttempts is empty.', + ) + } + + const idPropKey = 'action_attempt_id' + const idPropDef = blueprintActionAttemptDef.properties.find( + (p) => p.name === idPropKey, + ) + if (idPropDef == null) { + throw new Error( + `Blueprint action attempt is missing "${idPropKey}" property.`, + ) + } + + const statusPropKey = 'status' + const statusPropDef = blueprintActionAttemptDef.properties.find( + (p) => p.name === statusPropKey, + ) + if (statusPropDef == null) { + throw new Error( + `Blueprint action attempt is missing "${statusPropKey}" property.`, + ) + } + + const actionTypes = blueprint.actionAttempts.map( + (attempt) => attempt.actionAttemptType, + ) + + const properties: ApiRouteProperty[] = [ + mapBlueprintPropertyToRouteProperty(idPropDef), + mapBlueprintPropertyToRouteProperty(statusPropDef), + { + name: 'action_type', + description: 'Type of the action attempt.', + format: 'String', + isDeprecated: false, + deprecationMessage: '', + enumValues: actionTypes, + }, + { + name: 'error', + description: + 'Errors associated with the action attempt. Null for pending action attempts.', + format: 'Object', + isDeprecated: false, + deprecationMessage: '', + }, + { + name: 'result', + description: + 'Result of the action attempt. Null for pending action attempts.', + format: 'Object', + isDeprecated: false, + deprecationMessage: '', + }, + ] + + resources.push({ + name: 'action_attempt', + description: 'Represents an attempt to perform an action against a device.', + properties, + errors: [], + warnings: [], + events: eventsByRoutePath.get('/action_attempts') ?? [], + resourceSamples: [], + }) +} diff --git a/src/lib/layout/api-route.ts b/src/lib/layout/api-route.ts index fd51d64cd..f4b836dd5 100644 --- a/src/lib/layout/api-route.ts +++ b/src/lib/layout/api-route.ts @@ -15,6 +15,8 @@ import type { ResourceSample } from 'node_modules/@seamapi/blueprint/lib/samples import type { PathMetadata } from 'lib/path-metadata.js' +import { processActionAttemptResource } from './action-attempt-resource.js' + export interface ApiRouteLayoutContext { title: string description: string @@ -30,19 +32,19 @@ export interface ApiRouteLayoutContext { events: ApiRouteEvent[] } -interface ApiRouteEvent { +export interface ApiRouteEvent { name: string description: string properties: ApiRouteProperty[] } -interface ResourceSampleContext { +export interface ResourceSampleContext { title: string resourceData: string resourceDataSyntax: SyntaxName } -type ApiRouteProperty = Pick< +export type ApiRouteProperty = Pick< Property, 'name' | 'description' | 'isDeprecated' | 'deprecationMessage' > & { @@ -68,11 +70,12 @@ export interface ApiRouteResource { events: ApiRouteEvent[] } -interface ApiWarning { +export interface ApiWarning { name: string description: string } -interface ApiError { + +export interface ApiError { name: string description: string } @@ -108,6 +111,11 @@ export function setApiRouteLayoutContext( file.resources = [] for (const resourceType of metadata.resources) { + if (resourceType === 'action_attempt') { + processActionAttemptResource(blueprint, file.resources, eventsByRoutePath) + continue + } + const resource = blueprint.resources[resourceType] if (resource == null) { @@ -150,8 +158,6 @@ const groupEventsByRoutePath = ( const eventsByRoutePath = new Map() for (const event of events) { - if (event.routePath == null) continue - const routeEvents = eventsByRoutePath.get(event.routePath) ?? [] routeEvents.push({ name: event.eventType, diff --git a/src/lib/reference.ts b/src/lib/reference.ts index adae39a57..4cae12d1f 100644 --- a/src/lib/reference.ts +++ b/src/lib/reference.ts @@ -57,7 +57,8 @@ export const reference = ( !route.path.startsWith('/acs') && !route.path.startsWith('/thermostats') && !route.path.startsWith('/phones') && - !route.path.startsWith('/user_identities') + !route.path.startsWith('/user_identities') && + !route.path.startsWith('/action_attempts') ) { continue } From 2ab2b82150c685f037dfb2dcb74d08db40ba3595 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 16 May 2025 14:35:42 +0000 Subject: [PATCH 02/10] ci: Generate docs --- docs/api/_report.md | 1 - docs/api/action_attempts/README.md | 293 +++++++++++++++++++++++++++++ 2 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 docs/api/action_attempts/README.md diff --git a/docs/api/_report.md b/docs/api/_report.md index 327adc94d..750449c85 100644 --- a/docs/api/_report.md +++ b/docs/api/_report.md @@ -7,7 +7,6 @@ - `/access_codes` - `/access_codes/simulate` - `/access_codes/unmanaged` -- `/action_attempts` - `/bridges` - `/client_sessions` - `/connect_webviews` diff --git a/docs/api/action_attempts/README.md b/docs/api/action_attempts/README.md new file mode 100644 index 000000000..c711012eb --- /dev/null +++ b/docs/api/action_attempts/README.md @@ -0,0 +1,293 @@ +# Action Attempts + +## `action_attempt` + +Represents an attempt to perform an action against a device. + +### `action_attempt_id` + +Format: `UUID` + +ID of the action attempt. + +--- + +### `status` + +Format: `Enum` + +Possible enum values: +- `success` +- `pending` +- `error` + +--- + +### `action_type` + +Format: `String` + +Type of the action attempt. + +Possible enum values: +- `LOCK_DOOR` +- `UNLOCK_DOOR` +- `SCAN_CREDENTIAL` +- `ENCODE_ACCESS_METHOD` +- `ENCODE_CREDENTIAL` +- `RESET_SANDBOX_WORKSPACE` +- `SET_FAN_MODE` +- `SET_HVAC_MODE` +- `ACTIVATE_CLIMATE_PRESET` +- `SIMULATE_KEYPAD_CODE_ENTRY` +- `SIMULATE_MANUAL_LOCK_VIA_KEYPAD` +- `PUSH_THERMOSTAT_PROGRAMS` +- `SYNC_ACCESS_CODES` +- `CREATE_ACCESS_CODE` +- `DELETE_ACCESS_CODE` +- `UPDATE_ACCESS_CODE` +- `CREATE_NOISE_THRESHOLD` +- `DELETE_NOISE_THRESHOLD` +- `UPDATE_NOISE_THRESHOLD` + +--- + +### `error` + +Format: `Object` + +Errors associated with the action attempt. Null for pending action attempts. + +--- + +### `result` + +Format: `Object` + +Result of the action attempt. Null for pending action attempts. + +--- + +## Endpoints + + +--- + +## Events + +### `action_attempt.lock_door.succeeded` + +A lock door [action attempt](../../core-concepts/action-attempts.md) succeeded. + +
+ +action_attempt_id Format: UUID + +ID of the [action attempt](../../core-concepts/action-attempts.md). +
+
+ +action_type Format: String + +Type of action. +
+
+ +created_at Format: Datetime + +Date and time at which the event was created. +
+
+ +event_id Format: UUID + +ID of the event. +
+
+ +event_type Format: Enum + +Value: `action_attempt.lock_door.succeeded` +
+
+ +occurred_at Format: Datetime + +Date and time at which the event occurred. +
+
+ +status Format: String + +Status of the action. +
+
+ +workspace_id Format: UUID + +ID of the [workspace](../../core-concepts/workspaces/README.md). +
+--- + +### `action_attempt.lock_door.failed` + +A lock door [action attempt](../../core-concepts/action-attempts.md) failed. + +
+ +action_attempt_id Format: UUID + +ID of the [action attempt](../../core-concepts/action-attempts.md). +
+
+ +action_type Format: String + +Type of action. +
+
+ +created_at Format: Datetime + +Date and time at which the event was created. +
+
+ +event_id Format: UUID + +ID of the event. +
+
+ +event_type Format: Enum + +Value: `action_attempt.lock_door.failed` +
+
+ +occurred_at Format: Datetime + +Date and time at which the event occurred. +
+
+ +status Format: String + +Status of the action. +
+
+ +workspace_id Format: UUID + +ID of the [workspace](../../core-concepts/workspaces/README.md). +
+--- + +### `action_attempt.unlock_door.succeeded` + +An unlock door [action attempt](../../core-concepts/action-attempts.md) succeeded. + +
+ +action_attempt_id Format: UUID + +ID of the [action attempt](../../core-concepts/action-attempts.md). +
+
+ +action_type Format: String + +Type of action. +
+
+ +created_at Format: Datetime + +Date and time at which the event was created. +
+
+ +event_id Format: UUID + +ID of the event. +
+
+ +event_type Format: Enum + +Value: `action_attempt.unlock_door.succeeded` +
+
+ +occurred_at Format: Datetime + +Date and time at which the event occurred. +
+
+ +status Format: String + +Status of the action. +
+
+ +workspace_id Format: UUID + +ID of the [workspace](../../core-concepts/workspaces/README.md). +
+--- + +### `action_attempt.unlock_door.failed` + +An unlock door [action attempt](../../core-concepts/action-attempts.md) failed. + +
+ +action_attempt_id Format: UUID + +ID of the [action attempt](../../core-concepts/action-attempts.md). +
+
+ +action_type Format: String + +Type of action. +
+
+ +created_at Format: Datetime + +Date and time at which the event was created. +
+
+ +event_id Format: UUID + +ID of the event. +
+
+ +event_type Format: Enum + +Value: `action_attempt.unlock_door.failed` +
+
+ +occurred_at Format: Datetime + +Date and time at which the event occurred. +
+
+ +status Format: String + +Status of the action. +
+
+ +workspace_id Format: UUID + +ID of the [workspace](../../core-concepts/workspaces/README.md). +
+--- + From 6a746ca70c78263f140f2a1ebbc0881b798b75d9 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 10 Jul 2025 15:16:55 -0700 Subject: [PATCH 03/10] Remove action-attempt-resource --- src/lib/layout/action-attempt-resource.ts | 93 ----------------------- 1 file changed, 93 deletions(-) delete mode 100644 src/lib/layout/action-attempt-resource.ts diff --git a/src/lib/layout/action-attempt-resource.ts b/src/lib/layout/action-attempt-resource.ts deleted file mode 100644 index dfcca3ff6..000000000 --- a/src/lib/layout/action-attempt-resource.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { Blueprint } from '@seamapi/blueprint' - -import { - type ApiError, - type ApiRouteEvent, - type ApiRouteProperty, - type ApiRouteResource, - type ApiWarning, - mapBlueprintPropertyToRouteProperty, - type ResourceSampleContext, -} from './api-route.js' - -export function processActionAttemptResource( - blueprint: Blueprint, - resources: Array< - ApiRouteResource & { - warnings: ApiWarning[] - errors: ApiError[] - resourceSamples: ResourceSampleContext[] - } - >, - eventsByRoutePath: Map, -): void { - const blueprintActionAttemptDef = blueprint.actionAttempts[0] - if (blueprintActionAttemptDef == null) { - throw new Error( - 'Cannot process action attempt resource: blueprint.actionAttempts is empty.', - ) - } - - const idPropKey = 'action_attempt_id' - const idPropDef = blueprintActionAttemptDef.properties.find( - (p) => p.name === idPropKey, - ) - if (idPropDef == null) { - throw new Error( - `Blueprint action attempt is missing "${idPropKey}" property.`, - ) - } - - const statusPropKey = 'status' - const statusPropDef = blueprintActionAttemptDef.properties.find( - (p) => p.name === statusPropKey, - ) - if (statusPropDef == null) { - throw new Error( - `Blueprint action attempt is missing "${statusPropKey}" property.`, - ) - } - - const actionTypes = blueprint.actionAttempts.map( - (attempt) => attempt.actionAttemptType, - ) - - const properties: ApiRouteProperty[] = [ - mapBlueprintPropertyToRouteProperty(idPropDef), - mapBlueprintPropertyToRouteProperty(statusPropDef), - { - name: 'action_type', - description: 'Type of the action attempt.', - format: 'String', - isDeprecated: false, - deprecationMessage: '', - enumValues: actionTypes, - }, - { - name: 'error', - description: - 'Errors associated with the action attempt. Null for pending action attempts.', - format: 'Object', - isDeprecated: false, - deprecationMessage: '', - }, - { - name: 'result', - description: - 'Result of the action attempt. Null for pending action attempts.', - format: 'Object', - isDeprecated: false, - deprecationMessage: '', - }, - ] - - resources.push({ - name: 'action_attempt', - description: 'Represents an attempt to perform an action against a device.', - properties, - errors: [], - warnings: [], - events: eventsByRoutePath.get('/action_attempts') ?? [], - resourceSamples: [], - }) -} From e5464fad710b2d2cbdc3a923a0fb820cbc9aa874 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 10 Jul 2025 15:17:34 -0700 Subject: [PATCH 04/10] Remove import/export --- src/lib/layout/api-route.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/layout/api-route.ts b/src/lib/layout/api-route.ts index 29c647022..c68f006ab 100644 --- a/src/lib/layout/api-route.ts +++ b/src/lib/layout/api-route.ts @@ -13,7 +13,6 @@ import type { import { pascalCase } from 'change-case' import type { PathMetadata } from '../path-metadata.js' -import { processActionAttemptResource } from './action-attempt-resource.js' export interface ApiRouteLayoutContext { title: string @@ -32,7 +31,7 @@ export interface ApiRouteLayoutContext { events: ApiRouteEvent[] } -export interface ApiRouteEvent { +interface ApiRouteEvent { name: string description: string properties: ApiRouteProperty[] From 07f66a1126b0094d6ad7a47a34238681e9d106d0 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 10 Jul 2025 15:38:04 -0700 Subject: [PATCH 05/10] Fix types --- src/lib/layout/api-endpoint.ts | 3 +++ src/lib/layout/api-route.ts | 28 ++++++++++------------------ src/lib/reference.ts | 2 +- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/lib/layout/api-endpoint.ts b/src/lib/layout/api-endpoint.ts index 34c579a2f..abf5739bd 100644 --- a/src/lib/layout/api-endpoint.ts +++ b/src/lib/layout/api-endpoint.ts @@ -192,6 +192,9 @@ export function setEndpointLayoutContext( name: actionAttempt.actionAttemptType, description: actionAttempt.description, hidePreamble: false, + errorGroups: [], + warningGroups: [], + resourceSamples: [], propertyGroups: groupProperties( actionAttempt.properties.filter( ({ isUndocumented }) => !isUndocumented, diff --git a/src/lib/layout/api-route.ts b/src/lib/layout/api-route.ts index c68f006ab..db9bd48db 100644 --- a/src/lib/layout/api-route.ts +++ b/src/lib/layout/api-route.ts @@ -20,13 +20,7 @@ export interface ApiRouteLayoutContext { path: string isAlpha: boolean alphaMessage: string | undefined - resources: Array< - ApiRouteResource & { - warningGroups: ApiRouteVariantGroup[] - errorGroups: ApiRouteVariantGroup[] - resourceSamples: ResourceSampleContext[] - } - > + resources: ApiRouteResource[] endpoints: ApiRouteEndpoint[] events: ApiRouteEvent[] } @@ -77,6 +71,9 @@ export interface ApiRouteResource { events: ApiRouteEvent[] hidePreamble: boolean endpoints?: ApiRouteEndpoint[] + warningGroups: ApiRouteVariantGroup[] + errorGroups: ApiRouteVariantGroup[] + resourceSamples: ResourceSampleContext[] } interface ApiRouteVariantGroup { @@ -628,13 +625,7 @@ const getParentVariantResourceType = ( function processActionAttemptResource( blueprint: Blueprint, - resources: Array< - ApiRouteResource & { - warnings: ApiWarning[] - errors: ApiError[] - resourceSamples: ResourceSampleContext[] - } - >, + resources: ApiRouteResource[], eventsByRoutePath: Map, ): void { const blueprintActionAttemptDef = blueprint.actionAttempts[0] @@ -700,10 +691,11 @@ function processActionAttemptResource( resources.push({ name: 'action_attempt', description: 'Represents an attempt to perform an action against a device.', - properties, - errors: [], - warnings: [], - events: eventsByRoutePath.get('/action_attempts') ?? [], + propertyGroups: [{ propertyGroupKey: null, properties }], + hidePreamble: false, + errorGroups: [], + warningGroups: [], resourceSamples: [], + events: eventsByRoutePath.get('/action_attempts') ?? [], }) } diff --git a/src/lib/reference.ts b/src/lib/reference.ts index cc13c0e2c..07b487932 100644 --- a/src/lib/reference.ts +++ b/src/lib/reference.ts @@ -75,7 +75,7 @@ export const reference = ( !path.startsWith('/devices') && !path.startsWith('/locks') && !path.startsWith('/noise_sensors') && - !route.path.startsWith('/action_attempts') && + !path.startsWith('/action_attempts') && !path.startsWith('/access_codes') ) { return false From 3bdae3e0e680183435565d9f34593a10f047349d Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 10 Jul 2025 22:39:49 +0000 Subject: [PATCH 06/10] ci: Generate docs --- docs/api/_report.md | 1 - docs/api/_summary.md | 3 + docs/api/action_attempts/README.md | 309 ++++++++++++++--------------- docs/api/action_attempts/get.md | 188 ++++++++++++++++++ docs/api/action_attempts/list.md | 258 ++++++++++++++++++++++++ 5 files changed, 594 insertions(+), 165 deletions(-) create mode 100644 docs/api/action_attempts/get.md create mode 100644 docs/api/action_attempts/list.md diff --git a/docs/api/_report.md b/docs/api/_report.md index f60ff68cb..f8099394c 100644 --- a/docs/api/_report.md +++ b/docs/api/_report.md @@ -4,7 +4,6 @@ ### Routes -- `/action_attempts` - `/events` - `/thermostats/daily_programs` - `/user_identities/enrollment_automations` diff --git a/docs/api/_summary.md b/docs/api/_summary.md index deebbd366..ed49f3d43 100644 --- a/docs/api/_summary.md +++ b/docs/api/_summary.md @@ -76,6 +76,9 @@ * [Encode an Access Method](api/access_methods/encode.md) * [Get an Access Method](api/access_methods/get.md) * [List Access Methods](api/access_methods/list.md) +* [Action Attempts](api/action_attempts/README.md) + * [Get an Action Attempt](api/action_attempts/get.md) + * [List Action Attempts](api/action_attempts/list.md) * [Client Sessions](api/client_sessions/README.md) * [Create a Client Session](api/client_sessions/create.md) * [Delete a Client Session](api/client_sessions/delete.md) diff --git a/docs/api/action_attempts/README.md b/docs/api/action_attempts/README.md index c711012eb..28d3acc72 100644 --- a/docs/api/action_attempts/README.md +++ b/docs/api/action_attempts/README.md @@ -1,293 +1,274 @@ # Action Attempts -## `action_attempt` +## The action_attempt Object + +- [Properties](./#properties) +- [Events](./#events) + Represents an attempt to perform an action against a device. -### `action_attempt_id` +--- +## Properties -Format: `UUID` +**`action_attempt_id`** *UUID* ID of the action attempt. + + + --- -### `status` +**`status`** *Enum* -Format: `Enum` -Possible enum values: -- `success` -- `pending` -- `error` ---- +
+Enum values + +- success +- pending +- error +
-### `action_type` -Format: `String` +--- + +**`action_type`** *String* Type of the action attempt. -Possible enum values: -- `LOCK_DOOR` -- `UNLOCK_DOOR` -- `SCAN_CREDENTIAL` -- `ENCODE_ACCESS_METHOD` -- `ENCODE_CREDENTIAL` -- `RESET_SANDBOX_WORKSPACE` -- `SET_FAN_MODE` -- `SET_HVAC_MODE` -- `ACTIVATE_CLIMATE_PRESET` -- `SIMULATE_KEYPAD_CODE_ENTRY` -- `SIMULATE_MANUAL_LOCK_VIA_KEYPAD` -- `PUSH_THERMOSTAT_PROGRAMS` -- `SYNC_ACCESS_CODES` -- `CREATE_ACCESS_CODE` -- `DELETE_ACCESS_CODE` -- `UPDATE_ACCESS_CODE` -- `CREATE_NOISE_THRESHOLD` -- `DELETE_NOISE_THRESHOLD` -- `UPDATE_NOISE_THRESHOLD` ---- +
+Enum values + +- LOCK_DOOR +- UNLOCK_DOOR +- SCAN_CREDENTIAL +- ENCODE_CREDENTIAL +- RESET_SANDBOX_WORKSPACE +- SET_FAN_MODE +- SET_HVAC_MODE +- ACTIVATE_CLIMATE_PRESET +- SIMULATE_KEYPAD_CODE_ENTRY +- SIMULATE_MANUAL_LOCK_VIA_KEYPAD +- PUSH_THERMOSTAT_PROGRAMS +- SYNC_ACCESS_CODES +- CREATE_ACCESS_CODE +- DELETE_ACCESS_CODE +- UPDATE_ACCESS_CODE +- CREATE_NOISE_THRESHOLD +- DELETE_NOISE_THRESHOLD +- UPDATE_NOISE_THRESHOLD +
-### `error` -Format: `Object` +--- + +**`error`** *Object* Errors associated with the action attempt. Null for pending action attempts. ---- -### `result` -Format: `Object` + +--- + +**`result`** *Object* Result of the action attempt. Null for pending action attempts. ---- -## Endpoints --- + ## Events -### `action_attempt.lock_door.succeeded` +**`action_attempt.lock_door.succeeded`** A lock door [action attempt](../../core-concepts/action-attempts.md) succeeded.
-action_attempt_id Format: UUID +Properties -ID of the [action attempt](../../core-concepts/action-attempts.md). -
-
+action_attempt_id UUID -action_type Format: String + ID of the affected action attempt. -Type of action. -
-
+action_type String -created_at Format: Datetime + Type of the action. -Date and time at which the event was created. -
-
+created_at Datetime -event_id Format: UUID + Date and time at which the event was created. -ID of the event. -
-
+event_id UUID -event_type Format: Enum + ID of the event. -Value: `action_attempt.lock_door.succeeded` -
-
+event_type Enum -occurred_at Format: Datetime + Value: `action_attempt.lock_door.succeeded` -Date and time at which the event occurred. -
-
+occurred_at Datetime -status Format: String + Date and time at which the event occurred. -Status of the action. -
-
+status String + + Status of the action. -workspace_id Format: UUID +workspace_id UUID -ID of the [workspace](../../core-concepts/workspaces/README.md). + ID of the [workspace](../../core-concepts/workspaces/README.md) associated with the event.
+ --- -### `action_attempt.lock_door.failed` +**`action_attempt.lock_door.failed`** A lock door [action attempt](../../core-concepts/action-attempts.md) failed.
-action_attempt_id Format: UUID +Properties -ID of the [action attempt](../../core-concepts/action-attempts.md). -
-
+action_attempt_id UUID -action_type Format: String + ID of the affected action attempt. -Type of action. -
-
+action_type String -created_at Format: Datetime + Type of the action. -Date and time at which the event was created. -
-
+created_at Datetime -event_id Format: UUID + Date and time at which the event was created. -ID of the event. -
-
+event_id UUID -event_type Format: Enum + ID of the event. -Value: `action_attempt.lock_door.failed` -
-
+event_type Enum -occurred_at Format: Datetime + Value: `action_attempt.lock_door.failed` -Date and time at which the event occurred. -
-
+occurred_at Datetime -status Format: String + Date and time at which the event occurred. -Status of the action. -
-
+status String + + Status of the action. -workspace_id Format: UUID +workspace_id UUID -ID of the [workspace](../../core-concepts/workspaces/README.md). + ID of the [workspace](../../core-concepts/workspaces/README.md) associated with the event.
+ --- -### `action_attempt.unlock_door.succeeded` +**`action_attempt.unlock_door.succeeded`** An unlock door [action attempt](../../core-concepts/action-attempts.md) succeeded.
-action_attempt_id Format: UUID +Properties -ID of the [action attempt](../../core-concepts/action-attempts.md). -
-
+action_attempt_id UUID -action_type Format: String + ID of the affected action attempt. -Type of action. -
-
+action_type String -created_at Format: Datetime + Type of the action. -Date and time at which the event was created. -
-
+created_at Datetime -event_id Format: UUID + Date and time at which the event was created. -ID of the event. -
-
+event_id UUID -event_type Format: Enum + ID of the event. -Value: `action_attempt.unlock_door.succeeded` -
-
+event_type Enum -occurred_at Format: Datetime + Value: `action_attempt.unlock_door.succeeded` -Date and time at which the event occurred. -
-
+occurred_at Datetime -status Format: String + Date and time at which the event occurred. -Status of the action. -
-
+status String -workspace_id Format: UUID + Status of the action. -ID of the [workspace](../../core-concepts/workspaces/README.md). +workspace_id UUID + + ID of the [workspace](../../core-concepts/workspaces/README.md) associated with the event.
+ --- -### `action_attempt.unlock_door.failed` +**`action_attempt.unlock_door.failed`** An unlock door [action attempt](../../core-concepts/action-attempts.md) failed.
-action_attempt_id Format: UUID +Properties -ID of the [action attempt](../../core-concepts/action-attempts.md). -
-
+action_attempt_id UUID -action_type Format: String + ID of the affected action attempt. -Type of action. -
-
+action_type String -created_at Format: Datetime + Type of the action. -Date and time at which the event was created. -
-
+created_at Datetime -event_id Format: UUID + Date and time at which the event was created. -ID of the event. -
-
+event_id UUID -event_type Format: Enum + ID of the event. -Value: `action_attempt.unlock_door.failed` -
-
+event_type Enum -occurred_at Format: Datetime + Value: `action_attempt.unlock_door.failed` -Date and time at which the event occurred. -
-
+occurred_at Datetime -status Format: String + Date and time at which the event occurred. -Status of the action. -
-
+status String + + Status of the action. -workspace_id Format: UUID +workspace_id UUID -ID of the [workspace](../../core-concepts/workspaces/README.md). + ID of the [workspace](../../core-concepts/workspaces/README.md) associated with the event.
+ --- +## Endpoints + + +[**`/action_attempts/get`**](./get.md) + +Returns a specified [action attempt](../../core-concepts/action-attempts.md). + + +[**`/action_attempts/list`**](./list.md) + +Returns a list of the [action attempts](../../core-concepts/action-attempts.md) that you specify as an array of `action_attempt_id`s. + + diff --git a/docs/api/action_attempts/get.md b/docs/api/action_attempts/get.md new file mode 100644 index 000000000..852f841b0 --- /dev/null +++ b/docs/api/action_attempts/get.md @@ -0,0 +1,188 @@ +# Get an Action Attempt + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Returns a specified [action attempt](../../core-concepts/action-attempts.md). + + +{% tabs %} +{% tab title="JavaScript" %} + +Returns a specified action attempt. + +#### Code: + +```javascript +await seam.actionAttempts.get({ + action_attempt_id: "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", +}); +``` + +#### Output: + +```javascript +{ + "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type": "UNLOCK_DOOR", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} + +{% tab title="cURL" %} + +Returns a specified action attempt. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/action_attempts/get" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- < "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type" => "UNLOCK_DOOR", + "error" => nil, + "result" => { + }, + "status" => "success", +} +``` +{% endtab %} + +{% tab title="PHP" %} + +Returns a specified action attempt. + +#### Code: + +```php +$seam->action_attempts->get( + action_attempt_id: "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f" +); +``` + +#### Output: + +```php +[ + "action_attempt_id" => "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type" => "UNLOCK_DOOR", + "error" => null, + "result" => [], + "status" => "success", +]; +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Returns a specified action attempt. + +#### Code: + +```seam_cli +seam action-attempts get --action_attempt_id "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f" +``` + +#### Output: + +```seam_cli +{ + "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type": "UNLOCK_DOOR", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`action_attempt_id`** *String* (Required) + +ID of the action attempt that you want to get. + +--- + + +## Response + +[action\_attempt](./) + diff --git a/docs/api/action_attempts/list.md b/docs/api/action_attempts/list.md new file mode 100644 index 000000000..d6e0f77c8 --- /dev/null +++ b/docs/api/action_attempts/list.md @@ -0,0 +1,258 @@ +# List Action Attempts + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Returns a list of the [action attempts](../../core-concepts/action-attempts.md) that you specify as an array of `action_attempt_id`s. + + +{% tabs %} +{% tab title="JavaScript" %} + +Returns a list of the action attempts that you specify as an array of `action_attempt_id`s. + +#### Code: + +```javascript +await seam.actionAttempts.list({ + action_attempt_ids: [ + "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f", + ], +}); +``` + +#### Output: + +```javascript +[ + { + "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type": "UNLOCK_DOOR", + "error": null, + "result": {}, + "status": "success" + }, + { + "action_attempt_id": "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f", + "action_type": "LOCK_DOOR", + "error": null, + "result": {}, + "status": "success" + } +] +``` +{% endtab %} + +{% tab title="cURL" %} + +Returns a list of the action attempts that you specify as an array of `action_attempt_id`s. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/action_attempts/list" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- < "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type" => "UNLOCK_DOOR", + "error" => nil, + "result" => { + }, + "status" => "success", + }, + { + "action_attempt_id" => "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f", + "action_type" => "LOCK_DOOR", + "error" => nil, + "result" => { + }, + "status" => "success", + }, +] +``` +{% endtab %} + +{% tab title="PHP" %} + +Returns a list of the action attempts that you specify as an array of `action_attempt_id`s. + +#### Code: + +```php +$seam->action_attempts->list( + action_attempt_ids: [ + "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f", + ] +); +``` + +#### Output: + +```php +[ + [ + "action_attempt_id" => "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type" => "UNLOCK_DOOR", + "error" => null, + "result" => [], + "status" => "success", + ], + [ + "action_attempt_id" => "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f", + "action_type" => "LOCK_DOOR", + "error" => null, + "result" => [], + "status" => "success", + ], +]; +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Returns a list of the action attempts that you specify as an array of `action_attempt_id`s. + +#### Code: + +```seam_cli +seam action-attempts list --action_attempt_ids ["5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f","3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f"] +``` + +#### Output: + +```seam_cli +[ + { + "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f", + "action_type": "UNLOCK_DOOR", + "error": null, + "result": {}, + "status": "success" + }, + { + "action_attempt_id": "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f", + "action_type": "LOCK_DOOR", + "error": null, + "result": {}, + "status": "success" + } +] +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`action_attempt_ids`** *Array* *of UUIDs* (Required) + +IDs of the action attempts that you want to retrieve. + +--- + + +## Response + +Array of [action\_attempts](./) + From 2db48f05615795228f0f4541aa42feabbad52626 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 10 Jul 2025 15:54:08 -0700 Subject: [PATCH 07/10] Update SUMMARY --- docs/SUMMARY.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 76b0b6e77..b3d6d4911 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -216,8 +216,9 @@ * [Encode an Access Method](api/access_methods/encode.md) * [Get an Access Method](api/access_methods/get.md) * [List Access Methods](api/access_methods/list.md) -* [Action Attempts](api-clients/action_attempts/README.md) - * [Get Action Attempt](api-clients/action_attempts/get.md) +* [Action Attempts](api/action_attempts/README.md) + * [Get an Action Attempt](api/action_attempts/get.md) + * [List Action Attempts](api/action_attempts/list.md) * [Client Sessions](api/client_sessions/README.md) * [Create a Client Session](api/client_sessions/create.md) * [Delete a Client Session](api/client_sessions/delete.md) From 084605f842815ec7829f8c867fb63cda13a19d5a Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 10 Jul 2025 15:58:50 -0700 Subject: [PATCH 08/10] Update urls for api/action_attempts --- .gitbook.yaml | 4 ++-- docs/api-overview/overview.md | 2 +- .../activating-a-climate-preset.md | 2 +- docs/core-concepts/action-attempts.md | 2 +- .../33-lock-devices/get-started-with-33-lock-devices.md | 2 +- .../4suites-locks/get-started-with-4suites-locks.md | 2 +- .../akiles-locks/get-started-with-akiles-locks.md | 2 +- .../get-started-with-nest-thermostats.md | 2 +- .../get-started-with-honeywell-thermostats.md | 2 +- .../sensi-thermostats/get-started-with-sensi-thermostats.md | 2 +- .../get-started-with-smartthings-hubs-+-thermostats.md | 2 +- docs/device-guides/get-started-with-august-locks.md | 2 +- docs/device-guides/get-started-with-ecobee-thermostats.md | 2 +- .../get-started-with-smartthings-hubs-+-smart-locks.md | 2 +- docs/device-guides/get-started-with-ttlock-devices.md | 2 +- docs/products/smart-locks/lock-and-unlock.md | 4 ++-- .../thermostats/configure-current-climate-settings.md | 2 +- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.gitbook.yaml b/.gitbook.yaml index 1de3d0f3e..548f8e8a4 100644 --- a/.gitbook.yaml +++ b/.gitbook.yaml @@ -76,8 +76,8 @@ redirects: api-clients/access-control-systems/users/update-user: api/acs/users/update.md api-clients/access-control-systems/users: api/acs/users/README.md api-clients/access-control-systems: api/acs/README.md - api-clients/action-attempt/get-action-attempt: api-clients/action_attempts/get.md - api-clients/action-attempt: api-clients/action_attempts/README.md + api-clients/action-attempt/get-action-attempt: api/action_attempts/get.md + api-clients/action-attempt: api/action_attempts/README.md api-clients/client-sessions/create-a-client-session: api/client_sessions/create.md api-clients/client-sessions/delete-a-client-session: api/client_sessions/delete.md api-clients/client-sessions/get-a-client-session: api/client_sessions/get.md diff --git a/docs/api-overview/overview.md b/docs/api-overview/overview.md index e96bb31bb..6e342dd36 100644 --- a/docs/api-overview/overview.md +++ b/docs/api-overview/overview.md @@ -30,5 +30,5 @@ See the following reference topics: ## Monitoring * [Events](../api-clients/events/) -* [Action Attempts](../api-clients/action_attempts/) +* [Action Attempts](../api/action_attempts/) * [Connected Accounts](../api/connected_accounts/) diff --git a/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md b/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md index 69757361c..cb450291c 100644 --- a/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md +++ b/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md @@ -153,7 +153,7 @@ $seam->thermostats->activate_climate_preset( ## Poll the Action Attempt -Activating a climate preset returns an [action attempt](../../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../../api-clients/action_attempts/get.md) request. When the activation completes successfully, the `status` of the action attempt changes to `success`. +Activating a climate preset returns an [action attempt](../../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../../api/action_attempts/get.md) request. When the activation completes successfully, the `status` of the action attempt changes to `success`. {% tabs %} {% tab title="Python" %} diff --git a/docs/core-concepts/action-attempts.md b/docs/core-concepts/action-attempts.md index 2598a9aec..e63f7cba3 100644 --- a/docs/core-concepts/action-attempts.md +++ b/docs/core-concepts/action-attempts.md @@ -20,4 +20,4 @@ This action attempt enables you to keep track of the progress of your action. Our client libraries do this automatically for you. However, you can also choose not to wait and to check on the action at a later time. -For more information, see the [Action Attempts](../api-clients/action_attempts/) in the Seam API reference. +For more information, see the [Action Attempts](../api/action_attempts/) in the Seam API reference. diff --git a/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md b/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md index d8b7e51e8..3bab75919 100644 --- a/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md +++ b/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md @@ -875,7 +875,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md b/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md index db9ebd207..14ff58065 100644 --- a/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md +++ b/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md @@ -856,7 +856,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md b/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md index 02f09d3ea..ba62d24d2 100644 --- a/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md +++ b/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md @@ -857,7 +857,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md b/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md index ea767a586..4052468d3 100644 --- a/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md +++ b/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md @@ -919,7 +919,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md b/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md index 192fac37f..efdcb13b4 100644 --- a/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md +++ b/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md @@ -919,7 +919,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md b/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md index ac1d08362..5de69deb2 100644 --- a/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md +++ b/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md @@ -912,7 +912,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md b/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md index c4c1efb75..722bb73f1 100644 --- a/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md +++ b/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md @@ -922,7 +922,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-guides/get-started-with-august-locks.md b/docs/device-guides/get-started-with-august-locks.md index 6ed00eff6..7013ab8bd 100644 --- a/docs/device-guides/get-started-with-august-locks.md +++ b/docs/device-guides/get-started-with-august-locks.md @@ -878,7 +878,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-guides/get-started-with-ecobee-thermostats.md b/docs/device-guides/get-started-with-ecobee-thermostats.md index 68049aecd..18dc34ede 100644 --- a/docs/device-guides/get-started-with-ecobee-thermostats.md +++ b/docs/device-guides/get-started-with-ecobee-thermostats.md @@ -917,7 +917,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md b/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md index 23136267c..6a0566a2c 100644 --- a/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md +++ b/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md @@ -879,7 +879,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-guides/get-started-with-ttlock-devices.md b/docs/device-guides/get-started-with-ttlock-devices.md index 4e0c8db8b..60dcf9a92 100644 --- a/docs/device-guides/get-started-with-ttlock-devices.md +++ b/docs/device-guides/get-started-with-ttlock-devices.md @@ -875,7 +875,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/products/smart-locks/lock-and-unlock.md b/docs/products/smart-locks/lock-and-unlock.md index ccf7fae3f..5d4115d57 100644 --- a/docs/products/smart-locks/lock-and-unlock.md +++ b/docs/products/smart-locks/lock-and-unlock.md @@ -10,7 +10,7 @@ Seam enables you to lock or unlock your door lock remotely. This guide walks you When you send a command to a smart lock, it might take a while for Seam to confirm the action's success. To handle this, Seam provides [an "action attempt" object](../../core-concepts/action-attempts.md), which indicates whether the action was successful. -To ensure that the action has been successfully executed, we advise checking the status of the action attempt object by polling the ["Get Action Attempt" request](../../api-clients/action_attempts/get.md). Once Seam has successfully confirmed the action, the action attempt's `status` will indicate `success`. +To ensure that the action has been successfully executed, we advise checking the status of the action attempt object by polling the ["Get Action Attempt" request](../../api/action_attempts/get.md). Once Seam has successfully confirmed the action, the action attempt's `status` will indicate `success`. For those who prefer using webhooks to verify the success of an action, we'll soon introduce events that confirm an action's success. @@ -687,7 +687,7 @@ seam.Locks.LockDoor(deviceId: "11111111-1111-1111-1111-444444444444"); ### 2. Poll the Action Attempt to Verify the Success of the Action -Use the `action_attempt_id` from the prior response to make a [Get Action Attempt request](../../api-clients/action_attempts/get.md). When the action attempt's `status` changes to `success`, it indicates the action has been successful. +Use the `action_attempt_id` from the prior response to make a [Get Action Attempt request](../../api/action_attempts/get.md). When the action attempt's `status` changes to `success`, it indicates the action has been successful. {% tabs %} {% tab title="Python" %} diff --git a/docs/products/thermostats/configure-current-climate-settings.md b/docs/products/thermostats/configure-current-climate-settings.md index 6a04a4290..a6a1ba3b5 100644 --- a/docs/products/thermostats/configure-current-climate-settings.md +++ b/docs/products/thermostats/configure-current-climate-settings.md @@ -1134,7 +1134,7 @@ $seam->thermostats->set_fan_mode( ## Poll the Action Attempt -The imperative HVAC or fan mode setting request returns an [action attempt](../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../api-clients/action_attempts/get.md) request. When the setting modification completes successfully, the `status` of the action attempt changes to `success`. +The imperative HVAC or fan mode setting request returns an [action attempt](../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../api/action_attempts/get.md) request. When the setting modification completes successfully, the `status` of the action attempt changes to `success`. {% tabs %} {% tab title="Python" %} From 4b7217b0a675f862bece573f83523f09bb0c6ff3 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 10 Jul 2025 15:59:15 -0700 Subject: [PATCH 09/10] Remove api-clients/action_attempts --- docs/api-clients/action_attempts/README.md | 24 ---- docs/api-clients/action_attempts/get.md | 139 --------------------- 2 files changed, 163 deletions(-) delete mode 100644 docs/api-clients/action_attempts/README.md delete mode 100644 docs/api-clients/action_attempts/get.md diff --git a/docs/api-clients/action_attempts/README.md b/docs/api-clients/action_attempts/README.md deleted file mode 100644 index 7acce47c9..000000000 --- a/docs/api-clients/action_attempts/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Action Attempts - -## The Action Attempt Object - -| **`action_attempt_id`** | uuid | ID of the Action Attempt | -| ----------------------- | ------ | ----------------------------------------------------------- | -| **`action_type`** | string | [See table below](./#action-types) for list of action types | -| **`status`** | string | `pending` or `success` or `error` | -| **`result`** | object | Response data from the action | -| **`error`** | object | Error data from the action | - -### Action Types - -| `CREATE_ACCESS_CODE` | [Creates an Access Code](../../api/access_codes/create.md) for a keypad lock | -| ------------------------ | ------------------------------------------------------------------------------------------- | -| `DELETE_ACCESS_CODE` | [Deletes an Access Code](../../api/access_codes/delete.md) for a keypad lock | -| `LOCK_DOOR` | [Locks a Door Lock](../locks/lock_door.md) for a door lock | -| `UNLOCK_DOOR` | [Unlocks a Door Lock](../locks/unlock_door.md) for a door lock | -| `CREATE_NOISE_THRESHOLD` | [Creates a Noise Threshold](../noise_sensors/noise_thresholds/create.md) for a noise sensor | -| `REMOVE_NOISE_THRESHOLD` | [Removes a Noise Threshold](../noise_sensors/noise_thresholds/delete.md) for a noise sensor | - -### List of Methods - -
Get Action AttemptGet Action Attempt
diff --git a/docs/api-clients/action_attempts/get.md b/docs/api-clients/action_attempts/get.md deleted file mode 100644 index 98bb28b6a..000000000 --- a/docs/api-clients/action_attempts/get.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -description: Retrieve an Action Attempt using its ID. ---- - -# Get Action Attempt - -{% swagger method="get" path="/action_attempts/get" baseUrl="https://connect.getseam.com" summary="Get an Action Attempt" %} -{% swagger-description %} - -{% endswagger-description %} - -{% swagger-parameter in="query" name="action_attempt_id" required="true" %} -ID of the Action Attempt to be retrieved -{% endswagger-parameter %} - -{% swagger-parameter in="header" name="Authorization" required="true" %} -Bearer -{% endswagger-parameter %} - -{% swagger-response status="200: OK" description="Action Attempt retrieved" %} -```javascript -{ - "action_attempt": { - "status": "success", - "action_attempt_id": "f7d02670-128a-49f1-b615-b44a2808e5c4", - "action_type": "UNLOCK_DOOR", - "result": {}, - "error": null - }, - "ok": true -} -``` -{% endswagger-response %} - -{% swagger-response status="400: Bad Request" description="" %} -```javascript -{ - "error": { - "type": "invalid_input", - "message": "Required for provided \"action_attempt_id\"", - "validation_errors": { - "_errors": [], - "action_attempt_id": { - "_errors": [ - "Required" - ] - } - }, - "request_id": "315d5b5f-1dde-433f-9f01-ad780bbd4687" - }, - "ok": false -} -``` -{% endswagger-response %} - -{% swagger-response status="404: Not Found" description="Action Attempt not found" %} -```javascript -{ - "error": { - "type": "action_attempt_not_found", - "message": "action_attempt not found", - "data": { - "action_attempt_id": "f7d02670-123a-49f1-b615-b44a2808e5c4" - }, - "request_id": "27fa9e5d-485f-42ad-99d3-6d07006f00f5" - }, - "ok": false -} -``` -{% endswagger-response %} -{% endswagger %} - -### Code Example - -{% tabs %} -{% tab title="Python" %} -```python -seam.action_attempts.get("") - -# ActionAttempt( -# action_attempt_id='f7d02670-128a-49f1-b615-b44a2808e5c4', -# action_type='UNLOCK_DOOR', -# status='success', -# result={}, -# error=None -# ) -``` -{% endtab %} - -{% tab title="Javascript" %} -```javascript -await seam.actionAttempts.get( - "f7d02670-128a-49f1-b615-b44a2808e5c4" -); - -// { -// status: 'success', -// action_attempt_id: 'f7d02670-128a-49f1-b615-b44a2808e5c4', -// action_type: 'UNLOCK_DOOR', -// result: {}, -// error: null -// } -``` -{% endtab %} - -{% tab title="Ruby" %} -```ruby -seam.action_attempts.get(action_attempt_id: "f7d02670-128a-49f1-b615-b44a2808e5c4") -``` -{% endtab %} -{% endtabs %} - -### Parameters - -| `action_attempt_id` | type: string | ID of the Action Attempt to be retrieved | -| ------------------- | ------------ | ---------------------------------------- | - -### Response - -This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here. - -#### JSON format - -{% tabs %} -{% tab title="JSON" %} -```json -{ - "action_attempt": { - "status": "success", - "action_attempt_id": "f7d02670-128a-49f1-b615-b44a2808e5c4", - "action_type": "UNLOCK_DOOR", - "result": {}, - "error": null - }, - "ok": true -} -``` -{% endtab %} -{% endtabs %} From 0829ed0e9aedcfc71426da5f328d4ce908459c70 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Thu, 10 Jul 2025 17:52:50 -0700 Subject: [PATCH 10/10] Find / replace action attempt refs --- docs/SUMMARY.md | 4 ++-- docs/api-overview/overview.md | 2 +- .../activating-a-climate-preset.md | 2 +- docs/core-concepts/action-attempts.md | 2 +- .../33-lock-devices/get-started-with-33-lock-devices.md | 2 +- .../4suites-locks/get-started-with-4suites-locks.md | 2 +- .../akiles-locks/get-started-with-akiles-locks.md | 2 +- .../get-started-with-nest-thermostats.md | 2 +- .../get-started-with-honeywell-thermostats.md | 2 +- .../sensi-thermostats/get-started-with-sensi-thermostats.md | 2 +- .../get-started-with-smartthings-hubs-+-thermostats.md | 2 +- docs/device-guides/get-started-with-august-locks.md | 2 +- docs/device-guides/get-started-with-ecobee-thermostats.md | 2 +- .../get-started-with-smartthings-hubs-+-smart-locks.md | 2 +- docs/device-guides/get-started-with-ttlock-devices.md | 2 +- docs/products/smart-locks/lock-and-unlock.md | 4 ++-- .../thermostats/configure-current-climate-settings.md | 2 +- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index f64a32e51..8c1069837 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -226,8 +226,8 @@ * [Encode an Access Method](api/access_methods/encode.md) * [Get an Access Method](api/access_methods/get.md) * [List Access Methods](api/access_methods/list.md) -* [Action Attempts](api-clients/action_attempts/README.md) - * [Get Action Attempt](api-clients/action_attempts/get.md) +* [Action Attempts](api/action_attempts/README.md) + * [Get Action Attempt](api/action_attempts/get.md) * [Client Sessions](api/client_sessions/README.md) * [Create a Client Session](api/client_sessions/create.md) * [Delete a Client Session](api/client_sessions/delete.md) diff --git a/docs/api-overview/overview.md b/docs/api-overview/overview.md index e96bb31bb..6e342dd36 100644 --- a/docs/api-overview/overview.md +++ b/docs/api-overview/overview.md @@ -30,5 +30,5 @@ See the following reference topics: ## Monitoring * [Events](../api-clients/events/) -* [Action Attempts](../api-clients/action_attempts/) +* [Action Attempts](../api/action_attempts/) * [Connected Accounts](../api/connected_accounts/) diff --git a/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md b/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md index 69757361c..cb450291c 100644 --- a/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md +++ b/docs/capability-guides/thermostats/creating-and-managing-climate-presets/activating-a-climate-preset.md @@ -153,7 +153,7 @@ $seam->thermostats->activate_climate_preset( ## Poll the Action Attempt -Activating a climate preset returns an [action attempt](../../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../../api-clients/action_attempts/get.md) request. When the activation completes successfully, the `status` of the action attempt changes to `success`. +Activating a climate preset returns an [action attempt](../../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../../api/action_attempts/get.md) request. When the activation completes successfully, the `status` of the action attempt changes to `success`. {% tabs %} {% tab title="Python" %} diff --git a/docs/core-concepts/action-attempts.md b/docs/core-concepts/action-attempts.md index 2598a9aec..e63f7cba3 100644 --- a/docs/core-concepts/action-attempts.md +++ b/docs/core-concepts/action-attempts.md @@ -20,4 +20,4 @@ This action attempt enables you to keep track of the progress of your action. Our client libraries do this automatically for you. However, you can also choose not to wait and to check on the action at a later time. -For more information, see the [Action Attempts](../api-clients/action_attempts/) in the Seam API reference. +For more information, see the [Action Attempts](../api/action_attempts/) in the Seam API reference. diff --git a/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md b/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md index d8b7e51e8..3bab75919 100644 --- a/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md +++ b/docs/device-and-system-integration-guides/33-lock-devices/get-started-with-33-lock-devices.md @@ -875,7 +875,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md b/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md index db9ebd207..14ff58065 100644 --- a/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md +++ b/docs/device-and-system-integration-guides/4suites-locks/get-started-with-4suites-locks.md @@ -856,7 +856,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md b/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md index 02f09d3ea..ba62d24d2 100644 --- a/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md +++ b/docs/device-and-system-integration-guides/akiles-locks/get-started-with-akiles-locks.md @@ -857,7 +857,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md b/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md index ea767a586..4052468d3 100644 --- a/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md +++ b/docs/device-and-system-integration-guides/google-nest-thermostats/get-started-with-nest-thermostats.md @@ -919,7 +919,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md b/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md index 192fac37f..efdcb13b4 100644 --- a/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md +++ b/docs/device-and-system-integration-guides/honeywell-thermostats/get-started-with-honeywell-thermostats.md @@ -919,7 +919,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md b/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md index ac1d08362..5de69deb2 100644 --- a/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md +++ b/docs/device-and-system-integration-guides/sensi-thermostats/get-started-with-sensi-thermostats.md @@ -912,7 +912,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md b/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md index c4c1efb75..722bb73f1 100644 --- a/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md +++ b/docs/device-and-system-integration-guides/smartthings-hubs-+-devices/get-started-with-smartthings-hubs-+-thermostats.md @@ -922,7 +922,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-guides/get-started-with-august-locks.md b/docs/device-guides/get-started-with-august-locks.md index 6ed00eff6..7013ab8bd 100644 --- a/docs/device-guides/get-started-with-august-locks.md +++ b/docs/device-guides/get-started-with-august-locks.md @@ -878,7 +878,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-guides/get-started-with-ecobee-thermostats.md b/docs/device-guides/get-started-with-ecobee-thermostats.md index 68049aecd..18dc34ede 100644 --- a/docs/device-guides/get-started-with-ecobee-thermostats.md +++ b/docs/device-guides/get-started-with-ecobee-thermostats.md @@ -917,7 +917,7 @@ if ($living_room_thermostat->can_hvac_heat) { {% endtab %} {% endtabs %} -You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. +You can track the status of the operation to confirm that the device was set to heat mode successfully. Query `properties.current_climate_setting.hvac_mode_setting` for the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`thermostat.manually_adjusted` event](../api-clients/events/#event-types). Further, if you wanted to find out whether the HVAC system was currently heating, you could inspect `properties.is_heating` for the device. To query `properties.current_climate_setting.hvac_mode_setting` for the device: diff --git a/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md b/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md index 23136267c..6a0566a2c 100644 --- a/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md +++ b/docs/device-guides/get-started-with-smartthings-hubs-+-smart-locks.md @@ -879,7 +879,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/device-guides/get-started-with-ttlock-devices.md b/docs/device-guides/get-started-with-ttlock-devices.md index 4e0c8db8b..60dcf9a92 100644 --- a/docs/device-guides/get-started-with-ttlock-devices.md +++ b/docs/device-guides/get-started-with-ttlock-devices.md @@ -875,7 +875,7 @@ if (frontDoor.CanRemotelyUnlock == true) { {% endtab %} {% endtabs %} -You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api-clients/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). +You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the `locked` status of the device, [retrieve the action attempt](../api/action_attempts/get.md) by ID, or look for a [`lock.unlocked` event](../api-clients/events/#event-types). To query the `locked` status of the device: diff --git a/docs/products/smart-locks/lock-and-unlock.md b/docs/products/smart-locks/lock-and-unlock.md index ccf7fae3f..5d4115d57 100644 --- a/docs/products/smart-locks/lock-and-unlock.md +++ b/docs/products/smart-locks/lock-and-unlock.md @@ -10,7 +10,7 @@ Seam enables you to lock or unlock your door lock remotely. This guide walks you When you send a command to a smart lock, it might take a while for Seam to confirm the action's success. To handle this, Seam provides [an "action attempt" object](../../core-concepts/action-attempts.md), which indicates whether the action was successful. -To ensure that the action has been successfully executed, we advise checking the status of the action attempt object by polling the ["Get Action Attempt" request](../../api-clients/action_attempts/get.md). Once Seam has successfully confirmed the action, the action attempt's `status` will indicate `success`. +To ensure that the action has been successfully executed, we advise checking the status of the action attempt object by polling the ["Get Action Attempt" request](../../api/action_attempts/get.md). Once Seam has successfully confirmed the action, the action attempt's `status` will indicate `success`. For those who prefer using webhooks to verify the success of an action, we'll soon introduce events that confirm an action's success. @@ -687,7 +687,7 @@ seam.Locks.LockDoor(deviceId: "11111111-1111-1111-1111-444444444444"); ### 2. Poll the Action Attempt to Verify the Success of the Action -Use the `action_attempt_id` from the prior response to make a [Get Action Attempt request](../../api-clients/action_attempts/get.md). When the action attempt's `status` changes to `success`, it indicates the action has been successful. +Use the `action_attempt_id` from the prior response to make a [Get Action Attempt request](../../api/action_attempts/get.md). When the action attempt's `status` changes to `success`, it indicates the action has been successful. {% tabs %} {% tab title="Python" %} diff --git a/docs/products/thermostats/configure-current-climate-settings.md b/docs/products/thermostats/configure-current-climate-settings.md index 6a04a4290..a6a1ba3b5 100644 --- a/docs/products/thermostats/configure-current-climate-settings.md +++ b/docs/products/thermostats/configure-current-climate-settings.md @@ -1134,7 +1134,7 @@ $seam->thermostats->set_fan_mode( ## Poll the Action Attempt -The imperative HVAC or fan mode setting request returns an [action attempt](../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../api-clients/action_attempts/get.md) request. When the setting modification completes successfully, the `status` of the action attempt changes to `success`. +The imperative HVAC or fan mode setting request returns an [action attempt](../../core-concepts/action-attempts.md). Use the `action_attempt_id` from this response to poll the associated action attempt using the [`/action_attempts/get`](../../api/action_attempts/get.md) request. When the setting modification completes successfully, the `status` of the action attempt changes to `success`. {% tabs %} {% tab title="Python" %}