> ## Documentation Index
> Fetch the complete documentation index at: https://docs.draftt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a specific component by ID



## OpenAPI

````yaml https://api.draftt.io/swagger get /component/{componentId}
openapi: 3.1.0
info:
  title: Draftt API
  version: 0.2.1
servers:
  - url: https://api.draftt.io/v1
security:
  - BearerAuth: []
paths:
  /component/{componentId}:
    get:
      tags:
        - Component
      summary: Retrieve a specific component by ID
      parameters:
        - name: componentId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Component'
                    minItems: 1
                    maxItems: 1
                  nextToken:
                    type: string
                    enum:
                      - null
                required:
                  - items
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Component:
      type: object
      properties:
        id:
          type: number
        integrationId:
          type: number
        uniqueIdentifier:
          type: string
        region:
          type: string
        technology:
          type: string
        type:
          type: string
        typeDisplayName:
          type: string
        version:
          type: string
        tags:
          $ref: '#/components/schemas/SearchTags'
        details:
          type: object
          description: >-
            Additional details about the component grouped by a technology or
            technology group, each component contains only the details relevant
            to it
          properties:
            serverless-function:
              type: object
              description: Serverless function response metadata.
              properties:
                invocationCount:
                  type: number
                  description: >-
                    Number of invocations when available for serverless-function
                    components.
                lastInvocationTime:
                  type: string
                  format: date-time
                  description: >-
                    Timestamp of the last invocation when available for
                    serverless-function components.
              additionalProperties: false
            container-image:
              type: object
              description: Container image response metadata.
              properties:
                lastPulledAt:
                  type: string
                  format: date-time
                  description: >-
                    Latest image pull timestamp when available for
                    container-image components.
              additionalProperties: false
            database:
              type: object
              description: Database response metadata.
              properties:
                lastActiveConnectionTime:
                  type: string
                  format: date-time
                  description: >-
                    Timestamp of the last active database connection when
                    available for database components.
              additionalProperties: false
          additionalProperties: false
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - integrationId
        - uniqueIdentifier
        - technology
        - type
        - version
        - tags
      example:
        id: 20
        integrationId: 6
        uniqueIdentifier: arn:aws:rds:us-east-1:1234567:db:rds-dev-1
        region: us-east-1
        technology: rds
        type: rds-postgres
        typeDisplayName: Amazon RDS PostgreSQL
        version: '14.10'
        tags:
          - key: Terraform
            value: 'true'
          - key: Environment
            value: dev-us-east-1
          - key: Name
            value: rds-dev-1
        details:
          database:
            lastActiveConnectionTime: '2024-09-09T14:36:11.531Z'
        createdAt: '2024-05-06T11:25:50.750Z'
        updatedAt: '2024-09-09T14:36:11.531Z'
    SearchTags:
      type: array
      items:
        type: object
        properties:
          key:
            type: string
          value:
            type: string
        required:
          - key
          - value
      example:
        - key: Terraform
          value: 'true'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````