Import Leaf Certificate API

Use this API to fetch to import leaf certificates. You can use various filters to search for the required result. You can either import a single leaf certificate or a text file containing multiple leaf certificates in valid X509 format.

 If you are a sub-user with restricted access to assets and you request the Import leaf API, you get HTTP response code - 403(Forbidden). It means you do not have the required permissions. The API request failed because you do not have the required permissions. Check user permissions in the Administration Utility. For more information on tag-based user scoping refer to Certificate View Online help.

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

filter 

Mandatory String

Import a single leaf certificate, or a text file containing multiple leaf certificates in valid X509 format.Supported leaf certificate file formats:[.pem, .cer, .der, .crt]

For the list of tokens you can use to build the query refer to Search tokens and supported format.

Sample to Import Leaf CertificateSample to Import Leaf Certificate

API Request

curl -X POST
<qualys_base_url>/certview/v1/certificates/import
/leaf -H "accept: */*" -H "Authorization: Bearer <JWT Token>" 
-H"Content-Type: multipart/form-data" -F file=@Test.pem;type=
    

Response

 
 "certificatesResponses":[
 {
 "rawData":"-----BEGIN CERTIFICATE-----
\nMIIC4DPPAcigAwIBAgIQdoze/x18h9NNdOGzBKDixTANBgkqhkiG9w0BAQUFADAZ
\nMRcwFQYDVABCDw4yazhyMmNwLTY9LTEzNT
.
.
.
AQEA5wnGZ30GnkEAirfRbtWyXwfZrj4pxVm+jy9y\nu+QkASmJvlmUeZIaseRGRag4
tDcrRVulJijr/xxxxxxx7b8Y5qxTesvvMYIvdSS1\ngkTROVVBrQR0pEUj355AMwYR
N+vv0LInY4IqwazjXp1bfFjJ3tKdU83W6oJXthU2\ncv/PstC4Wmk2P9ofa2z+ODAx 92wvWge4SeKmhaonlCOCXmNYbM4EhF/5TPv96LA/\nnKLjYO3iqbNRRdhDDMN4E3Vl
O7hbe6m+CII4qs2IBnmoli/WSLDdafbpE+I7qUN5\nPUOE/OPVECIsLnMroqXIDof8
2dFZbdkDTWKgJRQtduZTgjlZ2wIDAQABoyQwIjAT\nBgNVHSUEDDAKBggrBgEFBQcD
.
.
.
8UpepsL+\n41ULNwTPFeelxpUZ2U+9z0lBpFxu3kbhG7BWq5pwUfktSPmKz/M74TJY
tm4KzAHs\nE+o2A9ryzW4NRIheQ8zCyCDV74o=\n-----END CERTIFICATE-----
",
 "status":"IMPORTED",
 "message":"IMPORTED",
 "name":"Test",
 "errorCode":0
 }
 ],
 "statusCode":201,
 "message":"Successfully imported 1 certificate(s). "
}