> ## 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.

# Bulk Update Components



## OpenAPI

````yaml https://api.draftt.io/swagger post /component/update
openapi: 3.1.0
info:
  title: Draftt API
  version: 0.2.1
servers:
  - url: https://api.draftt.io/v1
security:
  - BearerAuth: []
paths:
  /component/update:
    post:
      tags:
        - Component
      summary: Bulk Update Components
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComponentBatchUpdateInput'
      responses:
        '204':
          description: No Content - Update successful
        '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:
    ComponentBatchUpdateInput:
      type: object
      properties:
        query:
          $ref: '#/components/schemas/ComponentQueryFilter'
        payload:
          $ref: '#/components/schemas/UpdateComponentInput'
      required:
        - query
        - payload
      additionalProperties: false
      example:
        query:
          filter:
            technology:
              $eq: k8s
        payload:
          customTags:
            Environment: production
            Team: backend
            CostCenter: null
    ComponentQueryFilter:
      type: object
      examples:
        - pageSize: 20
          filter:
            technology:
              $eq: k8s
            region:
              $eq: us-east-1
        - filter:
            type:
              $eq: rds-postgres
            version:
              $like: 14.*
      properties:
        filter:
          $ref: '#/components/schemas/ComponentFilter'
    UpdateComponentInput:
      type: object
      properties:
        customTags:
          type: object
          additionalProperties:
            type: string
      example:
        customTags:
          Environment: production
          Team: backend
          CostCenter: null
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
    ComponentFilter:
      type: object
      properties:
        $and:
          type: array
          items:
            $ref: '#/components/schemas/ComponentFilter'
        $or:
          type: array
          items:
            $ref: '#/components/schemas/ComponentFilter'
        id:
          $ref: '#/components/schemas/NumberOperatorBlock'
        integrationId:
          $ref: '#/components/schemas/NumberOperatorBlock'
        uniqueIdentifier:
          $ref: '#/components/schemas/StringOperatorBlock'
        region:
          $ref: '#/components/schemas/StringOperatorBlock'
        vendor:
          $ref: '#/components/schemas/StringOperatorBlock'
        technology:
          $ref: '#/components/schemas/StringOperatorBlock'
        type:
          $ref: '#/components/schemas/StringOperatorBlock'
        version:
          $ref: '#/components/schemas/StringOperatorBlock'
        hasAvailableDraftts:
          $ref: '#/components/schemas/BooleanOperatorBlock'
        createdAt:
          $ref: '#/components/schemas/StringOperatorBlock'
        updatedAt:
          $ref: '#/components/schemas/StringOperatorBlock'
        tags$.*:
          $ref: '#/components/schemas/StringOperatorBlock'
        customTags$.*:
          $ref: '#/components/schemas/StringOperatorBlock'
      additionalProperties:
        oneOf:
          - $ref: '#/components/schemas/StringOperatorBlock'
          - not:
              type: object
    NumberOperatorBlock:
      type: object
      properties:
        $eq:
          type: number
          description: Equals operator
        $ne:
          type: number
          description: Not equals operator
        $gt:
          type: number
          description: Greater than operator
        $gte:
          type: number
          description: Greater than or equal operator
        $lt:
          type: number
          description: Less than operator
        $lte:
          type: number
          description: Less than or equal operator
        $in:
          type: array
          items:
            type: number
          description: In operator
        $nin:
          type: array
          items:
            type: number
          description: Not in operator
        $exists:
          type: boolean
          description: Exists operator
      minProperties: 1
      maxProperties: 1
    StringOperatorBlock:
      type: object
      properties:
        $eq:
          type: string
          description: Equals operator
        $ne:
          type: string
          description: Not equals operator
        $gt:
          type: string
          description: Greater than operator
        $gte:
          type: string
          description: Greater than or equal operator
        $lt:
          type: string
          description: Less than operator
        $lte:
          type: string
          description: Less than or equal operator
        $like:
          type: string
          description: >-
            Like operator, wildrards are defind as `*`, for example - `{$like:
            'abc*'}` - starts with abc
        $in:
          type: array
          items:
            type: string
          description: In operator
        $nin:
          type: array
          items:
            type: string
          description: Not in operator
        $exists:
          type: boolean
          description: Exists operator
      minProperties: 1
      maxProperties: 1
    BooleanOperatorBlock:
      type: object
      properties:
        $eq:
          type: boolean
          description: Equals operator
        $ne:
          type: boolean
          description: Not equals operator
        $exists:
          type: boolean
          description: Exists operator
      minProperties: 1
      maxProperties: 1
  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

````