This documentation supports an earlier version of BMC Helix Operations Management.

To view the documentation for the latest version, select 23.2 from the Product version picker.

Agent Query Tool PATROL Script Language command management endpoints in the REST API

The following section provides a list of supported endpoints and an overview about running these endpoints. Before you run an endpoint, you must authenticate yourself. For more information, see  Access and authentication for the REST API Open link

Related topic

PATROL Script Language overview and functions Open link

Roles and permissions


You can create, update, delete, and retrieve the Agent Query Tool (AQT) PATROL Script Language (PSL) commands by running APIs. 

POST /agent_commands
Request URL
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_commands/
Example request URL
 https://HostA.bmc.com/acs/api/v1.0/agent_commands/

You can create a PSL command even if the command:

  • Contains a special character in the name or the body
  • Contains blank spaces in the name
  • Contains quotation marks "" in the body
  • Is longer than 1056 characters

You can also create multiple PSL commands with the same body with different names.

Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions about obtaining the JWT token, see Access and authentication for the REST API. Open link

Parameter details

Parameter NameValue TypeLocated InMandatoryDescription
nameStringbodyYes

A name for the command.

The maximum length is 200 characters. The following special characters are allowed:

  • - (hyphen)
  • , (comma)
  • _ (underscore)
  • & (ampersand)
  • ; (semi colon)
descriptionStringbodyNoA description for the command.
commandStringbodyYes

The PSL command body.

Before sending the command, ensure that you replace quotation marks "" with the value &quot;.

Example

Actual command

" print(pconfig("GET","/AgentSetup/historyRetentionPeriod")); "

 Command in the REST body

" print(pconfig(&quot;GET&quot;,&quot;/AgentSetup/historyRetentionPeriod&quot;)); "

Note

In the command body, make sure that you use the following guidelines:

  • Use the escape character \ before a backslash '\' or before the '\n' character.
    For example:
    \\
    \\n
  • For quotation marks, perform one of the following steps:
    • Use the value &quot; instead of quotation marks
    • Use the escape character \ before quotation marks

Request body

{
 "name": "string",
"description": "string",
"command": "string"
}

Example request body

{
 "name": "History Retention Period",
"description": "To Get The History Retention Period",
"command": " print(pconfig(&quot;GET&quot;,&quot;/AgentSetup/historyRetentionPeriod&quot;)); "
}

CURL request body

curl --location --request POST 'https://<BMC Helix Portal-url>/acs/api/v1.0/agent_commands/' \
--header 'Authorization: Bearer <JWT-Token>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "command Name",
    "description": "Describe usage of command",
    "command": " PSL command  "
}'

CURL example request body

curl --location --request POST 'https://acme-trial.bmc.com/acs/api/v1.0/agent_commands/' \
--header 'Authorization: Bearer abc' \
--header 'Content-Type: application/json' \
--data '{
"name": "History Retention Period",
"description": "To Get The History Retention Period",
"command": " print(pconfig(&quot;GET&quot;,&quot;/AgentSetup/historyRetentionPeriod&quot;)); "
}'


Successful response

Success code: 200

{
'AgentCommand_Id': [
{
'id': 'cc495a2d-6bff-4be4-b85c-6e850582b660'
}
],
'message': 'Agent command created successfully'
}


Unsuccessful responses

Status code: 400

Scenario 1: The command name is empty or the command already exists.

Either Name/Command is null or Name already exist

Scenario 2: Invalid command body

Unrecognized field "name1" (class com.bmc.truesight.saas.acs.aqt.model.AQTRequest), not marked as ignorable


Back to top

PUT /agent_commands/<pslid>
Request URL
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_commands/<pslid>
Example request URL
 https://HostA.bmc.com/acs/api/v1.0/agent_commands/3bd2140c-e2c4-4c9a-b04b-c4593841cf31
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions about obtaining the JWT token, see Access and authentication for the REST API. Open link

Parameter details

Parameter NameValue TypeLocated InMandatoryDescription
nameStringbodyYesA name for the command.
descriptionStringbodyNoA description for the command.
commandStringbodyYes

The PSL command body.

Before sending the command, ensure that you replace quotation marks "" with the value &quot;.

Example

Actual command

" print(pconfig("GET","/AgentSetup/historyRetentionPeriod")); "

 Command in the REST body

" print(pconfig(&quot;GET&quot;,&quot;/AgentSetup/historyRetentionPeriod&quot;)); "
pslidStringpathYes

The PSL command ID.

Note

In the command body, make sure that you use the following guidelines::

  • Use the escape character \ before a backslash '\' or before the '\n' character.
    For example:
    \\
    \\n
  • For using quotation marks, perform one of the following steps:
    • Use the value &quot; instead of quotation marks
    • Use the escape character \ before quotation marks

Request body

{
 "name": "string",
"description": "string",
"command": "string"
}

Example request body

{
  "name": "Agent Information Command",
  "description": "Agent Information Details",
  "command": "print(&quot;Host = &quot;.get(&quote;/name&quot;).&quot;IP address = &quot;.get(&quot;/ipAddress&quot;).&quot;OS Version = &quot;.get(&quot;/osName&quot;)." ".get(&quot;/osVersion&quot;));"
}

CURL request body

curl --location --request PUT 'https://<BMC Helix Portal-url>/acs/api/v1.0/agent_commands/<pslid>' \
--header 'Authorization: Bearer <JWT-Token>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "command Name",
    "description": "Describe usage of command",
    "command": "PSL command"
}'

CURL example request body

curl --location --request PUT 'https://acme-trial.bmc.com/acs/api/v1.0/agent_commands/8329fa78-dbad-4135-9325-fe8cfe04458a' \
--header 'Authorization: Bearer abc' \
--header 'Content-Type: application/json' \
--data '{
"name": "Agent Information Command",
"description": "Agent Information Details",
"command": "print(&quot;Host = &quot;.get(&quot;/name&quot;).&quot;IP address = &quot;.get(&quot;/ipAddress&quot;).&quot;OS Version = &quot;.get(&quot;/osName&quot;).&quot; &quot;.get(&quot;/osVersion&quot;));"
}'


Successful response

Success code: 200

{
'user_name': 'admin',
'name': 'Agent Information Command',
'description': 'Agent Information Details',
'command': 'print("Host = ".get("/name")."IP address = ".get("/ipAddress")."OS Version = ".get("/osName")." ".get("/osVersion"));',
'creation_time': '2022-06-17T13:08:52.296156',
'modified_time': '2022-06-17T13:08:53.741090',
'id': 'cc495a2d-6bff-4be4-b85c-6e850582b660'
}


Unsuccessful response

Scenario 1: Invalid command ID

Error code: 404

Agent Command not found for 8ec8030e-c08a-420c-bb09-d499082a0fe0

Scenario 2: Unauthorized access

Error code: 401

Authentication Failed!!!

Back to top

DELETE /agent_commands/<pslid>

To delete a PSL command by ID, add ?type=id at the end of the command.

Request URL
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_commands/<pslid>?type=id
Example request URL for deleting a command by ID
 https://HostA.bmc.com/acs/api/v1.0/agent_commands/cc495a2d-6bff-4be4-b85c-6e850582b660?type=id

To delete a PSL command by name, add ?type=name at the end of the command.

Request URL
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_commands/<pslid>?type=name
Example request URL for deleting a command by name
 https://HostA.bmc.com/acs/api/v1.0/agent_commands/cc495a2d-6bff-4be4-b85c-6e850582b660?type=name
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions about obtaining the JWT token, see Access and authentication for the REST API. Open link

Parameter details

Parameter NameValue TypeLocated InMandatoryDescription
pslid or nameStringpathYesThe ID or name of the PSL command.
CURL request body

Delete by ID
curl --location --request DELETE 'https://<BMC Helix Portal-url>/acs/api/v1.0/agent_commands/<pslid>?type=id' \
--header 'Authorization: Bearer <JWT-Token>' \
--data ''


Delete by name
curl --location --request DELETE 'https://<BMC Helix Portal-url>/acs/api/v1.0/agent_commands/<agent_command_name>?type=name' \
--header 'Authorization: Bearer <JWT-Token>' \
--data ''

CURL example request body

Delete by ID
curl --location --request DELETE 'https://acme-trial.bmc.com/acs/api/v1.0/agent_commands/8329fa78-dbad-4135-9325-fe8cfe04458a?type=id' \
--header 'Authorization: Bearer abc' \
--data ''


Delete by name
curl --location --request DELETE 'https://acme-trial.bmc.com/acs/api/v1.0/agent_commands/Agent Information Command?type=name' \
--header 'Authorization: Bearer abc' \
--data ''

Successful response

Success code: 200

Agent command deleted.


Unsuccessful response

Scenario 1: Unauthorized access

Error code: 401

Authentication Failed!!!

Back to top

GET /agent_commands/
Request URL
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_commands/
Example request URL
 https://HostA.bmc.com/acs/api/v1.0/agent_commands/
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions about obtaining the JWT token, see Access and authentication for the REST API. Open link

CURL request body

curl --location --request GET 'https://<BMC Helix Portal-url>/acs/api/v1.0/agent_commands/' \
--header 'Authorization: Bearer <JWT-Token>' \
--data ''

CURL example request body

curl --location --request GET 'https://acme-trial.dsmlab.bmc.com/acs/api/v1.0/agent_commands/' \
--header 'Authorization: Bearer abc' \
--data ''

Successful response

Success code: 200

[
  {
    "user_name": "system",
    "name": "All pconfig variables",
    "description": "oob",
    "command": "print(system("pconfig +get -port ".get("/tcpPort")));",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "5968cca1-81c8-41fd-9bdc-85ddcfd671c2"
  },
  {
    "user_name": "system",
    "name": "Disabled KMs",
    "description": "oob",
    "command": "print(pconfig("GET","/AgentSetup/disabledKMs"));",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "fd707e69-6c69-4984-b264-caf22447e998"
  },
  {
    "user_name": "system",
    "name": "Active/ Running KMs details",
    "description": "oob",
    "command": "print(system("%DUMP KM_LIST"));",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "6e32bca0-4995-4d78-b14a-29df1bf80922"
  },
  {
    "user_name": "system",
    "name": "Agent Information",
    "description": "oob",
    "command": "print("Host = ".get("/name")."\\nIP address = ".get("/ipAddress")."\\nPort = ".get("/tcpPort")."\\nVersion = ".get("/patrolVersion")."\\nOS Version = ".get("/osName")." ".get("/osVersion"));",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "968aa00f-6830-4c10-ae82-67baef43b278"
  },
  {
    "user_name": "system",
    "name": "History Retention",
    "description": "oob",
    "command": "print(pconfig("GET","/AgentSetup/historyRetentionPeriod"));",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "d917aef2-8750-422f-a7ce-3fa72e45b04c"
  },
  {
    "user_name": "system",
    "name": "Preloaded KMs - Policy configured",
    "description": "oob",
    "command": "printf("Policy Configured:\\n%s\\n",pconfig("GET","/ConfigData/AgentSetup/preloadedKMs"));",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "d8965824-ddae-4911-acc4-9af152db6315"
  },
  {
    "user_name": "system",
    "name": "Preloaded KMs - Locally configured",
    "description": "oob",
    "command": "printf("Locally Configured:\\n%s\\n",pconfig("GET","/AgentSetup/preloadedKMs"));",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "ca5c3df7-ae86-405c-acfc-7d5af852adbc"
  },
  {
    "user_name": "system",
    "name": "Last 20 Parameter Alarm/Warning Events",
    "description": "oob",
    "command": "print("The result of the query:(Earliest First)\\\\n\\\\n".event_query("20","\\n\\n","TimeStamp: %{EV_TIME} Event id: %{EV_ID} Event type: %{EV_TYPE} Event description:%{EV_DESC}\\n","","","O", "A,W","","","", "-/-", "11",""). "\\\\n");",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "01561e74-74ff-4526-a6c4-f5908c0562d0"
  },
  {
    "user_name": "system",
    "name": "Refresh Parameters",
    "description": "oob",
    "command": "execute("OS","%REFRESH_ALL_PARAMS");",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "0771e882-238e-467a-82c4-646d19fe9d89"
  },
  {
    "user_name": "system",
    "name": "Force Discovery",
    "description": "oob",
    "command": "execute("OS","%REFRESH_APPL_DISC");",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "c8d7b233-bfab-4818-a8d0-d97272e27c13"
  },
  {
    "user_name": "system",
    "name": "PATROL SID Report",
    "description": "oob",
    "command": "outputLine="PATROL SID Report:\\\\n";instanceCount=int(0);parameterCount=int(0);foreach line KM (get_vars("","nodes")) {displayName=get("/".KM."/MetaKMDisplayName");kmName=get("/".KM."/name");if (length(displayName)){outputLine=outputLine."================================================================================================\\\\n|MONITOR TYPE:".displayName."(".kmName."):\\\\n================================================================================================\\\\n";foreach line instance (get("/".KM."/instances")) {instanceCount=int(instanceCount+1);parameterCount=int(parameterCount + lines(get_vars("/".KM."/".instance,"nodes")) - 2);instName=get("/".KM."/".instance . "/name");outputLine=outputLine.sprintf("|\\\\tNAME:%s\\\\t SID:%s\\\\n", instName, instance);}}}outputLine=outputLine."\\\\n\\\\nAgent currently has:\\\\n\\\\tInstances: ".instanceCount."\\\\n\\\\tParameters: ".parameterCount."\\\\n";print(outputLine);",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "7f9b81db-e501-47fe-a15b-951f8df05cd1"
  },
  {
    "user_name": "system",
    "name": "Mapped Device Report",
    "description": "oob",
    "command": "x=get_vars("","nodes");output="\\\\n=========================================================================\\\\n| Mapped Device Report:\\\\n=========================================================================\\\\n";foreach line KM (x) {cdmName=get("/".KM."/MetaKMCDMClassName");if (cdmName=="BMC_ComputerSystem") { foreach line instance (get("/".KM."/instances")) { displayName=get("/".KM."/MetaKMDisplayName");kmName=get("/".KM."/name"); mdFQDN=get("/".KM."/".instance."/MetaFQDN"); mdTID=get("/".KM."/".instance."/MetaTokenID"); if (length(mdFQDN)>0 && length(mdTID)>0) { output=output."| Mapped device:".mdFQDN."\\\\n|\\\\tMonitor type:".displayName."(".kmName.")\\\\n|\\\\tToken ID:".mdTID."\\\\n|\\\\n";}}}} print(output."=========================================================================\\\\n\\\\n");",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "e6968cbc-1e7b-4d30-88c4-5ee3464c8739"
  },
  {
    "user_name": "system",
    "name": "Preloaded KMs - All -Policy+Local",
    "description": "oob",
    "command": "printf("Merged List:\\n%s,%s\\n\\n",trim(pconfig("GET","/AgentSetup/preloadedKMs"),"\\\\n"),pconfig("GET","/ConfigData/AgentSetup/preloadedKMs")."\\n");",
    "creation_time": "2022-06-25 08:55:42.049397+00",
    "modified_time": null,
    "id": "b7a1109f-41a6-4e5f-ad87-ed2d66f4552f"
  },
  {
    "user_name": "system",
    "name": "Generate Namespace",
    "description": "oob",
    "command": "outputFileName=replace(get("/agentLogPath"),".errs",".namespace");outputFile=fopen(outputFileName,"w");write(outputFile,"\\n\\n===========================================================================\\n");write(outputFile,"| Global variables:                                                       |\\n");write(outputFile,"===========================================================================\\n");foreach line attr (get_vars("/","leaves")) { if ( attr == "AgentSetup" || attr == "EventSetup" ||attr == "ConfigData" || attr == "___tuning___" || attr == "snmp" || attr == "__self__" ) {  next; } else {  value=replace(get("/".KM."/".attr),"\\n","\\n\\t"); } write(outputFile,attr."(".value.")\\n");}foreach line KM ("AgentSetup\\nConfigData\\nEventSetup\\n".get_vars("","subnodes")) { write(outputFile,"\\n\\n===========================================================================\\n"); write(outputFile,"Application class: ".KM."\\n"); write(outputFile,"===========================================================================\\n");     foreach line attr (get_vars("/".KM,"leaves")) {         if ( attr == "AgentSetup" || attr == "EventSetup" ||attr == "ConfigData" || attr == "___tuning___" || attr == "snmp" || attr == "__self__" ) {             next;         }         value=replace(get("/".KM."/".attr),"\\n","\\n\\t");         write(outputFile,"|--".attr."(".value.")\\n");     }  foreach line instance (get_vars("/".KM,"subnodes")) {  write(outputFile,"|\\n|-- INSTANCE:".instance."\\n");     foreach line inst_attr (get_vars("/".KM."/".instance,"leaves")) {      if ( inst_attr == "AgentSetup" || inst_attr == "EventSetup" ||inst_attr == "ConfigData" || inst_attr == "___tuning___" || inst_attr == "snmp" || attr == "__self__" ) {    next;   }      inst_attr_value=replace(get("/".KM."/".instance."/".inst_attr),"\\n","\\n\\t\\t");   write(outputFile,"    |--".inst_attr."(".inst_attr_value.")\\n");  }     foreach line param (get_vars("/".KM."/".instance,"subnodes")) {      if ( param == "AgentSetup" || param == "EventSetup" ||param == "ConfigData" || param == "___tuning___" || param == "snmp" || attr == "__self__" ) {    next;   }   write(outputFile,"    |\\n    |--PARAMETER:".param."\\n");   foreach line param_attr (get_vars("/".KM."/".instance."/".param,"leaves")) {    param_value=replace(get("/".KM."/".instance."/".param."/".param_attr),"\\n","\\n\\t\\t\\t");    write(outputFile,"       |--".param_attr."(".param_value.")\\n");   }  } }}close(outputFile,0);if (get("/appType")=="NT") {cmd="TYPE \\\\"".outputFileName."\\\\"";}else{cmd="cat ".outputFileName;} print("Namespace report generated in ".outputFileName."\\n".system(cmd));",
    "creation_time": "2022-06-29 09:34:41.818111+00",
    "modified_time": null,
    "id": "ec0fdb10-bf1c-4e5d-a3c3-11a7db057d44"
  }
]


Unsuccessful response

Scenario 1: Unauthorized access

Error code: 401

Authentication Failed!!!

Back to top

GET /agent_commands/<pslid>
Request URL
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_commands/<pslid>
Example request URL
 https://HostA.bmc.com/acs/api/v1.0/agent_commands/cc495a2d-6bff-4be4-b85c-6e850582b660
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions about obtaining the JWT token, see Access and authentication for the REST API. Open link

Parameter details

Parameter NameValue TypeLocated InMandatoryDescription
pslidStringpathYesThe PSL command ID.

CURL request body

curl --location --request PUT 'https://<BMC Helix Portal-url>/acs/api/v1.0/agent_commands/<pslid>' \
--header 'Authorization: Bearer <JWT-Token>' \
--header 'Content-Type: application/json' \

CURL example request body

curl --location --request PUT 'https://acme-trial.bmc.com/acs/api/v1.0/agent_commands/8329fa78-dbad-4135-9325-fe8cfe04458a' \
--header 'Authorization: Bearer abc' \
--header 'Content-Type: application/json' \

Successful response

Success code: 200

{
    "userName": admin,
    "pslCommandName": "History Retention Period",
    "displayText": "History Retention Period",
    "pslCommand": " print(pconfig("GET","/AgentSetup/historyRetentionPeriod")); ",
    "currentTime": "2022-05-16T10:25:45.162861",
    "modifiedTime": "2022-05-16T10:25:45.162861",
    "pslid": "2a4da4de-a53f-4f8b-aa32-a67381ab6850"
}


Unsuccessful response

Scenario 1: Unauthorized access

Error code: 401

Authentication Failed!!!

Back to top

POST /agent_operations

Use this REST API endpoint to run PSL commands on multiple PATROL Agents simultaneously. You can run PSL commands on maximum 100 Agents in a single request. You can run the commands on the PATROL Agent ID or name.

The following permissions are required to run this endpoint:

  • manage_patrol_agent
    This permission is required to access the PATROL Agent.
  • manage_aqt_authentication
    This permission is required to view and manage the PATROL Agent.

To run  PSL commands on multiple PATROL Agents, you need to obtain the command ID and command names that you want to run . You can obtain these details by running the agent_commands API and get a list of all PSL commands.

Request URL - by PATROL Agent ID
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_operations?type=id/
Example request URL
 https://HostA.bmc.com/acs/api/v1.0/agent_operations?type=id/
Request URL - by PATROL Agent name
 https://<BMC Helix Portal URL>/acs/api/v1.0/agent_operations?type=name
Example request URL
 https://HostA.bmc.com/acs/api/v1.0/agent_operations?type=name/
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions about obtaining the JWT token, see Access and authentication for the REST API. Open link

Parameter details

Parameter NameValue TypeLocated InMandatoryDescription
command_typeStringbodyYes

A string with the following valid values:

  • ID: The PSL command ID
    For example:
    "id": "6e32bca0-4995-4d78-b14a-29df1bf80922"
  • name: The PSL command name
    For example:
    "name": "Active/ Running KMs details"
  • custom: A custom value that can include the command to be run.
    For example:
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); "
    If the custom value is used, ensure that you add or escape quotation marks with a back slash (\) or replace the quotation marks with the value &quot;.
commandStringbodyYes

The PSL command body.

Before sending the command, ensure that you add or escape quotation marks with a back slash (\) or replace the quotation marks with the value &quot;.

Example

Actual command

" print(pconfig("GET","/AgentSetup/historyRetentionPeriod")); "

 Command in the REST body

" print(pconfig(&quot;GET&quot;,&quot;/AgentSetup/historyRetentionPeriod&quot;)); "
aqt_timeout_seconds

Integer


bodyNo

The duration after which if the PATROL Agent fails to respond, it is considered as a timeout.

The default duration is 60 seconds. The maximum duration can be 285 seconds. If you want to increase the maximum timeout duration, contact BMC Support.

agentsStringbodyYes

A list of PATROL Agents with the following details:

  • agents: A string value of the PATROL Agent name or ID depending on the value passed in the REST API URL. For example:
    "agent": "hostA-bmc-1234"
    "agent": "ffb9cea6-29d5-4891-b3d5-18452021a251"
  • user: A string value. This value is required for a non-administrator user. For example:
    "user": "john"
    For an administrator user, you can keep the value blank. For example:
    "user": ""
  • password: A string value. This value is required for a non-administrator user. For example:
    "password": "pasword123"
    For an administrator user, you can keep the value blank. For example:
    "password": ""

Note

In the command body, make sure that you use the following guidelines:

  • Use the escape character \ before a backslash '\' or before the '\n' character.
    For example:
    \\
    \\n
  • For using quotation marks, perform one of the following steps:
    • Use the value &quot; instead of quotation marks
    • Use the escape character \ before quotation marks

Request body for the ID type and an administrator user or a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "integer",   
    "agents": [
        {
            "agent": "string",
            "user": "",
            "password": "",
        },
        {
            "agent": "string",
            "user": "",
            "password": "",
        }
    ]
}

Example request body for the ID type and an administrator user or a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "120",   
    "agents": [
        {
            "agent": "ffb9cea6-29d5-4891-b3d5-18452021a251",
            "user": "",
            "password": "",
        },
        {
            "agent": "ab2b41fa-ff4c-449f-844e-31f17fc8dd08",
            "user": "",
            "password": "",
        }
    ]
}

Request body for the ID type and a non-administrator user

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "integer", 
    "agents": [
        {
            "agent": "string",
            "user": "string",
            "password": "string",
        },
        {
            "agent": "string",
            "user": "string",
            "password": "string",
        }
    ]
}

Example request body for the ID type and a non-administrator user

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "120", 
    "agents": [
        {
            "agent": "ffb9cea6-29d5-4891-b3d5-18452021a251",
            "user": "patrol",
            "password": "patAdm1n",
        },
        {
            "agent": "ab2b41fa-ff4c-449f-844e-31f17fc8dd08",
            "user": "patrol1",
            "password": "patrol1",
        }
    ]
}

Request body for the PATROL Agent name type with the port and an administrator user or a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "integer", 
    "agents": [
        {
            "agent": "string:<port>",
            "user": "",
            "password": "",
        },
        {
            "agent": "string:<port>",
            "user": "",
            "password": "",
        }
    ]
}

Example request body for the PATROL Agent name type with the port and an administrator user or a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "120", 
    "agents": [
        {
            "agent": "hostA.bmc.com:3181",
            "user": "",
            "password": "",
        },
        {
            "agent": "hostB.bmc.com:5599",
            "user": "",
            "password": "",
        }
    ]
}

Request body for the PATROL Agent name type without the port and an administrator user or a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

In this case, the default port 3181 is considered.

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "integer", 
    "agents": [
        {
            "agent": "string",
            "user": "",
            "password": "",
        },
        {
            "agent": "string",
            "user": "",
            "password": "",
        }
    ]
}

Example request body for the PATROL Agent name type without the port and an administrator user or a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

In this case, the default port 3181 is considered.

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "120", 
    "agents": [
        {
            "agent": "hostA.bmc.com",
            "user": "",
            "password": "",
        },
        {
            "agent": "hostB.bmc.com",
            "user": "",
            "password": "",
        }
    ]
}

Request body for the PATROL Agent name type with the port and a non-administrator user

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "integer", 
    "agents": [
        {
            "agent": "string:<port>",
            "user": "string",
            "password": "string",
        },
        {
            "agent": "string:<port>",
            "user": "string",
            "password": "string",
        }
    ]
}

Example request body for the PATROL Agent name type with the port and a non-administrator user

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "120", 
 
    "agents": [
        {
            "agent": "hostA.bmc.com:3181",
            "user": "patrol",
            "password": "patAdm1n",
        },
        {
            "agent": "hostB.bmc.com:5599",
            "user": "patrol1",
            "password": "patrol1",
        }
    ]
}

Request body for the PATROL Agent name type without the port and a non-administrator user

In this case, the default port 3181 is considered.

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "integer", 
    "agents": [
        {
            "agent": "string",
            "user": "string",
            "password": "string",
        },
        {
            "agent": "string",
            "user": "string",
            "password": "string",
        }
    ]
}

Example request body for the PATROL Agent name type without the port and a non-administrator user

{
    "command": "print(pconfig(\"GET\",\"/AgentSetup/historyRetentionPeriod\")); ",
    "command_type": "custom",
    "aqt_timeout_seconds" : "120", 
 
    "agents": [
        {
            "agent": "hostA.bmc.com",
            "user": "patrol",
            "password": "patAdm1n",
        },
        {
            "agent": "hostB.bmc.com",
            "user": "patrol1",
            "password": "patrol1",
        }
    ]
}

CURL request body for an administrator user

curl --location --request POST 'https://hostA.bmc.com/acs/api/v1.0/agent_operations?type=name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJlZDhmMTQ4OS00MTdiLTQyNTAtYTkzYi1iZTJjNTVkY2Q4YWUiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI2MjI1MTY3MzM6OjkxNDY3NzQ1ODU5MDAzMCIsImF1ZCI6ImJtY19hZGVfY2xvdWRfc2VydmljZXMiLCJhbXIiOlsiZXlKMWMyVnlYMmxrSWpvaU9URTBOamMzTkRVNE5Ua3dNRE13SWl3aWNISnBibU5wY0dGc1gybGtJam9pWVdSdGFXNGlMQ0oxYzJWeVgzTjBZWFIxY3lJNklrVk9RVUpNUlNJc0luUjVjR1VpT2lKUVJWSlRUMDRpTENKMFpXNWhiblJmYVdRaU9pSTJNakkxTVRZM016TWlMQ0p5YjJ4bGN5STZXeUk1TVRBNU5qYzVPRGsxTlRjd05qWWlMQ0k1TWpFd05EQTROekU0T1RnNU5UQWlYU3dpWjNKdmRYQnpJanBiSWpRME1UTTBOakkzT1RBME5EazJPU0pkTENKd1pYSnRhWE56YVc5dWN5STZXeUlxSWwxOSJdLCJpc3MiOiJodHRwczovL2dsb2JleC10aHVuZGVyaGVhZC10cmlhbC5kc21sYWIuYm1jLmNvbSIsInR5cGUiOiJBQ0NFU1NfVE9LRU4iLCJleHAiOjE2NjkwMjUyODUsImlhdCI6MTY2OTAyNDM4NSwianRpIjoiNDg1MDVhNzAtZjFiMi00ZTAwLWIxYmItZmZkMjllMGYzOGUyIn0.anSk7v6HK_EuZUeG5v3d6Qg2ss058CBGl5M9baXaAPSgMSh7lcAX7PBBEXrXqy6SBVkywVue2H_ytR9fSJgAy26J05N72t74eVOAj1iR0gLAdrcqMoAKgGYT6wC-rfnn39vzGEFbTXOugpTwU3JzWkldIZ-Fr6oadbZSH-11Ur9Si1XCitfSKAWCcVOICWj4hFo8t5D2mvrFZaMkKv6_RAQuqnAda00muKoGev-c0G_MEsXs44HlGEBah7oebTRCDTqNGoEKNeuo9UZ3MEZ77AK9YctKtrsEInQIb-NGwKLIMxiE2r3JoKJWMAcmbIJtffSdh_djxnqOMOOxnr68jw' \
--header 'Cookie: onbmc_pool=2134411018.20480.0000' \
--data-raw '{
    "agents": [
        {
            "agent": "string:<port>",
            "user": "",
            "password": ""
        },
        {
            "agent": "string:<port>",
            "user": "",
            "password": ""
        }
      
    ],
    "command": "Agent Information",
    "command_type": "name"
  
}'

CURL example for an administrator user

curl --location --request POST 'https://hostA.bmc.com/acs/api/v1.0/agent_operations?type=name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJlZDhmMTQ4OS00MTdiLTQyNTAtYTkzYi1iZTJjNTVkY2Q4YWUiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI2MjI1MTY3MzM6OjkxNDY3NzQ1ODU5MDAzMCIsImF1ZCI6ImJtY19hZGVfY2xvdWRfc2VydmljZXMiLCJhbXIiOlsiZXlKMWMyVnlYMmxrSWpvaU9URTBOamMzTkRVNE5Ua3dNRE13SWl3aWNISnBibU5wY0dGc1gybGtJam9pWVdSdGFXNGlMQ0oxYzJWeVgzTjBZWFIxY3lJNklrVk9RVUpNUlNJc0luUjVjR1VpT2lKUVJWSlRUMDRpTENKMFpXNWhiblJmYVdRaU9pSTJNakkxTVRZM016TWlMQ0p5YjJ4bGN5STZXeUk1TVRBNU5qYzVPRGsxTlRjd05qWWlMQ0k1TWpFd05EQTROekU0T1RnNU5UQWlYU3dpWjNKdmRYQnpJanBiSWpRME1UTTBOakkzT1RBME5EazJPU0pkTENKd1pYSnRhWE56YVc5dWN5STZXeUlxSWwxOSJdLCJpc3MiOiJodHRwczovL2dsb2JleC10aHVuZGVyaGVhZC10cmlhbC5kc21sYWIuYm1jLmNvbSIsInR5cGUiOiJBQ0NFU1NfVE9LRU4iLCJleHAiOjE2NjkwMjUyODUsImlhdCI6MTY2OTAyNDM4NSwianRpIjoiNDg1MDVhNzAtZjFiMi00ZTAwLWIxYmItZmZkMjllMGYzOGUyIn0.anSk7v6HK_EuZUeG5v3d6Qg2ss058CBGl5M9baXaAPSgMSh7lcAX7PBBEXrXqy6SBVkywVue2H_ytR9fSJgAy26J05N72t74eVOAj1iR0gLAdrcqMoAKgGYT6wC-rfnn39vzGEFbTXOugpTwU3JzWkldIZ-Fr6oadbZSH-11Ur9Si1XCitfSKAWCcVOICWj4hFo8t5D2mvrFZaMkKv6_RAQuqnAda00muKoGev-c0G_MEsXs44HlGEBah7oebTRCDTqNGoEKNeuo9UZ3MEZ77AK9YctKtrsEInQIb-NGwKLIMxiE2r3JoKJWMAcmbIJtffSdh_djxnqOMOOxnr68jw' \
--header 'Cookie: onbmc_pool=2134411018.20480.0000' \
--data-raw '{
    "agents": [
        {
            "agent": "hostB.bmc.com:3181",
            "user": "",
            "password": ""
        },
        {
            "agent": "hostC:3185",
            "user": "",
            "password": ""
        }
      
    ],
    "command": "Agent Information",
    "command_type": "name"
  
}'

CURL request body for a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

curl --location --request POST 'https://hostA.bmc.com/acs/api/v1.0/agent_operations?type=name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJlZDhmMTQ4OS00MTdiLTQyNTAtYTkzYi1iZTJjNTVkY2Q4YWUiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI2MjI1MTY3MzM6OjEzNTkzMDAyNzQwODI5NSIsImF1ZCI6ImJtY19hZGVfY2xvdWRfc2VydmljZXMiLCJhbXIiOlsiZXlKMWMyVnlYMmxrSWpvaU1UTTFPVE13TURJM05EQTRNamsxSWl3aWNISnBibU5wY0dGc1gybGtJam9pZFhObGNqSWlMQ0oxYzJWeVgzTjBZWFIxY3lJNklrVk9RVUpNUlNJc0luUjVjR1VpT2lKUVJWSlRUMDRpTENKMFpXNWhiblJmYVdRaU9pSTJNakkxTVRZM016TWlMQ0p5YjJ4bGN5STZXeUkzT1RNNU5ESXpNVEkwTURZNU9ESWlYU3dpWjNKdmRYQnpJanBiSWpjd05EZ3hNak13TURjMU5URXdNaUpkTENKd1pYSnRhWE56YVc5dWN5STZXeUp0YjI1cGRHOXlMblZ6WlhKZmNISmxabVZ5Wlc1alpYTXViV0Z1WVdkbElpd2liVzl1YVhSdmNpNXBibVp5WVhOMGNuVmpkSFZ5WlY5d2IyeHBZMmxsY3k1dFlXNWhaMlZmWVhGMFgyRjFkR2hsYm5ScFkyRjBhVzl1SWl3aWJXOXVhWFJ2Y2k1cGJtWnlZWE4wY25WamRIVnlaVjl3YjJ4cFkybGxjeTV0WVc1aFoyVmZjR0YwY205c1gyRm5aVzUwSWwxOSJdLCJpc3MiOiJodHRwczovL2dsb2JleC10aHVuZGVyaGVhZC10cmlhbC5kc21sYWIuYm1jLmNvbSIsInR5cGUiOiJBQ0NFU1NfVE9LRU4iLCJleHAiOjE2NjkwMjc1ODMsImlhdCI6MTY2OTAyNjY4MywianRpIjoiMTgzN2NkOTYtMzMzNy00YjAzLWFhODEtMGZjYjdiY2JkZTQ5In0.SGBj7aU9nxaph5AN4ST5oWPKmUigfmPMx_4FA6JS3NXz15s01X1dySThu0CrkkN_r_fEeCK0vLbB_mLDlfYz23SquaAcTIZ44DaX6tHH7EmttoKEFXAMNHOMYive462Qg_Mkx6fgGtefsZwTf7BKHhX8ysmT37h2-vOJ0QKEBJuSn4P5nigDhbV0KgqEwxupz4BTdUChpjzpg0qj3Dz_NU_fV46ulERmRHVzUCqOTOi4S23wtLPSTSE0RSoQ_wFDyyYG3dK4f422liJZpSLqrEfRR3sbXrM5nKvWei1XNj7_7iOHAu6xQT--JjG3ajH9BWP-ACHyAbxTvCIDJM39Dg' \
--header 'Cookie: onbmc_pool=2134411018.20480.0000' \
--data-raw '{
    "agents": [
        {
            "agent": "string:<port>",
            "user": "",
            "password": ""
        },
        {
            "agent": "string:<port>",
            "user": "",
            "password": ""
        }
      
    ],
    "command": "Agent Information",
    "command_type": "name"
  
}'

CURL example for a non-administrator user with the manage_patrol_agent and manage_aqt_authentication permissions

curl --location --request POST 'https://hostA.bmc.com/acs/api/v1.0/agent_operations?type=name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJlZDhmMTQ4OS00MTdiLTQyNTAtYTkzYi1iZTJjNTVkY2Q4YWUiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI2MjI1MTY3MzM6OjEzNTkzMDAyNzQwODI5NSIsImF1ZCI6ImJtY19hZGVfY2xvdWRfc2VydmljZXMiLCJhbXIiOlsiZXlKMWMyVnlYMmxrSWpvaU1UTTFPVE13TURJM05EQTRNamsxSWl3aWNISnBibU5wY0dGc1gybGtJam9pZFhObGNqSWlMQ0oxYzJWeVgzTjBZWFIxY3lJNklrVk9RVUpNUlNJc0luUjVjR1VpT2lKUVJWSlRUMDRpTENKMFpXNWhiblJmYVdRaU9pSTJNakkxTVRZM016TWlMQ0p5YjJ4bGN5STZXeUkzT1RNNU5ESXpNVEkwTURZNU9ESWlYU3dpWjNKdmRYQnpJanBiSWpjd05EZ3hNak13TURjMU5URXdNaUpkTENKd1pYSnRhWE56YVc5dWN5STZXeUp0YjI1cGRHOXlMblZ6WlhKZmNISmxabVZ5Wlc1alpYTXViV0Z1WVdkbElpd2liVzl1YVhSdmNpNXBibVp5WVhOMGNuVmpkSFZ5WlY5d2IyeHBZMmxsY3k1dFlXNWhaMlZmWVhGMFgyRjFkR2hsYm5ScFkyRjBhVzl1SWl3aWJXOXVhWFJ2Y2k1cGJtWnlZWE4wY25WamRIVnlaVjl3YjJ4cFkybGxjeTV0WVc1aFoyVmZjR0YwY205c1gyRm5aVzUwSWwxOSJdLCJpc3MiOiJodHRwczovL2dsb2JleC10aHVuZGVyaGVhZC10cmlhbC5kc21sYWIuYm1jLmNvbSIsInR5cGUiOiJBQ0NFU1NfVE9LRU4iLCJleHAiOjE2NjkwMjc1ODMsImlhdCI6MTY2OTAyNjY4MywianRpIjoiMTgzN2NkOTYtMzMzNy00YjAzLWFhODEtMGZjYjdiY2JkZTQ5In0.SGBj7aU9nxaph5AN4ST5oWPKmUigfmPMx_4FA6JS3NXz15s01X1dySThu0CrkkN_r_fEeCK0vLbB_mLDlfYz23SquaAcTIZ44DaX6tHH7EmttoKEFXAMNHOMYive462Qg_Mkx6fgGtefsZwTf7BKHhX8ysmT37h2-vOJ0QKEBJuSn4P5nigDhbV0KgqEwxupz4BTdUChpjzpg0qj3Dz_NU_fV46ulERmRHVzUCqOTOi4S23wtLPSTSE0RSoQ_wFDyyYG3dK4f422liJZpSLqrEfRR3sbXrM5nKvWei1XNj7_7iOHAu6xQT--JjG3ajH9BWP-ACHyAbxTvCIDJM39Dg' \
--header 'Cookie: onbmc_pool=2134411018.20480.0000' \
--data-raw '{
    "agents": [
        {
            "agent": "hostB.bmc.com:3181",
            "user": "",
            "password": ""
        },
        {
            "agent": "hostC.bmc.com:3185",
            "user": "",
            "password": ""
        }
      
    ],
    "command": "Agent Information",
    "command_type": "name"
  
}'

CURL request body for a non-administrator user without the manage_patrol_agent and manage_aqt_authentication permissions

curl --location --request POST 'https://hostA.bmc.com/acs/api/v1.0/agent_operations?type=name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiIzMjE1MDYyZi1kODA3LTQ1Y2QtYjkyNS0zNDQ3MzYwNjllYzkiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI2MjI1MTY3MzM6OjQ2NTc4MTY5MzEzODE4NyIsImF1ZCI6ImJtY19hZGVfY2xvdWRfc2VydmljZXMiLCJhbXIiOlsiZXlKMWMyVnlYMmxrSWpvaU5EWTFOemd4Tmprek1UTTRNVGczSWl3aWNISnBibU5wY0dGc1gybGtJam9pZFhObGNqRWlMQ0oxYzJWeVgzTjBZWFIxY3lJNklrVk9RVUpNUlNJc0luUjVjR1VpT2lKUVJWSlRUMDRpTENKMFpXNWhiblJmYVdRaU9pSTJNakkxTVRZM016TWlMQ0p5YjJ4bGN5STZXeUl4TWpVNU5UVTRPRFl5TURNek5EQWlYU3dpWjNKdmRYQnpJanBiSWprd01USTBPRFk1TlRjeU9ESTROaUlzSWpVMU5EY3pOVFF3T0RZMk16UTBPU0pkTENKd1pYSnRhWE56YVc5dWN5STZXeUp0YjI1cGRHOXlMblZ6WlhKZmNISmxabVZ5Wlc1alpYTXViV0Z1WVdkbElpd2liVzl1YVhSdmNpNXBibVp5WVhOMGNuVmpkSFZ5WlY5d2IyeHBZMmxsY3k1dFlXNWhaMlZmY0dGMGNtOXNYMkZuWlc1MElsMTkiXSwiaXNzIjoiaHR0cHM6Ly9nbG9iZXgtdGh1bmRlcmhlYWQtdHJpYWwuZHNtbGFiLmJtYy5jb20iLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwiZXhwIjoxNjY5MDI3NzAyLCJpYXQiOjE2NjkwMjY4MDIsImp0aSI6Ijk2NjM1MTk2LTNlNGUtNDg5MS1hOTg5LTg3MmU1YWM0YjljYyJ9.cIb_DSf66tmB404umnhvGTOp8u0qstR92GhNM-6Rj4gCXfObUIziilULdqzqdSyOBgnCzZk2zvv5t9v0FslfH-gHCADhabbjGW-W4_KX6JefUoO2en2N6ZkxPeD3QqxWN5KdCh7EMXb5L_SDRY_kHRRjACrvcECuMCoCbqKoprRS0XvKch81WmwL1xjuu-78QzIuDOnDr8ASFt7sFqCfRrxgvaspKJ4mJ0wRga9vFkYn0Cs9iRIuqG4DLMi3Zhx7rMXNgscDjLtt-2ZPUVkKQWRD9rNtTuSrrkMW0y9q1Ghj7gGDnqHnZh2YHiShW2y4HFDlIZJkHcJUdxP8FjIPKQ' \
--header 'Cookie: onbmc_pool=2134411018.20480.0000' \
--data-raw '{
    "agents": [
        {
            "agent": "string:<port>",
            "user": "patrol",
            "password": "patAdm1n"
        },
        {
            "agent": "string:<port>",
            "user": "",
            "password": ""
        }
      
    ],
    "command": "Agent Information",
    "command_type": "name"
  
}'

CURL example for a non-administrator user without the manage_patrol_agent and manage_aqt_authentication permissions

curl --location --request POST 'https://hostA.bmc.com/acs/api/v1.0/agent_operations?type=name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiIzMjE1MDYyZi1kODA3LTQ1Y2QtYjkyNS0zNDQ3MzYwNjllYzkiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI2MjI1MTY3MzM6OjQ2NTc4MTY5MzEzODE4NyIsImF1ZCI6ImJtY19hZGVfY2xvdWRfc2VydmljZXMiLCJhbXIiOlsiZXlKMWMyVnlYMmxrSWpvaU5EWTFOemd4Tmprek1UTTRNVGczSWl3aWNISnBibU5wY0dGc1gybGtJam9pZFhObGNqRWlMQ0oxYzJWeVgzTjBZWFIxY3lJNklrVk9RVUpNUlNJc0luUjVjR1VpT2lKUVJWSlRUMDRpTENKMFpXNWhiblJmYVdRaU9pSTJNakkxTVRZM016TWlMQ0p5YjJ4bGN5STZXeUl4TWpVNU5UVTRPRFl5TURNek5EQWlYU3dpWjNKdmRYQnpJanBiSWprd01USTBPRFk1TlRjeU9ESTROaUlzSWpVMU5EY3pOVFF3T0RZMk16UTBPU0pkTENKd1pYSnRhWE56YVc5dWN5STZXeUp0YjI1cGRHOXlMblZ6WlhKZmNISmxabVZ5Wlc1alpYTXViV0Z1WVdkbElpd2liVzl1YVhSdmNpNXBibVp5WVhOMGNuVmpkSFZ5WlY5d2IyeHBZMmxsY3k1dFlXNWhaMlZmY0dGMGNtOXNYMkZuWlc1MElsMTkiXSwiaXNzIjoiaHR0cHM6Ly9nbG9iZXgtdGh1bmRlcmhlYWQtdHJpYWwuZHNtbGFiLmJtYy5jb20iLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwiZXhwIjoxNjY5MDI3NzAyLCJpYXQiOjE2NjkwMjY4MDIsImp0aSI6Ijk2NjM1MTk2LTNlNGUtNDg5MS1hOTg5LTg3MmU1YWM0YjljYyJ9.cIb_DSf66tmB404umnhvGTOp8u0qstR92GhNM-6Rj4gCXfObUIziilULdqzqdSyOBgnCzZk2zvv5t9v0FslfH-gHCADhabbjGW-W4_KX6JefUoO2en2N6ZkxPeD3QqxWN5KdCh7EMXb5L_SDRY_kHRRjACrvcECuMCoCbqKoprRS0XvKch81WmwL1xjuu-78QzIuDOnDr8ASFt7sFqCfRrxgvaspKJ4mJ0wRga9vFkYn0Cs9iRIuqG4DLMi3Zhx7rMXNgscDjLtt-2ZPUVkKQWRD9rNtTuSrrkMW0y9q1Ghj7gGDnqHnZh2YHiShW2y4HFDlIZJkHcJUdxP8FjIPKQ' \
--header 'Cookie: onbmc_pool=2134411018.20480.0000' \
--data-raw '{
    "agents": [
        {
            "agent": "hostB.bmc.com:3181",
            "user": "patrol",
            "password": "patAdm1n"
        },
        {
            "agent": "hostC.bmc.com:3185",
            "user": "",
            "password": ""
        }
      
    ],
    "command": "Agent Information",
    "command_type": "name"
  
}'

Successful response

Success code: 200

 {
    "result": [
        {
            "agentID": "ffb9cea6-29d5-4891-b3d5-18452021a251",
            "agentHost": "clm-pun-027988.bmc.com:3181",
            "output": "1\n1\n",
"status": "success"
        }
        {
            "agentID": "ab2b41fa-ff4c-449f-844e-31f17fc8dd08",
            "agentHost": "clm-aus-ust123.bmc.com:5599",
            "output": "2\n2\n",
"status": "success"         }
    ]
}


Unsuccessful responses

Scenario 1: The Agent is not found

{
    "result": [
        {
            "agentID": "ffb9cea6-29d5-4891-b3d5-18452021a252",
            "agentHost": "",
            "output": "Agent is not found",
            "status": "failure"
        }
         
    ]
}

Scenario 2: One of the PATROL Agents in the command is not valid

{
    "result": [
        {
            "agentID": "ffb9cea6-29d5-4891-b3d5-18452021a252",
            "agentHost": "",
            "output": "Agent is not found",
            "status": "failure"
        }
         
    ]
}

Scenario 3: The PATROL Agent is disconnected

{
    "result": [
        {
            "agentID": "ffb9cea6-29d5-4891-b3d5-18452021a252",
            "agentHost": "",
            "output": "Agent is disconnected",
            "status": "ERROR"
        }
         
    ]
}

Scenario 4: A non-administrator user who does not have the manage_aqt_authentication permission runs the command

{
    "result": [
        {
            "agentID": "ffb9cea6-29d5-4891-b3d5-18452021a252",
            "agentHost": "",
            "output": "CMDEX:User authentication failed",
            "status": "ERROR"
        }
         
    ]
}

Scenario 5: Invalid user credentials

{
    "result": [
        {
            "agentID": "ffb9cea6-29d5-4891-b3d5-18452021a252",
            "agentHost": "",
            "output": "CMDEX:User authentication failed",
            "status": "ERROR"
        }
         
    ]
}


Back to top

Was this page helpful? Yes No Submitting... Thank you

Comments