On this page:

Related pages:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
16 rates

The Universal Agent API is a Controller REST API that enables you to monitor and manage a Universal Agent deployment programmatically. 

The Universal Agent API enables you to act on Universal Agent groups, individual Universal Agents, rulebooks, and Universal Agent events.

Permissions

The following RBAC permissions and roles authorize the use of the Universal Agent REST APIs.

  • Permissions 
    • Configure Universal Agent: Allows all PUT and DELETE APIs
    • View Universal Agent: Allows all GET APIs
  • Roles
    • Universal Agent Administrator with both view and configure permissions
    • Universal Agent User with view permission

Universal Agent Administrator and Universal Agent User roles are added to all new and existing accounts. Also, Universal Agent Administrator and Universal Agent User roles are added to users who have Account Administrator role. Configure Universal Agent and View Universal Agent permissions are added to Account Administrator role of all accounts.

See Roles and Permissions for more information on AppDynamics permissions and roles. 

Using Environment Data

Using the API calls described in Get Complete Information for Universal Agents, you can get information about the running environment for each Universal Agent and the runtime agents. You can then use the values to populate rulebook properties, such as tier and application names. See the topic Dynamic Configuration Values.

To read environment variable data from JVM environments, the Universal Agent needs to have sufficient permissions. See more information about how to provision the Universal Agent with sudo access if necessary in Permissions for Running the Universal Agent.

As an API response, the environment data is made up of the following name/value pairs:

  • Information about the underlying platform:
    • platform_machine: Machine type. For example, i386
    • platform_processor: Processor name. For example, amdk6
    • platform_release: System/OS release. For example, 2.2.0 or NT
    • platform_system: System/OS name. For example, Linux or Windows
    • platform_version: System release version. For example, Darwin Kernel Version 14.4.0
  • Network-related information:
    • hostname: Fully qualified domain name
    • ip_addresses: List of IP addresses for machines where the Universal Agent is running 
    • mac_addresses: List of MAC addresses for machines where the Universal Agent is running
  • Names and values of each environment variable. The keys are the name of each environment variable, prefixed with env_. For example, if the environment contains the variables HOME and SHELL, then this section may look like:
    • env_HOME: /Users/john.smith
    • env_SHELL: /bin/bash
  • Time information:
    • time_utc: Current UTC date and time in ISO 8601 format
  • Information about the Universal Agent
    • universalagent_version: Current version. For example, 4.5.0.0.
    • universalagent_build: Build number
  • Information about the Java Agent:
    • java_targets: List of running Java processes on the machine. This is organized as a map of process IDs (PID) to process command line
    • java_installs: Absolute paths of the Java runtime agents installed by the Universal Agent. The path is organized as nested maps, using the app/tier/node name as the key. For example:

      "java_installs": {
          "MyApp": {
              "MyTier": {
                  "MyNode1": "/path/to/java/app/monitor/1",
                  "MyNode2": "/path/to/java/app/monitor/2",
              }
          },
          "MyApp2": {
              "MyTier2a": {
                  "Node": “/path/to/java/app/monitor/3"
              },
              "MyTier2b": {
                  "Node": “/path/to/java/app/monitor/4"
              },
      	"null": {
                  "null": "/path/to/java/app/monitor/that/only/had/app/specified/in/controller/info/xml"
              }
          }
      }
  • Information about the Machine Agent
    • machine_installs: List of absolute paths to Machine Agents installed by the Universal Agent
    • machine_starts: List of absolute paths to the Machine Agents started by the Universal Agent
  • Information about .NET Agent
    • dotnet_frameworks: List of the installed .NET frameworks
    • dotnet_version: .NET Agent version, if installed
  • Information about the Network Agent
    • none
  • Information about Analytics Agent
    • none

API Rate and Total Count Limits

The following rate limits apply by default:

  • Maximum 5000 agent registrations per minute per account
  • Maximum 5000 event registrations per minute per account
  • Maximum 500 user requests per minute per account 

The following total count limits apply by default: 

  • Maximum 5000 agents per account
  • Maximum 500 rulebooks per account
  • Maximum 500 groups per account 

For on-premises Controllers, you can configure rate and total count limits from the Controller Administration Console

Get Complete Information for Universal Agents

Returns information about running and previously running Universal Agents. When used with the groups query parameter, this API returns information only for the agents under the specified groups.  

GET controller/universalagent/v1/user/agents?agents=<value1, value2>
GET /controller/universalagent/v1/user/agents?agents=<value1, value2>&groups=<value>
GET /controller/universalagent/v1/user/agents?groups=<value1, value2>

Query Parameters

Parameter NameValueRequired
agentsA comma-delimited string of Universal Agent names. When present, returns the relevant matching subset of agents.No
groupsA comma-delimited string of group names. When present, returns only agents under the specified groups.No

Example Command

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/agents 

Response Format

{
    "agent1": {
        "version": <string>,
        "ruleBookName": <string>,
        "environment": {
            "key1": <object>,
            ...
        }
    },
    ...
}

Response Fields

  • agent1: Name of the Universal Agent
  • version:  Property specifying the version of the Universal Agent
  • ruleBookName: Property specifying the name of the rulebook of the Universal Agent
  • environment: Object holding the environment data collected by the Environment Modules

Get Summary Information for Universal Agents

View summary information about all running Universal Agents. The environment data is suppressed. When used with the groups query parameter, this API returns information only for the agents under the specified groups.

GET /controller/universalagent/v1/user/agents/summary?agents=<value>
GET /controller/universalagent/v1/user/agents/summary?agents=<value1, value2>&groups=<value>
GET /controller/universalagent/v1/user/agents/summary?groups=<value1, value2>

Query Parameters

Parameter NameValueRequired
agents

A comma-delimited string of Universal Agent names. When present, the relevant matching subset of agents is returned.

No
groupsA comma-delimited string of group names. When present, returns only agents under the specified groups.No

Example Command

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/agents/summary

Response Format

{
    "agent1": {
        "version": <string>,
        "ruleBookName": <string>
    },
    ...
}

Response Fields

  • agent1: Name of the Universal Agent
  • version:  Version of the Universal Agent
  • ruleBookName: Name of the rulebook of the Universal Agent

Get Universal Agent By Name

View details for the Universal Agent with a specified name.

GET /controller/universalagent/v1/user/agents/byName/<name>

Path Parameters

Parameter NameValueRequired
nameName of the Universal Agent. For example, agent1.Yes

Example Command

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/agents/byName/agent1

Response Format

{
    "version": <string>,
    "ruleBookName": <string>,
    "environment": {
        "key1": <object>,
        ...
    }
}

Response Fields

  • agent1: Name of the Universal Agent
  • version:  Version of the Universal Agent
  • ruleBookName: Name of the current rulebook of the Universal Agent

Delete Universal Agent by Name

Delete an agent by name.

DELETE /controller/universalagent/v1/user/agents/byName/<name>

Deleting an agent also deletes events associated with it.

Path Parameters

Parameter NameValueRequired
nameName of the Universal AgentYes

Example Command

curl -i -X DELETE -u '<userName>@<accountName>:<password>' 
-H 'Content-type: application/json' 
http://<controller-host>:8080/controller/universalagent/v1/user/agents/byName/agent1

Create or Update a Group

Universal Agent groups are a logical way of grouping different Universal Agents that are running on different machines. You can add different Universal Agents to a group and then add a common rulebook to that group. All Universal Agents in the group execute the same set of rules (that apply to their environment). For details on groups: see the section 'Rulebook Strategies' in Universal Agent Rulebooks

Create the group. If the group exists, it is updated. 

PUT /controller/universalagent/v1/user/groups/byName/<name>

Path Parameters 

Parameter NameDescriptionRequired
name

Name of the group. In the example that follows, "name""" is overridden by the path parameter name

Yes

Example Command

curl -i -X PUT -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json' 
-H 'Accept:application/json' 
http://<controller-host>:8080/controller/universalagent/v1/user/groups/byName/group1 
-d '{"name":"","comments":"This is group1"}'

Response Format

{
    “name": <string>,
    “comments": <string>
}

Add Universal Agent to a Group

Add the specified Universal Agent to the specified group.

PUT /controller/universalagent/v1/user/agents/membership/<agentName>/groups/<groupName>

Path Parameters

Parameter NameValueRequired
agentNameName of the Universal AgentYes
groupNameGroup name. For example: group1Yes

Example Command

curl -i -X PUT -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
-H 'Accept:application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/agents/membership/agent1/groups/group1

Response Format

{
    "agent1": {
        "version": <string>,
        "ruleBookName": <string>,
        "environment": {
            "key1": <object>,
            ...
        }
    },
    ...
}

Delete Universal Agent From a Group

Delete the specified Universal Agent from the specified group.

DELETE /controller/universalagent/v1/user/agents/membership/<agentName>/groups/<groupName>

Path Parameters

Parameter NameValueRequired
agentNameName of the Universal Agent. For example, agent1Yes
groupNameGroup name. For example, group1Yes

Example Command

curl -i -X DELETE -su '<userName>@<accountName>:<password>'
-H 'Content-type: application/json' 
-H 'Accept:application/json' 
http://<controller-host>:8080/controller/universalagent/v1/user/agents/membership/agent1/groups/group1

Move Universal Agent to Multiple Groups

Universal Agent is added to multiple groups and removed from previous groups.

PUT /controller/universalagent/v1/user/agents/groupsMembership/<agentName>

Path Parameters

Parameter NameValueRequired
agentNameName of the Universal Agent. For example, agent1Yes
groupName

A list of group names formatted as JSON data.
For example:

-d '[{"groupName":"group1"},{"groupName":"group2"}]'

 

Example Command

curl -i -X PUT -su '<userName>@<accountName>:<password>' 
-H 'Content-type: application/json' 
-H 'Accept:application/json' 
http://<controller-host>:8080/controller/universalagent/v1/user/agents/groupsMembership/agent1 
-d '[{"groupName":"group1"},{"groupName":"group2"}]'

Response Format

{
    "agent1": {
        "version": <string>,
        "ruleBookName": <string>,
        "environment": {
            "key1": <object>,
            ...
        }
    },
    ...
}

Get a Group By Name

Return information for the named group.

GET /controller/universalagent/v1/user/groups/byName/<name>

Path Parameters

Parameter NameDescriptionRequired
nameName of the group. For example, group1Yes
curl -i -X GET -u '<userName>@<accountName>:<password>' 
-H 'Content-type: application/json'  
http://<controller-host>:8080/controller/universalagent/v1/user/groups/byName/group1

Response Format

{
    "name": <string>,
    "comments": <string>
}

Get Multiple Groups

Get all groups or specific groups, groups having specific agents or groups having specific rulebooks.

GET /controller/universalagent/v1/user/groups?groups=group1,group2&agents=agent1,agent2&rulebooks=rulebook1

Query Parameters

Parameter NameDescriptionRequired
groupsUse to get specific groups, such as /controller/universalagent/v1/user/groups?groups=group1,group2No
agentsUse to get groups having specific agents.No
rulebooksUse to get groups specific rulebooks.No

Example Command

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/groups

Response Format

{
    "name": <string>,
    "comments": <string>
},
{
    "name": <string>,
    "comments": <string>
}

Delete a Group

Deletes the group. Deletion of the default group named default is not allowed.

Format

DELETE /controller/universalagent/v1/user/groups/byName/<name>

Path Parameters

Parameter NameDescriptionRequired
nameName of the group, for example, group1.Yes

Example Command

curl -i -X DELETE -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/groups/byName/group1

Create or Update a Rulebook

Create a rulebook. If a rulebook with "name" already exists, it is updated.

Format

PUT /controller/universalagent/v1/user/rulebooks/byName/<name>

Path Parameters

Parameter NameValueRequired
nameName of the group. This path parameter overrides "name": "rulebook1"Yes

Example Command

curl -i -X PUT -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
-H 'Accept:application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/rulebooks/byName/rulebook1
-d ' {
 "name": "rulebook1",
 "comments": "An example rulebook with a rule to start a machine agent",
 "config": {
     "controller_host": "localhost",
     "controller_port": "8080",
     "account_name": "",
     "account_access_key": ""
 },
 "rules": [
     {
         "name": "Example rule to start a 4.5.0.0 machine agent",
         "comments": "Enable by changing 'condition' to 'True'. Controller information is inherited from the 'config' section above. The machine agent will be installed in <universal_agent_dir>/monitor/machine/4.5/...",
         "monitor": "machine",
         "config": {
             "version": "4.5.0.0",
             "state": "started"
         },
         "condition": "True"
     }
 ]
}'

Response Format

{
    "name": <string>
    "comments": <string>,
    "config": {
        "key1": <object>
        ...
    },
    "rules": [
        {
            "name": <string>,
            "comments": <string>,
            "monitor": <string>,
            "config": {
                "key1": <object>
                ...
            },
            "condition": <string>
        },
        ...
    ]
}

Response Fields

  • name: Name of the rulebook
  • comments: Comments describing the rulebook
  • config: Optional set of name-value configuration settings inherited by each rule or specified in a specific rule
  • rules:  Object with a list of rules in the rulebook

Get Rulebooks

View specific rulebooks by name or group or view a list of all rulebooks.

GET /controller/universalagent/v1/user/rulebooks 
GET /controller/universalagent/v1/user/rulebooks/byName/<name> 
GET /controller/universalagent/v1/user/rulebooks/current/<groupName>

Returns the name, comments, and the configuration rules.

Path Parameters 

Parameter NameValueRequired
nameName of the rulebookYes
group_nameName of the groupYes

Example Command for a List of All Rulebooks

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/rulebooks

Response Format

This version returns a list of rulebooks similar to the following: 

[
    {
        "name": <string>,
        "comments": <string>,
        "config": {
            "key1": <object>
            ...
        },
        "rules": [
            {
                "name": <string>,
                "comments": <string>,
                "monitor": <string>,
                "config": {
                    "key1": <object>,
                    ...
                },
                "condition": <string>
            },
            ...
        ]
    },
    ...
]

Example Command for Specific Rulebook by Name

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/rulebooks/byName/rulebook1

Example Command for Rulebooks in a Group

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/rulebooks/current/group1

Response Format

The versions using name and groupName return a single rulebook similar to the following:

{
        "name": <string>,
        "comments": <string>,
        "config": {
            "key1": <object>
            ...
        },
        "rules": [
            {
                "name": <string>,
                "comments": <string>,
                "monitor": <string>,
                "config": {
                    "key1": <object>,
                    ...
                },
                "condition": <string>
            },
            ...
        ]
    }

Response Fields

  • name: Name of the rulebook
  • comments: Comments describing the rulebook
  • config: Optional set of name-value configuration settings inherited by each rule or specified in a specific rule
  • rules: Object with a list of rules in the rulebook

Add a Rulebook to a Group

Indicate which rulebook should be used by the Universal Agents in the group indicated by groupName.

PUT /controller/universalagent/v1/user/rulebooks/current/<groupName>

 

Path Parameters 

Parameter NameValueRequired
groupNamename of the groupYes

Example Command

curl -i -X PUT -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
-H 'Accept:application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/rulebooks/current/group1
-d '{"ruleBookName":"rulebook1"}'

Response Format

{
    "name": <string>
    "comments": <string>,
    "config": {
        "key1": <object>
        ...
    },
    "rules": [
        {
            "name": <string>,
            "comments": <string>,
            "monitor": <string>,
            "config": {
                "key1": <object>
                ...
            },
            "condition": <string>
        },
        ...
    ]
}

Response Fields

  • name: The name of the rulebook
  • comments: Comments describing the rulebook
  • config: Optional set of name-value configuration settings inherited by each rule or specified in a specific rule
  • rules:  Object with a list of rules for each agent in the rulebook

Get a Rulebook Associated with a Group

View the name of the current rulebook for the specified group of Universal Agents. 

GET /universalagent/v1/user/rulebooks/current/<groupName> 

Path Parameters 

Parameter NameValueRequired
groupNameThe name of the group.Yes

Example Command

 curl -i -X GET -u '<userName>@<accountName>:<password>' 
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/rulebooks/current/group1

Response Format

{
    "name": <string>
    "comments": <string>,
    "config": {
        "key1": <object>
        ...
    },
    "rules": [
        {
            "name": <string>,
            "comments": <string>,
            "monitor": <string>,
            "config": {
                "key1": <object>
                ...
            },
            "condition": <string>
        },
        ...
    ]
}

Response Fields

  • name: Name of the rulebook
  • comments: Comments describing the rulebook
  • config: Optional set of name-value configuration settings inherited by each rule or specified in a specific rule
  • rules: Section for a list of rules in the rulebook

Delete a Rulebook By Name

Remove the rulebook with the specified name.

DELETE /controller/universalagent/v1/user/rulebooks/byName/<name>

Deleting a rulebook also removes it from any group association. Deletion of the default rulebook named "default-controller" is not allowed.

Path Parameters 

Parameter NameValueRequired
namename of the rulebookYes

Example Command

curl -i -X DELETE -u '<user_name>@<account_name>:<password>'
-H 'Content-type: application/json'
http://<controller_host>:8080/controller/universalagent/v1/user/rulebooks/byName/rulebook1

Delete a Rulebook From a Group

Remove a rulebook for Universal Agents by group.

DELETE /controller/universalagent/v1/user/rulebooks/current/<groupName>

Universal Agents without a rulebook execute local rulebooks (thus allowing manual rulebook creation). Deletion of the default rulebook named "default-controller" is not allowed. 

Path Parameters

Parameter NameValueRequired
groupNamename of the groupYes

Example Command

curl -i -X DELETE -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/rulebooks/current/group1

Get All Events

View events that have occurred across all the Universal Agents. When the query parameters are present, the relevant matching subset of events is returned. By default, all events are shown up to the maximum limit of 600 events. 

GET /controller/universalagent/v1/user/events?agentIds=<value1,value2>&eventTypes=<value1,value2>&subTypes=<value>&timeRange=<value>

Query Parameters

Parameter NameValueRequired
agentIds

A comma-delimited strings of Universal Agent names. When present, events for the relevant matching subset of agents is returned.

No
eventTypes

A comma-delimited string of event types. When present, returns only relevant events. The valid event types are:

  • UNIVERSAL_AGENT_STARTUP
  • UNIVERSAL_AGENT_SHUTDOWN
  • UNIVERSAL_AGENT_EXECUTE_RULE
No
subTypes

The success or error code. The valid subtypes are:

  • Success
  • Error
No
timeRange

Time range specifier string as used in other parts of the Controller. For example:

  • last_1_hour.BEFORE_NOW.-1.1424287621109.60
  • last_5_minutes.BEFORE_NOW.-1.-1.5
No

Example Command

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/events

Response Format

[
 {
"id":<long>,
"version":<long>,
"eventType":<string>,
"eventTime":<Date>,
"severity":<string>,
"eventSummary":<string>,
"affectedEntities":[
   {
     "id":<long>,
     "version":<long>,
 "entityType":<string>,
     "entityId":<long>,
     "prettyToString":<string>
   }...,
],

"correlationKeys":[],
"properties":<string>,
"markedAsRead":<boolean>,
"markedAsResolved":<boolean>,
"archived":<boolean>,
"endTime":<long>,
"guid":<string>,
"subType":<string>,
"triggeredEntity":{
    "id":<long>,
    "version":<long>,
 "entityType":<string>,
    "entityId":<long>,
   "prettyToString":<string>
   }
},...
]


Response Fields

  • id: ID of the event
  • version: Version of the event
  • eventType: Type of the event
  • eventTime: Time when the event was generated
  • severity: Can be INFO or ERROR
  • eventSummary: Brief description of the event
    affectedEntities: 
    • entityType: A string representing universal agent, UNIVERSAL_AGENT
    • entityId: ID of the Universal Agent
  • correlationKeys: Not applicable for Universal Agent

  • properties: Not applicable for Universal Agent

  • markedAsRead: Not applicable for Universal Agent

  • markedAsResolved: Not applicable for Universal Agent

  • archived: Not applicable for Universal Agent

  • endTime: Not applicable for Universal Agent

  • guid: Not applicable for Universal Agent

  • subtype: Success or error code
  • triggeredEntity:
    • entityType: A string representing universal agent: UNIVERSAL_AGENT
    • entityId: ID of the Universal Agent 

Get Event Details

Get event details for all events. The number of events that can be returned is limited to 600. 

GET /controller/universalagent/v1/user/events/details&timeRange=<value>

Query Parameters

Parameter NameValueRequired
timeRange

Time range specifier string as used in other parts of the Controller. For example:

  • last_1_hour.BEFORE_NOW.-1.1424287621109.60
  • last_5_minutes.BEFORE_NOW.-1.-1.5
 

Example Command

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/events/details?timeRange=last_5_minutes.BEFORE_NOW.-1.-1.5 

 

Response Format 

[
  {
   "eventDetails": [
       {
        "id":<long>,
        "version":<long>,
        "name":<string>,
        "value":<string>
       }
    ]
    eventProperties: [],
    userComments: [ ],
    eventId: <long>
  },...
]


Response Fields

  • eventId: ID of the event
  • version: Version of the event
  • name: Details of the event
  • value: Not applicable for Universal Agent

Get Event Details By Event ID

Get details for a specific event by event id.

GET /controller/universalagent/v1/user/events/detailsByEventId/<eventId>

Path Parameters

Parameter NameValueRequired
eventId

ID of the event 

Yes

Example Command

curl -i -X GET -u '<userName>@<accountName>:<password>'
-H 'Content-type: application/json'
http://<controller-host>:8080/controller/universalagent/v1/user/events/detailsByEventId/1

Response Format 

{
   "eventDetails": [
       {
        "id":<long>,
        "version":<long>,
        "name":<string>,
        "value":<string>
       }
    ]
    eventProperties: [],
    userComments: [ ],
    eventId: <long>
 }

Response Fields

  • eventDetails: Not applicable for Universal Agent
    • id: ID of the event
    • version: Version of the event
    • name: Details of the event
    • value: Not applicable for Universal Agent
  • eventProperties: Not applicable for Universal Agent
  • userComments: Not applicable for Universal Agent
  • eventId: Not applicable for Universal Agent

Create a Configuration Template

Create a configuration template to reference in your rulebooks using:

PUT /controller/universalagent/v1/user/configurations/{name}

The template is stored on the Controller and can be referenced from multiple rulebooks. See Rulebook Configuration Templates.

Path Parameters 

Parameter NameValueRequired
name

Name of the configuration template.

Yes

Example Create Template

curl -i -X PUT -u '<userName>@<accountName>:<password>' -H 'Content-type: application/json' -H 'Accept:application/json' http://localhost:8080/controller/universalagent/v1/user/configurations/440startedconfig -d ' {
"name": "450startedconfig",
 "config": {
 "state":"started",
 "version": "4.5.0"
 },
 "model": "NameValue"
}'

Response Format 

Response Payload: Created template

 {
    "name": "450startedconfig",
    "model": "NameValue",
    "config": {
        "state": "started",
        "version": "4.5.0"
    },
    "referredRuleBooks": []
}

HTTP Response Status Code: 200 OK

Response Fields:

  • name: Name of the configuration template
  • model: Model of the template. NameValue is the only supported model.
  • config: Configuration properties, a list of name-value pairs. 
  • referredRuleBooks: A list of the rulebooks that refer to this template.

Update a Configuration Template

Update an existing configuration template using:

PUT /controller/universalagent/v1/user/configurations/{name}
Parameter NameValueRequired
name

Name of the configuration template.

Yes

Example Update Template Command

curl -i -X PUT -u '<userName>@<accountName>:<password>' -H 'Content-type: application/json' -H 'Accept:application/json' http://localhost:8080/controller/universalagent/v1/user/configurations/450startedconfig -d ' {
"name": "450startedconfig",
 "config": {
 "state":"started",
 "version": "4.5.0" # changed
 },
 "model": "NameValue"
}

Response Format

Response Payload: Changed template

HTTP Response Status Code: 200 OK

{
    "name": "450startedconfig",
    "model": "NameValue",
    "config": {
        "state": "started",
        "version": "4.5.0"
    },
    "referredRuleBooks": []
}

Response Fields

  • name: Name of the configuration template
  • model: Model of the template. NameValue is the only supported model.
  • config: Configuration properties, a list of name-value pairs.
  • referredRuleBooks: A list of the rulebooks that refer to this template.

Delete a Configuration Template

Delete a configuration template using:

DELETE /controller/universalagent/v1/user/configurations/{name}

Path Parameters 

Parameter NameValueRequired
name

Name of the configuration template.

Yes 

Example Delete Template Command

curl -i -X DELETE -su '<controller-user>@<controller-account>:<controller-password>' -H "Content-type: application/json" -H "Accept:application/json" \
        "http://<controller-host>:<controller-port>/controller/universalagent/v1/user/configurations/450startedconfig"

Response 

Response Payload: None

HTTP Response Status Code: 200 OK, if the template is present, 404 Not Found, for non-existent templates.

Fields: Not Applicable

View Configuration Templates

View specific templates by name or view a list of all templates using: 

GET /controller/universalagent/v1/user/configurations
GET /controller/universalagent/v1/user/configurations/{name}

Path Parameters 

Parameter NameValueRequired
name

Name of the configuration template.

Yes

Example Command: View Specific Template

curl -i -X GET -su '<controller-user>@<controller-account>:<controller-password>' -H "Content-type: application/json" -H "Accept:application/json" \
        "http://<controller-host>:<controller-port>/controller/universalagent/v1/user/configurations/450startedconfig"

Example Command: View All Templates

curl -i -X GET -su '<controller-user>@<controller-account>:<controller-password>' -H "Content-type: application/json" -H "Accept:application/json" \
        "http://<controller-host>:controller-port>/controller/universalagent/v1/user/configurations"

Response Payload for Specific Template

 {
    "name": "450startedconfig",
    "model": "NameValue",
    "config": {
        "state": "started",
        "version": "4.5.0"
    },
    "referredRuleBooks": []
}

Response Payload: All Templates

[
    {
        "name": "450startedconfig",
        "model": "NameValue",
        "config": {
            "state": "started",
            "version": "4.5.0"
        },
        "referredRuleBooks": []
    },
    {
        "name": "controllerConfig",
        "model": "NameValue",
        "config": {
            "controller_key": "some",
            "controller-port": "9000",
            "controller-host": "localhost"
        },
        "referredRuleBooks": []
    }
]

 

HTTP Response Status Codes:

  • 200 OK
  • 404 Not Found: when template is not present. 

Response Fields

  • name: Name of the configuration template
  • model: Model of the template. NameValue is the only supported model
  • config: Configuration properties, a list of name-value pairs
  • referredRuleBooks: A list of the rulebooks that refer to this template
  • for view all templates: List of configuration templates 
  • [] if no configuration templates are present
  • No labels