Amazon IoT Core Principals API

The Principals API from Amazon IoT Core — 1 operation(s) for principals.

GitHub OpenAPI

Operations 5

PUT /things/{thingName}/principals Attach Thing Principal #
DELETE /things/{thingName}/principals Detach Thing Principal #
GET /things/{thingName}/principals List Thing Principals #
GET /principals/things List Principal Things #
GET /principals/things-v2 List Principal Things V2 #

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-core:amazon-iot-core-principals-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-core-principals-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS IoT Principals API
  version: '2015-05-28'
  description: Generated from AWS's published Smithy model for AWS IoT. 5 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://iot.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /things/{thingName}/principals:
    put:
      operationId: AttachThingPrincipal
      summary: Attach Thing Principal
      description: Attaches the specified principal to the specified thing. A principal can be X.509 certificates, Amazon
        Cognito identities or federated identities. Requires permission to access the AttachThingPrincipal action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachThingPrincipalResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      parameters:
      - name: thingName
        in: path
        required: true
        schema:
          type: string
        description: The name of the thing.
      - name: x-amzn-principal
        in: header
        required: true
        schema:
          type: string
        description: The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an
          Amazon Cognito ID.
      - name: thingPrincipalType
        in: query
        schema:
          type: string
          enum:
          - EXCLUSIVE_THING
          - NON_EXCLUSIVE_THING
        description: The type of the relation you want to specify when you attach a principal to a thing. EXCLUSIVE_THING
          - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s
          attached to the principal. NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple
          things can be attached to the principal.
      tags:
      - Principals
    delete:
      operationId: DetachThingPrincipal
      summary: Detach Thing Principal
      description: Detaches the specified principal from the specified thing. A principal can be X.509 certificates, IAM users,
        groups, and roles, Amazon Cognito identities or federated identities. This call is asynchronous. It might take several
        seconds for the detachment to propagate. Requires permission to access the DetachThingPrincipal action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetachThingPrincipalResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      parameters:
      - name: thingName
        in: path
        required: true
        schema:
          type: string
        description: The name of the thing.
      - name: x-amzn-principal
        in: header
        required: true
        schema:
          type: string
        description: If the principal is a certificate, this value must be ARN of the certificate. If the principal is an
          Amazon Cognito identity, this value must be the ID of the Amazon Cognito identity.
      tags:
      - Principals
    get:
      operationId: ListThingPrincipals
      summary: List Thing Principals
      description: Lists the principals associated with the specified thing. A principal can be X.509 certificates, IAM users,
        groups, and roles, Amazon Cognito identities or federated identities. Requires permission to access the ListThingPrincipals
        action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListThingPrincipalsResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      parameters:
      - name: nextToken
        in: query
        schema:
          type: string
        description: To retrieve the next set of results, the nextToken value from a previous response; otherwise null to
          receive the first set of results.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to return in this operation.
      - name: thingName
        in: path
        required: true
        schema:
          type: string
        description: The name of the thing.
      tags:
      - Principals
  /principals/things:
    get:
      operationId: ListPrincipalThings
      summary: List Principal Things
      description: Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users,
        groups, and roles, Amazon Cognito identities or federated identities. Requires permission to access the ListPrincipalThings
        action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPrincipalThingsResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      parameters:
      - name: nextToken
        in: query
        schema:
          type: string
        description: To retrieve the next set of results, the nextToken value from a previous response; otherwise null to
          receive the first set of results.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to return in this operation.
      - name: x-amzn-principal
        in: header
        required: true
        schema:
          type: string
        description: The principal.
      tags:
      - Principals
  /principals/things-v2:
    get:
      operationId: ListPrincipalThingsV2
      summary: List Principal Things V2
      description: Lists the things associated with the specified principal. A principal can be an X.509 certificate or an
        Amazon Cognito ID. Requires permission to access the ListPrincipalThings action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPrincipalThingsV2Response'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      parameters:
      - name: nextToken
        in: query
        schema:
          type: string
        description: To retrieve the next set of results, the nextToken value from a previous response; otherwise null to
          receive the first set of results.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to return in this operation.
      - name: x-amzn-principal
        in: header
        required: true
        schema:
          type: string
        description: The principal. A principal can be an X.509 certificate or an Amazon Cognito ID.
      - name: thingPrincipalType
        in: query
        schema:
          type: string
          enum:
          - EXCLUSIVE_THING
          - NON_EXCLUSIVE_THING
        description: The type of the relation you want to filter in the response. If no value is provided in this field, the
          response will list all things, including both the EXCLUSIVE_THING and NON_EXCLUSIVE_THING attachment types. EXCLUSIVE_THING
          - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s
          attached to the principal. NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple
          things can be attached to the principal.
      tags:
      - Principals
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: iot
  schemas:
    AttachThingPrincipalResponse:
      type: object
      properties: {}
    DetachThingPrincipalResponse:
      type: object
      properties: {}
    InternalFailureException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    InvalidRequestException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    ListPrincipalThingsResponse:
      type: object
      properties:
        things:
          type: array
          items:
            type: string
          description: The things.
        nextToken:
          type: string
          description: The token to use to get the next set of results, or null if there are no additional results.
    ListPrincipalThingsV2Response:
      type: object
      properties:
        principalThingObjects:
          type: array
          items:
            $ref: '#/components/schemas/PrincipalThingObject'
          description: A list of thingPrincipalObject that represents the principal and the type of relation it has with the
            thing.
        nextToken:
          type: string
          description: The token to use to get the next set of results, or null if there are no additional results.
    ListThingPrincipalsResponse:
      type: object
      properties:
        principals:
          type: array
          items:
            type: string
          description: The principals associated with the thing.
        nextToken:
          type: string
          description: The token to use to get the next set of results, or null if there are no additional results.
    PrincipalThingObject:
      type: object
      properties:
        thingName:
          type: string
          description: The name of the thing.
        thingPrincipalType:
          type: string
          enum:
          - EXCLUSIVE_THING
          - NON_EXCLUSIVE_THING
          description: The type of the relation you want to specify when you attach a principal to a thing. The value defaults
            to NON_EXCLUSIVE_THING. EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively.
            The thing will be the only thing that’s attached to the principal. NON_EXCLUSIVE_THING - Attaches the specified
            principal to the specified thing. Multiple things can be attached to the principal.
      required:
      - thingName
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    ServiceUnavailableException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    UnauthorizedException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/iot/service/2015-05-28/iot-2015-05-28.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)