Use this API to upload CSV file to add external sites to the account. A single CSV file can contain up to 1000 records. You can download the template from this link, update your content, and use CSV as an input file. First line in CSV is always considered as header, refer to Template to view the header.
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
file |
Mandatory | file | Provide the CSV file with single column.
You can download the template from this link. A single CSV file can contain up to 1000 records. |
action | Mandatory | String | Select the action to be performed on uploaded CSV. Choose SAVE or SAVE_AND_LAUNCH once the CSV is uploaded. |
Authorization | Mandatory | String | Authorization token to authenticate to the Qualys Cloud Platform. Prepend token with Bearer and one space. For example - Bearer <authToken> |
API Request
curl -X POST '<qualys_base_url>/certview/v1/certview/v1/externalSites/bulkAdd?action=SAVE' -H 'Accept: application/json' -H 'Authorization: Bearer <JWT Token>' -H 'Content-Type: multipart/form-data' -F 'file=@test1.csv;type=text/csv'
Response
Created
Response code: 202
API Request
curl -X POST '<qualys_base_url>/certview/v1/externalSites/bulkAdd?action=SAVE' -H 'Accept: application/json' -H 'Authorization: Bearer <JWT Token>' -H 'Content-Type: multipart/form-data' -F 'file=@test1.csv;type=text/csv'
Response
{
"errorCode": 400,
"message": null,
"subErrors": [
{
"errorCode": 400,
"field": "172.16.0.0",
"lineNo": 1,
"message": "Provide a valid public IP address"
},
{
"errorCode": 400,
"field": "2001:db8:3333:4444:5555:6666:7777:8888",
"lineNo": 2,
"message": "We don't support IPv6 right now, so Please provide a IPv4 address"
},
{
"errorCode": 400,
"field": ".qualys.com",
"lineNo": 3,
"message": "Invalid FQDN or IP Address"
}
],
"status": "BAD_REQUEST",
"timestamp": "2023-09-06T11:41:24.196+00:00"
}