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.

...

Request

Parameter
Required
Type
Description
IdYesURLURL parameter for the Id which is used to find and return a target group

Include Page
REST V1 Target Group Response
REST V1 Target Group Response

Response Codes

HTTP Code
Description
200Target Group was found and returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Target Group not found
500Unexpected internal server error

Example

If we had a Target Group in our database with an Id of 11004 with the following attributes

Code Block
themeEclipse
titleTarget Group - 11004
{
	"description": "GET example description",
	"environments": [11001],
	"workflows": [],
	"instanceId": 11004,
	"instanceName": "GET Example Name",
	"isActive": true, "pluginOperations": [],
	"instanceCode": "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/v1/topology/instance/11004

The GET request would return the following JSON Instance object

Code Block
themeEclipse
titleTarget Group GET Return JSON
{
	"description": "GET example description",
	"environments": [11001],
	"workflows": [],
	"instanceId": 11004,
	"instanceName": "GET Example Name",
	"isActive": true, "pluginOperations": [],
	"instanceCode": "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 instanceCode, instanceName, 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 Instances. The instanceName 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/v1/topology/instance?

Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters: 

instanceCode={instanceCode}

instanceName={instanceName}

groupCode={groupCode}

subGroupCode={subGroupCode}

Examples:
To Specify the code parameter only:

http://host:port/flexdeploy/rest/v1/topology/instance?instanceCode={instanceCode}

To Specify the code and group code parameters:

http://host:port/flexdeploy/rest/v1/topology/instance?instanceCode={instanceCode}&groupCode={groupCode}

To Specify the name, group code, and sub group code parameters:

http://host:port/flexdeploy/rest/v1/topology/instance?instanceName={instanceName}&groupCode={groupCode}&subGroupCode={subGroupCode}

...

Attributes
Type
Required
Description
IdURLYesURL parameter for the Id which is used to find and update a Target Group.
descriptionStringNoDescription of the Target Group.
environmentsList<Long>No

List of the environment ids that will be added to the Target Group.

If input environment(s) is not already associated it will be associated to Target Group but existing environment assignment that are not in PATCH request will not be unassigned.

i.e. input list is considered as append to existing assignments.

workflowsList<Long>No

List of the workflow ids that will be added to the Target Group.

If input workflow(s) is not already associated it will be associated to Target Group but existing workflow assignment that are not in PATCH request will not be unassigned.

i.e. input list is considered as append to existing assignments.

instanceIdStringNoThe instance Id in the request is ignored
instanceNameStringNoName of the Target Group
isActiveBooleanNoWhether or not this Target Group is active.
pluginsList<Plugin>No

List of the plugins that will be added to the Target Group.

If input plugin(s) is not already associated it will be associated to the Target Group but existing plugin assignment that are not in PATCH request will not be unassigned.

i.e. input list is considered as append to existing assignments.

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

...