Amazon IoT SiteWise Iot Sitewise Data Segments API

The Iot Sitewise Data Segments API from Amazon IoT SiteWise — 4 operation(s) for iot sitewise data segments.

GitHub OpenAPI

Operations 4

POST /datasets/{datasetId}/data-segments/associate Batch Associate Data Segments To Dataset #
POST /datasets/{datasetId}/data-segments/batch-delete Batch Delete Dataset Data Segments #
POST /datasets/{datasetId}/data-segments/disassociate Batch Disassociate Data Segments From Dataset #
GET /datasets/{datasetId}/data-segments List Dataset Data Segments #

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-iot-sitewise:amazon-iot-sitewise-data-segments-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-iot-sitewise-data-segments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS IoT SiteWise Data Segments API
  version: '2019-12-02'
  description: Generated from AWS's published Smithy model for AWS IoT SiteWise. 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://iotsitewise.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /datasets/{datasetId}/data-segments/associate:
    post:
      operationId: BatchAssociateDataSegmentsToDataset
      summary: Batch Associate Data Segments To Dataset
      description: Associates a batch of data segments with a curated dataset. Data segments are time-bounded slices of time
        series data selected from source session datasets. Data segments that belong to the same time series can't overlap
        in time, regardless of which dataset they belong to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchAssociateDataSegmentsToDatasetResponse'
        '409':
          description: ConflictingOperationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictingOperationException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '410':
          description: LimitExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: datasetId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the curated dataset to associate data segments with.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspaceName:
                  type: string
                  description: The name of the workspace that contains the dataset.
                associateDataSegmentEntries:
                  type: array
                  items:
                    $ref: '#/components/schemas/AssociateDataSegmentEntry'
                  description: The list of data segment entries to associate with the dataset.
                clientToken:
                  type: string
                  description: A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
                    If you retry a request that completed successfully using the same client token, the retry succeeds without
                    performing any further actions.
              required:
              - workspaceName
              - associateDataSegmentEntries
      tags:
      - Data Segments
  /datasets/{datasetId}/data-segments/batch-delete:
    post:
      operationId: BatchDeleteDatasetDataSegments
      summary: Batch Delete Dataset Data Segments
      description: Deletes a batch of data segments from a session dataset. Deleting a data segment deletes the underlying
        time series data for the segment's time range.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchDeleteDatasetDataSegmentsResponse'
        '409':
          description: ConflictingOperationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictingOperationException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: datasetId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the session dataset from which to delete data segments.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspaceName:
                  type: string
                  description: The name of the workspace that contains the dataset.
                deleteDataSegmentEntries:
                  type: array
                  items:
                    $ref: '#/components/schemas/DeleteDataSegmentEntry'
                  description: The list of data segment entries to delete.
                clientToken:
                  type: string
                  description: A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
                    If you retry a request that completed successfully using the same client token, the retry succeeds without
                    performing any further actions.
              required:
              - workspaceName
              - deleteDataSegmentEntries
      tags:
      - Data Segments
  /datasets/{datasetId}/data-segments/disassociate:
    post:
      operationId: BatchDisassociateDataSegmentsFromDataset
      summary: Batch Disassociate Data Segments From Dataset
      description: Disassociates a batch of data segments from a curated dataset. Disassociating a data segment doesn't delete
        the underlying data in the source session dataset.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchDisassociateDataSegmentsFromDatasetResponse'
        '409':
          description: ConflictingOperationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictingOperationException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: datasetId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the curated dataset to disassociate data segments from.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspaceName:
                  type: string
                  description: The name of the workspace that contains the dataset.
                disassociateDataSegmentEntries:
                  type: array
                  items:
                    $ref: '#/components/schemas/DisassociateDataSegmentEntry'
                  description: The list of data segment entries to disassociate from the dataset.
                clientToken:
                  type: string
                  description: A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
                    If you retry a request that completed successfully using the same client token, the retry succeeds without
                    performing any further actions.
              required:
              - workspaceName
              - disassociateDataSegmentEntries
      tags:
      - Data Segments
  /datasets/{datasetId}/data-segments:
    get:
      operationId: ListDatasetDataSegments
      summary: List Dataset Data Segments
      description: Retrieves a paginated list of data segments associated with a dataset. Use the nextToken parameter to retrieve
        additional results.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDatasetDataSegmentsResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: datasetId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the dataset.
      - name: workspaceName
        in: query
        required: true
        schema:
          type: string
        description: The name of the workspace that contains the dataset.
      - name: datasetVersion
        in: query
        schema:
          type: string
        description: The version of the dataset to list data segments for.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: 'The maximum number of results to return for each paginated request. Default: 50.'
      - name: nextToken
        in: query
        schema:
          type: string
        description: The token to be used for the next set of paginated results.
      tags:
      - Data Segments
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: iotsitewise
  schemas:
    AssociateDataSegmentEntry:
      type: object
      properties:
        sourceDatasetId:
          type: string
          description: The ID of the source dataset that contains the data segment.
        timeSeriesId:
          type: string
          description: The ID of the time series.
        startTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        endTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
      required:
      - sourceDatasetId
      - timeSeriesId
      - startTimestamp
      - endTimestamp
    BatchAssociateDataSegmentsToDatasetResponse:
      type: object
      properties:
        datasetId:
          type: string
          description: The ID of the dataset.
        datasetVersion:
          type: string
          description: The version of the dataset after association.
        failedAssociations:
          type: array
          items:
            $ref: '#/components/schemas/FailedDataSegmentAssociation'
          description: A list of data segment associations that failed.
      required:
      - datasetId
      - datasetVersion
      - failedAssociations
    BatchDeleteDatasetDataSegmentsResponse:
      type: object
      properties:
        datasetId:
          type: string
          description: The ID of the dataset.
        datasetVersion:
          type: string
          description: The version of the dataset after deletion.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FailedDataSegmentDeletion'
          description: A list of data segment deletions that failed.
      required:
      - datasetId
      - datasetVersion
      - errors
    BatchDisassociateDataSegmentsFromDatasetResponse:
      type: object
      properties:
        datasetId:
          type: string
          description: The ID of the dataset.
        datasetVersion:
          type: string
          description: The version of the dataset after disassociation.
        failedDisassociations:
          type: array
          items:
            $ref: '#/components/schemas/FailedDataSegmentDisassociation'
          description: A list of data segment disassociations that failed.
      required:
      - datasetId
      - datasetVersion
      - failedDisassociations
    ConflictingOperationException:
      type: object
      properties:
        message:
          type: string
        resourceId:
          type: string
          description: The ID of the resource that conflicts with this operation.
        resourceArn:
          type: string
          description: The ARN of the resource that conflicts with this operation.
      required:
      - message
      - resourceId
      - resourceArn
    DataSegmentEnrichment:
      type: object
      properties:
        status:
          type: string
          enum:
          - ENRICHED
          - NOT_ENRICHED
          description: The enrichment status of the data segment.
        lastEnrichedAt:
          type: string
          format: date-time
          description: The date the data segment was last enriched, in Unix epoch time.
      required:
      - status
    DataSegmentSummary:
      type: object
      properties:
        sourceDatasetId:
          type: string
          description: The ID of the source dataset that contains the data segment.
        timeSeriesId:
          type: string
          description: The ID of the time series.
        startTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        endTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        alias:
          type: string
          description: The alias of the time series.
        dataType:
          type: string
          enum:
          - STRING
          - INTEGER
          - DOUBLE
          - BOOLEAN
          - STRUCT
          - VIDEO
          - ANNOTATION
          - JSON
          description: The data type of the time series.
        enrichment:
          $ref: '#/components/schemas/DataSegmentEnrichment'
      required:
      - sourceDatasetId
      - timeSeriesId
      - startTimestamp
      - endTimestamp
      - alias
      - dataType
    DeleteDataSegmentEntry:
      type: object
      properties:
        timeSeriesId:
          type: string
          description: The ID of the time series.
        startTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        endTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
      required:
      - timeSeriesId
      - startTimestamp
      - endTimestamp
    DisassociateDataSegmentEntry:
      type: object
      properties:
        sourceDatasetId:
          type: string
          description: The ID of the source dataset that contains the data segment.
        timeSeriesId:
          type: string
          description: The ID of the time series.
        startTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        endTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
      required:
      - sourceDatasetId
      - timeSeriesId
      - startTimestamp
      - endTimestamp
    FailedDataSegmentAssociation:
      type: object
      properties:
        sourceDatasetId:
          type: string
          description: The ID of the source dataset.
        timeSeriesId:
          type: string
          description: The ID of the time series.
        startTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        endTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        errorCode:
          type: string
          enum:
          - INTERNAL_FAILURE
          - VALIDATION_ERROR
          - RESOURCE_NOT_FOUND
          - LIMIT_EXCEEDED
          - CONFLICTING_OPERATION
          description: The error code for the failed association.
        errorMessage:
          type: string
          description: The error message for the failed association.
      required:
      - sourceDatasetId
      - timeSeriesId
      - startTimestamp
      - endTimestamp
      - errorCode
      - errorMessage
    FailedDataSegmentDeletion:
      type: object
      properties:
        timeSeriesId:
          type: string
          description: The ID of the time series.
        startTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        endTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        errorCode:
          type: string
          enum:
          - INTERNAL_FAILURE
          - VALIDATION_ERROR
          - RESOURCE_NOT_FOUND
          - LIMIT_EXCEEDED
          - CONFLICTING_OPERATION
          description: The error code for the failed deletion.
        errorMessage:
          type: string
          description: The error message for the failed deletion.
      required:
      - timeSeriesId
      - startTimestamp
      - endTimestamp
      - errorCode
      - errorMessage
    FailedDataSegmentDisassociation:
      type: object
      properties:
        sourceDatasetId:
          type: string
          description: The ID of the source dataset.
        timeSeriesId:
          type: string
          description: The ID of the time series.
        startTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        endTimestamp:
          $ref: '#/components/schemas/TimeInNanos'
        errorCode:
          type: string
          enum:
          - INTERNAL_FAILURE
          - VALIDATION_ERROR
          - RESOURCE_NOT_FOUND
          - LIMIT_EXCEEDED
          - CONFLICTING_OPERATION
          description: The error code for the failed disassociation.
        errorMessage:
          type: string
          description: The error message for the failed disassociation.
      required:
      - sourceDatasetId
      - timeSeriesId
      - startTimestamp
      - endTimestamp
      - errorCode
      - errorMessage
    InternalFailureException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    InvalidRequestException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    LimitExceededException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    ListDatasetDataSegmentsResponse:
      type: object
      properties:
        dataSegments:
          type: array
          items:
            $ref: '#/components/schemas/DataSegmentSummary'
          description: A list that summarizes each data segment.
        nextToken:
          type: string
          description: The token for the next set of results, or null if there are no additional results.
      required:
      - dataSegments
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    TimeInNanos:
      type: object
      properties:
        timeInSeconds:
          type: integer
          description: The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by
            offsetInNanos.
        offsetInNanos:
          type: integer
          description: The nanosecond offset from timeInSeconds.
      required:
      - timeInSeconds
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/iotsitewise/service/2019-12-02/iotsitewise-2019-12-02.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)