Certificates Search
Introduction
The Certificate Search API allows you to search for certificates based on specific criteria.
Base URL
The base URL for all API requests is:
Domain | URL |
---|---|
api.odin.io | api.odin.io/v1 |
The endpoint for host search is:
/certificates/search/
Authentication
All requests to this API must include an authentication token in the headers. Use the following header for authentication:
X-API-Key: V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY=
Request Parameters
The API requires the following request parameter to be included in the request body:
https://api.odin.io/v1/certificates/search/
Include the following parameters in the request body:
Name | Description |
---|---|
limit | Specifies the maximum number of certificates to retrieve. The value must be a positive integer. |
query | Allows you to filter certificates based on specific attributes. The query parameter accepts a search query in the form of a string. |
Example Request
{
"limit": 5,
"query": "certificate.issuer.common_name:R3"
}
CURL
{
curl --location 'https://api.odin.io/v1/certificates/search/' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY=' \
--data '{
"limit": 5,
"query": "certificate.issuer.common_name:R3"
}'
}
This cURL command is structured to perform an HTTP POST request to https://api.odin.io/v1/certificates/search/. It includes the following headers:
'Accept: application/json': Specifies that the client expects a JSON response.
'Content-Type: application/json': Indicates that the content in the request body is in JSON format.
'X-API-Key: V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY=': Provides the API key for authentication with the value 'V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY='.
data '{ "limit": 5, "query": "certificate.issuer.common_name:R3" }': Sends a JSON payload in the request body. The payload specifies a query for searching certificates where the issuer's common name is 'R3' with a limit of 5 results.
Response Parameters
The response from the Odin Certificate search API will be in JSON format and include the following fields:
Example Response
{
"success": true,
"pagination": {
"start": null,
"last": [
8.757687,
1678430700000
],
"limit": 1,
"total": 948178656
},
"data": [
{
"fingerprint_md5": "7CE997F7F0A602C956D8770FA887234C",
"fingerprint_sha1": "BF33C0AC0B283770F3BD7A80822262FA09876FD6",
"fingerprint_sha256": "5821D920257433710022A66B701E794A909234601CABE63F8F0499A74D3489FE",
"issuer": {
"common_name": [
"R3"
],
"country": [
"US"
],
"organization": [
"Let's Jd"
]
},
"subject": {
"common_name": [
"ssl.jd.nl"
]
},
"subject_alt_name": {
"dns_names": [
"ssl.jd.nl"
]
},
"tags": [
"dv",
"trusted",
"precert"
],
"validity": {
"end": "2023-01-31T21:33:48",
"length": 7775899,
"start": "2022-11-02T21:33:49"
}
}
]
}
success | Indicates whether the request was successful or not. |
pagination | Contains pagination details for the search results. |
start | The starting point of the search results (not applicable in this API). |
last | The last entry in the search results. |
limit | The maximum number of certificates requested. |
total | The total count of certificates matching the query. |
data | An array of certificate objects. |
fingerprint_md5 | The MD5 fingerprint of the certificate. |
fingerprint_sha1 | The SHA-1 fingerprint of the certificate. |
fingerprint_sha256 | The SHA-256 fingerprint of the certificate. |
issuer | Information about the issuer of the certificate. |
common_name | The common name of the issuer. |
country | The country associated with the issuer. |
organization | The organization associated with the issuer. |
subject | Information about the subject of the certificate. |
common_name | The common name of the subject. |
subject_alt_name | Additional subject alternative names. |
dns_names | The DNS names associated with the certificate. |
tags | Additional tags associated with the certificate. |
validity | Information about the validity period of the certificate. |
end | The end date of the validity period. |
length | The length of the validity period in seconds. |
start | The start date of the validity period. |
The response will include the count of certificates matching the query and detailed information about each certificate matching the query.