---
updatedAt: 2026-10-06T17:39:05.000Z
agentTools:
  projectIndex: https://docs.akeyless.io/llms.txt
---

# /certificate-discovery

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "email": "support@akeyless.io",
      "name": "Akeyless",
      "url": "http://akeyless.io"
    },
    "description": "The purpose of this application is to provide access to Akeyless API.",
    "title": "Secrets & keys",
    "version": "3.0"
  },
  "paths": {
    "/certificate-discovery": {
      "post": {
        "operationId": "CertificateDiscovery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertificateDiscovery"
              }
            }
          },
          "required": true,
          "x-go-name": "Body"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CertificateDiscoveryResponse"
          },
          "default": {
            "$ref": "#/components/responses/errorResponse"
          }
        },
        "tags": [
          "Certificates"
        ],
        "x-docs-category": "Secrets & keys",
        "x-docs-group": "Certificates"
      }
    }
  },
  "tags": [
    {
      "name": "Certificates"
    }
  ],
  "x-readme": {
    "apply-tag-changes": true
  },
  "servers": [
    {
      "url": "https://api.akeyless.io"
    }
  ],
  "components": {
    "responses": {
      "CertificateDiscoveryResponse": {
        "description": "CertificateDiscoveryResponse wraps response body.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CertificateDiscoveryOutput"
            }
          }
        }
      },
      "errorResponse": {
        "description": "errorResponse wraps any error to return it as a JSON object with one \"error\"\nfield.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JSONError"
            }
          }
        }
      }
    },
    "schemas": {
      "CertificateDiscovery": {
        "description": "CertificateDiscovery is a command that discovery certificates",
        "properties": {
          "debug": {
            "default": false,
            "description": "Debug mode",
            "type": "boolean",
            "x-go-name": "Debug"
          },
          "exclude-hosts": {
            "description": "A comma separated list of IP addresses, CIDR ranges, or DNS names to exclude from the scan",
            "type": "string",
            "x-go-name": "ExcludeHosts"
          },
          "expiration-event-in": {
            "description": "How many days before the expiration of the certificate would you like to be notified.",
            "items": {
              "type": "string"
            },
            "type": "array",
            "x-go-name": "ExpirationEventsInDays"
          },
          "hosts": {
            "description": "A comma separated list of IPs, CIDR ranges, or DNS names to discovery",
            "type": "string",
            "x-go-name": "Hosts"
          },
          "json": {
            "default": false,
            "description": "Set output format to JSON",
            "type": "boolean",
            "x-go-name": "Json"
          },
          "port-ranges": {
            "default": "443",
            "description": "A comma separated list of port ranges\nExamples: \"80,443\" or \"80,443,8080-8090\" or \"443\"",
            "type": "string",
            "x-go-name": "PortRanges"
          },
          "protection-key": {
            "description": "The name of the key that protects the certificate value",
            "type": "string",
            "x-go-name": "ProtectionKey"
          },
          "target-location": {
            "description": "The folder where the results will be saved",
            "type": "string",
            "x-go-name": "TargetFolder"
          },
          "token": {
            "description": "Authentication token (see `/auth` and `/configure`)",
            "type": "string",
            "x-go-name": "Profile"
          },
          "uid-token": {
            "description": "The universal identity token, Required only for universal_identity authentication",
            "type": "string",
            "x-go-name": "UIDToken"
          }
        },
        "required": [
          "hosts",
          "target-location"
        ],
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/client/commands"
      },
      "CertificateDiscoveryOutput": {
        "properties": {
          "results": {
            "$ref": "#/components/schemas/ScanResults"
          }
        },
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/client/commands"
      },
      "JSONError": {
        "properties": {
          "error": {
            "type": "string",
            "x-go-name": "Err"
          }
        },
        "title": "JSONError wraps an error with JSON object.",
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/client"
      },
      "ScanResults": {
        "description": "ScanResults contains detailed results from a certificate scan",
        "properties": {
          "CountExisting": {
            "format": "int64",
            "type": "integer"
          },
          "CountFailed": {
            "format": "int64",
            "type": "integer"
          },
          "CountHosts": {
            "format": "int64",
            "type": "integer"
          },
          "CountNew": {
            "format": "int64",
            "type": "integer"
          },
          "CountSubdomains": {
            "format": "int64",
            "type": "integer"
          },
          "Error": {
            "type": "string",
            "x-go-type": "error"
          },
          "FailedTargets": {
            "items": {
              "$ref": "#/components/schemas/TargetError"
            },
            "type": "array"
          },
          "ItemNames": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/certificate/certificate_discovery/scanner/results"
      },
      "TargetError": {
        "description": "TargetError represents a failed target scan",
        "properties": {
          "error": {
            "type": "string",
            "x-go-name": "Error"
          },
          "host": {
            "type": "string",
            "x-go-name": "Host"
          },
          "port": {
            "format": "int64",
            "type": "integer",
            "x-go-name": "Port"
          }
        },
        "type": "object",
        "x-go-package": "akeyless.io/akeyless-main-repo/go/src/certificate/certificate_discovery/scanner/results"
      }
    }
  }
}
```