@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AWS IoT 1-Click Devices Service
@version 2018-05-14
@auth AWS SigV4
@endpoints 13
@toc claims(1), devices(9), tags(3)

@group claims
@endpoint PUT /claims/{claimCode}
@required {ClaimCode: str}
@returns(200) {ClaimCode: str?, Total: int?}

@endgroup

@group devices
@endpoint GET /devices/{deviceId}
@required {DeviceId: str}
@returns(200) {DeviceDescription: DeviceDescription?{Arn: str?, Attributes: map<str,str>?, DeviceId: str?, Enabled: bool?, RemainingLife: num(f64)?, Type: str?, Tags: map<str,str>?}}

@endpoint PUT /devices/{deviceId}/finalize-claim
@required {DeviceId: str}
@optional {Tags: map<str,str>}
@returns(200) {State: str?}

@endpoint GET /devices/{deviceId}/methods
@required {DeviceId: str}
@returns(200) {DeviceMethods: [DeviceMethod]?}

@endpoint PUT /devices/{deviceId}/initiate-claim
@required {DeviceId: str}
@returns(200) {State: str?}

@endpoint POST /devices/{deviceId}/methods
@required {DeviceId: str}
@optional {DeviceMethod: DeviceMethod, DeviceMethodParameters: str}
@returns(200) {DeviceMethodResponse: str?}

@endpoint GET /devices/{deviceId}/events
@required {DeviceId: str, fromTimeStamp: str(timestamp), toTimeStamp: str(timestamp)}
@optional {maxResults: int, nextToken: str}
@returns(200) {Events: [DeviceEvent]?, NextToken: str?}

@endpoint GET /devices
@optional {deviceType: str, maxResults: int, nextToken: str}
@returns(200) {Devices: [DeviceDescription]?, NextToken: str?}

@endgroup

@group tags
@endpoint GET /tags/{resource-arn}
@required {ResourceArn: str}
@returns(200) {Tags: map<str,str>?}

@endpoint POST /tags/{resource-arn}
@required {ResourceArn: str, Tags: map<str,str>}

@endgroup

@group devices
@endpoint PUT /devices/{deviceId}/unclaim
@required {DeviceId: str}
@returns(200) {State: str?}

@endgroup

@group tags
@endpoint DELETE /tags/{resource-arn}
@required {ResourceArn: str, tagKeys: [str]}

@endgroup

@group devices
@endpoint PUT /devices/{deviceId}/state
@required {DeviceId: str}
@optional {Enabled: bool}

@endgroup

@end
