...
...
...
Environment Instances can Targets can be accessed and modified through this API using three services: GET, PUT, and PATCH. These three services allow for the retrieval, complete update, and partial update of environment instancestargets.
...
Each function returns a JSON environment instance object. The environment object has these attributes:
...
Back to Top
...
title | Base URL for Environment REST API |
---|
...
http://host:port/flexdeploy/rest/topology/environmentinstance/{environmentId}/{instanceId}
REST V1 Authentication | | REST V1 Authentication |
---|
|
GET
This GET service will find an environment instance a target with the given environment id and instance id. It returns the JSON representation of the environment instancetarget.
Info |
---|
|
http://host:port/flexdeploy/rest/v1/topology/environmentinstance/{environmentId}/{instanceId} |
...
Request
Parameter | Type | Required | Description |
---|
environmentId | URL | Yes | URL parameter for the environment Id which is used to find and return |
an environment instancea target. |
instanceId | URL | Yes | URL parameter for the instance Id which is used to find and return |
an environment instance Include Page |
---|
| REST V1 Targets Response |
---|
| REST V1 Targets Response |
---|
|
Response Codes
HTTP Code | Description |
---|
200 | Target was found and returned |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Environment Instance not found |
500 | Unexpected internal server error |
Example
If we had an environment a target in our database with an Id environment id of 11101 and had the following attributes12347 and an instance id of 12342, we can run a GET request at the following URL: http://host:port/flexdeploy/rest/v1/topology/environmentinstance/12347/12342
The GET request would return the following JSON target object:
Code Block |
---|
theme | Eclipse |
---|
title | Environment - 11101Instance: 12347, 12342 |
---|
|
{
"description": "This is Environment 1"
"instances": [15100],
"isActive": true,
"environmentCode": "ENV1",
"sortNumber": 1,
"environmentId": 11101,
"isBuildEnvironment": true,
"environmentName": "Env 1"
} |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/topology/environment/11101
The GET request would return the following JSON environment object
Code Block |
---|
theme | Eclipse |
---|
title | Environment GET Return JSON |
---|
|
{
"description": "This is Environment 1",
"instances": [15100],
"isActive": true,
"environmentCode": "ENV1",
"sortNumber": 1,
"environmentId": 11101,
"isBuildEnvironment": true,
"environmentName": "Env 1"
} |
...
"instanceId": 12342,
"endPoints":
[
{
"endPointId": 10101,
"resourceIds": [11223,11224]
},
{
"endPointId": 10111,
"resourceIds": [11223]
}
],
"environmentId": 12347,
"isActive": true,
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": null,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_REVISIONS_TO_KEEP",
"propertyValue": 15,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_HOST",
"propertyValue": "dev-soa.company.local",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_PORT",
"propertyValue": 8001,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FD_ORACLE_SOA_HOME",
"propertyValue": "/u01/oracle/products/fmw/soa",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "MDS_PASS",
"propertyValue": "*****",
"credentialId": 74952,
"isExpression": false
}
]
} |
PUT
This PUT service will replace all attributes of an environment instance a target with the given environment instance corresponding to the environment id and instance id provided in the url.
Info |
---|
|
http://host:port/flexdeploy/rest/v1/topology/environmentinstance/{environmentId}/{instanceId} |
Code Block |
---|
theme | Eclipse | title | Sample PUT JSON
---|
Request
...
{
"description": "This is Put 1",
"instances": [15100],
"isActive": false,
"environmentCode": "PUT1",
"sortNumber": 6,
"environmentId": 00000,
"isBuildEnvironment": true,
"environmentName": "Put 1"
}
...
Parameter | Type | Required | Description |
---|
environmentId | URL | Yes | URL parameter for the environment Id which is used to find and return |
an environment instancea target. |
instanceId | URL | Yes | URL parameter for the instance Id which is used to find and return |
an environment instancea target. |
environmentId | Long | No | The environment id of the |
environment instancetarget. This parameter is ignored in PUT. |
instanceId | Long | No | The instance id of the |
environment instancetarget. This parameter is ignore in PUT. |
isActive | Boolean | No | Whether or not the |
environment instance Notarget is active. Defaults to true if not passed in. |
endPoints | List<EndPoint> | No | List of endpoint ids and their associated resource type ids. If currently associated Endpoint(s) are not in input list, then those Endpoint(s) will be unassigned from target along with any resource types. |
properties | List<Property> | i.e. at the end of successful request, target will have mapped Endpoint(s) matching to input request. EndPoint contains endpointId and array of resourceIds. |
properties | List<PropertyValue> | Yes | List of property names |
and , their values, and credential id for encrypted properties. If target property does not have value in input list, then that property value will be cleared. PropertyValue contains propertyName, propertyValue, and credentialId. |
Include Page |
---|
| REST V1 Targets Response |
---|
| REST V1 Targets Response |
---|
|
Response Codes
HTTP Code | Description |
---|
200 | Target was found and updated |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Environment Instance not found |
500 | Unexpected internal server error |
Example
If we had an environment a target in our database with an Id environment id of 11101 and had 12347 and an instance id of 12342 with the following attributes,
Code Block |
---|
theme | Eclipse |
---|
title | Environment PUT JSONTarget: 12347, 12342 |
---|
|
{
"descriptionendPoints":
[
{
"This is Environment 1"
"instances": [15100],
"isActive": true,
"environmentCode": "ENV1",
"sortNumber": 1,
"environmentId": 11101,
"isBuildEnvironment": true,
"environmentName": "Env 1"
"endPointId": 10101,
"resourceIds": [11223,11224]
},
{
"endPointId": 10111,
"resourceIds": [11223]
}
],
"isActive": true,
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": null,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_REVISIONS_TO_KEEP",
"propertyValue": 15,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_HOST",
"propertyValue": "dev-soa.company.local",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_PORT",
"propertyValue": 8001,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FD_ORACLE_SOA_HOME",
"propertyValue": "/u01/oracle/products/fmw/soa",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "MDS_PASS",
"propertyValue": "*****",
"credentialId": 74952,
"isExpression": false
}
]
} |
When we run a PUT request at the following URL: http://host:port/flexdeploy/rest/v1/topology/environmentinstance/
environment12347/
1110112342
And the PUT request receives the following JSON environment target object,
Code Block |
---|
theme | Eclipse |
---|
title | Environment PUT Receive JSONTarget: 12347, 12342 |
---|
|
{
"description": "This is the updated Environment 1",
"instances": [15101],
"isActive": true,
"environmentCode": "PUT2",
"sortNumber": 2,
"environmentId": 11101,
"isBuildEnvironment": false,
"environmentName": "PUT 2"
"instanceId": 12342,
"endPoints":
[
{
"endPointId": 10101,
"resourceIds": [11223]
},
{
"endPointId": 10111,
"resourceIds": []
}
],
"environmentId": 12347,
"isActive": true,
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": "classpath",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_REVISIONS_TO_KEEP",
"propertyValue": 15,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_HOST",
"propertyValue": "dev-soa.newcompany.local",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_PORT",
"propertyValue": 8001,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FD_ORACLE_SOA_HOME",
"propertyValue": "/u01/oracle/products/fmw/soa",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "MDS_PASS",
"propertyValue": "newPass",
"credentialId": null,
"isExpression": false
}
]
} |
The PUT request would then update the target with the environment with Id 11101 and return the 12347 and the instance 12342. It will return the following JSON environment object:
Code Block |
---|
theme | Eclipse |
---|
title | Environment PUT Return JSON |
---|
|
{
"description": "This is the updated Environment 1",
"instances": [15101],
"isActive": true,
"environmentCode": "PUT2",
"sortNumber": 2,
"environmentId": 11101,
"isBuildEnvironment": false,
"environmentName": "PUT 2"
} |
Back to Top
|
{
"instanceId": 12342,
"endPoints":
[
{
"endPointId": 10101,
"resourceIds": [11223]
},
{
"endPointId": 10111,
"resourceIds": []
}
],
"environmentId": 12347,
"isActive": true,
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": "classpath",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_REVISIONS_TO_KEEP",
"propertyValue": 15,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_HOST",
"propertyValue": "dev-soa.newcompany.local",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_PORT",
"propertyValue": 8001,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FD_ORACLE_SOA_HOME",
"propertyValue": "/u01/oracle/products/fmw/soa",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "MDS_PASS",
"propertyValue": "*****",
"credentialId": 74952,
"isExpression": false
}
]
} |
PATCH
This PATCH service will update an existing environment instance existing target with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the environment instance. Note: end points and resource types will be added, not replaced.target.
Info |
---|
|
http://host:port/flexdeploy/rest/v1/topology/environmentinstance/{environmentId}/{instanceId} |
...
Tip |
---|
title | End Points and Resource Types |
---|
|
In PATCH, end points and resource types are added, not replaced |
Request
Parameter | Type | Required | Description |
---|
environmentId | URL | Yes | URL parameter for the environment Id which is used to find and return |
an environment instancean target. |
instanceId | URL | Yes | URL parameter for the instance Id which is used to find and return |
an environment instancean target. |
environmentId | Long | No | The environment id of the |
environment instancetarget. This parameter is ignored in PATCH. |
instanceId | Long | No | The instance id of the |
environment instancetarget. This parameter is ignore in PATCH. |
isActive | Boolean | No | Whether or not |
the environment instance the target is active |
endPoints | List<EndPoint> | No | List of endpoint ids and their associated resource type ids. If provided endpoint is not associated with target, then it will be mapped. Similarly resource types are associated if not already associated to specific endpoint. If already mapped endpoint is not in input list then it will not be removed. EndPoint contains endpointId and array of resourceIds. |
properties | List<Property> | No | List of property names |
and their values, their values, and credential id for encrypted properties. Only values provided in input are updated, other values will not change. PropertyValue contains propertyName, propertyValue, and credentialId. |
Include Page |
---|
| REST V1 Targets Response |
---|
| REST V1 Targets Response |
---|
|
Response Codes
HTTP Code | Description |
---|
200 | Target was found and patched |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Target not found |
500 | Unexpected internal server error |
Example
If we had an environment a target in our database with an Id environment id of 11101 and had 12347 and an instance id of 12342 with the following attributes,
Code Block |
---|
theme | Eclipse |
---|
title | Environment PATCH JSONTarget: 12347, 12342 |
---|
|
{
"description": "This is Environment 1",
"instances": [15101],
"isActive": true,
"environmentCode": "ENV1",
"sortNumber": 1,
"environmentId": 11101,
"isBuildEnvironment": false,
"environmentName": "Env 1" "instanceId": 12342,
"endPoints":
[
{
"endPointId": 10101,
"resourceIds": [11223,11224]
},
{
"endPointId": 10111,
"resourceIds": [11223]
}
],
"environmentId": 12347,
"isActive": true,
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": null,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_REVISIONS_TO_KEEP",
"propertyValue": 15,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_HOST",
"propertyValue": "dev-soa.company.local",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_PORT",
"propertyValue": 8001,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FD_ORACLE_SOA_HOME",
"propertyValue": "/u01/oracle/products/fmw/soa",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "MDS_PASS",
"propertyValue": "*****",
"credentialId": 74952,
"isExpression": false
}
]
} |
When we run a PATCH request at the following URL: http://host:port/flexdeploy/rest/v1/topology/environmentinstance/
environment12347/
1110112342
And the PATCH request receives the following JSON environment etarget object,
Code Block |
---|
theme | Eclipse |
---|
title | Environment PATCH Receive JSONTarget: 12347, 12342 |
---|
|
{
"descriptionendPoints":
"This is Patch with some null attributes",
"instances": [15102,15103],
"isActive": null,
"environmentCode [
{
"endPointId": 10101,
"resourceIds": [12123]
},
{
"endPointId": 12241,
"resourceIds": [18612]
}
],
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": "new value",
"credentialId": null,
"isExpression": false
},
{
"sortNumberpropertyName": 7"MDS_PASS",
"environmentId "propertyValue": null"",
"isBuildEnvironment "credentialId": false52268,
"environmentName "isExpression": "Patch with some null"
false
}
]
} |
The PATCH request would then update the environment instance with Id 11101 and return the the environment 12347 and the instance 12342. It will return the following JSON environment object:
Code Block |
---|
theme | Eclipse |
---|
title | Environment PATCH Return JSON |
---|
|
{
"description": "This is Patch with some null attributes",
"instances": [15102,15103],
"isActive": true,
"environmentCode": "ENV1",
"sortNumber": 7,
"environmentId": 11101,
"isBuildEnvironment": false,
"environmentName": "Patch with some null"
} |
...
|
{
"instanceId": 12342,
"endPoints":
[
{
"endPointId": 10101,
"resourceIds": [11223,11224,12123]
},
{
"endPointId": 10111,
"resourceIds": [11223]
},
{
"endPointId": 12241,
"resourceIds": [18612]
}
],
"environmentId": 12347,
"isActive": true,
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": "new value",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_REVISIONS_TO_KEEP",
"propertyValue": 15,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_HOST",
"propertyValue": "dev-soa.company.local",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FDSOA_SERVER_PORT",
"propertyValue": 8001,
"credentialId": null,
"isExpression": false
},
{
"propertyName": "FD_ORACLE_SOA_HOME",
"propertyValue": "/u01/oracle/products/fmw/soa",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "MDS_PASS",
"propertyValue": "*****",
"credentialId": 52268,
"isExpression": false
}
]
} |