Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
titleAPI URL

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
targetGroupIdNoQuery - LongThis is a URL query parameter for the Target Group Id which is used to search the Target Groups.
targetGroupCodeNoQuery - String

This is a URL query parameter for the Target Group code which is used to search the Target Groups.

Equals ignore case search

targetGroupNameNoQuery - String

This is a URL query parameter for the Target Group name which is used to search the Target Groups.

Contains ignore case search

groupCodeNoQuery - String

This is a URL query parameter for the group code which is used to search the Target Groups.

Equals ignore case search

subGroupCodeNoQuery - String

This is a URL query parameter for the sub group code which is used to search the Target Groups.

Equals ignore case search

isActiveNoQuery - Boolean

This is a URL query parameter for the isActive Boolean which is used to search the Target Groups.

isDeploymentTargetNoQuery - BooleanThis is a URL query parameter for the isDeploymentTarget Boolean which is used to search the Target Groups.

...

Request

Attributes
Type
Required
Description
IdURLYesURL parameter for the Id which is used to find and update an a Target Group.
descriptionStringNoDescription of the Target Group.
targetsList<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.

workflowPropertySetsList<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.

targetGroupIdStringNoThe Target Group Id in the request is ignored.
targetGroupNameStringYesName of the Target Group.
isActiveBooleanNo

Whether or not this Target Group is active.

Defaults to true if nothing is passed.

pluginOperationPropertySetsList<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.

targetGroupCodeStringYesThe code of the Target Group.
groupCodeStringNoThe group code of the Target Group.
subGroupCodeStringNoThe sub group code of the Target Group.
isDeploymentTargetBooleanNo

Whether or not this Target Group is a deployment target.

Defaults to true if nothing is passed.


Response Codes

HTTP Code
Description
200Target Group was found and updated
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Target Group not found
500Unexpected 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
titleCurrent Target Group
collapsetrue
{
	"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
titleSample JSON Input
collapsetrue
{
	"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
titleSample JSON Output
collapsetrue
{
	"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
IdURLYesURL parameter for the Id which is used to find and update an Target Group.
descriptionStringNoDescription of the Target Group.
targetsList<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.

workflowsPropertySetsList<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.

targetGroupIdStringNoThe Target Group Id in the request is ignored
targetGroupNameStringNoName of the Target Group.
isActiveBooleanNoWhether or not this Target Group is active.
pluginsList<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.

targetGroupCodeStringNoThe code of the Target Group.
groupCodeStringNoThe group code of the Target Group.
subGroupCodeStringNoThe sub group code of the Target Group.
isDeploymentTargetBooleanNoWhether or not this Target Group is a deployment target.

...