Three Changes You Need to Make for Certs 2.0 API
I’m a Censys Search API user, and I want to upgrade to Certs 2.0.
If this is you, here are the three changes you need to make to your API client in order to begin querying certs in the new Censys Certs 2.0.
1. Update API Endpoints
Certificate search, aggregate, and lookup functionality have moved to new paths with (optional) new HTTP methods.
-
Method: GET
-
Base URL:
https://search.censys.io
-
Path:
/api/v2/certificates
-
Endpoints:
-
/search
— Search for certificates by submitting a query using the new Censys Search Language. -
/{fingerprint}
— Retrieve all data in a certificate record using the certificate’s SHA-256 fingerprint. -
/aggregate
— See a breakdown of certificate records (that match a provided search query) by value for a field that you provide. -
/bulk
— Retrieve all data in up to 100 certificate records using the certificates' SHA-256 fingerprints.
-
Visit the Censys Search 2.0 API documentation to see all the details on each endpoint and try them out.
2. Update Search Queries
In order to translate search queries used on Censys' legacy cert dataset for Certs 2.0, you must change field names to reflect the new, improved certificate record schema and adjust syntax to use the more powerful Censys Search Language.
2.1. Schema Changes
The data model of Censys certificate records is largely unchanged, but the schema has been improved to clarify which data is parsed directly from the certificate’s contents and which data represents enrichments provided by Censys, so the name of many fields you formerly queried has changed, although keys still use dot notation to show their nested structure (e.g., parsed.subject_key_info.fingerprint_sha256
).
For more information, you can read about the Introduction to Certificates or see some example queries translated, or just browse the entire schema.
2.2. Query Syntax
Certs 2.0 utilizes the new Censys Search Language. Read this introduction to learn how to:
-
Specify fields
-
Use wildcards
-
Limit results to exact matches
-
Leverage boolean operators like
and
,or
andnot
Questions? Reach out to support@censys.io!
Comments
0 comments
Please sign in to leave a comment.