GET Certificates CSV
The GET /Certificates/CSV method is used to create output, in a CSV format, of certificates from Keyfactor Command that match the query criteria provided in the request. The content will display in the response body and can be copied from there for use in a file, as needed. This method returns HTTP 200 OK on a success with a comma-delimited list of certificates plus a header line that can be copied to a CSV file.
Permissions for certificates can be configured at multiple levels. You can apply them system-wide—for all certificates—or use fine-grained control by assigning permissions at the certificate collection
The certificate search function allows you to query the Keyfactor Command database for certificates from any available source based on any criteria of the certificates and save the results as a collection that will be availble in other places in the Management Portal (e.g. expiration alerts and certain reports). level. The appropriate level depends on how the certificates are accessed. See Certificate Collection Permissions for more information about system-wide versus more targeted permission models.
Table 323: GET Certificates CSV Input Parameters
| Name | In | Description |
|---|---|---|
| SortName | Query | A string containing the property by which the results should be sorted. Fields available for sorting through the API for the most part match those that appear as sortable columns in the Keyfactor Command Management Portal. The default sort field is Import Date. |
| SortOrder | Query | An integer that sets the sort order on the returned results. A value of 0 sorts results in ascending order while a value of 1 sorts results in descending order. The default is ascending. |
| Query | Query | A string query, to limit the requested set of certificates, in the form: CN –contains "mycertificate.keyexample.com" See Certificate Search Page for querying guidelines to build your body query. |
| CollectionId | Query |
An optional integer that specifies the certificate collection (CollectionId) to validate whether the user has sufficient permissions to perform the action. If a CollectionId is not provided, the user must have appropriate permissions granted system-wide or via certificate store containers. Providing a CollectionId allows the system to check the user's permissions at the certificate collection level. Permissions are evaluated in the following order:
Use either ContainerId or CollectionId, not both. If both are specified, CollectionId takes precedence, and the ContainerId is ignored (defaults to 0). See Certificate Collection Permissions for more information. |
Table 324: GET Certificates CSV Response Data
| Name | Description |
|---|---|
| Content |
A comma-delimited string of certificate data as per the criteria supplied. The following fields are included:
For example: Copy
|
Was this page helpful? Provide Feedback