Versions Compared

Key

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

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

...

Request

Parameter
Required
Type
Description
IdYesURLURL parameter for the Id which is used to find and return an instance

Include Page
REST V1 Instance Response
REST V1 Instance Response

Response Codes

HTTP Code
Description
200Instance was found and returned
400Bad request
401Unauthorized
500Unexpected internal server error

Example

If we had an Instance in our database with an Id of 11004 with the following attributes

Code Block
themeEclipse
titleInstance - 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
titleInstance 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 Instances in the form of JSON objects based on the query parameters instanceCode, instanceName, groupCode, and subGroupCode. Instances 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 instances that contain the specified parameter. The other parameters must be equal to the instance.

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}

...

Tip

The query parameters are not case sensitive. Searching by instanceName=NAME is the same as searching by instanceName=name.

Request

Parameter
Required
Type
Description
instanceCodeNo
URL
Query - String

This is a URL query parameter for the instance code which is used to search the instances.

Equals ignore case search

instanceNameNo
URL
Query - String

This is a URL query parameter for the instance name which is used to search the instances.

Contains ignore case search

groupCodeNo
URL
Query - String

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

Equals ignore case search

subGroupCodeNo
URL
Query - String

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

Equals ignore case search

Include Page
REST V1 Instance Response
REST V1 Instance Response

...