Skip to content

/AWS1/CL_CGS=>LISTRECORDS()

About ListRecords

Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.

ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.

ListRecords The following examples have been edited for readability. POST / HTTP/1.1 CONTENT-TYPE: application/json X-AMZN-REQUESTID: b3d2e31e-d6b7-4612-8e84-c9ba288dab5d X-AMZ-TARGET: com.amazonaws.cognito.sync.model.AWSCognitoSyncService.ListRecords HOST: cognito-sync.us-east-1.amazonaws.com:443 X-AMZ-DATE: 20141111T183230Z AUTHORIZATION: AWS4-HMAC-SHA256 Credential=, SignedHeaders=content-type;host;x-amz-date;x-amz-target;x-amzn-requestid, Signature=

{ "Operation": "com.amazonaws.cognito.sync.model#ListRecords", "Service": "com.amazonaws.cognito.sync.model#AWSCognitoSyncService", "Input": { "IdentityPoolId": "IDENTITY_POOL_ID", "IdentityId": "IDENTITY_ID", "DatasetName": "newDataSet" } } 1.1 200 OK x-amzn-requestid: b3d2e31e-d6b7-4612-8e84-c9ba288dab5d content-type: application/json content-length: 623 date: Tue, 11 Nov 2014 18:32:30 GMT

{ "Output": { "__type": "com.amazonaws.cognito.sync.model#ListRecordsResponse", "Count": 0, "DatasetDeletedAfterRequestedSyncCount": false, "DatasetExists": false, "DatasetSyncCount": 0, "LastModifiedBy": null, "MergedDatasetNames": null, "NextToken": null, "Records": [], "SyncSessionToken": "SYNC_SESSION_TOKEN" }, "Version": "1.0" }

Method Signature

IMPORTING

Required arguments:

IV_IDENTITYPOOLID TYPE /AWS1/CGSIDENTITYPOOLID /AWS1/CGSIDENTITYPOOLID

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

IV_IDENTITYID TYPE /AWS1/CGSIDENTITYID /AWS1/CGSIDENTITYID

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

IV_DATASETNAME TYPE /AWS1/CGSDATASETNAME /AWS1/CGSDATASETNAME

A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).

Optional arguments:

IV_LASTSYNCCOUNT TYPE /AWS1/CGSLONG /AWS1/CGSLONG

The last server sync count for this record.

IV_NEXTTOKEN TYPE /AWS1/CGSSTRING /AWS1/CGSSTRING

A pagination token for obtaining the next page of results.

IV_MAXRESULTS TYPE /AWS1/CGSINTEGERSTRING /AWS1/CGSINTEGERSTRING

The maximum number of results to be returned.

IV_SYNCSESSIONTOKEN TYPE /AWS1/CGSSYNCSESSIONTOKEN /AWS1/CGSSYNCSESSIONTOKEN

A token containing a session ID, identity ID, and expiration.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_CGSLISTRECORDSRSP /AWS1/CL_CGSLISTRECORDSRSP