---
title: "Searches for certificates confirming given criteria."
method: POST
path: "/v1/certificate/search"
tags: ["v1/certificate"]
---

# Searches for certificates confirming given criteria.

`POST /v1/certificate/search`

Insert as many search criteria as needed. A reference about allowed values for criteria could be found below, under SearchCertificateCriteriaRestRequest model.

## Request body

- SearchCertificatesRestRequest
  - `max_number_of_results` integer — Maximum number of results
  - `criteria` SearchCertificateCriteriaRestRequest[] — A List of search criteria.
    - `property` 'QUERY, SERIAL_NUMBER, USERNAME, SUBJECT_DN, SUBJECT_ALT_NAME, EXTERNAL_ACCOUNT_BINDING_ID, END_ENTITY_PROFILE, CERTIFICATE_PROFILE, EXTERNAL_ACCOUNT_BINDING_ID, CA, STATUS, ISSUED_DATE, EXPIRE_DATE, REVOCATION_DATE' — A search property
    - `value` string — A search value. This could be sting value, ISO 8601 Date string, an appropriate string name of End Entity Profile or Certificate Profile or CA
    - `operation` 'EQUAL' | 'LIKE' | 'BEGINS_WITH' | 'BEFORE' | 'AFTER' — An operation for property on inserted value. 'EQUAL' for string, 'LIKE' for string value ('QUERY'), 'BEGINS_WITH' for string value (case sensitive trailing wildcard search.), 'BEFORE' or 'AFTER' for date values

## Response `200`

Successful operation

- SearchCertificatesRestResponse[]
  - `certificates` CertificateRestResponse[]
    - `certificate` string, byte — Certificate
    - `serial_number` string — Hex Serial Number
    - `response_format` string — Response format
    - `certificate_chain` string[] — Certificate chain
    - `certificate_profile` string — Certificate profile name
    - `end_entity_profile` string — End Entity profile name
  - `more_results` boolean

## Changes

- **2025-03-11** `4045b1bab09f` — 15 breaking, 2 warning, 1 info
  - removed the enum value `CA` of the request property `criteria/items/property`
  - removed the enum value `CERTIFICATE_PROFILE` of the request property `criteria/items/property`
  - removed the enum value `END_ENTITY_PROFILE` of the request property `criteria/items/property`
  - removed the enum value `EXPIRE_DATE` of the request property `criteria/items/property`
  - …14 more
- **2025-03-11** `37878df36b77` — 2 breaking, 16 info
  - removed the enum value `QUERY, SERIAL_NUMBER, USERNAME, SUBJECT_DN, SUBJECT_ALT_NAME, EXTERNAL_ACCOUNT_BINDING_ID, END_ENTITY_PROFILE, CERTIFICATE_PROFILE, EXTERNAL_ACCOUNT_BINDING_ID, CA, STATUS, ISSUED_DATE, EXPIRE_DATE, REVOCATION_DATE` of the request property `criteria/items/property`
  - the response's body type/format changed from `array`/`` to `object`/`` for status `200`
  - added the new `CA` enum value to the request property `criteria/items/property`
  - added the new `CERTIFICATE_PROFILE` enum value to the request property `criteria/items/property`
  - …14 more
- …earlier changes not shown

[Full history](https://skmtc.dev/keyfactor/apis/ejbca-rest-interface/changes/v1/certificate/search/post.md)

---

[API](https://skmtc.dev/keyfactor/apis/ejbca-rest-interface.md) · [All operations](https://skmtc.dev/keyfactor/apis/ejbca-rest-interface/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keyfactor/ejbca-rest-interface/revisions/44f8798658e2/schema)
