Anchor | ||||
---|---|---|---|---|
|
...
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Id | Yes | URL | URL parameter for the Id which is used to find and return an instance |
Response Codes
HTTP Code | Description |
---|---|
200 | Instance was found and returned |
400 | Bad request |
401 | Unauthorized |
500 | Unexpected internal server error |
Example
If we had an Instance in our database with an Id of 11004 with the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "GET example description", "environments": [11001], "workflows": [], "instanceId": 11004, "instanceName": "GET Example Name", "isActive": true, "plugins": [], "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/topology/instance/11004
The GET request would return the following JSON Instance object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "GET example description", "environments": [11001], "workflows": [], "instanceId": 11004, "instanceName": "GET Example Name", "isActive": true, "plugins": [], "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 code, name, group code, and sub group code. 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.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/topology/instance? Append the following character sequences to the above URL to specify Query parameters.Use '&' between successive query parameters:codeinstanceCode={codeinstanceCode} nameinstanceName={nameinstanceName} groupcodegroupCode={groupcodegroupCode} subgroupcodesubGroupCode={subgroupcodesubGroupCode} Examples:To Specify the code parameter only:http://host:port/flexdeploy/rest/topology/instance?codeinstanceCode={codeinstanceCode} To Specify the code and group code parameters:http://host:port/flexdeploy/rest/topology/instance?codeinstanceCode={codeinstanceCode}&groupcodegroupCode={groupcodegroupCode} To Specify the name, group code, and sub group code parameters:http://host:port/flexdeploy/rest/topology/instance?nameinstanceName={nameinstanceName}&groupcodegroupCode={groupcodegroupCode}&subgroupcodesubGroupCode={subgroupcodesubGroupCode} |
Tip |
---|
The query parameters are not case sensitive. Searching by nameinstanceName=NAME is the same as searching by nameinstanceName=name. |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
codeinstanceCode | No | URL | This is a URL query parameter for the instance code which is used to search the instances. |
nameinstanceName | No | URL | This is a URL query parameter for the instance name which is used to search the instances. |
groupcodegroupCode | No | URL | This is a URL query parameter for the group code which is used to search the instances. |
subgroupcodesubGroupCode | No | URL | This is a URL query parameter for the sub group code which is used to search the instances. |
...
Output when the Group Code was made "Group" through http://host:port/flexdeploy/rest/topology/instance?groupcodegroupCode=Group
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "description": "GET example description", "environments": [10001], "workflows": [10001], "instanceId": 10000, "instanceName": "GET Example Name", "isActive": true, "plugins": [{"propertySetName":"pluginName","ownerId":12345}], "instanceCode": "GETEXAMPLECODE", "groupCode": "Group", "subGroupCode": "GET example sub group", "isDeploymentTarget": false }, { "description": "GET example 2 description", "environments": [10001, 10002, 10003], "workflows": [10001, 10002, 10003], "instanceId": 10012, "instanceName": "GET Example 2 Name", "isActive": true, "plugins": [], "instanceCode": "GETEXAMPLECODE2", "groupCode": "group", "subGroupCode": "GET example 2 sub group", "isDeploymentTarget": true } ] |
...