Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Include Page
REST V1 Authentication
REST V1 Authentication

Table of Contents
maxLevel2

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
titleAPI URL
http://host:port/flexdeploy/rest/v1/topology/environmentinstance/{environmentId}/{instanceId}

Request

Parameter

Type

Required

Description

environmentId

URLYesURL parameter for the environment Id which is used to find and return an environment instancea target.
instanceIdURLYesURL parameter for the instance Id which is used to find and return an environment instancea target.

Include Page
REST V1 Environment Instance Targets Response
REST V1 Environment Instance Targets Response

Response Codes

HTTP CodeDescription
200Environment Instance Target was found and returned
401Authentication failure
403Authorization failure (no access to resource)
404Environment Instance not found
500Unexpected internal server error

Example

If we had an environment instance a target in our database with an environment id of 12347 and an instance id of 12342 with the following attributes,

...

, 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
themeEclipse
titleEnvironment 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"
		},
		{
			"propertyNamecredentialId": "FDSOA_SERVER_PORT"null,
			"propertyValueisExpression": "8001"false
		},
		{
			"propertyName": "FDFDSOA_ORACLESERVER_SOA_HOMEPORT",
			"propertyValue": "/8001,
			"credentialId": null,
			"isExpression": false
		},
		{
			"propertyName": "FD_ORACLE_SOA_HOME",
			"propertyValue": "/u01/oracle/products/fmw/soa",
		}
	]
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/topology/environmentinstance/12347/12342

The GET request would return the following JSON environment instance object:

Code Block
themeEclipse
titleEnvironment 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
		},
		{
			"propertyName": "FDSOA_REVISIONS_TO_KEEP",
			"propertyValue": "15"
		},
		{
			"propertyName": "FDSOA_SERVER_HOST",
			"propertyValue": "dev-soa.company.local"
		},
		{
			"propertyName": "FDSOA_SERVER_PORT",
			"propertyValue": "8001"
		},
		{
			"propertyName": "FD_ORACLE_SOA_HOME",
			"propertyValue": "/u01/oracle/products/fmw/soa"
		}
	]
}

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.

Info
titleAPI URL

http://host:port/flexdeploy/rest/topology/environmentinstance/{environmentId}/{instanceId}

Request

...

Parameter

...

Type

...

Required

...

Description

...

environmentId

...

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 environment instance along with any resource types.

i.e. at the end of successful request, environment instance will have mapped Endpoint(s) matching to input request.

EndPoint contains endpointId and array of resourceIds.

...

List of property names and their values. If environment instance property does not have value in input list, then that property value will be cleared.

PropertyValue contains propertyName and propertyValue.

...

Response Codes

...

Example

If we had an environment instance in our database with an environment id of 12347 and an instance id of 12342 with the following attributes,

Code Block
themeEclipse
titleEnvironment Instance: 12347, 12342
{
	"instanceId": 12342,
	"endPoints":
	[
		{
			"endPointId": 10101,
			"resourceIds": [11223,11224]	"credentialId": null,
			"isExpression": false
		},
		{
			"propertyName": "MDS_PASS",
			"propertyValue": "*****",
			"credentialId": 74952,
			"isExpression": false
		}
	]
}

PUT

This PUT service will replace all attributes of a target with the given environment instance corresponding to the environment id and instance id provided in the url.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/environmentinstance/{environmentId}/{instanceId}

Request

Parameter

Type

Required

Description

environmentId

URLYesURL parameter for the environment Id which is used to find and return a target.
instanceIdURLYesURL parameter for the instance Id which is used to find and return a target.
environmentIdLongNoThe environment id of the target. This parameter is ignored in PUT.
instanceIdLongNoThe instance id of the target. This parameter is ignore in PUT.
isActiveBooleanNoWhether or not the target is active. Defaults to true if not passed in.
endPointsList<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.

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.

propertiesList<PropertyValue>Yes

List of property names, 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 CodeDescription
200Target was found and updated
401Authentication failure
403Authorization failure (no access to resource)
404Environment Instance not found
500Unexpected internal server error

Example

If we had a target in our database with an environment id of 12347 and an instance id of 12342 with the following attributes,

Code Block
themeEclipse
titleTarget: 12347, 12342
{
	"endPoints":
	[
		{
			"endPointId": 10101,
			"resourceIds": [11223,11224]
		},
		{
			"endPointId": 10111,
			"resourceIds": [11223]
		}
	],
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "FDSOA_EXT_CLASSPATH",
			"propertyValue": null,
			"credentialId": null,
			"isExpression": false
		},
		{
			"endPointIdpropertyName": 10111"FDSOA_REVISIONS_TO_KEEP",
			"resourceIdspropertyValue": [11223]15,
		}
	],
	"environmentIdcredentialId": 12347null,
			"isActiveisExpression": truefalse
	"properties":
	[	},
		{
			"propertyName": "FDSOA_EXTSERVER_CLASSPATHHOST",
			"propertyValue": null
		},
		{"dev-soa.company.local",
			"propertyNamecredentialId": "FDSOA_REVISIONS_TO_KEEP"null,
			"propertyValueisExpression": "15"false
		},
		{
			"propertyName": "FDSOA_SERVER_HOSTPORT",
			"propertyValue": "dev-soa.company.local"
		},
		{
			"propertyName": "FDSOA_SERVER_PORT"8001,
			"credentialId": null,
			"propertyValueisExpression": "8001"false
		},
		{
			"propertyName": "FD_ORACLE_SOA_HOME",
			"propertyValue": "/u01/oracle/products/fmw/soa",
			"credentialId": null,
			"isExpression": false
		},
		]
}

When we run a PUT request at the following URL

http://host:port/flexdeploy/rest/topology/environmentinstance/12347/12342

And the PUT request receives the following JSON environment instance object,

Code Block
themeEclipse
titleEnvironment Instance: 12347, 12342
{
	"instanceId": 12342,
	"endPoints":
	[
		{{
			"propertyName": "MDS_PASS",
			"propertyValue": "*****",
			"endPointIdcredentialId": 1010174952,
			"resourceIdsisExpression": [11223]false
		},
		{
			"endPointId": 10111,
			"resourceIds": []
		}
	],
	"environmentId": 12347}

When we run a PUT request at the following URL: http://host:port/flexdeploy/rest/v1/topology/environmentinstance/12347/12342

And the PUT request receives the following JSON target object,

Code Block
themeEclipse
titleTarget: 12347, 12342
{
	"instanceId": 12342,
	"isActiveendPoints": true
	"properties":
	[
		{
			"propertyNameendPointId": "FDSOA_EXT_CLASSPATH"10101,
			"propertyValueresourceIds": "classpath"[11223]
		},
		{
			"propertyNameendPointId": "FDSOA_REVISIONS_TO_KEEP"10111,
			"propertyValueresourceIds": "15"[]
		},
		{],
			"propertyNameenvironmentId": "FDSOA_SERVER_HOST"12347,
			"propertyValueisActive": "dev-soa.newcompany.local"
		},true,
	"properties":
	[
		{
			"propertyName": "FDSOA_SERVEREXT_PORTCLASSPATH",
			"propertyValue": "classpath",
			"credentialId": null,
			"8001isExpression": false
		},
		{
			"propertyName": "FDFDSOA_ORACLEREVISIONS_SOATO_HOMEKEEP",
			"propertyValue": 15,
"/u01/oracle/products/fmw/soa"			"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
themeEclipse
titleEnvironment Instance: 12347, 12342
{
	"instanceId": 12342,
	"endPoints":
	[
		{{
			"propertyName": "FDSOA_SERVER_HOST",
			"propertyValue": "dev-soa.newcompany.local",
			"endPointIdcredentialId": 10101null,
			"resourceIdsisExpression": [11223]false
		},
		{
			"endPointIdpropertyName": 10111"FDSOA_SERVER_PORT",
			"resourceIdspropertyValue": []8001,
		}
	],
	"environmentIdcredentialId": 12347null,
			"isActiveisExpression": truefalse
	"properties":
	[	},
		{
			"propertyName": "FDSOAFD_ORACLE_EXTSOA_CLASSPATHHOME",
			"propertyValue": "classpath"
		},
		{/u01/oracle/products/fmw/soa",
			"credentialId": null,
			"propertyNameisExpression": "FDSOA_REVISIONS_TO_KEEP",
			"propertyValue": "15"false
		},
		{
			"propertyName": "FDSOAMDS_SERVER_HOSTPASS",
			"propertyValue": "dev-soa.newcompany.local"
		},
		{newPass",
			"propertyNamecredentialId": "FDSOA_SERVER_PORT"null,
			"propertyValueisExpression": "8001"false
		},
		{
			"propertyName": "FD_ORACLE_SOA_HOME",
			"propertyValue": "/u01/oracle/products/fmw/soa"
		}
	]
}

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
titleAPI URL

http://host:port/flexdeploy/rest/topology/environmentinstance/{environmentId}/{instanceId}

Tip
titleEnd Points and Resource Types

In PATCH, end points and resource types are added, not replaced

Request

...

Parameter

...

Type

...

Required

...

Description

...

environmentId

...

List of endpoint ids and their associated resource type ids. If provided endpoint is not associated with environment instance, 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.

...

List of property names and their values. Only values provided in input are updated, other values will not change.

PropertyValue contains propertyName and propertyValue.

...

Response Codes

...

Example

If we had an environment instance in our database with an environment id of 12347 and an instance id of 12342 with the following attributes,

Code Block
themeEclipse
titleEnvironment Instance: 12347, 12342
{
	"instanceId": 12342,
	"endPoints":
	[]
}

The PUT request would then update the target with the environment 12347 and the instance 12342. It will return the following JSON object:

Code Block
themeEclipse
titleEnvironment 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 target with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the target.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/environmentinstance/{environmentId}/{instanceId}


Tip
titleEnd Points and Resource Types

In PATCH, end points and resource types are added, not replaced

Request

Parameter

Type

Required

Description

environmentId

URLYesURL parameter for the environment Id which is used to find and return an target.
instanceIdURLYesURL parameter for the instance Id which is used to find and return an target.
environmentIdLongNoThe environment id of the target. This parameter is ignored in PATCH.
instanceIdLongNoThe instance id of the target. This parameter is ignore in PATCH.
isActiveBooleanNoWhether or not the target is active
endPointsList<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.

propertiesList<Property>No

List of property names, 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 CodeDescription
200Target was found and patched
401Authentication failure
403Authorization failure (no access to resource)
404Target not found
500Unexpected internal server error

Example

If we had a target in our database with an environment id of 12347 and an instance id of 12342 with the following attributes,

Code Block
themeEclipse
titleTarget: 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
		},
		{
			"endPointIdpropertyName": 10101"MDS_PASS",
			"resourceIdspropertyValue": [11223,11224]
		},
		{"*****",
			"endPointIdcredentialId": 1011174952,
			"resourceIdsisExpression": [11223]
		}
	],
	"environmentId": 12347,
	"isActive": true
	"properties":
	[
		{
			"propertyName": "FDSOA_EXT_CLASSPATH",
			"propertyValue": null
		}, false
		}
	]
}

When we run a PATCH request at the following URL: http://host:port/flexdeploy/rest/v1/topology/environmentinstance/12347/12342

And the PATCH request receives the following JSON etarget object,

Code Block
themeEclipse
titleTarget: 12347, 12342
{
	"endPoints":
	[
		{
			"propertyNameendPointId": "FDSOA_REVISIONS_TO_KEEP"10101,
			"propertyValueresourceIds": "15"[12123]
		},
		{
			"propertyNameendPointId": "FDSOA_SERVER_HOST"12241,
			"propertyValueresourceIds": [18612]
		}
	],
"dev-soa.company.local"
		},	"properties":
	[
		{
			"propertyName": "FDSOA_SERVEREXT_PORTCLASSPATH",
			"propertyValue": "new value",
			"credentialId": null,
			"8001isExpression": false
		},
		{
			"propertyName": "FD_ORACLE_SOA_HOMEMDS_PASS",
			"propertyValue": "",
"/u01/oracle/products/fmw/soa"			"credentialId": 52268,
			"isExpression": false
		}
	]
}

When we run a The PATCH request at the following URL

http://host:port/flexdeploy/rest/topology/environmentinstance/12347/12342

And the PATCH request receives the following JSON environment instance object,would then update the environment instance with the environment 12347 and the instance 12342. It will return the following JSON object:

Code Block
themeEclipse
titleEnvironment InstanceTarget: 12347, 12342
{
	"instanceId": 12342,
	"endPoints":
	[
		{
			"endPointId": 10101,
			"resourceIds": [11223,11224,12123]
		},
		{
			"endPointId": 10111,
			"resourceIds": [11223]
		},
		{
			"endPointId": 12241,
			"resourceIds": [18612]
		}
	]18612]
		}
	],
	"environmentId": 12347,
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "FDSOA_EXT_CLASSPATH",
			"propertyValue": "new value"
		}
	]
}

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
themeEclipse
titleEnvironment Instance: 12347, 12342
{
	"instanceId": 12342,
	"endPoints":
	[
			"propertyValue": "new value",
			"credentialId": null,
			"isExpression": false
		},
		{
			"endPointIdpropertyName": 10101"FDSOA_REVISIONS_TO_KEEP",
			"resourceIdspropertyValue": [11223,11224,12123]
		},
		{ 15,
			"endPointIdcredentialId": 10111null,
			"resourceIdsisExpression": [11223]false
		},
		{
			"endPointIdpropertyName": 12241"FDSOA_SERVER_HOST",
			"resourceIdspropertyValue": [18612]
		}
	],
	"environmentId"dev-soa.company.local",
			"credentialId": 12347null,
			"isActiveisExpression": truefalse
	"properties":
	[	},
		{
			"propertyName": "FDSOA_EXTSERVER_CLASSPATHPORT",
			"propertyValue": 8001,
"new value"			"credentialId": null,
			"isExpression": false
		},
		{
			"propertyName": "FDSOAFD_REVISIONSORACLE_TOSOA_KEEPHOME",
			"propertyValue": "15"
		},
		{/u01/oracle/products/fmw/soa",
			"propertyName": "FDSOA_SERVER_HOST""credentialId": null,
			"propertyValueisExpression": "dev-soa.company.local"false
		},
		{
			"propertyName": "FDSOAMDS_SERVER_PORTPASS",
			"propertyValue": "8001"
		},
		{*****",
			"propertyNamecredentialId": "FD_ORACLE_SOA_HOME"52268,
			"propertyValueisExpression": "/u01/oracle/products/fmw/soa"false
		}
	]
}