@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Amazon Cognito Sync
@version 2014-06-30
@auth AWS SigV4
@endpoints 17
@toc identitypools(17)

@endpoint POST /identitypools/{IdentityPoolId}/bulkpublish
@required {IdentityPoolId: str}
@returns(200) {IdentityPoolId: str?}

@endpoint DELETE /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}
@required {IdentityPoolId: str, IdentityId: str, DatasetName: str}
@returns(200) {Dataset: Dataset?{IdentityId: str?, DatasetName: str?, CreationDate: str(timestamp)?, LastModifiedDate: str(timestamp)?, LastModifiedBy: str?, DataStorage: int(i64)?, NumRecords: int(i64)?}}

@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}
@required {IdentityPoolId: str, IdentityId: str, DatasetName: str}
@returns(200) {Dataset: Dataset?{IdentityId: str?, DatasetName: str?, CreationDate: str(timestamp)?, LastModifiedDate: str(timestamp)?, LastModifiedBy: str?, DataStorage: int(i64)?, NumRecords: int(i64)?}}

@endpoint GET /identitypools/{IdentityPoolId}
@required {IdentityPoolId: str}
@returns(200) {IdentityPoolUsage: IdentityPoolUsage?{IdentityPoolId: str?, SyncSessionsCount: int(i64)?, DataStorage: int(i64)?, LastModifiedDate: str(timestamp)?}}

@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}
@required {IdentityPoolId: str, IdentityId: str}
@returns(200) {IdentityUsage: IdentityUsage?{IdentityId: str?, IdentityPoolId: str?, LastModifiedDate: str(timestamp)?, DatasetCount: int?, DataStorage: int(i64)?}}

@endpoint POST /identitypools/{IdentityPoolId}/getBulkPublishDetails
@required {IdentityPoolId: str}
@returns(200) {IdentityPoolId: str?, BulkPublishStartTime: str(timestamp)?, BulkPublishCompleteTime: str(timestamp)?, BulkPublishStatus: str?, FailureMessage: str?}

@endpoint GET /identitypools/{IdentityPoolId}/events
@required {IdentityPoolId: str}
@returns(200) {Events: map<str,str>?}

@endpoint GET /identitypools/{IdentityPoolId}/configuration
@required {IdentityPoolId: str}
@returns(200) {IdentityPoolId: str?, PushSync: PushSync?{ApplicationArns: [str]?, RoleArn: str?}, CognitoStreams: CognitoStreams?{StreamName: str?, RoleArn: str?, StreamingStatus: str?}}

@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets
@required {IdentityPoolId: str, IdentityId: str}
@optional {nextToken: str, maxResults: int}
@returns(200) {Datasets: [Dataset]?, Count: int?, NextToken: str?}

@endpoint GET /identitypools
@optional {nextToken: str, maxResults: int}
@returns(200) {IdentityPoolUsages: [IdentityPoolUsage]?, MaxResults: int?, Count: int?, NextToken: str?}

@endpoint GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records
@required {IdentityPoolId: str, IdentityId: str, DatasetName: str}
@optional {lastSyncCount: int(i64), nextToken: str, maxResults: int, syncSessionToken: str}
@returns(200) {Records: [Record]?, NextToken: str?, Count: int?, DatasetSyncCount: int(i64)?, LastModifiedBy: str?, MergedDatasetNames: [str]?, DatasetExists: bool?, DatasetDeletedAfterRequestedSyncCount: bool?, SyncSessionToken: str?}

@endpoint POST /identitypools/{IdentityPoolId}/identity/{IdentityId}/device
@required {IdentityPoolId: str, IdentityId: str, Platform: str, Token: str}
@returns(200) {DeviceId: str?}

@endpoint POST /identitypools/{IdentityPoolId}/events
@required {IdentityPoolId: str, Events: map<str,str>}

@endpoint POST /identitypools/{IdentityPoolId}/configuration
@required {IdentityPoolId: str}
@optional {PushSync: PushSync, CognitoStreams: CognitoStreams}
@returns(200) {IdentityPoolId: str?, PushSync: PushSync?{ApplicationArns: [str]?, RoleArn: str?}, CognitoStreams: CognitoStreams?{StreamName: str?, RoleArn: str?, StreamingStatus: str?}}

@endpoint POST /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}
@required {IdentityPoolId: str, IdentityId: str, DatasetName: str, DeviceId: str}

@endpoint DELETE /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}
@required {IdentityPoolId: str, IdentityId: str, DatasetName: str, DeviceId: str}

@endpoint POST /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}
@required {IdentityPoolId: str, IdentityId: str, DatasetName: str, SyncSessionToken: str}
@optional {x-amz-Client-Context: str, DeviceId: str, RecordPatches: [RecordPatch]}
@returns(200) {Records: [Record]?}

@end
