Amazon Cognito Cognito Datasets API

The Cognito Datasets API from Amazon Cognito — 2 operation(s) for cognito datasets.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

DELETE /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName} Delete a sync dataset · Delete Dataset #
Ask an LLM
“Can I permanently delete a dataset so it can't be merged with others?”
“What happens to a dataset after it is deleted?”
Tell an agent destructive · confirm first
Delete dataset {dataset} from {identity} in {pool}.
Permanently remove {dataset} on {identity} in {pool}.
GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName} Get a sync dataset's metadata · Describe Dataset #
Ask an LLM
“What is the sync count and last modified date of a dataset?”
“Can I see metadata for one dataset of a user?”
Tell an agent
Describe dataset {dataset} in identity {identity} of pool {pool}.
Show metadata for {dataset} on {identity} in {pool}.
POST /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName} Sync records to a dataset · Update Records #
Ask an LLM
“How do I send new values to a dataset without losing other users' changes?”
“Can I patch records in a dataset with a stale sync count?”
Tell an agent
Update records {patches} in dataset {dataset} for {identity} in {pool} using sync token {token}.
Sync {patches} to {dataset} on {identity} in {pool} with session token {token}.
GET /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets List a user's sync datasets · List Datasets #
Ask an LLM
“Which datasets does a user have in a pool?”
“Can I page through a user's sync datasets?”
Tell an agent
List datasets for {identity} in {pool}.
Show up to {max} datasets for {identity} in {pool}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-cognito:amazon-cognito-datasets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-cognito-datasets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Cognito Identity Provider Datasets API
  version: '2016-04-18'
  description: Generated from AWS's published Smithy model for Amazon Cognito Identity Provider. 4 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://cognito-sync.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}:
    delete:
      operationId: DeleteDataset
      summary: Delete Dataset
      description: Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone.
        Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset
        will result in a ResourceNotFoundException. This API can be called with temporary user credentials provided by Cognito
        Identity or with developer credentials.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteDatasetResponse'
        '500':
          description: InternalErrorException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncInternalErrorException'
        '400':
          description: InvalidParameterException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncInvalidParameterException'
        '403':
          description: NotAuthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncNotAuthorizedException'
        '409':
          description: ResourceConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncResourceConflictException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncResourceNotFoundException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncTooManyRequestsException'
      parameters:
      - name: IdentityPoolId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: IdentityId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: DatasetName
        in: path
        required: true
        schema:
          type: string
        description: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash),
          and '.' (dot).
      tags:
      - Datasets
    get:
      operationId: DescribeDataset
      summary: Describe Dataset
      description: Gets meta data about a dataset by identity and dataset name. 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. This API 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.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DescribeDatasetResponse'
        '500':
          description: InternalErrorException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncInternalErrorException'
        '400':
          description: InvalidParameterException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncInvalidParameterException'
        '403':
          description: NotAuthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncNotAuthorizedException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncResourceNotFoundException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncTooManyRequestsException'
      parameters:
      - name: IdentityPoolId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: IdentityId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: DatasetName
        in: path
        required: true
        schema:
          type: string
        description: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash),
          and '.' (dot).
      tags:
      - Datasets
    post:
      operationId: UpdateRecords
      summary: Update Records
      description: Posts updates to records and adds and deletes records for a dataset and user. The sync count in the record
        patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException
        if you try to patch a record with a new value but a stale sync count.For example, if the sync count on the server
        is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected.
        To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response
        returns the new sync count for that record. You should present that sync count the next time you try to update that
        same record. When the record does not exist, specify the sync count as 0. This API can be called with temporary user
        credentials provided by Cognito Identity or with developer credentials.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateRecordsResponse'
        '500':
          description: InternalErrorException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncInternalErrorException'
        '400':
          description: InvalidLambdaFunctionOutputException; InvalidParameterException; LimitExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidLambdaFunctionOutputException'
        '429':
          description: LambdaThrottledException; TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LambdaThrottledException'
        '403':
          description: NotAuthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncNotAuthorizedException'
        '409':
          description: ResourceConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncResourceConflictException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncResourceNotFoundException'
      parameters:
      - name: IdentityPoolId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: IdentityId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: DatasetName
        in: path
        required: true
        schema:
          type: string
        description: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash),
          and '.' (dot).
      - name: x-amz-Client-Context
        in: header
        schema:
          type: string
        description: Intended to supply a device ID that will populate the lastModifiedBy field referenced in other methods.
          The ClientContext field is not yet implemented.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                DeviceId:
                  type: string
                  description: The unique ID generated for this device by Cognito.
                RecordPatches:
                  type: array
                  items:
                    $ref: '#/components/schemas/RecordPatch'
                  description: A list of patch operations.
                SyncSessionToken:
                  type: string
                  description: The SyncSessionToken returned by a previous call to ListRecords for this dataset and identity.
              required:
              - SyncSessionToken
      tags:
      - Datasets
  /identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets:
    get:
      operationId: ListDatasets
      summary: List Datasets
      description: 'Lists datasets for an 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. ListDatasets can be called
        with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito
        Identity credentials to make this API call. ListDatasets The following examples have been edited for readability.
        POST / HTTP/1.1 CONTENT-TYPE: application/json X-AMZN-REQUESTID: 15225768-209f-4078-aaed-7494ace9f2db X-AMZ-TARGET:
        com.amazonaws.cognito.sync.model.AWSCognitoSyncService.ListDatasets HOST: cognito-sync.us-east-1.amazonaws.com:443
        X-AMZ-DATE: 20141111T215640Z 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#ListDatasets", "Service": "com.amazonaws.cognito.sync.model#AWSCognitoSyncService",
        "Input": { "IdentityPoolId": "IDENTITY_POOL_ID", "IdentityId": "IDENTITY_ID", "MaxResults": "3" } } 1.1 200 OK x-amzn-requestid:
        15225768-209f-4078-aaed-7494ace9f2db, 15225768-209f-4078-aaed-7494ace9f2db content-type: app'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDatasetsResponse'
        '500':
          description: InternalErrorException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncInternalErrorException'
        '400':
          description: InvalidParameterException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncInvalidParameterException'
        '403':
          description: NotAuthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncNotAuthorizedException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CognitoSyncTooManyRequestsException'
      parameters:
      - name: IdentityPoolId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: IdentityId
        in: path
        required: true
        schema:
          type: string
        description: 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.
      - name: nextToken
        in: query
        schema:
          type: string
        description: A pagination token for obtaining the next page of results.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to be returned.
      tags:
      - Datasets
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: cognito-sync
  schemas:
    CognitoSyncInternalErrorException:
      type: object
      properties:
        message:
          type: string
          description: Message returned by InternalErrorException.
      required:
      - message
    CognitoSyncInvalidParameterException:
      type: object
      properties:
        message:
          type: string
          description: Message returned by InvalidParameterException.
      required:
      - message
    CognitoSyncNotAuthorizedException:
      type: object
      properties:
        message:
          type: string
          description: The message returned by a NotAuthorizedException.
      required:
      - message
    CognitoSyncResourceConflictException:
      type: object
      properties:
        message:
          type: string
          description: The message returned by a ResourceConflictException.
      required:
      - message
    CognitoSyncResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
          description: Message returned by a ResourceNotFoundException.
      required:
      - message
    CognitoSyncTooManyRequestsException:
      type: object
      properties:
        message:
          type: string
          description: Message returned by a TooManyRequestsException.
      required:
      - message
    Dataset:
      type: object
      properties:
        IdentityId:
          type: string
          description: 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.
        DatasetName:
          type: string
          description: A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash),
            and '.' (dot).
        CreationDate:
          type: string
          format: date-time
          description: Date on which the dataset was created.
        LastModifiedDate:
          type: string
          format: date-time
          description: Date when the dataset was last modified.
        LastModifiedBy:
          type: string
          description: The device that made the last change to this dataset.
        DataStorage:
          type: integer
          description: Total size in bytes of the records in this dataset.
        NumRecords:
          type: integer
          description: Number of records in this dataset.
    DeleteDatasetResponse:
      type: object
      properties:
        Dataset:
          $ref: '#/components/schemas/Dataset'
    DescribeDatasetResponse:
      type: object
      properties:
        Dataset:
          $ref: '#/components/schemas/Dataset'
    InvalidLambdaFunctionOutputException:
      type: object
      properties:
        message:
          type: string
          description: A message returned when an InvalidLambdaFunctionOutputException occurs
      required:
      - message
    LambdaThrottledException:
      type: object
      properties:
        message:
          type: string
          description: A message returned when an LambdaThrottledException is thrown
      required:
      - message
    ListDatasetsResponse:
      type: object
      properties:
        Datasets:
          type: array
          items:
            $ref: '#/components/schemas/Dataset'
          description: A set of datasets.
        Count:
          type: integer
          description: Number of datasets returned.
        NextToken:
          type: string
          description: A pagination token for obtaining the next page of results.
    Record:
      type: object
      properties:
        Key:
          type: string
          description: The key for the record.
        Value:
          type: string
          description: The value for the record.
        SyncCount:
          type: integer
          description: The server sync count for this record.
        LastModifiedDate:
          type: string
          format: date-time
          description: The date on which the record was last modified.
        LastModifiedBy:
          type: string
          description: The user/device that made the last change to this record.
        DeviceLastModifiedDate:
          type: string
          format: date-time
          description: The last modified date of the client device.
    RecordPatch:
      type: object
      properties:
        Op:
          type: string
          enum:
          - replace
          - remove
          description: An operation, either replace or remove.
        Key:
          type: string
          description: The key associated with the record patch.
        Value:
          type: string
          description: The value associated with the record patch.
        SyncCount:
          type: integer
          description: Last known server sync count for this record. Set to 0 if unknown.
        DeviceLastModifiedDate:
          type: string
          format: date-time
          description: The last modified date of the client device.
      required:
      - Op
      - Key
      - SyncCount
    UpdateRecordsResponse:
      type: object
      properties:
        Records:
          type: array
          items:
            $ref: '#/components/schemas/Record'
          description: A list of records that have been updated.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/cognito-sync/service/2014-06-30/cognito-sync-2014-06-30.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)