Import Profile from CSV API
Use this API to import profile API with CSV.
Scan based assets are the assets on which Qualys Agent is not supported, however, they can be remotely monitored with Qualys Scanner. You cannot assign scan based assets to FIM Monitoring Profile. To ensure this compliance, there islidation to this API. If any of the provided Asset IDs belong to a scan-based asset, the import operation for that particular profile is skipped, and an error response is generated.
Input ParametersInput Parameters
|
Parameter |
Mandatory/ |
Data Type |
Description |
|---|---|---|---|
|
file |
Mandatory |
CSV |
Provide the name of the CSV file that contains all the information related to monitoring profile. |
|
Authorization |
Mandatory |
String |
Authorization token to authenticate to the Qualys Enterprise TruRisk™ Platform. Prepend token with "Bearer" and one space. For example - Bearer authToken |
|
forceUpdate |
Optional |
Boolean |
Provide the value as "true" only if you want to update your existing profile. |
API Request
curl -X POST
'<qualys_base_url>/fim/v3/profiles/importcsv'
-H 'Authorization: Bearer <token>'
-H 'Content-Type: multipart/form-data; boundary=---WebKitFormBoundary7MA4YWxkTrZu0gW'
-F '[email protected]'
Request Body
-F 'file=@"csvFileName.csv"'
Response
"BAD DATA" : { "" : "profile name contains invalid character. Only alpha numeric characters, space, '-', '_' are allowed." }, "FAILED" : {}, "SUCCESS" : { "" : "Profile created successfully" } }
API Request
curl -X POST '<qualys_base_url>/fim/v3/profiles/importcsv'
-H 'Authorization: Bearer <token>'
-H 'Content-Type: multipart/form-data ; boundary=--
WebKitFormBoundary7MA4YWxkTrZu0gW'
-F 'file=@"csvFilenName.csv"'
Response: Success call of API
{
"FAILED" : {},
"SUCCESS" : {
"Registry Rule Profile" : "Profile created successfully"
}
}
Response: Failed call of API
{
"FAILED" : {
"Registry Rule Profile" : "Provided list of asset ids is not valid"
},
"SUCCESS" : {}
}