Anchor | ||||
---|---|---|---|---|
|
...
Attributes | Type | Description |
---|---|---|
Descriptiondescription | String | Description of the Instance |
Environmentsenvironments | List<Long> | List of the Environment Ids that are associated with this instance |
Workflowsworkflows | List<Long> | List of the workflow ids that are associated with this instance |
Instance IdinstanceId | String | The unique id of the instance. The id is made when making the instance, and it is returned in the JSON. |
Instance NameinstanceName | String | Name of the instance |
isActive | Boolean | Whether or not this instance is active. |
Pluginsplugins | List<Plugin> | List of the plugin ids that are associated with this instance |
Instance CodeinstanceCode | String | The code of the Instance |
Group CodegroupCode | String | The group code of the instance |
Sub Group CodesubGroupCode | String | The sub group code of the instance |
isDeploymentTarget | Boolean | Whether or not this instance is a deployment target. |
...
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:code={code} name={name} groupcode={groupcode} subgroupcode={subgroupcode} Examples:To Specify the code parameter only:http://host:port/flexdeploy/rest/topology/instance?code={code} To Specify the code and group code parameters:http://host:port/flexdeploy/rest/topology/instance?code={code}&groupcode={groupcode} To Specify the name, group code, and sub group code parameters:http://host:port/flexdeploy/rest/topology/instance?name={name}&groupcode={groupcode}&subgroupcode={subgroupcode} |
...
Parameter | Required | Type | Description |
---|---|---|---|
Codecode | No | URL | This is a URL query parameter for the code which is used to search the instances. |
Namename | No | URL | This is a URL query parameter for the name which is used to search the instances. |
Group Codegroupcode | No | URL | This is a URL query parameter for the group code which is used to search the instances. |
Sub Group Codesubgroupcode | No | URL | This is a URL query parameter for the sub group code which is used to search the instances. |
...
Attributes | Type | Required | Description |
---|---|---|---|
Descriptiondescription | String | No | Description of the Instance |
Environmentsenvironments | List<Long> | No | List of the Environment Ids that are associated with this instance |
Workflowsworkflows | List<Long> | No | List of the workflow ids that are associated with this instance |
Instance IdinstanceId | String | No | The unique id of the instance. The id is made when making the instance, and it is returned in the JSON. |
Instance NameinstanceName | String | Yes | Name of the instance |
isActive | Boolean | No* | Whether or not this instance is active. |
Pluginsplugins | List<Plugin> | No | List of the plugin ids that are associated with this instance |
Instance CodeinstanceCode | String | Yes | The code of the Instance |
Group CodegroupCode | String | No | The group code of the instance |
Sub Group CodesubGroupCode | String | No | The sub group code of the instance |
isDeploymentTarget | Boolean | No* | Whether or not this instance is a deployment target. |
...
Parameters
Attributes | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | URL parameter for the Id which is used to find and update an instance |
Descriptiondescription | String | No | Description of the Instance |
Environmentsenvironments | List<Long> | No | List of the Environment Ids that are associated with this instance |
Workflowsworkflows | List<Long> | No | List of the workflow ids that are associated with this instance |
Instance IdinstanceId | String | No | The instance Id in the request is ignored |
Instance NameinstanceName | String | Yes | Name of the instance |
isActive | Boolean | No* | Whether or not this instance is active. |
Pluginsplugins | List<Plugin> | No | List of the plugin ids that are associated with this instance |
Instance CodeinstanceCode | String | Yes | The code of the Instance |
Group CodegroupCode | String | No | The group code of the instance |
Sub Group CodesubGroupCode | String | No | The sub group code of the instance |
isDeploymentTarget | Boolean | No* | Whether or not this instance is a deployment target. |
*defaults to true if nothing is passed
Response Codes
HTTP Code | Description |
---|---|
200 | Instance was found and updated |
400 | Bad request |
401 | Unauthorized |
404 | Instance not found |
500 | Unexpected internal server error |
Example
If we had an instance in our database with an Id of 11104 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "Example description", "environments": [], "workflows": [], "instanceId": 11104, "instanceName": "Example Name", "isActive": false, "plugins": [], "instanceCode": "EXAMPLECODE", "groupCode": "Group", "subGroupCode": "Sub Group", "isDeploymentTarget": false } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/topology/instance/11104
And the PUT request receives the following JSON instance object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "PUT description", "environments": [11001], "workflows": [11104], "instanceId": 1, "instanceName": "PUT Name", "isActive": true, "plugins": [], "instanceCode": "PUTCODE", "groupCode": "PUT group", "subGroupCode": "PUT sub group", "isDeploymentTarget": true } |
The PUT request would then update the Instance with Id 11104 and return the following JSON Instance object.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "PUT description", "environments": [11001], "workflows": [11104], "instanceId": 11104, "instanceName": "PUT Name", "isActive": true, "plugins": [], "instanceCode": "PUTCODE", "groupCode": "PUT group", "subGroupCode": "PUT sub group", "isDeploymentTarget": true } |
...
Parameters
Attributes | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | URL parameter for the Id which is used to find and update an instance |
Descriptiondescription | String | No | Description of the Instance |
Environmentsenvironments | List<Long> | No | List of the Environment Ids that are associated with this instance |
Workflowsworkflows | List<Long> | No | List of the workflow ids that are associated with this instance |
Instance IdinstanceId | String | No | The instance Id in the request is ignored |
Instance NameinstanceName | String | No | Name of the instance |
isActive | Boolean | No | Whether or not this instance is active. |
Pluginsplugins | List<Plugin> | No | List of the plugin ids that are associated with this instance |
Instance CodeinstanceCode | String | No | The code of the Instance |
Group CodegroupCode | String | No | The group code of the instance |
Sub Group CodesubGroupCode | String | No | The sub group code of the instance |
isDeploymentTarget | Boolean | No | Whether or not this instance is a deployment target. |
Response Codes
HTTP Code | Description |
---|---|
200 | Instance was found and patched |
400 | Bad request |
401 | Unauthorized |
404 | Instance not found |
500 | Unexpected internal server error |
Example
If we had an instance in our database with an Id of 11104 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "Example description", "environments": [11001], "workflows": [], "instanceId": 11104, "instanceName": "Example Name", "isActive": false, "plugins": [], "instanceCode": "EXAMPLECODE", "groupCode": "Group", "subGroupCode": "Sub Group", "isDeploymentTarget": false } |
When we run a PATCH request at the following URL
http://host:port/flexdeploy/rest/topology/instance/11104
And the PATCH request receives the following JSON instance object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "PATCH example description", "environments": null, "workflows": null, "instanceId": null, "instanceName": null, "isActive": null, "plugins": null, "instanceCode": "PATCHEXAMPLECODE", "groupCode": null, "subGroupCode": null, "isDeploymentTarget": null } |
The PATCH request would then update the instance with Id 11104 and return the following JSON instance object.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "PATCH example description", "environments": [11001], "workflows": [], "instanceId": 11104, "instanceName": "Example Name", "isActive": false, "plugins": [], "instanceCode": "PATCHEXAMPLECODE", "groupCode": "Group", "subGroupCode": "Sub Group", "isDeploymentTarget": false } |
...