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

# Update

> Update a PKI discovery configuration



## OpenAPI

````yaml PATCH /api/v1/cert-manager/discovery-jobs/{discoveryId}
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/cert-manager/discovery-jobs/{discoveryId}:
    patch:
      tags:
        - PKI Discovery
      description: Update a PKI discovery configuration
      operationId: updatePkiDiscovery
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: discoveryId
          required: true
          description: The ID of the discovery configuration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: Name of the discovery configuration
                description:
                  type: string
                  maxLength: 255
                  nullable: true
                  description: Description of the discovery configuration
                targetConfig:
                  type: object
                  properties:
                    ipRanges:
                      type: array
                      items:
                        type: string
                        maxLength: 64
                      description: IP addresses or CIDR ranges to scan (Network jobs).
                    domains:
                      type: array
                      items:
                        type: string
                        maxLength: 253
                      description: Domains to scan (Network jobs).
                    ports:
                      type: string
                      maxLength: 256
                      default: 443, 8443, 636, 993, 995
                      description: Comma-separated ports or ranges (Network jobs).
                    connectionIds:
                      type: array
                      items:
                        type: string
                        format: uuid
                      minItems: 1
                      maxItems: 100
                      description: >-
                        SSH connections for Linux Server jobs or Windows (WinRM)
                        connections for Windows Server jobs, one per server.
                    searchFolderPaths:
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 1024
                      minItems: 1
                      maxItems: 20
                      description: >-
                        Folders to search. Each folder is searched along with
                        the folders below it.
                    skipFolderPaths:
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 1024
                      maxItems: 50
                      default: []
                      description: Folders that are never entered.
                    maxFolderDepth:
                      type: integer
                      minimum: 1
                      maximum: 20
                      default: 8
                      description: How many levels below each search folder to go.
                    maxFileSizeKb:
                      type: integer
                      minimum: 1
                      maximum: 10240
                      default: 512
                      description: Files bigger than this, in KB, are skipped.
                    importStandaloneCaCertificates:
                      type: boolean
                      default: false
                      description: >-
                        Also import CA certificates found on their own. Leaf
                        certificates always bring their chain.
                    certificateStores:
                      type: array
                      items:
                        type: string
                        enum:
                          - My
                          - WebHosting
                          - Remote Desktop
                          - CA
                          - Root
                      minItems: 1
                      default:
                        - My
                        - WebHosting
                      description: >-
                        LocalMachine certificate stores to read. CA and Root can
                        be selected only when importStandaloneCaCertificates is
                        true.
                  additionalProperties: false
                  description: >-
                    Target configuration. Network jobs use domains, ipRanges and
                    ports. Linux Server jobs use connectionIds,
                    searchFolderPaths, skipFolderPaths, maxFolderDepth,
                    maxFileSizeKb and importStandaloneCaCertificates. Windows
                    Server jobs use connectionIds, certificateStores and
                    importStandaloneCaCertificates.
                isAutoScanEnabled:
                  type: boolean
                  description: Enable automatic scheduled scans
                scanIntervalDays:
                  type: number
                  minimum: 1
                  maximum: 365
                  nullable: true
                  description: Interval in days between automatic scans
                gatewayId:
                  type: string
                  format: uuid
                  nullable: true
                  description: Gateway ID for scanning private networks
                gatewayPoolId:
                  type: string
                  format: uuid
                  nullable: true
                  description: Gateway pool ID for scanning private networks
                isActive:
                  type: boolean
                  description: Whether the discovery configuration is active
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  discoveryType:
                    type: string
                    default: network
                  targetConfig: {}
                  isAutoScanEnabled:
                    type: boolean
                    default: false
                  scanIntervalDays:
                    type: number
                    nullable: true
                  gatewayId:
                    type: string
                    format: uuid
                    nullable: true
                  isActive:
                    type: boolean
                    default: true
                  lastScanStatus:
                    type: string
                    nullable: true
                  lastScanJobId:
                    type: string
                    nullable: true
                  lastScanMessage:
                    type: string
                    nullable: true
                  lastScannedAt:
                    type: string
                    format: date-time
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  gatewayPoolId:
                    type: string
                    format: uuid
                    nullable: true
                required:
                  - id
                  - name
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.