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.
Info |
---|
Target Groups previously known as Instances |
Authentication - Use Basic Authentication for this API.
...
This GET service will return a list of Target Groups in the form of JSON objects based on the query parameters targetGroupId, 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:targetGroupId = {targetGroupId} 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} |
...
Parameter | Required | Type | Description |
---|---|---|---|
targetGroupId | No | Query - Long | This is a URL query parameter for the Target Group Id which is used to search the Target Groups. |
targetGroupCode | No | Query - String | This is a URL query parameter for the Target Group code which is used to search the Target Groups. Equals ignore case search |
targetGroupName | No | Query - String | This is a URL query parameter for the Target Group name which is used to search the Target Groups. Contains ignore case search |
groupCode | No | Query - String | This is a URL query parameter for the group code which is used to search the Target Groups. Equals ignore case search |
subGroupCode | No | Query - String | This is a URL query parameter for the sub group code which is used to search the Target Groups. Equals ignore case search |
isActive | No | Query - Boolean | This is a URL query parameter for the isActive Boolean which is used to search the Target Groups. |
isDeploymentTarget | No | Query - Boolean | This is a URL query parameter for the isDeploymentTarget Boolean which is used to search the Target Groups. |
...
Request
Attributes | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | URL parameter for the Id which is used to find and update an a Target Group. |
description | String | No | Description of the Target Group. |
targets | List<TargetDataObject> | No | List of the Targets that are associated with this Target Group. If currently associated Targets(s) are not in input list those Targets will be unassigned from this Target Group. i.e. at the end of successful request, the Target Group will have mapped Targets matching to input request. |
workflowPropertySets | List<PropertySetDataObject> | No | List of the Workflow Property Sets that are associated with this Target Group. If currently associated Property Set(s) are not in input list those Property Sets will be unassigned from this Target Group. i.e. at the end of successful request, the Target Group will have mapped Property Sets matching to input request. |
targetGroupId | String | No | The Target Group Id in the request is ignored. |
targetGroupName | String | Yes | Name of the Target Group. |
isActive | Boolean | No | Whether or not this Target Group is active. Defaults to true if nothing is passed. |
pluginOperationPropertySets | List<PropertySetDataObject> | No | List of the Plugin Operation Property Sets that are associated with this Target Group. If currently associated Property Set(s) are not in input list those Property Sets will be unassigned from this Target Group. i.e. at the end of successful request, the Target Group will have mapped Property Sets matching to input request. |
targetGroupCode | String | Yes | The code of the Target Group. |
groupCode | String | No | The group code of the Target Group. |
subGroupCode | String | No | The sub group code of the Target Group. |
isDeploymentTarget | Boolean | No | Whether or not this Target Group is a deployment target. Defaults to true if nothing is passed. |
Response Codes
HTTP Code | Description |
---|---|
200 | Target Group was found and updated |
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 Group in our database with an Id of 11104 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "Example description", "targets": [], "workflowPropertySets": [], "targetGroupId": 11104, "targetGroupName": "Example Name", "isActive": false, "pluginOperationPropertySets": [], "targetGroupCode": "EXAMPLECODE", "groupCode": "Group", "subGroupCode": "Sub Group", "isDeploymentTarget": false } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v2/topology/targetgroup/11104
And the PUT request receives the following JSON Target Group object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "PUT description", "targets": [], "workflowPropertySets": [], "targetGroupId": 1, "targetGroupName": "PUT Name", "isActive": true, "pluginOperationPropertySets": [], "targetGroupCode": "PUTCODE", "groupCode": "PUT group", "subGroupCode": "PUT sub group", "isDeploymentTarget": true } |
The PUT request would then update the Target Group with Id 11104 and return the following JSON Target Group object.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "PUT description", "targets": [], "workflowPropertySets": [], "targetGroupId": 11104, "targetGroupName": "PUT Name", "isActive": true, "pluginOperationPropertySets": [], "targetGroupCode": "PUTCODE", "groupCode": "PUT group", "subGroupCode": "PUT sub group", "isDeploymentTarget": true } |
PATCH
...
Attributes | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | URL parameter for the Id which is used to find and update an Target Group. |
description | String | No | Description of the Target Group. |
targets | List<TargetDataObject> | No | List of the Target Data Objects that will be added to the Target Group. If input targets(s) is not already associated, it will be associated to Target Group but existing Target assignment that are not in PATCH request will not be unassigned. i.e. input list is considered as append to existing assignments. |
workflowsPropertySets | List<PropertySetDataObject> | No | List of the Workflow Property Sets that will be added to the Target Group. If input Property Set(s) is not already associated, it will be associated to Target Group but existing Property Set assignment that are not in PATCH request will not be unassigned. i.e. input list is considered as append to existing assignments. |
targetGroupId | String | No | The Target Group Id in the request is ignored |
targetGroupName | String | No | Name of the Target Group. |
isActive | Boolean | No | Whether or not this Target Group is active. |
plugins | List<Plugin> | No | List of the Plugin Property Sets that will be added to the Target Group. If input Property Set(s) is not already associated, it will be associated to Target Group but existing Property Set assignment that are not in PATCH request will not be unassigned. i.e. input list is considered as append to existing assignments. |
targetGroupCode | String | No | The code of the Target Group. |
groupCode | String | No | The group code of the Target Group. |
subGroupCode | String | No | The sub group code of the Target Group. |
isDeploymentTarget | Boolean | No | Whether or not this Target Group is a deployment target. |
...