Update Blocked Commands
Update Blocked Commands is a configuration-based API that helps you update the blocked commands.
The API can be executed only by the Manager user role.
API Version History
The following table provides the information about the different versions of this API along with the status:
API Version | Status | EOS Timeline | EOL Timeline |
---|---|---|---|
v2 | Active | N/A | N/A |
v1 | Active | N/A | N/A |
For more information on API versioning, refer to API Versioning.
v2 API
Input ParametersInput Parameters
Parameter | Mandatory/ Optional |
Data Type | Description |
---|---|---|---|
languageId | Mandatory | Long | Provide the language ID, which is the unique id that is the combination of platform and language. |
commandId | Mandatory | Long | Provide the unique ID of the blocked command. |
commands | Mandatory | String | Provide the commands that are comma separated strings which the user wants to block from script creation. |
user | Optional | Object | Provide the user details like name and ID of user. |
Authorization | Mandatory | String | Authorization token to authenticate to the Qualys Enterprise TruRisk™ Platform. Prepend the token with 'Bearer', followed by a space. For example: Bearer . |
Sample: Update a blocked command using command IDSample: Update a blocked command using command ID
API Request
curl -X POST
'<qualys_base_url>/sm/v2/block-commands/update'
-header 'Content-Type: application/json'
-header 'Authorization: Bearer {{authToken}}'
-data '{
"languageId": 201,
"commandId": 206,
"commands": "abc,runas1,runas2,curl1,curl2,curl3",
"user": {
"id": "9321f0b3-5372-4107-817c-d5647de6da11",
"name": "string",
"userName": "string"
}
}'
Response
{ "body": "Commands Updated Successfully" }
v1 API
Input ParametersInput Parameters
Parameter | Mandatory/ Optional |
Data Type | Description |
---|---|---|---|
languageId | Mandatory | Long | Provide the language ID, which is the unique id that is the combination of platform and language. |
commands | Mandatory | String | Provide the commands that are comma separated strings which the user wants to block from script creation. |
user | Optional | Object | Provide the user details like name and ID of user. |
Authorization | Mandatory | String | Authorization token to authenticate to the Qualys Enterprise TruRisk™ Platform. Prepend the token with 'Bearer', followed by a space. For example: Bearer . |
API Request
curl -X POST 'https://<qualys_base_url>/sm/v1/block-commands/update' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{authToken}}' \ --data '{ "languageId": 4, "commands":"date,ls,mkdir,put", "user": { "id": "<USER ID>", "name": "<USER NAME>" } }'
Response
{ "body": "Commands Updated Successfully" }