{"files":{"SKILL.md":"---\nname: aws-iot-1-click-devices-service\ndescription: \"AWS IoT 1-Click Devices Service API skill. Use when working with AWS IoT 1-Click Devices Service for claims, devices, tags. Covers 13 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# AWS IoT 1-Click Devices Service\nAPI version: 2018-05-14\n\n## Auth\nAWS SigV4\n\n## Base URL\nNot specified.\n\n## Setup\n1. Configure auth: AWS SigV4\n2. GET /devices -- lists the 1-click compatible devices associated with your aws account.\n3. POST /devices/{deviceId}/methods -- create first method\n\n## Endpoints\n13 endpoints across 3 groups. See references/api-spec.lap for full details.\n\n### Claims\n| Method | Path | Description |\n|--------|------|-------------|\n| PUT | /claims/{claimCode} | Adds device(s) to your account (i.e., claim one or more devices) if and only if you\n received a claim code with the device(s). |\n\n### Devices\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /devices/{deviceId} | Given a device ID, returns a DescribeDeviceResponse object describing the\n details of the device. |\n| PUT | /devices/{deviceId}/finalize-claim | Given a device ID, finalizes the claim request for the associated device.\n Claiming a device consists of initiating a claim, then publishing a device event,\n and finalizing the claim. For a device of type button, a device event can\n be published by simply clicking the device. |\n| GET | /devices/{deviceId}/methods | Given a device ID, returns the invokable methods associated with the device. |\n| PUT | /devices/{deviceId}/initiate-claim | Given a device ID, initiates a claim request for the associated device.\n Claiming a device consists of initiating a claim, then publishing a device event,\n and finalizing the claim. For a device of type button, a device event can\n be published by simply clicking the device. |\n| POST | /devices/{deviceId}/methods | Given a device ID, issues a request to invoke a named device method (with possible\n parameters). See the \"Example POST\" code snippet below. |\n| GET | /devices/{deviceId}/events | Using a device ID, returns a DeviceEventsResponse object containing an\n array of events for the device. |\n| GET | /devices | Lists the 1-Click compatible devices associated with your AWS account. |\n| PUT | /devices/{deviceId}/unclaim | Disassociates a device from your AWS account using its device ID. |\n| PUT | /devices/{deviceId}/state | Using a Boolean value (true or false), this operation\n enables or disables the device given a device ID. |\n\n### Tags\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /tags/{resource-arn} | Lists the tags associated with the specified resource ARN. |\n| POST | /tags/{resource-arn} | Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per\n resource. |\n| DELETE | /tags/{resource-arn} | Using tag keys, deletes the tags (key/value pairs) associated with the specified\n resource ARN. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Update a claim?\" -> PUT /claims/{claimCode}\n- \"Get device details?\" -> GET /devices/{deviceId}\n- \"List all methods?\" -> GET /devices/{deviceId}/methods\n- \"Create a method?\" -> POST /devices/{deviceId}/methods\n- \"List all events?\" -> GET /devices/{deviceId}/events\n- \"List all devices?\" -> GET /devices\n- \"Get tag details?\" -> GET /tags/{resource-arn}\n- \"Delete a tag?\" -> DELETE /tags/{resource-arn}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api AWS IoT 1-Click Devices Service\n@version 2018-05-14\n@auth AWS SigV4\n@endpoints 13\n@toc claims(1), devices(9), tags(3)\n\n@group claims\n@endpoint PUT /claims/{claimCode}\n@desc Adds device(s) to your account (i.e., claim one or more devices) if and only if you\n@required {ClaimCode: str}\n@returns(200) {ClaimCode: str?, Total: int?}\n\n@endgroup\n\n@group devices\n@endpoint GET /devices/{deviceId}\n@desc Given a device ID, returns a DescribeDeviceResponse object describing the\n@required {DeviceId: str}\n@returns(200) {DeviceDescription: DeviceDescription?{Arn: str?, Attributes: map<str, str>?: any, DeviceId: str?, Enabled: bool?, RemainingLife: num(f64)?, Type: str?, Tags: map<str, str>?: any}}\n\n@endpoint PUT /devices/{deviceId}/finalize-claim\n@desc Given a device ID, finalizes the claim request for the associated device.\n@required {DeviceId: str}\n@optional {Tags: map<str,str>}\n@returns(200) {State: str?}\n\n@endpoint GET /devices/{deviceId}/methods\n@desc Given a device ID, returns the invokable methods associated with the device.\n@required {DeviceId: str}\n@returns(200) {DeviceMethods: [DeviceMethod]?}\n\n@endpoint PUT /devices/{deviceId}/initiate-claim\n@desc Given a device ID, initiates a claim request for the associated device.\n@required {DeviceId: str}\n@returns(200) {State: str?}\n\n@endpoint POST /devices/{deviceId}/methods\n@desc Given a device ID, issues a request to invoke a named device method (with possible\n@required {DeviceId: str}\n@optional {DeviceMethod: DeviceMethod, DeviceMethodParameters: str}\n@returns(200) {DeviceMethodResponse: str?}\n\n@endpoint GET /devices/{deviceId}/events\n@desc Using a device ID, returns a DeviceEventsResponse object containing an\n@required {DeviceId: str, fromTimeStamp: str(timestamp), toTimeStamp: str(timestamp)}\n@optional {maxResults: int, nextToken: str}\n@returns(200) {Events: [DeviceEvent]?, NextToken: str?}\n\n@endpoint GET /devices\n@desc Lists the 1-Click compatible devices associated with your AWS account.\n@optional {deviceType: str, maxResults: int, nextToken: str}\n@returns(200) {Devices: [DeviceDescription]?, NextToken: str?}\n\n@endgroup\n\n@group tags\n@endpoint GET /tags/{resource-arn}\n@desc Lists the tags associated with the specified resource ARN.\n@required {ResourceArn: str}\n@returns(200) {Tags: map<str,str>?}\n\n@endpoint POST /tags/{resource-arn}\n@desc Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per\n@required {ResourceArn: str, Tags: map<str,str>}\n\n@endgroup\n\n@group devices\n@endpoint PUT /devices/{deviceId}/unclaim\n@desc Disassociates a device from your AWS account using its device ID.\n@required {DeviceId: str}\n@returns(200) {State: str?}\n\n@endgroup\n\n@group tags\n@endpoint DELETE /tags/{resource-arn}\n@desc Using tag keys, deletes the tags (key/value pairs) associated with the specified\n@required {ResourceArn: str, tagKeys: [str]}\n\n@endgroup\n\n@group devices\n@endpoint PUT /devices/{deviceId}/state\n@desc Using a Boolean value (true or false), this operation\n@required {DeviceId: str}\n@optional {Enabled: bool}\n\n@endgroup\n\n@end\n"}}