curl --request POST \
--url https://us.infisical.com/api/v1/projects/{projectId}/certificates/search \
--header 'Content-Type: application/json' \
--data '
{
"friendlyName": "<string>",
"commonName": "<string>",
"offset": 0,
"limit": 25,
"forPkiSync": false,
"search": "<string>",
"status": "<string>",
"profileIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
],
"extendedKeyUsage": "<string>",
"keyAlgorithm": "<string>",
"signatureAlgorithm": "<string>",
"keySizes": [
123
],
"caIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enrollmentTypes": [
"<string>"
],
"source": "<string>",
"notAfterFrom": "2023-11-07T05:31:56Z",
"notAfterTo": "2023-11-07T05:31:56Z",
"notBeforeFrom": "2023-11-07T05:31:56Z",
"notBeforeTo": "2023-11-07T05:31:56Z",
"applicationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"applicationIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://us.infisical.com/api/v1/projects/{projectId}/certificates/search"
payload = {
"friendlyName": "<string>",
"commonName": "<string>",
"offset": 0,
"limit": 25,
"forPkiSync": False,
"search": "<string>",
"status": "<string>",
"profileIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
],
"extendedKeyUsage": "<string>",
"keyAlgorithm": "<string>",
"signatureAlgorithm": "<string>",
"keySizes": [123],
"caIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"enrollmentTypes": ["<string>"],
"source": "<string>",
"notAfterFrom": "2023-11-07T05:31:56Z",
"notAfterTo": "2023-11-07T05:31:56Z",
"notBeforeFrom": "2023-11-07T05:31:56Z",
"notBeforeTo": "2023-11-07T05:31:56Z",
"applicationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"applicationIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
friendlyName: '<string>',
commonName: '<string>',
offset: 0,
limit: 25,
forPkiSync: false,
search: '<string>',
status: '<string>',
profileIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
fromDate: '2023-11-07T05:31:56Z',
toDate: '2023-11-07T05:31:56Z',
metadata: [{key: '<string>', value: '<string>'}],
extendedKeyUsage: '<string>',
keyAlgorithm: '<string>',
signatureAlgorithm: '<string>',
keySizes: [123],
caIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
enrollmentTypes: ['<string>'],
source: '<string>',
notAfterFrom: '2023-11-07T05:31:56Z',
notAfterTo: '2023-11-07T05:31:56Z',
notBeforeFrom: '2023-11-07T05:31:56Z',
notBeforeTo: '2023-11-07T05:31:56Z',
applicationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
applicationIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://us.infisical.com/api/v1/projects/{projectId}/certificates/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us.infisical.com/api/v1/projects/{projectId}/certificates/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'friendlyName' => '<string>',
'commonName' => '<string>',
'offset' => 0,
'limit' => 25,
'forPkiSync' => false,
'search' => '<string>',
'status' => '<string>',
'profileIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'fromDate' => '2023-11-07T05:31:56Z',
'toDate' => '2023-11-07T05:31:56Z',
'metadata' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'extendedKeyUsage' => '<string>',
'keyAlgorithm' => '<string>',
'signatureAlgorithm' => '<string>',
'keySizes' => [
123
],
'caIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'enrollmentTypes' => [
'<string>'
],
'source' => '<string>',
'notAfterFrom' => '2023-11-07T05:31:56Z',
'notAfterTo' => '2023-11-07T05:31:56Z',
'notBeforeFrom' => '2023-11-07T05:31:56Z',
'notBeforeTo' => '2023-11-07T05:31:56Z',
'applicationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'applicationIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us.infisical.com/api/v1/projects/{projectId}/certificates/search"
payload := strings.NewReader("{\n \"friendlyName\": \"<string>\",\n \"commonName\": \"<string>\",\n \"offset\": 0,\n \"limit\": 25,\n \"forPkiSync\": false,\n \"search\": \"<string>\",\n \"status\": \"<string>\",\n \"profileIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fromDate\": \"2023-11-07T05:31:56Z\",\n \"toDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"extendedKeyUsage\": \"<string>\",\n \"keyAlgorithm\": \"<string>\",\n \"signatureAlgorithm\": \"<string>\",\n \"keySizes\": [\n 123\n ],\n \"caIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"enrollmentTypes\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"notAfterFrom\": \"2023-11-07T05:31:56Z\",\n \"notAfterTo\": \"2023-11-07T05:31:56Z\",\n \"notBeforeFrom\": \"2023-11-07T05:31:56Z\",\n \"notBeforeTo\": \"2023-11-07T05:31:56Z\",\n \"applicationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"applicationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us.infisical.com/api/v1/projects/{projectId}/certificates/search")
.header("Content-Type", "application/json")
.body("{\n \"friendlyName\": \"<string>\",\n \"commonName\": \"<string>\",\n \"offset\": 0,\n \"limit\": 25,\n \"forPkiSync\": false,\n \"search\": \"<string>\",\n \"status\": \"<string>\",\n \"profileIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fromDate\": \"2023-11-07T05:31:56Z\",\n \"toDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"extendedKeyUsage\": \"<string>\",\n \"keyAlgorithm\": \"<string>\",\n \"signatureAlgorithm\": \"<string>\",\n \"keySizes\": [\n 123\n ],\n \"caIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"enrollmentTypes\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"notAfterFrom\": \"2023-11-07T05:31:56Z\",\n \"notAfterTo\": \"2023-11-07T05:31:56Z\",\n \"notBeforeFrom\": \"2023-11-07T05:31:56Z\",\n \"notBeforeTo\": \"2023-11-07T05:31:56Z\",\n \"applicationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"applicationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/projects/{projectId}/certificates/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"friendlyName\": \"<string>\",\n \"commonName\": \"<string>\",\n \"offset\": 0,\n \"limit\": 25,\n \"forPkiSync\": false,\n \"search\": \"<string>\",\n \"status\": \"<string>\",\n \"profileIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fromDate\": \"2023-11-07T05:31:56Z\",\n \"toDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"extendedKeyUsage\": \"<string>\",\n \"keyAlgorithm\": \"<string>\",\n \"signatureAlgorithm\": \"<string>\",\n \"keySizes\": [\n 123\n ],\n \"caIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"enrollmentTypes\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"notAfterFrom\": \"2023-11-07T05:31:56Z\",\n \"notAfterTo\": \"2023-11-07T05:31:56Z\",\n \"notBeforeFrom\": \"2023-11-07T05:31:56Z\",\n \"notBeforeTo\": \"2023-11-07T05:31:56Z\",\n \"applicationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"applicationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"certificates": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"serialNumber": "<string>",
"friendlyName": "<string>",
"commonName": "<string>",
"notBefore": "2023-11-07T05:31:56Z",
"notAfter": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"hasPrivateKey": true,
"caId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revokedAt": "2023-11-07T05:31:56Z",
"revocationReason": 123,
"altNames": "<string>",
"caCertId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"certificateTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keyUsages": [
"<string>"
],
"extendedKeyUsages": [
"<string>"
],
"pkiSubscriberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"renewBeforeDays": 123,
"renewedFromCertificateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"renewedByCertificateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"renewalError": "<string>",
"keyAlgorithm": "<string>",
"signatureAlgorithm": "<string>",
"subjectOrganization": "<string>",
"subjectOrganizationalUnit": "<string>",
"subjectCountry": "<string>",
"subjectState": "<string>",
"subjectLocality": "<string>",
"fingerprintSha256": "<string>",
"fingerprintSha1": "<string>",
"isCA": true,
"pathLength": 123,
"source": "<string>",
"discoveryMetadata": null,
"externalMetadata": null,
"applicationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keySource": "infisical",
"hsmConnectorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hsmKeyLabel": "<string>",
"hsmPublicKeySpki": null,
"subjectDomainComponents": "<string>",
"caName": "<string>",
"profileName": "<string>",
"enrollmentType": "<string>",
"applicationName": "<string>"
}
],
"totalCount": 123
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Search
Search and filter certificates within a project.
curl --request POST \
--url https://us.infisical.com/api/v1/projects/{projectId}/certificates/search \
--header 'Content-Type: application/json' \
--data '
{
"friendlyName": "<string>",
"commonName": "<string>",
"offset": 0,
"limit": 25,
"forPkiSync": false,
"search": "<string>",
"status": "<string>",
"profileIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
],
"extendedKeyUsage": "<string>",
"keyAlgorithm": "<string>",
"signatureAlgorithm": "<string>",
"keySizes": [
123
],
"caIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enrollmentTypes": [
"<string>"
],
"source": "<string>",
"notAfterFrom": "2023-11-07T05:31:56Z",
"notAfterTo": "2023-11-07T05:31:56Z",
"notBeforeFrom": "2023-11-07T05:31:56Z",
"notBeforeTo": "2023-11-07T05:31:56Z",
"applicationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"applicationIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://us.infisical.com/api/v1/projects/{projectId}/certificates/search"
payload = {
"friendlyName": "<string>",
"commonName": "<string>",
"offset": 0,
"limit": 25,
"forPkiSync": False,
"search": "<string>",
"status": "<string>",
"profileIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
],
"extendedKeyUsage": "<string>",
"keyAlgorithm": "<string>",
"signatureAlgorithm": "<string>",
"keySizes": [123],
"caIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"enrollmentTypes": ["<string>"],
"source": "<string>",
"notAfterFrom": "2023-11-07T05:31:56Z",
"notAfterTo": "2023-11-07T05:31:56Z",
"notBeforeFrom": "2023-11-07T05:31:56Z",
"notBeforeTo": "2023-11-07T05:31:56Z",
"applicationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"applicationIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
friendlyName: '<string>',
commonName: '<string>',
offset: 0,
limit: 25,
forPkiSync: false,
search: '<string>',
status: '<string>',
profileIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
fromDate: '2023-11-07T05:31:56Z',
toDate: '2023-11-07T05:31:56Z',
metadata: [{key: '<string>', value: '<string>'}],
extendedKeyUsage: '<string>',
keyAlgorithm: '<string>',
signatureAlgorithm: '<string>',
keySizes: [123],
caIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
enrollmentTypes: ['<string>'],
source: '<string>',
notAfterFrom: '2023-11-07T05:31:56Z',
notAfterTo: '2023-11-07T05:31:56Z',
notBeforeFrom: '2023-11-07T05:31:56Z',
notBeforeTo: '2023-11-07T05:31:56Z',
applicationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
applicationIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://us.infisical.com/api/v1/projects/{projectId}/certificates/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us.infisical.com/api/v1/projects/{projectId}/certificates/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'friendlyName' => '<string>',
'commonName' => '<string>',
'offset' => 0,
'limit' => 25,
'forPkiSync' => false,
'search' => '<string>',
'status' => '<string>',
'profileIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'fromDate' => '2023-11-07T05:31:56Z',
'toDate' => '2023-11-07T05:31:56Z',
'metadata' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'extendedKeyUsage' => '<string>',
'keyAlgorithm' => '<string>',
'signatureAlgorithm' => '<string>',
'keySizes' => [
123
],
'caIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'enrollmentTypes' => [
'<string>'
],
'source' => '<string>',
'notAfterFrom' => '2023-11-07T05:31:56Z',
'notAfterTo' => '2023-11-07T05:31:56Z',
'notBeforeFrom' => '2023-11-07T05:31:56Z',
'notBeforeTo' => '2023-11-07T05:31:56Z',
'applicationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'applicationIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us.infisical.com/api/v1/projects/{projectId}/certificates/search"
payload := strings.NewReader("{\n \"friendlyName\": \"<string>\",\n \"commonName\": \"<string>\",\n \"offset\": 0,\n \"limit\": 25,\n \"forPkiSync\": false,\n \"search\": \"<string>\",\n \"status\": \"<string>\",\n \"profileIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fromDate\": \"2023-11-07T05:31:56Z\",\n \"toDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"extendedKeyUsage\": \"<string>\",\n \"keyAlgorithm\": \"<string>\",\n \"signatureAlgorithm\": \"<string>\",\n \"keySizes\": [\n 123\n ],\n \"caIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"enrollmentTypes\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"notAfterFrom\": \"2023-11-07T05:31:56Z\",\n \"notAfterTo\": \"2023-11-07T05:31:56Z\",\n \"notBeforeFrom\": \"2023-11-07T05:31:56Z\",\n \"notBeforeTo\": \"2023-11-07T05:31:56Z\",\n \"applicationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"applicationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us.infisical.com/api/v1/projects/{projectId}/certificates/search")
.header("Content-Type", "application/json")
.body("{\n \"friendlyName\": \"<string>\",\n \"commonName\": \"<string>\",\n \"offset\": 0,\n \"limit\": 25,\n \"forPkiSync\": false,\n \"search\": \"<string>\",\n \"status\": \"<string>\",\n \"profileIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fromDate\": \"2023-11-07T05:31:56Z\",\n \"toDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"extendedKeyUsage\": \"<string>\",\n \"keyAlgorithm\": \"<string>\",\n \"signatureAlgorithm\": \"<string>\",\n \"keySizes\": [\n 123\n ],\n \"caIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"enrollmentTypes\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"notAfterFrom\": \"2023-11-07T05:31:56Z\",\n \"notAfterTo\": \"2023-11-07T05:31:56Z\",\n \"notBeforeFrom\": \"2023-11-07T05:31:56Z\",\n \"notBeforeTo\": \"2023-11-07T05:31:56Z\",\n \"applicationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"applicationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v1/projects/{projectId}/certificates/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"friendlyName\": \"<string>\",\n \"commonName\": \"<string>\",\n \"offset\": 0,\n \"limit\": 25,\n \"forPkiSync\": false,\n \"search\": \"<string>\",\n \"status\": \"<string>\",\n \"profileIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"fromDate\": \"2023-11-07T05:31:56Z\",\n \"toDate\": \"2023-11-07T05:31:56Z\",\n \"metadata\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"extendedKeyUsage\": \"<string>\",\n \"keyAlgorithm\": \"<string>\",\n \"signatureAlgorithm\": \"<string>\",\n \"keySizes\": [\n 123\n ],\n \"caIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"enrollmentTypes\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"notAfterFrom\": \"2023-11-07T05:31:56Z\",\n \"notAfterTo\": \"2023-11-07T05:31:56Z\",\n \"notBeforeFrom\": \"2023-11-07T05:31:56Z\",\n \"notBeforeTo\": \"2023-11-07T05:31:56Z\",\n \"applicationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"applicationIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"certificates": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"serialNumber": "<string>",
"friendlyName": "<string>",
"commonName": "<string>",
"notBefore": "2023-11-07T05:31:56Z",
"notAfter": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"hasPrivateKey": true,
"caId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revokedAt": "2023-11-07T05:31:56Z",
"revocationReason": 123,
"altNames": "<string>",
"caCertId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"certificateTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keyUsages": [
"<string>"
],
"extendedKeyUsages": [
"<string>"
],
"pkiSubscriberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"renewBeforeDays": 123,
"renewedFromCertificateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"renewedByCertificateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"renewalError": "<string>",
"keyAlgorithm": "<string>",
"signatureAlgorithm": "<string>",
"subjectOrganization": "<string>",
"subjectOrganizationalUnit": "<string>",
"subjectCountry": "<string>",
"subjectState": "<string>",
"subjectLocality": "<string>",
"fingerprintSha256": "<string>",
"fingerprintSha1": "<string>",
"isCA": true,
"pathLength": 123,
"source": "<string>",
"discoveryMetadata": null,
"externalMetadata": null,
"applicationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keySource": "infisical",
"hsmConnectorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hsmKeyLabel": "<string>",
"hsmPublicKeySpki": null,
"subjectDomainComponents": "<string>",
"caName": "<string>",
"profileName": "<string>",
"enrollmentType": "<string>",
"applicationName": "<string>"
}
],
"totalCount": 123
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Path Parameters
Body
The friendly name of the certificate to filter by.
The common name of the certificate to filter by.
The offset to start from. If you enter 10, it will start from the 10th certificate.
x >= 0The number of certificates to return.
1 <= x <= 100Retrieve only certificates available for PKI sync.
Search by SAN, CN, certificate ID, or serial number.
Filter by certificate status.
Filter by certificate profile IDs.
Filter certificates created from this date.
Filter certificates created until this date.
Filter by metadata key-value pairs. Each entry should have a key (required) and optionally a value to match against.
Show child attributes
Show child attributes
Filter by extended key usage. Only certificates containing this EKU will be returned (e.g. 'codeSigning', 'serverAuth').
Filter by key algorithm (e.g. 'RSA_2048', 'EC_prime256v1').
Filter by signature algorithm (e.g. 'RSA-SHA256', 'ECDSA-SHA256').
Filter by key sizes in bits (e.g. [2048, 4096]).
Filter by certificate authority IDs.
Filter by enrollment types (e.g. 'api', 'est', 'acme', 'scep').
Filter by certificate source ('issued', 'discovered', 'imported').
Filter certificates expiring on or after this date.
Filter certificates expiring on or before this date.
Filter certificates issued on or after this date.
Filter certificates issued on or before this date.
Filter to certificates issued through a specific Application.
Filter to certificates issued through any of the supplied Applications.
Column to sort by (e.g. 'notAfter', 'notBefore', 'commonName').
notAfter, notBefore, createdAt, commonName, keyAlgorithm, status Sort direction: 'asc' or 'desc'.
asc, desc Was this page helpful?