Swagger Blocklisting examples
You can get and set the blocklisting configuration.
Swagger GET /blockListingConfig example
Perform the following steps to get the blocklisting configuration:
- Expand the blockListing section.
- Click GET /blockListingConfig.
- Click Try it Out.
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Click Execute.Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.
Response body{ "configIdsByHostname": { "system-name.com": "id1" }, "configsById": { "id1": { "hashFiles": [ "example_md5.md5" ], "scanFolders": [ "/home/usera" ] } } }
Swagger PUT /blockListingConfig example
Perform the following steps to update the blocklisting configuration:
- Expand the blockListing section.
- Click PUT /blockListingConfig.
- Click Try it Out.
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Supply the request body in the following
format.
{ "configIdsByHostname": { "vm1.example.com": "id1", "vm2.example.com": "id2" }, "configsById": { "id1": { "hashFiles": [ "hashes.txt" ], "scanFolders": [ "/home" ] }, "id2": { "hashFiles": [ "hashes.txt", "hashes2.txt" ], "scanFolders": [ "/opt" ] } } }
- Click Execute.
Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.
Swagger GET /hashFiles example
Perform the following steps to get the blocklisting hash files:
- Expand the blockListing section.
- Click GET /hashFiles.
- Click Try it Out.
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Click Execute.Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.
Response body { "KBM_TYPE": "root", "hashFiles": [ { "KBM_TYPE": "file", "hashFile": "example_md5.md5", "hashType": "MD5", "hashCount": 1, "nonEmptyLines": 1 }, { "KBM_TYPE": "file", "hashFile": "hash.md5.txt", "hashType": "MD5", "hashCount": 1, "nonEmptyLines": 1 }, { "KBM_TYPE": "file", "hashFile": "md5_test_error.md5", "hashType": "MD5", "hashCount": 1, "nonEmptyLines": 1 } ] }
Swagger POST /hashFiles example
Perform the following steps to update the blocklisting hash files:
- Expand the blockListing section.
- Click POST /hashFiles.
- Click Try it Out.
- Click Filename Add string item.
- Click Choose File and upload the hash file.
- Continue to click Add string item to upload additional hash files as needed.
- Click Execute.
Swagger DELETE /hashFiles example
Perform the following steps to delete a blocklisting hash file:
- Expand the blockListing section.
- Click DELETE /hashFiles.
- Click Try it Out.
- Enter the name of the hash file that you want to delete.
- Click Execute.
Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.