GET Certificates CSV
The GET /Certificates/CSV method is used to create content, in a CSV format, of certificates from Keyfactor Command that match the query criteria provided in the body. The content will display in the response body and can be copied from there for use in a file, as needed. This endpoint
An endpoint is a URL that enables the API to gain access to resources on a server. returns 204 with no content upon success.
Permissions for certificates can be set at either the global or 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. See Certificate Collection Permissions for more information about global vs collection permissions. See also the CollectionId input parameter
A parameter or argument is a value that is passed into a function in an application., below.
Table 851: 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 integer specifying an optional certificate collection identifier to validate that the user executing the request has sufficient permissions to do so. If a certificate collection ID is not supplied, the user must have global permissions to complete the action. Supplying a certificate collection ID allows for a check of the user's certificate collection-level permissions to determine whether the user has sufficient permissions at a collection level to complete the action. See Certificate Collection Permissions for more information. |
Table 852: GET Certificates CSV Response Data
| Name | Description |
|---|---|
| Content |
A comma-separated string of certificate data as per the criteria supplied. The following fields are included:
For example: "Issued DN,Import Date,Effective Date,Expiration Date,Issued CN,Certificate Authority Name,Template Display Name,Principal,Requester,Key Type,Key Size,Certificate State,Thumbprint\r\n\ "CN=Root CA,DC=keyexample,DC=com\",\"2022-11-17T19:52:00.8900000Z\",\"2020-04-14T23:39:28.0000000Z\",\"2035-04-14T23:49:28.0000000Z\",\"Root CA\",\"CN=Root CA,DC=keyexample,DC=com\",\"\",\"\",\"KEYEXAMPLE\\SQL241$\",\"RSA\",\"2048\",\"CertificateAuthority\",\"6DEA35B694F008B7DD69AE88B349B2FFD8AFF503\",\r\n\ "CN=dc240.keyexample.com\",\"2022-11-17T19:52:01.2230000Z\",\"2020-04-15T03:58:35.0000000Z\",\"2021-04-15T03:58:35.0000000Z\",\"dc240.keyexample.com\",\"CN=Root CA,DC=keyexample,DC=com\",\"DomainController\",\"\",\"KEYEXAMPLE\\DC240$\",\"RSA\",\"2048\",\"Active\",\"2F2407C5329C646AC75834EAACE65DBF70F8FB1B\",\r\n\ "CN=sql241.keyexample.com\",\"2022-11-17T19:52:01.2530000Z\",\"2020-04-15T14:50:52.0000000Z\",\"2022-04-15T14:50:52.0000000Z\",\"sql241.keyexample.com\",\"CN=Root CA,DC=keyexample,DC=com\",\"EnterpriseWebServer\",\"\",\"KEYEXAMPLE\\SQL241$\",\"RSA\",\"2048\",\"Active\",\"FEB56E1F076CFD2AEFE6969885F1CD59CBC839DB\",\r\n\ "CN=appsrvr09.keyexample.com\",\"2022-11-17T19:52:01.3000000Z\",\"2020-04-15T16:57:06.0000000Z\",\"2020-05-27T16:57:06.0000000Z\",\"appsrvr09.keyexample.com\",\"CN=Root CA,DC=keyexample,DC=com\",\"EnterpriseWebServer-ShortLifetime\",\"\",\"KEYEXAMPLE\\jsmith\",\"RSA\",\"2048\",\"Active\",\"D60EC19B68589885DC8BD60BAD7EC7E81BAC256B\",\r\n\ "CN=keyfactor243.keyexample.com\",\"2022-11-17T19:52:01.3330000Z\",\"2020-04-15T17:42:51.0000000Z\",\"2022-04-15T17:42:51.0000000Z\",\"keyfactor243.keyexample.com\",\"CN=Root CA,DC=keyexample,DC=com\",\"EnterpriseWebServer\",\"\",\"KEYEXAMPLE\\SRVR243$\",\"RSA\",\"2048\",\"Active\",\"BFA679661A7F40A507F9C518BE2A8CFF6D364AA0\",\r\n\ "CN=appsrvr25.keyexample.com,L=Independence,ST=OH,C=US\",\"2022-11-17T19:52:01.3630000Z\",\"2020-09-14T22:07:52.0000000Z\",\"2020-10-26T22:07:52.0000000Z\",\"appsrvr25.keyexample.com\",\"CN=Root CA,DC=keyexample,DC=com\",\"EnterpriseWebServer\",\"\",\"KEYEXAMPLE\\ggant\",\"RSA\",\"2048\",\"Active\",\"D48DAE96497B4995D27B10EBC4EA571DAE80E6C8\",\r\n\ "CN=appsrvr25.keyexample.com,L=Independence,ST=OH,C=US\",\"2022-11-17T19:52:01.3900000Z\",\"2020-09-14T22:23:51.0000000Z\",\"2020-10-26T22:23:51.0000000Z\",\"appsrvr25.keyexample.com\",\"CN=Root CA,DC=keyexample,DC=com\",\"EnterpriseWebServer\",\"\",\"KEYEXAMPLE\\jsmith\",\"RSA\",\"2048\",\"Active\",\"D3E5CC1A4DBEFF0CE14F2ADAF9B811B9B9306A1C\",\r\n\ |