Environment Instances 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 instances.
...
Code Block |
---|
theme | Eclipse |
---|
title | Environment Instance: 12347, 12342 |
---|
|
{
"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 with the given environment instance corresponding to the environment id and instance id provided in the url.
...
Code Block |
---|
theme | Eclipse |
---|
title | Environment Instance: 12347, 12342 |
---|
|
{
"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 PUT request at the following URL: http://host:port/flexdeploy/rest/v1/topology/environmentinstance/12347/12342
...
Code Block |
---|
theme | Eclipse |
---|
title | Environment Instance: 12347, 12342 |
---|
|
{
"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 environment instance with the environment 12347 and the instance 12342. It will return the following JSON object:
Code Block |
---|
theme | Eclipse |
---|
title | Environment Instance: 12347, 12342 |
---|
|
{
"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 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.
Info |
---|
|
http://host:port/flexdeploy/rest/v1/topology/environmentinstance/{environmentId}/{instanceId} |
...
Code Block |
---|
theme | Eclipse |
---|
title | Environment Instance: 12347, 12342 |
---|
|
{
"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/12347/12342
...
Code Block |
---|
theme | Eclipse |
---|
title | Environment Instance: 12347, 12342 |
---|
|
{
"endPoints":
[
{
"endPointId": 10101,
"resourceIds": [12123]
},
{
"endPointId": 12241,
"resourceIds": [18612]
}
],
"properties":
[
{
"propertyName": "FDSOA_EXT_CLASSPATH",
"propertyValue": "new value",
"credentialId": null,
"isExpression": false
},
{
"propertyName": "MDS_PASS",
"propertyValue": "",
"credentialId": 52268,
"isExpression": false
}
]
} |
The PATCH request would then update the environment instance with the environment 12347 and the instance 12342. It will return the following JSON object:
Code Block |
---|
theme | Eclipse |
---|
title | Environment Instance: 12347, 12342 |
---|
|
{
"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
}
]
} |