Environment Instance API

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.

Authentication - Use Basic Authentication for this API.

GET

This GET service will find an environment instance with the given environment id and instance id. It returns the JSON representation of the environment instance. 

API URL

http://host:port/flexdeploy/rest/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 instance
instanceIdURLYesURL parameter for the instance Id which is used to find and return an environment instance

Response

AttributesTypeDescription
environmentIdLongThe environment id of the environment instance
instanceIdLongThe instance id of the environment instance
isActiveBooleanWhether or not the environment instance is active
endPointsList<EndPoint>List of endpoint ids and their associated resource type ids
propertiesList<PropertyValue>List of property names and their values

Endpoint, relative to Environment Instance is defined as shown below.

AttributesTypeDescription
endPointIdLongEndpoint id mapped to environment instance.
resourceTypeIdsList<Long>List of resource type id for endpoint mapping.

Property value, relative to Environment Instance is defined as shown below.

AttributesTypeDescription
propertyNameStringProperty code
propertyValueStringProperty value

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,

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
		},
		{
			"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"
		}
	]
}

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:

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
		},
		{
			"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.

API URL

http://host:port/flexdeploy/rest/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 instance
instanceIdURLYesURL parameter for the instance Id which is used to find and return an environment instance
environmentIdLongNoThe environment id of the environment instance. This parameter is ignored in PUT.
instanceIdLongNoThe instance id of the environment instance. This parameter is ignore in PUT.
isActiveBooleanNoWhether or not the environment instance is active. Defaults to true if not passed in.
endPointsList<EndPoint>NoList of endpoint ids and their associated resource type ids
propertiesList<PropertyValue>YesList of property names and their values

Response

AttributesTypeDescription
environmentIdLongThe environment id of the environment instance
instanceIdLongThe instance id of the environment instance
isActiveBooleanWhether or not the environment instance is active
endPointsList<EndPoint>List of endpoint ids and their associated resource type ids
propertiesList<PropertyValue>List of property names and their values

Endpoint, relative to Environment Instance is defined as shown below.

AttributesTypeDescription
endPointIdLongEndpoint id mapped to environment instance.
resourceTypeIdsList<Long>List of resource type id for endpoint mapping.

Property value, relative to Environment Instance is defined as shown below.

AttributesTypeDescription
propertyNameStringProperty code
propertyValueStringProperty value

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,

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
		},
		{
			"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"
		}
	]
}

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,

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

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

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"
		},
		{
			"propertyName": "FDSOA_REVISIONS_TO_KEEP",
			"propertyValue": "15"
		},
		{
			"propertyName": "FDSOA_SERVER_HOST",
			"propertyValue": "dev-soa.newcompany.local"
		},
		{
			"propertyName": "FDSOA_SERVER_PORT",
			"propertyValue": "8001"
		},
		{
			"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.

API URL

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

End 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 environment instance
instanceIdURLYesURL parameter for the instance Id which is used to find and return an environment instance
environmentIdLongNoThe environment id of the environment instance. This parameter is ignored in PATCH.
instanceIdLongNoThe instance id of the environment instance. This parameter is ignore in PATCH.
isActiveBooleanNoWhether or not the environment instance is active
endPointsList<EndPoint>NoList of endpoint ids and their associated resource type ids
propertiesList<Property>NoList of property names and their values

Response

AttributesTypeDescription
environmentIdLongThe environment id of the environment instance
instanceIdLongThe instance id of the environment instance
isActiveBooleanWhether or not the environment instance is active
endPointsList<EndPoint>List of endpoint ids and their associated resource type ids
propertiesList<PropertyValue>List of property names and their values

Endpoint, relative to Environment Instance is defined as shown below.

AttributesTypeDescription
endPointIdLongEndpoint id mapped to environment instance.
resourceTypeIdsList<Long>List of resource type id for endpoint mapping.

Property value, relative to Environment Instance is defined as shown below.

AttributesTypeDescription
propertyNameStringProperty code
propertyValueStringProperty value

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,

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
		},
		{
			"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"
		}
	]
}

When we run a 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,

Environment Instance: 12347, 12342
{
	"endPoints":
	[
		{
			"endPointId": 10101,
			"resourceIds": [12123]
		},
		{
			"endPointId": 12241,
			"resourceIds": [18612]
		}
	],
	"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:

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"
		},
		{
			"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"
		}
	]
}
The following macros are not currently supported in the footer:
  • style