Target Groups can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of Target Groups.
Authentication - Use Basic Authentication for this API.
Table of Contents | ||
---|---|---|
|
...
Request
Parameter | Required | Type | Description |
---|---|---|---|
Id | Yes | URL | URL parameter for the Id which is used to find and return a target group |
Response Codes
HTTP Code | Description |
---|---|
200 | Target Group was found and returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Target Group not found |
500 | Unexpected internal server error |
Example
If we had an Target a Target Group in our database with an Id of 11004 with and the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "GET example description", "targets": [], "workflowPropertySets": [], "targetGroupId": 11004, "targetGroupName": "GET Example Name", "isActive": true, "pluginOperationPropertySets": [], "targetGroupCode": "GETEXAMPLECODE", "groupCode": "GET example group", "subGroupCode": "GET example sub group", "isDeploymentTarget": false } |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v2/topology/targetgroup/11004
The GET request would return the following JSON Target Group object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "GET example description", "targets": [], "workflowPropertySets": [], "targetGroupId": 11004, "targetGroupName": "GET Example Name", "isActive": true, "pluginOperationPropertySets": [], "targetGroupCode": "GETEXAMPLECODE", "groupCode": "GET example group", "subGroupCode": "GET example sub group", "isDeploymentTarget": false } |
GET by Query Parameters
This GET service will return a list of Target Groups in the form of JSON objects based on the query parameters targetGroupCode, targetGroupName, groupCode, and subGroupCode. Target Groups are only returned if they match ALL of the specified query parameters. If no query parameters are given this request will return the entire list of Target Groups. The targetGroupName parameter returns Target Groups that contain the specified parameter. The other parameters must be equal to the Target Group.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v2/topology/targetgroup? Append the following character sequences to the above URL to specify Query parameters.Use '&' between successive query parameters:targetGroupCode={targetGroupCode} targetGroupName={targetGroupName} groupCode={groupCode} subGroupCode={subGroupCode} Examples:To Specify the code parameter only:http://host:port/flexdeploy/rest/v2/topology/targetgroup?targetGroupCode={targetGroupCode} To Specify the code and group code parameters:http://host:port/flexdeploy/rest/v2/topology/targetgroup?targetGroupCode={targetGroupCode}&groupCode={groupCode} To Specify the name, group code, and sub group code parameters:http://host:port/flexdeploy/rest/v2/topology/targetgroup?targetGroupName={targetGroupName}&groupCode={groupCode}&subGroupCode={subGroupCode} |
...