Anchor | ||||
---|---|---|---|---|
|
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/topology/instance |
Jump To:
- Instance Rest API
- Instance Rest API
- Instance Rest API
- Instance Rest API
- Instance Rest APIOverview
- GET
- POST
- PUT
- PATCH
...
Anchor | ||||
---|---|---|---|---|
|
Overview:
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.
...
**defaults to true if nothing is passed
...
Anchor | ||||
---|---|---|---|---|
|
GET
There are two implementations of GET. One will find an Instance with the given Id and return the JSON representation of the Instance. The other will find a list of Instances matching the parameters supplied to it.
GET by ID
This GET service will find an Instance with the given Id and return the JSON representation of the object.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/topology/instance/{Id} |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Id | Yes | URL | URL parameter for the Id which is used to find and return an instance |
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
ExampleIf we had an Instance in our database with an Id of 11004 with the following attributes
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
|
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} |
...
Tip |
---|
The query parameters are not case sensitive. Searching by name=NAME is the same as searching by name=name. |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Code | No | URL | This is a URL query parameter for the code which is used to search the instances. |
Name | No | URL | This is a URL query parameter for the name which is used to search the instances. |
Group Code | No | URL | This is a URL query parameter for the group code which is used to search the instances. |
Sub Group Code | No | URL | This is a URL query parameter for the sub group code which is used to search the instances. |
Example Output
Output when the Group Code was made "Group" through http://host:port/flexdeploy/rest/topology/instance?groupcode=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 } ] |
Anchor | ||||
---|---|---|---|---|
|
POST
The POST service will create a new instance with the same attributes as the given JSON object. It returns the JSON representation of the Instance that was just created with an updated ID attribute.
...
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
If the POST receives the following JSON instance object,
the following Instance will be created in the database. Notice the updated Instance Id field.
|
Anchor | ||||
---|---|---|---|---|
|
PUT
This PUT service will update all attributes of an Instance with the given Id based on the attributes of the supplied JSON object.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/topology/instance/{Id} |
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
ExampleIf we had an instance in our database with an Id of 11104 and had the following attributes
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,
The PUT request would then update the Instance with Id 11104 and return the following JSON Instance object.
|
Anchor | ||||
---|---|---|---|---|
|
PATCH
This PATCH service will update the information of the Instance of the specified Id with the non-null parameters of the JSON. The parameters that are null will not be changed in the Instance.
...
Tip |
---|
The only required attribute is the Instance Id in the URL. |
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
ExampleIf we had an instance in our database with an Id of 11104 and had the following attributes
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,
The PATCH request would then update the instance with Id 11104 and return the following JSON instance object.
|
...