This section describes the Oracle WebLogic Server RESTful management resources that were implemented in Oracle WebLogic Server version 12.1.3 and available in version 12.2.1.
12.1.3 RESTful management resources provide a comprehensive public interface for configuring, deploying, monitoring, and administering the Oracle WebLogic Server platform in all supported environments.
The 12.1.3 management resources are enabled in a domain by default and are only available on the administration server. Management resources only use the domain-scoped default edit session and are only available over non-partitioned URLs.
To use RESTful management services in a WebLogic Server domain, your WebLogic Administrator must enable them using the WebLogic Server Administration Console. For more information, see "Enable RESTful Management Services" in the Administration Console Online Help. Alternatively, using WebLogic Scripting Tool (WLST), set the RestfulManagementService Enabled
property on the DomainMBean.
The format of the WebLogic Server resource URL is:
http(s)://
host:port
/management/wls/{version}/
path
where:
host
—the host where WebLogic Server is running
port
—the HTTP or HTTPS port
{version
}—the version of a REST resource. See "The {version} Specifier in Resource URLs".
path
—the relative path that identifies a resource. For example, the path to a server instance would be: servers/id/
myserver
.
The {version} specifier in resource URLs implicitly (/latest
) or explicitly (/12.1.3.0
) denotes the version of a REST resource. In future WLS releases, you can specify /latest
to use the current version of a REST resource or a version number to specify a previous version.
As a best practice, if you are using a browser or a reflexive client that follows links in the resources for navigation and can react to evolving resources, then use /latest
. If you are writing code that would break as a resource evolves, then specify an explicit version.
The WebLogic Server RESTful Management Services support the following representation formats:
The data format that can you get back from a resource (for example, through the Accept header) – only JSON.
The data format that can you send in to a resource (for example, through the Content-Type header) – most support only JSON, however, some also support multi-part forms (for example, the file upload versions of deploying applications and libraries).
The WebLogic Server REST interfaces support methods for accessing objects in the configuration and monitoring object trees.
Table 1-1 shows the REST methods for administering monitoring and configuration data and the tasks that you can perform with each method.
Table 1-1 REST Resource Methods for Administering Configuration Data
Task | REST Method |
---|---|
Determine the methods and method parameters that an object in the tree supports. |
|
Retrieve data for an object in the tree. |
|
Add an object to the tree. |
|
Update an object in the tree. |
|
Delete an object from the tree. |
|
Use the following procedures with WebLogic Server REST resources.
To create a new entity:
Invoke OPTIONS
to get a template object containing default values for the new entity.
Change the values of any properties you want to customize on the returned object.
POST
the modified object to create the new entity.
To change some properties of an entity:
Invoke GET
on the entity's URL to get back an object containing the entity's current values.
Change the values of the properties you want to modify on the returned object.
POST
the modified object back to the entity's URL.
For long running operations, specify the __detached=true
query parameter (asynchronous invocation). The method runs in detached (background) mode and returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
Specify _includeFields
and _excludeFields
query parameters to constrain the fields included in a response. Filtering collection results to only the information that you require may yield faster response times when interacting with large data sets. Include and exclude are mutually exclusive, and if neither is specified, all available information is included.
Use multi-part form data to pass a stream of bytes from the client to the WLS resource. For example, when the files you want to deploy (or redeploy) are not on the Administration Server file system. Use the POST accepting "multipart/form-data"
method to upload the files from the client's file system to the Administration Server and then deploy (or redeploy) them.
POST accepting "multipart/form-data"
is used only when uploading deployments from the client to the server. When supported, the resource will document two different forms of POST
: POST accepting "application/jason"
and POST accepting "multipart/form-data"
.
The WebLogic Server REST interfaces support navigating the resource tree dynamically. To provide this support, the GET method on each REST resource returns a links
element containing a list of URIs to the resources above and below it in the resource tree. Thus, you can navigate the resource tree using this technique:
Make an HTTP GET request on a known REST resource, specifying a literal, hard-coded value as the URI.
Parse the links
list in the response to identify the appropriate parent or child resource. See "Parsing the links List" for more information.
If you are done navigating and the REST resource you identified in Step 2 is the one on which you want to perform operations, use the appropriate HTTP requests to perform the operations, using the URI value you retrieved from the links
list.
If you need to continue navigating the resource tree, make an HTTP GET request on the REST resource you identified in Step 2, using the URI value you retrieved from the links
list. Then, return to Step 2.
Using dynamic navigation of the resource tree can provide a variety of benefits, including:
More maintainable source code, because it does not include a literal, hard-coded URI value for each HTTP request.
The ability to perform actions across collections of objects, such as servers and applications, whose names are not known during code development.
The links
element returned as part of the response to an HTTP GET request is a list of subordinate elements, each describing a single resource that is directly related to the current resource. Each of these subordinate elements contains the following properties:
A string value indicating how the linked resource is related to the current resource. The string values are as follows:
The linked resource is the parent of the current resource.
The linked resource performs an action on the object represented by the current resource. The value of the title
property indicates the type of action the linked resource performs.
A string without dots (.
). The linked resource has a relationship to the current resource that is specific to the current resource. For example, the GET method on the /management/wls/{version}
resource returns link
list elements with simple-name
values corresponding to the types of objects in a domain:
changemanger
datasources
deployments
jobs
servers
targets
A string containing one dot(.
). The linked resource is a member of a collection of resources subordinate to the current resource, and another element in the GET response provides more information about the linked resource. An example of such a collection is the individual servers under the /management/wls/{version}/servers
resource.
The first part of the dotted-name
value is the name of a list element in the GET response that contains more information, and the second part is the name of the property in that list element's subelement that identifies each subelement:
list-element-name.subelement-property-name
To discover more information about the linked resource, use its dotted-name
value in conjunction with its title
value:
Parse the dotted-name
value into its two parts: list-element-name
and subelement-property-name
.
In the GET response, look for a list element named list-element-name
. In this list, look for a subelement whose subelement-property-name
property value matches the linked resource's title
property value.
For example, given the dotted-name
value items.name
and the title
value myserver
, you would look in the GET response for the subelement of the items
list whose name
property value is the string myserver
.
A string value containing the URI to use in an HTTP request to access the linked resource.
(Optional) A string value providing additional information when the rel
property value is action
or dotted-name
:
When rel
property value is action
, the title
property value describes the kind of action the linked resource performs.
When the rel
property value is dotted-name
, the title
property value is the value to match in the subelement property of the list element specified by the dotted-name
value.
The HTTP methods used to manipulate the resources described in this section all return one of the following HTTP status codes:
The request was successfully completed. A 200 is returned for successful GET or OPTIONS methods, or a POST method to modify a resource (versus create).
The request has been fulfilled and resulted in a new resource being created. A Location header containing the canonical URI for the newly created resource will be returned.
A 201 is returned from a synchronous resource creation or an asynchronous resource creation that completed before the response was returned.
The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.
When specifying an asynchronous (__detached=true
) resource creation, (such as when deploying an application) or update (such as when redeploying an application), a 202 is returned if the operation is still in progress. If __detached=false
, a 202 might still be returned if the underlying operation does not finish in a reasonable amount of time.
The response contains a Location header of a job resource that the client should poll to find out when the job has finished. Also, it returns an entity that contains the current state of the job.
The request could not be processed because it contains missing or invalid information (such as a validation error on an input field, a missing required value, or such).
The request is not authorized. The authentication credentials included with this request are missing or invalid.
Cannot authenticate the user. The user does not possess authorization to perform this request.
The request specified a URI of a resource that does not exist.
The HTTP verb specified in the request (DELETE, GET, HEAD, POST, PUT) is not supported for this request URI.
The resource identified by this request is not capable of generating a representation corresponding to one of the media types in the Accept header of the request. For example, the client's Accept header asks for XML but the resource can only return JSON.
The client's ContentType header is wrong (for example. the client tries to send in XML but the resource can only accept JSON).
The server encountered an unexpected condition which prevented it from fulfilling the request.
The server is currently unable to handle the request due to temporary overloading or maintenance of the server. The WLS REST web application is not currently running.
The wls resource contains information about the versions of the REST interface supported by the WLS domain.
For information about versions supported by the REST interface, see The {version} Specifier in Resource URLs
The resource supports the following methods:
The GET method on this resource returns information about each supported version of this REST interface.
For information about versions supported by the REST interface, see The {version} Specifier in Resource URLs
The response body returned includes a list Version entities for the supported versions of this REST interface.
This method can return the following links:
uri=/management/wls/12.1.3.0 rel=current
uri=/management/wls/12.1.3.0 rel=items.version title=12.1.3.0
uri=/management/wls/latest rel=items.version title=latest
uri=/management/wls/{versions} rel=versions
This method returns one of the Standard HTTP Status Codes
This example demonstrates how to obtain information about each supported version of the REST resources.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "items.version", "uri": "http:\/\/localhost:7001\/management\/wls\/12.1.3.0", "title": "12.1.3.0" }, { "rel": "items.version", "uri": "http:\/\/localhost:7001\/management\/wls\/latest", "title": "latest" }, { "rel": "current", "uri": "http:\/\/localhost:7001\/management\/wls\/12.1.3.0" } ], "items": [ { "version": "12.1.3.0", "lifecycle": "active", "isLatest": true }, { "version": "latest", "lifecycle": "active", "isLatest": true } ] }
This resource contains overall information about the WLS domain.
The resource supports the following methods:
The GET method on this resource returns overall information about this domain, for example, aggregated server runtime statistics.
The response body returned includes a Wls entity.
This method can return the following links:
uri=/management/wls/{version}/changeManager rel=changeManager
uri=/management/wls/{version}/datasources rel=datasources
uri=/management/wls/{version}/deployments rel=deployments
uri=/management/wls/{version}/jobs rel=jobs
uri=/management/wls/{version}/servers rel=servers
uri=/management/wls/{version}/targets rel=targets
This method returns one of the Standard HTTP Status Codes
This example obtains the root WLS resource links and summary information for a domain.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest
Example Response
HTTP/1.1 200 OK HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls" }, { "rel": "jobs", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs" }, { "rel": "servers", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers" }, { "rel": "deployments", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments" }, { "rel": "datasources", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources" }, { "rel": "changeManager", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/changeManager" }, { "rel": "targets", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/targets" } ], "item": { "name": "mydomain", "productionMode": false, "activeHttpSessionCount": 0, "activeThreadCount": 5, "configuredServerCount": 3, "activeServerCount": 1, "overallServiceHealth": {"state": "ok"} } }
The changeManager resource returns information about edit sessions. Use this resource to explicitly manage an edit session:
Use the changeManager to start an edit session.
Use other resources to make any number of configuration changes, such as configuring data sources and deploying applications.
Use the changeManager to either cancel all the changes in the edit session or activate them.
This strategy batches all the changes together which is typically most useful in a production environment when a number of configuration changes need to be made together before they are ready to be exposed to clients.
With implicit edit sessions, instead of using the changeManager, just use other resources to change the configuration (for example, create a data source). Each REST call to change the configuration will start its own edit session, make the change, and then activate the change. This is useful for small tweaks to the configuration as typically performed in development environments.
The resource supports the following methods:
The GET method on this resource returns information about the current status of the edit session.
The response body returned includes a ChangeManager entity.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to return change manager information.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/changeManager
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/changeManager\/startEdit", "title": "startEdit" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/changeManager\/cancelEdit", "title": "cancelEdit" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/changeManager\/activate", "title": "activate" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/changeManager\/safeResolve", "title": "safeResolve" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/changeManager\/forceResolve", "title": "forceResolve" } ], "item": { "mergeNeeded": false, "locked": false } }
This resource activates the changes.
The resource supports the following methods:
The POST method on this resource activates changes saved during the current editing session but not yet deployed.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to activate any outstanding changes in the current session.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/changeManager/activate
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "The changes are activated successfully.", "severity": "SUCCESS" }]}
This resource cancels the current edit session.
The resource supports the following methods:
The POST method on this resource cancels the current edit session, releases the edit lock, and discards saved or unsaved changes.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to cancel the current edit session.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/changeManager/cancelEdit
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Edit session has been cancelled successfully.", "severity": "SUCCESS" }]}
This resource forcibly resolves all changes between the default edit session and the global configuration.
The resource supports the following methods:
The POST method on this resource forcibly resolves all changes between the default edit session and the global configuration.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to forcibly resolve all changes between the current edit session and the currently activated configuration.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/changeManager/forceResolve
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Successfully resolved the changes in default edit session with the global configuration.", "severity": "SUCCESS" }]}
This resource resolves non-conflicting changes between the default edit session and the global configuration.
The resource supports the following methods:
The POST method on this resource resolves non-conflicting changes between the default edit session and the global configuration. It fails if there are any conflicting changes.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to safely resolve non-conflicting changes between the current edit session and the currently activated configuration.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/changeManager/safeResolve
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Successfully resolved the changes in default edit session with the global configuration.", "severity": "SUCCESS" }]}
This resource starts a configuration edit session.
The resource supports the following methods:
The POST method on this resource starts the edit session.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to begin a new edit session.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/changeManager/startEdit
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Started edit session, please be sure to save and activate your changes once you are done.", "severity": "SUCCESS" }]}
This resource manages the data sources that run in this WLS domain.
The resource supports the following methods:
The GET method on this resource returns a listing of all the data sources in this WLS domain.
This method supports optional query parameters which can be used to constrain the fields included in the response. Constraining the fields to only the information that you require may yield faster response times when interacting with large data sets.
(Optional) Specifies that these values are not required and may be omitted in a response.
(Optional) Specifies that these values are required and must be included in the response.
Include and exclude are mutually exclusive, and if neither is specified all available information is included.
The response body returned includes a collection of DataSource entities. It also contains links to their corresponding resources.
This method can return the following links:
uri=/management/wls/{version}/datasources/drivers rel=drivers
uri=/management/wls/{version}/datasources/test rel=test
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to display information about all configured data sources.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/datasources
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest" }, { "rel": "vendors", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors" }, { "rel": "test", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/test" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource", "title": "TestDataSource" } ], "items": [{ "name": "TestDataSource", "targets": [ "myserver", "Cluster-0" ], "jdbcDataSourceParams": { "scope": "global", "dataSourceList": null, "globalTransactionsProtocol": "one phase commit", "rowPrefetchSize": 48, "streamChunkSize": 256, "algorithmType": "failover", "connectionPoolFailoverCallbackHandler": null, "failoverRequestIfBusy": false, "rowPrefetch": false, "jndiNames": [ "jndiName1", "jndiName2" ], "keepConnAfterLocalTx": true, "keepConnAfterGlobalTx": false }, "jdbcConnectionPoolParams": { "driverInterceptor": "", "connectionHarvestMaxCount": 1, "connectionHarvestTriggerCount": -1, "minCapacity": 1, "profileType": 0, "connectionLabelingCallback": "", "maxCapacity": 15, "highestNumWaiters": 2147483647, "loginDelaySeconds": 0, "secondsToTrustAnIdlePoolConnection": 10, "initialCapacity": 1, "shrinkFrequencySeconds": 900, "testFrequencySeconds": 120, "testTableName": "SQL SELECT 1 FROM SYS.SYSTABLES", "testConnectionsOnReserve": false, "connectionReserveTimeoutSeconds": 10, "connectionCreationRetryFrequencySeconds": 0, "inactiveConnectionTimeoutSeconds": 0, "statementCacheSize": 10, "statementCacheType": "least recently used", "statementTimeout": -1, "countOfTestFailuresTillFlush": 2, "countOfRefreshFailuresTillDisable": 2, "profileHarvestFrequencySeconds": 300, "initSql": "", "fatalErrorCodes": "", "removeInfectedConnections": true, "jdbcXaDebugLevel": 10, "ignoreInUseConnectionsEnabled": true, "credentialMappingEnabled": false, "pinnedToThread": false, "identityBasedConnectionPoolingEnabled": false, "wrapTypes": true, "wrapJdbc": true }, "jdbcDriverParams": { "properties": [ { "name": "portNumber", "value": "1527" }, { "name": "databaseName", "value": "demo;create=true" }, { "name": "serverName", "value": "localhost" } ], "driverName": "org.apache.derby.jdbc.ClientXADataSource", "systemProperties": [], "url": "jdbc:derby:\/\/localhost:1527\/demo", "useXaDataSourceInterface": true, "usePasswordIndirection": false }, "aggregateMetrics": { "reserveRequestCount": 0, "failedReserveRequestCount": 0, "waitingForConnectionTotal": 0, "waitingForConnectionSuccessTotal": 0, "waitingForConnectionFailureTotal": 0, "currCapacityHighCount": 3, "state": "Running", "prepStmtCacheAccessCount": 0, "prepStmtCacheAddCount": 0, "prepStmtCacheDeleteCount": 0, "prepStmtCacheCurrentSize": 0, "prepStmtCacheHitCount": 0, "prepStmtCacheMissCount": 0, "currCapacity": 3, "numAvailable": 3, "highestNumAvailable": 3, "numUnavailable": 0, "highestNumUnavailable": 0, "leakedConnectionCount": 0, "failuresToReconnectCount": 0, "connectionDelayTime": 238, "activeConnectionsCurrentCount": 0, "waitingForConnectionCurrentCount": 0, "activeConnectionsHighCount": 0, "waitingForConnectionHighCount": 0, "waitSecondsHighCount": 0, "connectionsTotalCount": 3, "activeConnectionsAverageCount": 0 }, "dataSourceMetrics": [ { "reserveRequestCount": 0, "failedReserveRequestCount": 0, "waitingForConnectionTotal": 0, "waitingForConnectionSuccessTotal": 0, "waitingForConnectionFailureTotal": 0, "currCapacityHighCount": 1, "state": "Running", "prepStmtCacheAccessCount": 0, "prepStmtCacheAddCount": 0, "prepStmtCacheDeleteCount": 0, "prepStmtCacheCurrentSize": 0, "prepStmtCacheHitCount": 0, "prepStmtCacheMissCount": 0, "currCapacity": 1, "numAvailable": 1, "highestNumAvailable": 1, "numUnavailable": 0, "highestNumUnavailable": 0, "leakedConnectionCount": 0, "failuresToReconnectCount": 0, "connectionDelayTime": 238, "activeConnectionsCurrentCount": 0, "waitingForConnectionCurrentCount": 0, "activeConnectionsHighCount": 0, "waitingForConnectionHighCount": 0, "waitSecondsHighCount": 0, "connectionsTotalCount": 1, "activeConnectionsAverageCount": 0, "serverName": "Cluster-0-Server-2" }, { "reserveRequestCount": 0, "failedReserveRequestCount": 0, "waitingForConnectionTotal": 0, "waitingForConnectionSuccessTotal": 0, "waitingForConnectionFailureTotal": 0, "currCapacityHighCount": 1, "state": "Running", "prepStmtCacheAccessCount": 0, "prepStmtCacheAddCount": 0, "prepStmtCacheDeleteCount": 0, "prepStmtCacheCurrentSize": 0, "prepStmtCacheHitCount": 0, "prepStmtCacheMissCount": 0, "currCapacity": 1, "numAvailable": 1, "highestNumAvailable": 1, "numUnavailable": 0, "highestNumUnavailable": 0, "leakedConnectionCount": 0, "failuresToReconnectCount": 0, "connectionDelayTime": 238, "activeConnectionsCurrentCount": 0, "waitingForConnectionCurrentCount": 0, "activeConnectionsHighCount": 0, "waitingForConnectionHighCount": 0, "waitSecondsHighCount": 0, "connectionsTotalCount": 1, "activeConnectionsAverageCount": 0, "serverName": "Cluster-0-Server-1" }, { "reserveRequestCount": 0, "failedReserveRequestCount": 0, "waitingForConnectionTotal": 0, "waitingForConnectionSuccessTotal": 0, "waitingForConnectionFailureTotal": 0, "currCapacityHighCount": 1, "state": "Running", "prepStmtCacheAccessCount": 0, "prepStmtCacheAddCount": 0, "prepStmtCacheDeleteCount": 0, "prepStmtCacheCurrentSize": 0, "prepStmtCacheHitCount": 0, "prepStmtCacheMissCount": 0, "currCapacity": 1, "numAvailable": 1, "highestNumAvailable": 1, "numUnavailable": 0, "highestNumUnavailable": 0, "leakedConnectionCount": 0, "failuresToReconnectCount": 0, "connectionDelayTime": 4, "activeConnectionsCurrentCount": 0, "waitingForConnectionCurrentCount": 0, "activeConnectionsHighCount": 0, "waitingForConnectionHighCount": 0, "waitSecondsHighCount": 0, "connectionsTotalCount": 1, "activeConnectionsAverageCount": 0, "serverName": "myserver" } ] }] }
The OPTIONS method on this resource returns a template entity that has been pre-populated with default values.
If you want to create a data source, call this method to get the template, fill in values, such as the driver class name and database URL, then use it in the POST method to create the data source.
The response body returned includes a DataSource template entity that can be customized and then used to create a new data source.
This method returns one of the Standard HTTP Status Codes
This example uses the OPTIONS method to obtain a template for a data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X OPTIONS http://localhost:7001/management/wls/latest/datasources
Example Response
HTTP/1.1 200 OK Response Body: {"item": { "name": "DataSource-0", "targets": [], "jdbcDataSourceParams": { "scope": "global", "dataSourceList": null, "globalTransactionsProtocol": "one phase commit", "rowPrefetchSize": 48, "streamChunkSize": 256, "algorithmType": "failover", "connectionPoolFailoverCallbackHandler": null, "failoverRequestIfBusy": false, "rowPrefetch": false, "jndiNames": [], "keepConnAfterLocalTx": true, "keepConnAfterGlobalTx": false }, "jdbcConnectionPoolParams": { "driverInterceptor": "", "connectionHarvestMaxCount": 1, "connectionHarvestTriggerCount": -1, "minCapacity": 1, "profileType": 0, "connectionLabelingCallback": "", "maxCapacity": 15, "highestNumWaiters": 2147483647, "loginDelaySeconds": 0, "secondsToTrustAnIdlePoolConnection": 10, "initialCapacity": 1, "shrinkFrequencySeconds": 900, "testFrequencySeconds": 120, "testTableName": null, "testConnectionsOnReserve": false, "connectionReserveTimeoutSeconds": 10, "connectionCreationRetryFrequencySeconds": 0, "inactiveConnectionTimeoutSeconds": 0, "statementCacheSize": 10, "statementCacheType": "least recently used", "statementTimeout": -1, "countOfTestFailuresTillFlush": 2, "countOfRefreshFailuresTillDisable": 2, "profileHarvestFrequencySeconds": 300, "initSql": "", "fatalErrorCodes": "", "removeInfectedConnections": true, "jdbcXaDebugLevel": 10, "ignoreInUseConnectionsEnabled": true, "credentialMappingEnabled": false, "pinnedToThread": false, "identityBasedConnectionPoolingEnabled": false, "wrapTypes": true, "wrapJdbc": true }, "jdbcDriverParams": { "properties": [], "password": null, "driverName": null, "systemProperties": [], "url": null, "useXaDataSourceInterface": true, "usePasswordIndirection": false }, "aggregateMetrics": { "reserveRequestCount": 0, "failedReserveRequestCount": 0, "waitingForConnectionTotal": 0, "waitingForConnectionSuccessTotal": 0, "waitingForConnectionFailureTotal": 0, "currCapacityHighCount": 0, "state": null, "prepStmtCacheAccessCount": 0, "prepStmtCacheAddCount": 0, "prepStmtCacheDeleteCount": 0, "prepStmtCacheCurrentSize": 0, "prepStmtCacheHitCount": 0, "prepStmtCacheMissCount": 0, "currCapacity": 0, "numAvailable": 0, "highestNumAvailable": 0, "numUnavailable": 0, "highestNumUnavailable": 0, "leakedConnectionCount": 0, "failuresToReconnectCount": 0, "connectionDelayTime": 0, "activeConnectionsCurrentCount": 0, "waitingForConnectionCurrentCount": 0, "activeConnectionsHighCount": 0, "waitingForConnectionHighCount": 0, "waitSecondsHighCount": 0, "connectionsTotalCount": 0, "activeConnectionsAverageCount": 0, "serverName": null }, "dataSourceMetrics": [] }}
The POST method on this resource creates a new data source.
The request body must include a fully populated DataSource entity that describes the new data source. Read only parameter values are ignored.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to create a new data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ 'name': 'TestDataSource', 'targets': [ 'myserver', 'Cluster-0' ], 'jdbcDriverParams': { 'properties': [ { name: 'portNumber', value: '1527' }, { name: 'databaseName', value: 'demo;create=true' }, { name: 'serverName', value: 'localhost' } ], 'password': 'password1', 'driverName': 'org.apache.derby.jdbc.ClientXADataSource', 'url': 'jdbc:derby://localhost:1527/demo', 'systemProperties': [], 'usePasswordIndirection': false, 'useXaDataSourceInterface': true }, 'jdbcDataSourceParams': { 'scope': 'global', 'algorithmType': 'failover', 'connectionPoolFailoverCallbackHandler': null, 'failoverRequestIfBusy': false, 'dataSourceList': null, 'globalTransactionsProtocol': 'one phase commit', 'rowPrefetchSize': 48, 'streamChunkSize': 256, 'rowPrefetch': false, 'keepConnAfterLocalTx': true, 'keepConnAfterGlobalTx': false, 'jndiNames': [ 'jndiName1', 'jndiName2' ] }, 'jdbcConnectionPoolParams': { 'profileHarvestFrequencySeconds': 300, 'driverInterceptor': '', 'connectionHarvestMaxCount': 1, 'connectionHarvestTriggerCount': -1, 'minCapacity': 1, 'profileType': 0, 'connectionLabelingCallback': '', 'maxCapacity': 15, 'highestNumWaiters': 2147483647, 'loginDelaySeconds': 0, 'secondsToTrustAnIdlePoolConnection': 10, 'initialCapacity': 1, 'shrinkFrequencySeconds': 900, 'testFrequencySeconds': 120, 'testTableName': 'SQL SELECT 1 FROM SYS.SYSTABLES', 'testConnectionsOnReserve': false, 'connectionReserveTimeoutSeconds': 10, 'connectionCreationRetryFrequencySeconds': 0, 'inactiveConnectionTimeoutSeconds': 0, 'statementCacheSize': 10, 'statementCacheType': 'least recently used', 'statementTimeout': -1, 'countOfTestFailuresTillFlush': 2, 'countOfRefreshFailuresTillDisable': 2, 'fatalErrorCodes': '', 'initSql': '', 'ignoreInUseConnectionsEnabled': true, 'removeInfectedConnections': true, 'credentialMappingEnabled': false, 'pinnedToThread': false, 'identityBasedConnectionPoolingEnabled': false, 'wrapTypes': true, 'wrapJdbc': true, 'jdbcXaDebugLevel': 10 } }" \ -X POST http://localhost:7001/management/wls/latest/datasources
Example Response
HTTP/1.1 201 Created Location: http://localhost:7001/management/wls/latest/datasources/id/TestDataSource Response Body: {"messages": [{ "message": "Successfully created 'TestDataSource'.", "severity": "SUCCESS" }]}
This resource manages the data source identified by the resource URL.
The resource supports the following methods:
The DELETE method deletes the data source identified by the resource URL.
The response body returned contains a message stating that the data source's configuration was deleted.
This method returns one of the Standard HTTP Status Codes
This example uses the DELETE method to remove a data source configuration.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X DELETE http://localhost:7001/management/wls/latest/datasources/id/TestDataSource
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Successfully deleted 'TestDataSource'.", "severity": "SUCCESS" }]}
-----
The GET method on this resource returns information about the data source identified by the resource URL.
The response body returned includes a DataSource entity that contains information about the specified data source.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to find information about a specific data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/datasources/id/TestDataSource
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/start", "title": "start" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/shutdown", "title": "shutdown" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/test", "title": "test" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/clearStatementCache", "title": "clearStatementCache" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/reset", "title": "reset" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/shrink", "title": "shrink" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/suspend", "title": "suspend" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/id\/TestDataSource\/resume", "title": "resume" } ], "item": { "name": "TestDataSource", "targets": [ "myserver", "Cluster-0" ], "jdbcDataSourceParams": { "scope": "global", "dataSourceList": null, "globalTransactionsProtocol": "one phase commit", "rowPrefetchSize": 96, "streamChunkSize": 256, "algorithmType": "failover", "connectionPoolFailoverCallbackHandler": null, "failoverRequestIfBusy": false, "rowPrefetch": true, "jndiNames": [ "jndiName1", "jndiName2", "jndiName3" ], "keepConnAfterLocalTx": true, "keepConnAfterGlobalTx": false }, "jdbcConnectionPoolParams": { "driverInterceptor": "", "connectionHarvestMaxCount": 1, "connectionHarvestTriggerCount": -1, "minCapacity": 1, "profileType": 0, "connectionLabelingCallback": "", "maxCapacity": 30, "highestNumWaiters": 2147483647, "loginDelaySeconds": 0, "secondsToTrustAnIdlePoolConnection": 10, "initialCapacity": 2, "shrinkFrequencySeconds": 900, "testFrequencySeconds": 120, "testTableName": "SQL SELECT 1 FROM SYS.SYSTABLES", "testConnectionsOnReserve": false, "connectionReserveTimeoutSeconds": 10, "connectionCreationRetryFrequencySeconds": 0, "inactiveConnectionTimeoutSeconds": 0, "statementCacheSize": 10, "statementCacheType": "least recently used", "statementTimeout": -1, "countOfTestFailuresTillFlush": 2, "countOfRefreshFailuresTillDisable": 2, "profileHarvestFrequencySeconds": 300, "initSql": "", "fatalErrorCodes": "", "removeInfectedConnections": true, "jdbcXaDebugLevel": 10, "ignoreInUseConnectionsEnabled": true, "credentialMappingEnabled": false, "pinnedToThread": false, "identityBasedConnectionPoolingEnabled": false, "wrapTypes": true, "wrapJdbc": true }, "jdbcDriverParams": { "properties": [ { "name": "portNumber", "value": "1527" }, { "name": "databaseName", "value": "demo;create=true" }, { "name": "serverName", "value": "localhost" } ], "driverName": "org.apache.derby.jdbc.ClientXADataSource", "systemProperties": [], "url": "jdbc:derby:\/\/localhost:1527\/demo", "useXaDataSourceInterface": true, "usePasswordIndirection": false }, "aggregateMetrics": { "reserveRequestCount": 3, "failedReserveRequestCount": 0, "waitingForConnectionTotal": 0, "waitingForConnectionSuccessTotal": 0, "waitingForConnectionFailureTotal": 0, "currCapacityHighCount": 3, "state": "Shutdown", "prepStmtCacheAccessCount": 0, "prepStmtCacheAddCount": 0, "prepStmtCacheDeleteCount": 0, "prepStmtCacheCurrentSize": 0, "prepStmtCacheHitCount": 0, "prepStmtCacheMissCount": 0, "currCapacity": 0, "numAvailable": 0, "highestNumAvailable": 3, "numUnavailable": 0, "highestNumUnavailable": 3, "leakedConnectionCount": 0, "failuresToReconnectCount": 0, "connectionDelayTime": 238, "activeConnectionsCurrentCount": 0, "waitingForConnectionCurrentCount": 0, "activeConnectionsHighCount": 3, "waitingForConnectionHighCount": 0, "waitSecondsHighCount": 0, "connectionsTotalCount": 3, "activeConnectionsAverageCount": 0 }, "dataSourceMetrics": [ { "reserveRequestCount": 1, "failedReserveRequestCount": 0, "waitingForConnectionTotal": 0, "waitingForConnectionSuccessTotal": 0, "waitingForConnectionFailureTotal": 0, "currCapacityHighCount": 1, "state": "Shutdown", "prepStmtCacheAccessCount": 0, "prepStmtCacheAddCount": 0, "prepStmtCacheDeleteCount": 0, "prepStmtCacheCurrentSize": 0, "prepStmtCacheHitCount": 0, "prepStmtCacheMissCount": 0, "currCapacity": 0, "numAvailable": 0, "highestNumAvailable": 1, "numUnavailable": 0, "highestNumUnavailable": 1, "leakedConnectionCount": 0, "failuresToReconnectCount": 0, "connectionDelayTime": 4, "activeConnectionsCurrentCount": 0, "waitingForConnectionCurrentCount": 0, "activeConnectionsHighCount": 1, "waitingForConnectionHighCount": 0, "waitSecondsHighCount": 0, "connectionsTotalCount": 1, "activeConnectionsAverageCount": 0, "serverName": "myserver" } ] } }
-----
The POST method on this resource reconfigures the data source identified by the resource URL.
The POST request body must include a fully populated DataSource entity that contains the desired data source configuration. Read only parameter values are ignored.
The response body returned contains a message stating that the data source's configuration was updated.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to update a data source configuration.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ 'name': 'TestDataSource', 'targets': [ 'myserver', 'Cluster-0' ], 'jdbcDriverParams': { 'properties': [ { name: 'portNumber', value: '1527' }, { name: 'databaseName', value: 'demo;create=true' }, { name: 'serverName', value: 'localhost' } ], 'password': 'password1', 'driverName': 'org.apache.derby.jdbc.ClientXADataSource', 'url': 'jdbc:derby://localhost:1527/demo', 'systemProperties': [], 'usePasswordIndirection': false, 'useXaDataSourceInterface': true }, 'jdbcDataSourceParams': { 'scope': 'global', 'algorithmType': 'failover', 'connectionPoolFailoverCallbackHandler': null, 'failoverRequestIfBusy': false, 'dataSourceList': null, 'globalTransactionsProtocol': 'one phase commit', 'rowPrefetchSize': 96, 'streamChunkSize': 256, 'rowPrefetch': true, 'keepConnAfterLocalTx': true, 'keepConnAfterGlobalTx': false, 'jndiNames': [ 'jndiName1', 'jndiName2', 'jndiName3' ] }, 'jdbcConnectionPoolParams': { 'profileHarvestFrequencySeconds': 300, 'driverInterceptor': '', 'connectionHarvestMaxCount': 1, 'connectionHarvestTriggerCount': -1, 'minCapacity': 1, 'profileType': 0, 'connectionLabelingCallback': '', 'maxCapacity': 30, 'highestNumWaiters': 2147483647, 'loginDelaySeconds': 0, 'secondsToTrustAnIdlePoolConnection': 10, 'initialCapacity': 2, 'shrinkFrequencySeconds': 900, 'testFrequencySeconds': 120, 'testTableName': 'SQL SELECT 1 FROM SYS.SYSTABLES', 'testConnectionsOnReserve': false, 'connectionReserveTimeoutSeconds': 10, 'connectionCreationRetryFrequencySeconds': 0, 'inactiveConnectionTimeoutSeconds': 0, 'statementCacheSize': 10, 'statementCacheType': 'least recently used', 'statementTimeout': -1, 'countOfTestFailuresTillFlush': 2, 'countOfRefreshFailuresTillDisable': 2, 'fatalErrorCodes': '', 'initSql': '', 'ignoreInUseConnectionsEnabled': true, 'removeInfectedConnections': true, 'credentialMappingEnabled': false, 'pinnedToThread': false, 'identityBasedConnectionPoolingEnabled': false, 'wrapTypes': true, 'wrapJdbc': true, 'jdbcXaDebugLevel': 10 } }" \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Successfully updated 'TestDataSource'.", "severity": "SUCCESS" }]}
-----
This resource clears the statement cache for each connection in the data source. If statement caching is enabled for a data source, WebLogic Server caches prepared and callable statements that are used in each connection in the data source. Each connection has its own cache, but the caches for each connection are configured and managed as a group. When you clear the statement cache for a data source, you clear the statement cache for all connections in the instance of the data source you select.
When you clear a statement that is currently in use by an application, WebLogic Server removes the statement from the cache, but does not close it. When you clear a statement that is not currently in use, WebLogic Server removes the statement from the cache and closes it.
The resource supports the following methods:
The POST method on this resource clears the statement cache for each connection in the data source.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to clear the statement caches for a specific data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/clearStatementCache
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' was successfully cleared.", "severity": "SUCCESS" }]}
This resource resets a data source. When you reset the database connections in a JDBC data source, WebLogic Server closes and recreates all available database connections in the pool of connections in the data source.
The resource supports the following methods:
The POST method on this resource resets the database connections for a data source.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to reset the database connections for a data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/reset
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' was successfully reset.", "severity": "SUCCESS" }]}
This resource resumes a suspended data source. When you resume a data source, WebLogic Server marks the data source as enabled and allows applications to reserve connections from the data source. If you suspended the data source (not forcibly suspended), all connections are preserved exactly as they were before the data source was suspended. Clients that had reserved a connection before the data source was suspended can continue exactly where they left off.
NOTE: You cannot resume a data source that did not start correctly, for example, if the database server is unavailable.
The resource supports the following methods:
The POST method on this resource resumes individual data sources that are in the Suspended
state.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to resume a suspended data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/resume
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' was successfully resumed.", "severity": "SUCCESS" }]}
This resource shrinks the pool of database connections in individual instances of a data source.
The resource supports the following methods:
The POST method on this resource shrinks the connection pool in a data source.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to shrink the connection pool for a specific data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/shrink
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' was successfully shrunken.", "severity": "SUCCESS" }]}
This resource shuts down a running data source. When you shut down a data source (not forcibly shut down), WebLogic Server closes database connections in the data source and shuts down the data source. If any connections from the data source are currently in use, the operation will fail.
The resource supports the following methods:
The POST method on this resource shuts down a data source.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to shut down a data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/shutdown
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' was successfully stopped.", "severity": "SUCCESS" }]}
This resource starts a stopped data source. Starting a data source re-initializes the data source, creates connections, and transitions the data source to a health state of Running
The resource supports the following methods:
The POST method on this resource starts a data source.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to start a data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/start
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' was successfully started.", "severity": "SUCCESS" }]}
This resource suspends a data source. When you suspend a data source (not forcibly suspend), the data source is marked as disabled and applications cannot reserve connections from the pool. Applications that already have a reserved connection from the data source when it is suspended will get an exception when trying to reserve the connection. WebLogic Server preserves all connections in the data source exactly as they were before the data source was suspended.
The resource supports the following methods:
The POST method on this resource suspends individual instances of a data source. When you suspend a data source, applications can no longer get a database connection from the data source.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to suspend a data source.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/suspend
Example Response
HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' was successfully suspended.", "severity": "SUCCESS" }]}
This resource tests a data source's database connection.
The resource supports the following methods:
The POST method on this resource tests the data source's database connection.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to test a data source's connectivity with a database.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/datasources/id/TestDataSource/test
Example Response
HHTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Data Source 'TestDataSource' is working correctly.", "severity": "SUCCESS" }]}
This resource tests a database connection. It is typically used to verify the parameters that will be used to create a new data source.
The resource supports the following methods:
The OPTIONS method on this resource returns a template entity that has been pre-populated with default values.
If you want to test a database connection, call this method to get the template, fill in values, such as the driver class name and connection URL, then use it in the POST method to test the connection.
The response body returned includes a DatabaseDriverAttributes entity.
This method returns one of the Standard HTTP Status Codes
This example uses the OPTIONS method to obtain a template for a database connection.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X OPTIONS http://localhost:7001/management/wls/latest/datasources/test
Example Response
HTTP/1.1 200 OK Response Body: {"item": { "properties": null, "password": null, "url": null, "driverName": null }}
The POST method on this resource converts a set of driver-specific attributes into a generic database connection entity, properly formatting the connection URL and list of properties.
NOTE: Since REST resources are not allowed to return cleartext passwords, the returned driver does not have its password filled in, even though one of the driver attributes holds the password. To compensate for this, the client should hold on to the database driver attributes entity, use its passwordAttributeName
property to find the attribute that holds the password, then set the password
property on the returned database connection entity to that password.
The request body must include a fully populated DatabaseDriverAttributes entity. Read only parameter values are ignored.
The response body returned includes a DatabaseConnection entity.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to test a database connection configuration.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ url: 'jdbc:derby://localhost:1527/demo', driverName: 'org.apache.derby.jdbc.ClientXADataSource', password: null, properties: [ { name: 'portNumber', value: '1527' }, { name: 'databaseName', value: 'demo;create=true' }, { name: 'serverName', value: 'localhost' } ] }" \ -X POST http://localhost:7001/management/wls/latest/datasources/test
Example Response
HTTP/1.1 200 OK Response Body: {"item": { "cause": [], "ok": true }}
This resource lists the available database driver vendors in this WLS domain.
The resource supports the following methods:
The GET method on this resource returns a listing of this domain's available database driver vendors.
The response body returned includes a collection of DatabaseVendor entities. Note that their drivers
property is not populated.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to discover all available database driver vendors known to a domain.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/datasources/vendors
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Adabas%20for%20z%2FOS", "title": "Adabas for z\/OS" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/CICS%2FTS%20for%20z%2FOS", "title": "CICS\/TS for z\/OS" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Cache", "title": "Cache" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Cloudscape", "title": "Cloudscape" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/DB2", "title": "DB2" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/DB2%20for%20i5%2FOS", "title": "DB2 for i5\/OS" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/DB2%20for%20z%2FOS", "title": "DB2 for z\/OS" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Derby", "title": "Derby" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/EnterpriseDB", "title": "EnterpriseDB" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/FirstSQL", "title": "FirstSQL" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/IMS%2FDB%20for%20z%2FOS", "title": "IMS\/DB for z\/OS" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/IMS%2FTM%20for%20z%2FOS", "title": "IMS\/TM for z\/OS" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Informix", "title": "Informix" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Ingres", "title": "Ingres" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/MS%20SQL%20Server", "title": "MS SQL Server" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/MaxDB", "title": "MaxDB" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/MySQL", "title": "MySQL" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Oracle", "title": "Oracle" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Oracle%20BI%20Server", "title": "Oracle BI Server" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Oracle%20TimesTen%20Client%20Connection", "title": "Oracle TimesTen Client Connection" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Oracle%20TimesTen%20Direct%20Connection", "title": "Oracle TimesTen Direct Connection" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/PointBase", "title": "PointBase" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/PostgreSQL", "title": "PostgreSQL" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Progress", "title": "Progress" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Sybase", "title": "Sybase" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/VSAM%20for%20z%2FOS", "title": "VSAM for z\/OS" } ], "items": [ {"name": "Adabas for z\/OS"}, {"name": "CICS\/TS for z\/OS"}, {"name": "Cache"}, {"name": "Cloudscape"}, {"name": "DB2"}, {"name": "DB2 for i5\/OS"}, {"name": "DB2 for z\/OS"}, {"name": "Derby"}, {"name": "EnterpriseDB"}, {"name": "FirstSQL"}, {"name": "IMS\/DB for z\/OS"}, {"name": "IMS\/TM for z\/OS"}, {"name": "Informix"}, {"name": "Ingres"}, {"name": "MS SQL Server"}, {"name": "MaxDB"}, {"name": "MySQL"}, {"name": "Oracle"}, {"name": "Oracle BI Server"}, {"name": "Oracle TimesTen Client Connection"}, {"name": "Oracle TimesTen Direct Connection"}, {"name": "PointBase"}, {"name": "PostgreSQL"}, {"name": "Progress"}, {"name": "Sybase"}, {"name": "VSAM for z\/OS"} ] }
This resource describes a database driver vendor.
The resource supports the following methods:
The GET method on this resource returns a listing of this vendor's database drivers.
The response body returned includes a DatabaseVendor entity.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to discover all of the supported drivers for a database vendor.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/datasources/vendors/id/Derby
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors" }, { "rel": "item.drivers.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Derby\/drivers\/id\/Derby's%20Driver%20(Type%204%20XA)%20Versions:Any", "title": "Derby's Driver (Type 4 XA) Versions:Any" }, { "rel": "item.drivers.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Derby\/drivers\/id\/Derby's%20Driver%20(Type%204%20embedded)%20Versions:Any", "title": "Derby's Driver (Type 4 embedded) Versions:Any" }, { "rel": "item.drivers.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/datasources\/vendors\/id\/Derby\/drivers\/id\/Derby's%20Driver%20(Type%204)%20Versions:Any", "title": "Derby's Driver (Type 4) Versions:Any" } ], "item": { "name": "Derby", "drivers": [ { "name": "Derby's Driver (Type 4 XA) Versions:Any", "type": "Type 4", "description": null, "driverClassName": "org.apache.derby.jdbc.ClientXADataSource", "forXa": true, "testSql": "SELECT 1 FROM SYS.SYSTABLES" }, { "name": "Derby's Driver (Type 4 embedded) Versions:Any", "type": "Type 4 embedded", "description": null, "driverClassName": "org.apache.derby.jdbc.EmbeddedDriver", "forXa": false, "testSql": "SELECT 1 FROM SYS.SYSTABLES" }, { "name": "Derby's Driver (Type 4) Versions:Any", "type": "Type 4", "description": null, "driverClassName": "org.apache.derby.jdbc.ClientDriver", "forXa": false, "testSql": "SELECT 1 FROM SYS.SYSTABLES" } ] } }
This resource helps construct a database connection that is appropriate to a specific database driver.
The resource supports the following methods:
The OPTIONS method on this resource returns a template entity that has been pre-populated with default values.
If you want to construct an appropriate database connection for a specific kind of database driver, find the driver class name, then call this method to get a template that lists the attributes that must be filled in for this driver. After filling in the values, use it in the POST method which converts the completed template into a database connection.
The response body returned includes a DatabaseDriverAttributes entity.
This method returns one of the Standard HTTP Status Codes
This example uses the OPTIONS method to obtain a template for a database driver configuration.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X OPTIONS http://localhost:7001/management/wls/latest/datasources/vendors/id/Derby/drivers/id/Derby's%20Driver%20(Type%204)%20Versions:Any
Example Response
HTTP/1.1 200 OK Response Body: {"item": { "attributes": [ { "name": "DbmsHost", "value": null, "defaultValue": null, "description": null, "inUrl": true, "required": true }, { "name": "DbmsPort", "value": "1527", "defaultValue": "1527", "description": null, "inUrl": true, "required": true }, { "name": "DbmsName", "value": null, "defaultValue": null, "description": null, "inUrl": true, "required": true }, { "name": "DbmsUsername", "value": null, "defaultValue": null, "description": null, "inUrl": false, "required": true }, { "name": "DbmsPassword", "value": null, "defaultValue": null, "description": null, "inUrl": false, "required": true } ], "passwordAttributeName": "DbmsPassword" }}
The POST method on this resource converts a set of driver-specific attributes into a generic database connection entity, properly formatting the connection URL and list of properties.
NOTE: Since REST resources are not allowed to return cleartext passwords, the returned driver does not have its password filled in, even though one of the driver attributes holds the password. To compensate for this, the client should hold on to the database driver attributes entity, use its passwordAttributeName
property to find the attribute that holds the password, then set the password
property on the returned database connection entity to that password.
The request body must include a fully populated DatabaseDriverAttributes entity. Read only parameter values are ignored.
The response body returned includes a DatabaseConnection entity.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to construct a database connection configuration.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ attributes: [ { name: 'DbmsHost', value: 'localhost' }, { name: 'DbmsPort', value: '1527' }, { name: 'DbmsName', value: 'db1' }, { name: 'DbmsUsername', value: 'u1' }, { name: 'DbmsPassword', value: 'p1' } ] }" \ -X POST http://localhost:7001/management/wls/latest/datasources/vendors/id/Derby/drivers/id/Derby's%20Driver%20(Type%204)%20Versions:Any
Example Response
HTTP/1.1 200 OK Response Body: {"item": { "properties": [ { "name": "user", "value": "u1" }, { "name": "portNumber", "value": "1527" }, { "name": "databaseName", "value": "db1;create=true" }, { "name": "serverName", "value": "localhost" } ], "driverName": "org.apache.derby.jdbc.ClientDriver", "url": "jdbc:derby:\/\/localhost:1527\/db1;ServerName=localhost;databaseName=db1" }}
This resource lists the deployments that run in this WLS domain.
The resource supports the following methods:
The GET method on this resource returns a listing of all the deployments in this WLS domain.
The response body returned includes a collection of Deployment entities. It also contains links to their corresponding resources.
This method can return the following links:
uri=/management/wls/{version}/deployments/application rel=application
uri=/management/wls/{version}/deployments/inspect rel=inspect
uri=/management/wls/{version}/deployments/library rel=library
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to display all deployments in a domain.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/deployments
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest" }, { "rel": "inspect", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/inspect" }, { "rel": "application", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application" }, { "rel": "library", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/library" }, { "rel": "application", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/BasicApp", "title": "BasicApp" }, { "rel": "library", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/library\/id\/airline", "title": "airline" } ], "items": [ { "name": "BasicApp", "state": "active", "type": "application", "targets": ["myserver"], "displayName": "BasicApp", "deploymentPath": "\/deployments\/BasicApp\/app\/BasicApp.ear" }, { "name": "airline", "state": "active", "type": "library", "targets": [ "myserver", "Cluster-0" ], "displayName": "airline", "deploymentPath": "\/deployments\/airline.war" } ] }
This resource manages the applications that are deployed in this WLS domain.
The resource supports the following methods:
The GET method on this resource returns a listing of all the applications in this WLS domain.
This method supports optional query parameters which can be used to constrain the fields included in the response. Constraining the fields to only the information that you require may yield faster response times when interacting with large data sets.
(optional) Specifies that these values are not required and may be omitted in a response.
(optional) Specifies that these values are required and must be included in the response.
Include and exclude are mutually exclusive, and if neither is specified all available information is included.
The response body returned includes a collection of Application entities. It also contains links to their corresponding resources.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to list all the applications in this WLS domain.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/deployments/application
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare", "title": "fairShare" } ], "items": [{ "name": "fairShare", "state": "active", "type": "application", "targets": [ "myserver", "Cluster-0" ], "servlets": [ { "servletName": "SimpleSlowServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] }, { "servletName": "SimpleFastServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] }, { "servletName": "JspServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] }, { "servletName": "FileServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] } ], "displayName": "fairShare", "urls": [ "http:\/\/localhost:7001\/fairShare" ], "planPath": null, "applicationType": "war", "openSessionsCurrentCount": 0, "sessionsOpenedTotalCount": 0, "health": {"state": "ok"}, "deploymentPath": "\/deployments\/fairShare.war", "ejbs": [] }] }
The OPTIONS method on this resource returns a template entity that has been pre-populated with default values.
If you want to deploy an application, call this method to get the template, fill in values, such as the path to the application, then use it in the POST method to deploy the application.
The response body returned includes an Application template entity that can be customized and then used to deploy the application.
This method returns one of the Standard HTTP Status Codes
The resource supports the following methods:
This POST method deploys a new application when the files you want to deploy are already on the Administration Server file system.
This resource launches a job to deploy the application.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
The request body must include a fully populated Application entity that describes the new application. Read only parameter values are ignored.
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 201 Created status code and a Location header with a link to the new application resource. If the job timed out, the method returns a 202 Accepted status code and a Location header with a link to the expected new application resource.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code, a link to the job resource, and a Location header with a link to the expected new application resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to deploy a new application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ name: 'BasicApp', deploymentPath: '/deployments/BasicApp/app/BasicApp.ear', targets: [ 'myserver' ] }" \ -X POST http://localhost:7001/management/wls/latest/deployments/application
Example Response
HTTP/1.1 201 Created Location: http://localhost:7001/management/wls/latest/deployments/application/id/BasicApp Response Body: { "messages": [{ "message": "Deployed the application 'BasicApp'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/0" }], "item": { "operation": "deploy", "status": "completed", "beginTime": 1390587114114, "endTime": 1390587115796, "name": "ADTR-0", "id": "0", "type": "deployment", "targets": [{ "errors": [], "status": "completed", "name": "myserver", "type": "server" }], "deploymentName": "BasicApp", "description": "[Deployer:149026]deploy application BasicApp on myserver." } }
This example uses the POST method to deploy a new application asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ name: 'fairShare', deploymentPath: '/deployments/fairShare.war' }" \ -X POST http://localhost:7001/management/wls/latest/deployments/application?__detached=true
Example Response
HTTP/1.1 202 Accepted Location: http://localhost:7001/management/wls/latest/deployments/application/id/fairShare Response Body: { "messages": [{ "message": "Deploying the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/31" }] }
This POST method deploys a new application when the files you want to deploy are not on the Administration Server file system. It uploads the files to deploy from the client's file system to the Administration Server file system and then deploys them.
Note: When using a multipart form to create, you need to:
Specify the file to deploy via the deployment
form element.
Specify the plan to deploy via the plan
form element.
Send in the rest of the template via the model
form element.
This resource launches a job to upload and deploy the application.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
The request body includes form data with a Content-Type header of multipart/form-data and the following form fields:
(Required) Specifies all the necessary information about the application to deploy except for the deployment archive and its corresponding deployment plan.
The Content-Disposition header must have its name parameter set to model
The Content-Type header must be application/json
and the content must be a JSON object containing an Application entity, excluding the deployment
and plan
fields.
(Required) Specifies the deployment archive to be uploaded.
The Content-Disposition header must have its name parameter set to deployment
and must have a filename parameter set to the file name you want the uploaded deployment archive to have on the server.
The Content-Type header must be application/octet-stream
and the content must be the deployment archive data.
(Optional) Specifies the deployment plan to be uploaded.
The Content-Disposition header must have its name parameter set to plan
and must have a filename parameter set to the file name you want the uploaded deployment plan to have on the server.
The Content-Type header must be application/octet-stream
and the content must be the deployment plan data.
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 201 Created status code and a Location header with a link to the new library resource. If the job timed out, the method returns a 202 Accepted status code and a Location header with a link to the expected new library resource.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code, a link to the job resource, and a Location header with a link to the expected new library resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to upload a deployment archive and deploy it as a new application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:multipart/form-data \ -F "model={ name: 'myapp', targets: [ 'myserver', 'Cluster-0' ] }" \ -F "deployment=@/deployments/MyApp/app/MyApp.ear" \ -X POST http://localhost:7001/management/wls/latest/deployments/application
Example Response
HTTP/1.1 100 Continue HTTP/1.1 201 Created Location: http://localhost:7001/management/wls/latest/deployments/application/id/myapp Response Body: { "messages": [{ "message": "Deployed the application 'myapp'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/27" }], "item": { "operation": "deploy", "status": "completed", "beginTime": 1390587191114, "endTime": 1390587192047, "name": "ADTR-27", "id": "27", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "myapp", "description": "[Deployer:149026]deploy application myapp on Cluster-0,myserver." } }
This resource manages an application.
The resource supports the following methods:
The DELETE method undeploys the application identified by the resource URL.
This resource launches a job to undeploy the application.
(optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the DELETE method to undeploy an application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X DELETE http://localhost:7001/management/wls/latest/deployments/application/id/BasicApp
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Undeployed the application 'BasicApp'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/2" }], "item": { "operation": "remove", "status": "completed", "beginTime": 1390587119309, "endTime": 1390587119588, "name": "ADTR-2", "id": "2", "type": "deployment", "targets": [{ "errors": [], "status": "completed", "name": "myserver", "type": "server" }], "deploymentName": "BasicApp", "description": "[Deployer:149026]remove application BasicApp on myserver." } }
This example uses the DELETE method to undeploy an application asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X DELETE http://localhost:7001/management/wls/latest/deployments/application/id/fairShare?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Undeploying the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/35" }] }
The GET method on this resource returns information about the application identified by the resource URL.
The response body returned includes an Application entity that contains information about the specified application.
This method can return the following links:
uri=/management/wls/{version}/deployments/application/id/{application-name}/bindables rel=bindables
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to display information about a specific application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/deployments/application/id/fairShare
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/redeploy", "title": "redeploy" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/update", "title": "update" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/start", "title": "start" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/stop", "title": "stop" }, { "rel": "bindables", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/fairShare\/bindables" } ], "item": { "name": "fairShare", "state": "active", "type": "application", "targets": [ "myserver", "Cluster-0" ], "servlets": [ { "servletName": "SimpleSlowServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] }, { "servletName": "SimpleFastServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] }, { "servletName": "JspServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] }, { "servletName": "FileServlet", "contextPath": "\/fairShare", "aggregateMetrics": { "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 }, "servletMetrics": [ { "serverName": "myserver", "executionTimeTotal": 0, "invocationTotalCount": 0, "reloadTotalCount": 0, "executionTimeHigh": 0, "executionTimeLow": 0 } ] } ], "displayName": "fairShare", "urls": [ "http:\/\/localhost:7001\/fairShare" ], "planPath": null, "applicationType": "war", "openSessionsCurrentCount": 0, "sessionsOpenedTotalCount": 0, "health": {"state": "ok"}, "deploymentPath": "\/deployments\/fairShare.war", "ejbs": [] } }
This resource manages the external resource references for an application.
The resource supports the following methods:
The GET method on this resource returns a listing of the external resource references for this application.
The response body returned includes an ApplicationBindables entity that contains information about external resource references for the specified application.
This method returns one of the Standard HTTP Status Codes
This example uses the GET request to display the bindables for an application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/deployments/application/id/MyApp/bindables
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/application\/id\/MyApp" }], "item": { "writeable": true, "bindables": [ { "name": "JNDIName", "jndiName": "gddsBean1", "path": [ { "name": "ApplicationDescriptor", "type": "DescriptorMBean" }, { "name": "gddsBean2", "type": "ResourceDescriptionBean" } ] }, { "name": "JNDIName", "jndiName": "gddsBean1", "path": [ { "name": "ApplicationDescriptor", "type": "DescriptorMBean" }, { "name": "gddsBean3", "type": "ResourceEnvDescriptionBean" } ] }, { "name": "JNDIName", "type": "ejb", "jndiName": "gddsBean1", "path": [ { "name": "ApplicationDescriptor", "type": "DescriptorMBean" }, { "name": "gddsBean1", "type": "EjbReferenceDescriptionBean" } ] }, { "name": "JNDIName", "jndiName": "gddsBean", "path": [ { "name": "mywar.war", "type": "AppDeploymentConfigurationModuleMBean" }, { "name": "WebAppDescriptor", "type": "DescriptorMBean" }, { "name": "gddsBean2", "type": "ResourceDescriptionBean" } ] }, { "name": "JNDIName", "jndiName": "gddsBean", "path": [ { "name": "mywar.war", "type": "AppDeploymentConfigurationModuleMBean" }, { "name": "WebAppDescriptor", "type": "DescriptorMBean" }, { "name": "gddsBean3", "type": "ResourceEnvDescriptionBean" } ] }, { "name": "JNDIName", "type": "ejb", "jndiName": "gddsBean", "path": [ { "name": "mywar.war", "type": "AppDeploymentConfigurationModuleMBean" }, { "name": "WebAppDescriptor", "type": "DescriptorMBean" }, { "name": "gddsBean1", "type": "EjbReferenceDescriptionBean" } ] } ] } }
The POST method updates external resource references for the application. The application must already have a deployment plan before you can call this method.
The request body must include a fully populated ApplicationBindables entity that describes the bindables for the application.
The response body returned contains a message stating that the application bindables were updated.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to update the bindables for an application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ 'bindables': [ { 'jndiName': 'JNDINAME1', 'name': 'JNDIName', 'type': 'Ejb', 'path': [ { 'name': 'ApplicationDescriptor', 'type': 'DescriptorMBean' }, { 'name': 'gddsBean1', 'type': 'EjbReferenceDescriptionBean' } ] }, { 'jndiName': 'JNDINAME2', 'name': 'JNDIName', 'type': 'JmsConnectionFactory', 'path': [ { 'name': 'ApplicationDescriptor', 'type': 'DescriptorMBean' }, { 'name': 'gddsBean2', 'type': 'ResourceDescriptionBean' } ] }, { 'jndiName': 'JNDINAME3', 'name': 'JNDIName', 'type': 'Resource Adapter', 'path': [ { 'name': 'ApplicationDescriptor', 'type': 'DescriptorMBean' }, { 'name': 'gddsBean3', 'type': 'ResourceEnvDescriptionBean' } ] }, { 'jndiName': 'JNDINAME4', 'name': 'JNDIName', 'type': 'JmsConnectionFactory', 'path': [ { 'name': 'mywar.war', 'type': 'AppDeploymentConfigurationModuleMBean' }, { 'name': 'WebAppDescriptor', 'type': 'DescriptorMBean' }, { 'type': 'WeblogicWebAppBean' }, { 'name': 'gddsBean2', 'type': 'ResourceDescriptionBean' } ] }, { 'jndiName': 'JNDINAME5', 'name': 'JNDIName', 'type': 'Resource Adapter', 'path': [ { 'name': 'mywar.war', 'type': 'AppDeploymentConfigurationModuleMBean' }, { 'name': 'WebAppDescriptor', 'type': 'DescriptorMBean' }, { 'type': 'WeblogicWebAppBean' }, { 'name': 'gddsBean3', 'type': 'ResourceEnvDescriptionBean' } ] }, { 'jndiName': 'JNDINAME6', 'name': 'JNDIName', 'type': 'Ejb', 'path': [ { 'name': 'mywar.war', 'type': 'AppDeploymentConfigurationModuleMBean' }, { 'name': 'WebAppDescriptor', 'type': 'DescriptorMBean' }, { 'type': 'WeblogicWebAppBean' }, { 'name': 'gddsBean1', 'type': 'EjbReferenceDescriptionBean' } ] } ] }" \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/MyApp/bindables
Example Response
HTTP/1.1 100 Continue HTTP/1.1 200 OK Response Body: {"messages": [{ "message": "Successfully updated 'MyApp'.", "severity": "SUCCESS" }]}
This resource redeploys an application.
The resource supports the following methods:
The resource supports the following methods:
This POST method redeploys the application identified by the resource URL. Use this method when the file to redeploy is already on the Administration Server file system. For example, you've physically replaced the file that the deployment refers to, and you want the deployment to start using the new file.
You should invoke this method after you have updated the underlying deployment archive or exploded directory.
This resource launches a job to redeploy the application.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to redeploy the specified application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/fairShare/redeploy
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Redeployed the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/25" }], "item": { "operation": "redeploy", "status": "completed", "beginTime": 1390587186018, "endTime": 1390587186120, "name": "ADTR-25", "id": "25", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "fairShare", "description": "[Deployer:149026]redeploy application fairShare on Cluster-0,myserver." } }
This example uses the POST method to redeploy the specified application asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/fairShare/redeploy?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Redeploying the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/34" }] }
This POST method uploads and redeploys the application. Use this method when the file to redeploy exists on the client's file system. It uploads the file to the Administration Server and then signals the deployment to start using it.
This resource launches a job to upload and redeploy the application.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
The request body includes form data with a Content-Type header of multipart/form-data and the following form fields:
(Required) Specifies the application to redeploy.
The Content-Disposition header must have its name parameter set to deployment
and must have a filename parameter set to the file name you want the deployment archive to have on the server.
The Content-Type header must be application/octet-stream
and the content must be the deployment archive data.
(Optional) Specifies the new deployment plan for the application.
The Content-Disposition header must have its name parameter set to plan
and must have a filename parameter set to the file name you want the deployment plan to have on the server.
The Content-Type header must be application/octet-stream
and the content must be the deployment plan data.
(Optional) Specifies the archive version, as a String.
The Content-Disposition header must have its name parameter set to archiveVersion
The Content-Type header must be text/plain
(Optional) Specifies the plan version, as a String.
The Content-Disposition header must have its name parameter set to planVersion
The Content-Type header must be text/plain
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to upload an archive and redeploy it as an application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:multipart/form-data \ -F "deployment=@/deployments/fairShare.war" \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/myapp/redeploy
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Redeployed the application 'myapp'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/29" }], "item": { "operation": "deploy", "status": "completed", "beginTime": 1390587195811, "endTime": 1390587196066, "name": "ADTR-29", "id": "29", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "myapp", "description": "[Deployer:149026]deploy application myapp on Cluster-0,myserver." } }
This example uses the POST method to upload an archive and redeploy it as an application asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:multipart/form-data \ -F "deployment=@/deployments/fairShare.war" \ -X POST http://localhost:7001/management/wls/latest/deployments/library/id/airline/redeploy?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Redeploying the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/13" }] }
This resource starts an application.
The resource supports the following methods:
The POST method starts the application identified by the resource URL.
This resource launches a job to start the application.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to start an application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/fairShare/start
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Started the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/24" }], "item": { "operation": "start", "status": "completed", "beginTime": 1390587183386, "endTime": 1390587183443, "name": "ADTR-24", "id": "24", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "fairShare", "description": "[Deployer:149026]start application fairShare on Cluster-0,myserver." } }
This example uses the POST method to start an application asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/fairShare/start?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Starting the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/33" }] }
This resource stops an application.
The resource supports the following methods:
The POST method stops the application identified by the resource URL.
This resource launches a job to stop the application.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to stop an application.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/fairShare/stop
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Stopped the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/23" }], "item": { "operation": "stop", "status": "completed", "beginTime": 1390587180998, "endTime": 1390587181033, "name": "ADTR-23", "id": "23", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "fairShare", "description": "[Deployer:149026]stop application fairShare on Cluster-0,myserver." } }
This example uses the POST method to stop an application asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/fairShare/stop?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Stopping the application 'fairShare'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/32" }] }
This resource updates an application. Use this resource when you want to update the dynamic elements in a deployment plan without redeploying the application; no sessions will be lost. Use the redeploy resource to update the actual deployment. It will also update all changes in a deployment plan, but sessions will be lost.
The resource supports the following methods:
The POST method updates the application identified by the resource URL. You should invoke this method after you have updated the underlying deployment plan.
This resource launches a job to update the application.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to update an application with deployment plan changes.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/deployments/application/id/BasicApp/update
Example Response
HTTP/1.1 400 Bad Request Response Body: { "messages": [{ "message": "Failed to update the application 'BasicApp'.", "severity": "FAILURE" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/37" }], "item": { "operation": "update", "error": "\n The application BasicApp cannot have the resource \/deployments\/BasicApp\/plan\/Plan.xml updated dynamically. Either:\n1.) The resource does not exist. \n or \n2) The resource cannot be changed dynamically. \nPlease ensure the resource uri is correct, and redeploy the entire application for this change to take effect.", "status": "failed", "beginTime": 1390587229032, "endTime": 1390587229322, "name": "ADTR-37", "id": "37", "type": "deployment", "targets": [{ "errors": ["\n The application BasicApp cannot have the resource \/deployments\/BasicApp\/plan\/Plan.xml updated dynamically. Either:\n1.) The resource does not exist. \n or \n2) The resource cannot be changed dynamically. \nPlease ensure the resource uri is correct, and redeploy the entire application for this change to take effect."], "status": "failed", "name": "myserver", "type": "server" }], "deploymentName": "BasicApp", "description": "[Deployer:149026]update application BasicApp on myserver." } }
This resource inspects a deployment (archive or exploded directory) and returns information about it. This is useful for finding out information about the deployment before it has been deployed, for example, whether it's a library or an application.
The resource supports the following methods:
The OPTIONS method on this resource returns a template entity that has been pre-populated with default values.
If you want to inspect a deployment, call this method to get the template, fill in the values, such as the deploymentPath, then use it in the POST method to inspect the deployment.
The response body returned includes a DeploymentReference template entity that can be customized and then used to inspect the deployment.
This method returns one of the Standard HTTP Status Codes
This example uses the OPTIONS method to obtain a template for deployment inspection.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X OPTIONS http://localhost:7001/management/wls/latest/deployments/inspect
Example Response
HTTP/1.1 200 OK Response Body: {"item": { "planPath": null, "deploymentPath": null }}
The POST method on this resource examines a deployment and returns information about it.
The request body must include a fully populated DeploymentReference entity. Read only parameter values are ignored.
The response body returned includes a DeploymentDescription entity.
This method returns one of the Standard HTTP Status Codes
This example uses the POST method to inspect a library prior to deployment.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ deploymentPath: '/deployments/aquarium_sv2_ivfab.ear' }" \ -X POST http://localhost:7001/management/wls/latest/deployments/inspect
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments" }], "item": { "deploymentType": "library", "name": "aquarium_sv2_ivfab", "specVersion": "2.0", "implVersion": "fabulous", "deploymentPath": "\/deployments\/aquarium_sv2_ivfab.ear" } }
This resource manages the libraries that are deployed in this WLS domain.
The resource supports the following methods:
The GET method on this resource returns a listing of all the libraries in this WLS domain.
The response body returned includes a collection of Library entities. It also contains links to their corresponding resources.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to return a summary of all libraries.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/deployments/library
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/library\/id\/airline", "title": "airline" } ], "items": [{ "name": "airline", "state": "active", "type": "library", "targets": ["myserver"], "displayName": "airline", "deploymentPath": "\/deployments\/airline.war" }] }
The OPTIONS method on this resource returns a template entity that has been pre-populated with default values.
If you want to deploy a library, call this method to get the template, fill in values, such as the path to the library, then use it in the POST method to deploy the library.
The response body returned includes a Library template entity that can be customized and then used to deploy the library.
This method returns one of the Standard HTTP Status Codes
This example uses the OPTIONS method to obtain a template for a library deployment.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X OPTIONS http://localhost:7001/management/wls/latest/deployments/library
Example Response
HTTP/1.1 200 OK Response Body: {"item": { "name": null, "state": null, "type": "library", "targets": null, "displayName": null, "specVersion": null, "implVersion": null, "deploymentPath": null, "referencingApplications": null, "referencingLibraries": null }}
The resource supports the following methods:
This POST method deploys a new library.
This resource launches a job to deploy the library.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
The request body must include a fully populated Library entity that describes the new library. Read only parameter values are ignored.
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 201 Created status code and a Location header with a link to the new library resource. If the job timed out, the method returns a 202 Accepted status code and a Location header with a link to the expected new library resource.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code, a link to the job resource, and a Location header with a link to the expected new library resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to deploy a new library.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ name: 'airline', deploymentPath: '/deployments/airline.war', targets: [ 'myserver', 'Cluster-0' ] }" \ -X POST http://localhost:7001/management/wls/latest/deployments/library
Example Response
HTTP/1.1 201 Created Location: http://localhost:7001/management/wls/latest/deployments/library/id/airline Response Body: { "messages": [{ "message": "Deployed the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/1" }], "item": { "operation": "deploy", "status": "completed", "beginTime": 1390587116296, "endTime": 1390587116676, "name": "ADTR-1", "id": "1", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "airline", "description": "[Deployer:149117]deploy library airline on Cluster-0,myserver." } }
This example uses the POST method to deploy a new library asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ name: 'airline', deploymentPath: '/deployments/airline.war', targets: [ 'myserver', 'Cluster-0' ] }" \ -X POST http://localhost:7001/management/wls/latest/deployments/library
Example Response
HTTP/1.1 201 Created Location: http://localhost:7001/management/wls/latest/deployments/library/id/airline Response Body: { "messages": [{ "message": "Deployed the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/1" }], "item": { "operation": "deploy", "status": "completed", "beginTime": 1390587116296, "endTime": 1390587116676, "name": "ADTR-1", "id": "1", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "airline", "description": "[Deployer:149117]deploy library airline on Cluster-0,myserver." } }
This POST method uploads and deploys a new library.
Note: When using a multipart form to create, you need to:
Specify the file to deploy via the deployment
form element.
Send in the rest of the template via the model
form element.
This resource launches a job to upload and deploy the library.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
The request body includes form data with a Content-Type header of multipart/form-data and the following form fields:
(Required) Specifies all the necessary information about the library to deploy.
The Content-Disposition header must have its name parameter set to model
The Content-Type header must be application/json
and the content must be a JSON object containing a Library entity excluding the deployment
field.
(Required) Specifies the library to be deployed.
The Content-Disposition header must have its name parameter set to deployment
and must have a filename parameter set to the file name you want the library to have on the server.
The Content-Type header must be application/octet-stream
and the content must be the library data.
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 201 Created status code and a Location header with a link to the new library resource. If the job timed out, the method returns a 202 Accepted status code and a Location header with a link to the expected new library resource.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code, a link to the job resource, and a Location header with a link to the expected new library resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to upload a deployment archive and deploy it as a new library.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:multipart/form-data \ -F "model={ name: 'airline', targets: [ 'myserver' ] }" \ -F "deployment=@/deployments/airline.war" \ -X POST http://localhost:7001/management/wls/latest/deployments/library
Example Response
HTTP/1.1 201 Created Location: http://localhost:7001/management/wls/latest/deployments/library/id/airline Response Body: { "messages": [{ "message": "Deployed the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/7" }], "item": { "operation": "deploy", "status": "completed", "beginTime": 1390587130807, "endTime": 1390587131056, "name": "ADTR-7", "id": "7", "type": "deployment", "targets": [{ "errors": [], "status": "completed", "name": "myserver", "type": "server" }], "deploymentName": "airline", "description": "[Deployer:149117]deploy library airline on myserver." } }
This example uses the POST method to upload a deployment archive and deploy it asynchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:multipart/form-data \ -F "model={ name: 'airline', targets: [ 'myserver' ] }" \ -F "deployment=@/deployments/airline.war" \ -X POST http://localhost:7001/management/wls/latest/deployments/library?__detached=true
Example Response
HTTP/1.1 202 Accepted Location: http://localhost:7001/management/wls/latest/deployments/library/id/airline Response Body: { "messages": [{ "message": "Deploying the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/11" }] }
This resource manages a library.
The resource supports the following methods:
The DELETE method undeploys the library identified by the resource URL.
This resource launches a job to undeploy the library.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the DELETE method to undeploy a library.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X DELETE http://localhost:7001/management/wls/latest/deployments/library/id/airline
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Undeployed the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/3" }], "item": { "operation": "remove", "status": "completed", "beginTime": 1390587121460, "endTime": 1390587121632, "name": "ADTR-3", "id": "3", "type": "deployment", "targets": [ { "errors": [], "status": "completed", "name": "Cluster-0", "type": "cluster" }, { "errors": [], "status": "completed", "name": "myserver", "type": "server" } ], "deploymentName": "airline", "description": "[Deployer:149117]remove library airline on Cluster-0,myserver." } }
The GET method on this resource returns information about the library identified by the resource URL.
The response body returned includes a Library entity that contains information about the specified library.
This method can return the following links:
uri=/management/wls/{version}/deployments/library/id/{library-name}/undeploy rel=undeploy
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to find information about a specific library.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/deployments/library/id/airline
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/library" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/deployments\/library\/id\/airline\/redeploy", "title": "redeploy" } ], "item": { "name": "airline", "state": "active", "type": "library", "targets": ["myserver"], "displayName": "airline", "deploymentPath": "\/deployments\/airline.war" } }
This resource redeploys a library.
The resource supports the following methods:
This POST method uploads and redeploys the library identified by the resource URL. You should invoke this method after you have updated the underlying deployment archive or exploded directory.
This resource launches a job to upload and redeploy the library.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
The request body includes form data with a Content-Type header of multipart/form-data and the following form field:
(Required) Specifies the library to be redeployed.
The Content-Disposition header must have its name parameter set to deployment
and must have a filename parameter set to the file name you want the library to have on the server.
The Content-Type header must be application/octet-stream
and the content must be the library data.
If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.
This example uses the POST method to upload an archive and redeploy it as a library.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:multipart/form-data \ -F "deployment=@/deployments/fairShare.war" \ -X POST http://localhost:7001/management/wls/latest/deployments/library/id/airline/redeploy
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Redeployed the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/9" }], "item": { "operation": "deploy", "status": "completed", "beginTime": 1390587135085, "endTime": 1390587135333, "name": "ADTR-9", "id": "9", "type": "deployment", "targets": [{ "errors": [], "status": "completed", "name": "myserver", "type": "server" }], "deploymentName": "airline", "description": "[Deployer:149117]deploy library airline on myserver." } }
This example uses the POST method to upload an archive and redeploy it as a library.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:multipart/form-data \ -F "deployment=@/deployments/fairShare.war" \ -X POST http://localhost:7001/management/wls/latest/deployments/library/id/airline/redeploy?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Redeploying the library 'airline'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/13" }] }
This resource lists the jobs running in this WLS domain.
The resource supports the following methods:
The GET method on this resource returns a listing of all the jobs in this WLS domain.
The response body returned includes a collection of Job entities. It also contains links to their corresponding resources.
This method can return the following links:
uri=/management/wls/{version}/jobs/deployment rel=deployment
uri=/management/wls/{version}/jobs/server rel=server
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to obtain information about all jobs.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/jobs
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest" }, { "rel": "server", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server" }, { "rel": "deployment", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment" }, { "rel": "items.id", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_0_start", "title": "Cluster-0-Server-1:_0_start" } ], "items": [{ "status": "completed", "beginTime": 1390586983126, "endTime": 1390586998781, "name": "_0_start", "id": "Cluster-0-Server-1:_0_start", "type": "server", "description": "Starting Cluster-0-Server-1 server ..." }] }
This resource returns information about all deployment-related jobs.
The resource supports the following methods:
The GET method on this resource returns information about each job that is related to a deployment operation.
The response body returned includes a DeploymentJob entity.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to obtain information about all deployment jobs.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/jobs/deployment
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment" }], "items": [{ "operation": "deploy", "status": "in progress", "beginTime": 1390587139546, "name": "ADTR-11", "id": "11", "type": "deployment", "targets": [{ "errors": [], "status": "in progress", "name": "myserver", "type": "server" }], "deploymentName": "airline", "description": "[Deployer:149117]deploy library airline on myserver." }] }
This resource returns information about a deployment-related job.
The resource supports the following methods:
The GET method on this resource returns information about the deployment-related job identified by the resource URL.
The response body returned includes a DeploymentJob entity that contains information about the specified deployment-related job.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to obtain information about a deployment job.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/jobs/deployment/id/11
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment" }], "item": { "operation": "deploy", "status": "in progress", "beginTime": 1390587139546, "name": "ADTR-11", "id": "11", "type": "deployment", "targets": [{ "errors": [], "status": "in progress", "name": "myserver", "type": "server" }], "deploymentName": "airline", "description": "[Deployer:149117]deploy library airline on myserver." } }
This resource returns information about all server lifecycle jobs.
The resource supports the following methods:
The GET method on this resource returns information about each job that is related to a server lifecycle operation.
The response body returned includes a ServerJob entity.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to obtain information about all server lifecycle jobs.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/jobs/server
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs" }, { "rel": "server", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_0_start", "title": "Cluster-0-Server-1:_0_start" } ], "items": [{ "operation": "start", "status": "completed", "beginTime": 1390586983126, "endTime": 1390586998781, "name": "_0_start", "id": "Cluster-0-Server-1:_0_start", "type": "server", "description": "Starting Cluster-0-Server-1 server ...", "serverName": "Cluster-0-Server-1" }] }
This resource returns information about a server lifecycle job.
The resource supports the following methods:
The GET method on this resource returns information about a specific server lifecycle job identified by the resource URL.
The response body returned includes a ServerJob entity.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to obtain information about a server lifecycle job.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/jobs/server/id/Cluster-0-Server-1:_8_start
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server" }], "item": { "operation": "start", "status": "in progress", "beginTime": 1390587038967, "name": "_8_start", "id": "Cluster-0-Server-1:_8_start", "type": "server", "description": "Starting Cluster-0-Server-1 server ...", "serverName": "Cluster-0-Server-1" } }
This resource enumerates the servers in a WLS domain and provides summary metrics and state for each server.
The resource supports the following methods:
The GET method on this resource returns a listing of this domain's servers.
This method supports optional query parameters which can be used to constrain the fields included in the response. Constraining the fields to only the information that you require may yield faster response times when interacting with large data sets.
(Optional) Specifies that these values are not required and may be omitted in a response.
(Optional) Specifies that these values are required and must be included in the response.
Include and exclude are mutually exclusive, and if neither is specified all available information is included.
The response body returned includes a collection of Server entities. It also contains links to their corresponding resources.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to return a list of all servers in this domain.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/servers
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/myserver", "title": "myserver" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1", "title": "Cluster-0-Server-1" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-2", "title": "Cluster-0-Server-2" } ], "items": [ { "name": "myserver", "state": "running", "heapFreeCurrent": 136785464, "heapSizeCurrent": 423231488, "activeHttpSessionCount": 0, "activeThreadCount": 5, "health": {"state": "ok"}, "usedPhysicalMemory": 3502743552, "jvmProcessorLoad": 0 }, { "name": "Cluster-0-Server-1", "state": "shutdown" }, { "name": "Cluster-0-Server-2", "state": "shutdown" } ] }
This resource gets information about a specific server.
The resource supports the following methods:
The GET method on this resource returns information about the server identified by the resource URL.
The response body returned includes a Server entity that contains information about the specified server.
This method can return the following links:
uri=/management/wls/{version}/servers/id/{server-name}/logs rel=logs
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to obtain information about a specific server.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers" }, { "rel": "logs", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/logs" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/start", "title": "start" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/restart", "title": "restart" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/suspend", "title": "suspend" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/resume", "title": "resume" }, { "rel": "action", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/shutdown", "title": "shutdown" } ], "item": { "name": "Cluster-0-Server-1", "state": "running", "heapFreeCurrent": 231060176, "heapSizeCurrent": 320798720, "activeHttpSessionCount": 0, "activeThreadCount": 6, "health": {"state": "ok"}, "usedPhysicalMemory": 3925577728, "jvmProcessorLoad": 0 } }
This resource returns a list of logs which are maintained for this server.
The resource supports the following methods:
The GET method on this resource returns the server's log file list.
The response body returned includes a collection of LogReference entities. It also contains links to their corresponding resources.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to find all of the available logs for a server.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/logs
Example Response
HTTP/1.1 200 OK Response Body: { "links": [ { "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/logs\/id\/HTTPAccessLog", "title": "HTTPAccessLog" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/logs\/id\/DataSourceLog", "title": "DataSourceLog" }, { "rel": "items.name", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/logs\/id\/ServerLog", "title": "ServerLog" } ], "items": [ {"name": "HTTPAccessLog"}, {"name": "DataSourceLog"}, {"name": "ServerLog"} ] }
This resource displays the entries in a server's log.
The resource supports the following methods:
The GET method on this resource returns the server's log.
This method supports the following query parameters which can be used to filter and qualify the results included in the response.
(Optional) Specifies the maximum number of entries to return.
If maxResults is not specified, or is less than one, then all of the entries in the log are returned. Otherwise, only maxResults entries are returned. If there are more than maxResults matching entries, the last maxResults entries (based on the order of the entries in the underlying log) are returned.
(Optional) Specifies the earliest log entry to return. Note that you need to encode the query parameter to turn it into a valid URL; a space becomes %20, a '/' (forward slash) becomes %2F, and a ':' (colon) becomes %3A. For example, management/wls/latest/servers/id/myserver/logs/id/mylog?startTime=11/21/14 12:06:53
would become management/wls/latest/servers/id/myserver/logs/id/mylog?startTime=11%2F21%2F14%2012%3A06%3A53
(Optional) Specifies the latest log entry to return. Note that you need to encode the query parameter to turn it into a valid URL; a space becomes %20, a '/' (forward slash) becomes %2F, and a ':' (colon) becomes %3A. For example, management/wls/latest/servers/id/myserver/logs/id/mylog?endTime=11/21/14 02:23:15
would become management/wls/latest/servers/id/myserver/logs/id/mylog?endTime=11%2F21%2F14%2002%3A23%3A15
(Optional) Specifies a WebLogic Diagnostics Framework (WLDF) query expression which can be used to further filter and qualify the log entries returned. (olink:WLDFC316)
The response body returned includes a collection of LogEntry entities. The entities are in the same order as the corresponding entries in the underlying log.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to return the last five entries in the server log.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/logs/id/ServerLog?maxResults=5
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/servers\/id\/Cluster-0-Server-1\/logs" }], "items": [ { "timeStamp": "01\/24\/14 13:09:58 604", "message": "The server \"myserver\" connected to this server.", "severity": "Info", "subSystem": "Server", "userId": "WLS Kernel", "contextId": "", "recordId": "90", "msgId": "BEA-002635" }, { "timeStamp": "01\/24\/14 13:09:58 613", "message": "Starting \"async\" replication service with remote cluster address \"null\"", "severity": "Notice", "subSystem": "Cluster", "userId": "WLS Kernel", "contextId": "", "recordId": "91", "msgId": "BEA-000162" }, { "timeStamp": "01\/24\/14 13:09:58 670", "message": "The server started in RUNNING mode.", "severity": "Notice", "subSystem": "WebLogicServer", "userId": "WLS Kernel", "contextId": "", "recordId": "92", "msgId": "BEA-000360" }, { "timeStamp": "01\/24\/14 13:09:59 507", "message": "Server state changed to RUNNING.", "severity": "Notice", "subSystem": "WebLogicServer", "userId": "WLS Kernel", "contextId": "", "recordId": "93", "msgId": "BEA-000365" }, { "timeStamp": "01\/24\/14 13:09:59 512", "message": "Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.", "severity": "Info", "subSystem": "org.hibernate.validator.engine.resolver.DefaultTraversableResolver", "userId": "WLS Kernel", "contextId": "", "recordId": "94", "msgId": "BEA-000000" } ] }
This resource restarts a specific server.
The resource supports the following methods:
The POST method restarts the server identified by the resource URL.
This resource launches a job to restart the server.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a ServerJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a ServerJob entity.
This example uses the POST method to restart a server synchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/restart
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Restarted the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_4_start" }], "item": { "operation": "start", "status": "completed", "beginTime": 1390587009914, "endTime": 1390587022047, "name": "_4_start", "id": "Cluster-0-Server-1:_4_start", "type": "server", "description": "Starting Cluster-0-Server-1 server ...", "serverName": "Cluster-0-Server-1" } }
This example uses the POST method to restart a server in detached mode.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/restart?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Restarting the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_12_start" }] }
This resource resumes a server.
The resource supports the following methods:
The POST method resumes the server instance that is suspended or in the ADMIN state.
This resource launches a job to restart the server.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a ServerJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a ServerJob entity.
This example uses the POST method to resume a server synchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/resume
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Resumed the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_2_resume" }], "item": { "operation": "resume", "status": "completed", "beginTime": 1390587004735, "endTime": 1390587004747, "name": "_2_resume", "id": "Cluster-0-Server-1:_2_resume", "type": "server", "description": "Resuming Cluster-0-Server-1 server ...", "serverName": "Cluster-0-Server-1" } }
This example uses the POST method to resume a server in detached mode.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/resume?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Resuming the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_10_resume" }] }
This resource performs a graceful shut down on a specific server.
The resource supports the following methods:
The POST method shuts down the server identified by the resource URL.
This resource launches a job to shut down the server.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
(Optional) Specifies whether to gracefully shut down the server (false, the default) or force shut down of the server (true).
If the method was invoked synchronously and successfully launched the job, the response body includes a ServerJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a ServerJob entity.
This example uses the POST method to shut down a server synchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/shutdown
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Shutdown the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_7_shutdown" }], "item": { "operation": "shutdown", "status": "completed", "beginTime": 1390587036811, "endTime": 1390587036940, "name": "_7_shutdown", "id": "Cluster-0-Server-1:_7_shutdown", "type": "server", "description": "Shutting down Cluster-0-Server-1 server ...", "serverName": "Cluster-0-Server-1" } }
This example uses the POST method to shut down a server in detached mode.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/shutdown?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Shutting down the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_11_shutdown" }] }
This resource starts a specific server.
The resource supports the following methods:
The POST method starts the server identified by the resource URL.
This resource launches a job to start the server.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a ServerJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a ServerJob entity.
This example uses the POST method to start a server synchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/start
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Started the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_0_start" }], "item": { "operation": "start", "status": "completed", "beginTime": 1390586983126, "endTime": 1390586998781, "name": "_0_start", "id": "Cluster-0-Server-1:_0_start", "type": "server", "description": "Starting Cluster-0-Server-1 server ...", "serverName": "Cluster-0-Server-1" } }
This example uses the POST method to start a server in detached mode.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/start?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Starting the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_8_start" }] }
This resource suspends a server.
The resource supports the following methods:
The POST method moves the server identified by the resource URL from the RUNNING state to the ADMIN state.
This resource launches a job to suspend the server.
(Optional) Specifies whether this method runs in detached (background) mode or synchronously.
If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).
If the method was invoked synchronously and successfully launched the job, the response body includes a ServerJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.
If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.
If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a ServerJob entity.
This example uses the POST method to suspend a server synchronously.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/suspend
Example Response
HTTP/1.1 200 OK Response Body: { "messages": [{ "message": "Suspended the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_1_suspendWithTimeout" }], "item": { "operation": "suspending", "status": "completed", "beginTime": 1390587002462, "endTime": 1390587002489, "name": "_1_suspendWithTimeout", "id": "Cluster-0-Server-1:_1_suspendWithTimeout", "type": "server", "description": "suspending Cluster-0-Server-1 server ...", "serverName": "Cluster-0-Server-1" } }
This example uses the POST method to suspend a server in detached mode.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X POST http://localhost:7001/management/wls/latest/servers/id/Cluster-0-Server-1/suspend?__detached=true
Example Response
HTTP/1.1 202 Accepted Response Body: { "messages": [{ "message": "Suspending the server 'Cluster-0-Server-1'.", "severity": "SUCCESS" }], "links": [{ "rel": "job", "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/server\/id\/Cluster-0-Server-1:_9_suspendWithTimeout" }] }
This resource lists all servers and clusters in this WLS domain.
The resource supports the following methods:
The GET method on this resource returns all servers and clusters in this WLS domain.
The response body contains a collection of Target entities.
This method returns one of the Standard HTTP Status Codes
This example uses the GET method to return a list of all targets in this domain.
Example Request
curl -v \ --user username:password \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -X GET http://localhost:7001/management/wls/latest/targets
Example Response
HTTP/1.1 200 OK Response Body: { "links": [{ "rel": "parent", "uri": "http:\/\/localhost:7001\/management\/wls\/latest" }], "items": [ { "name": "myserver", "type": "server" }, { "name": "Cluster-0", "type": "cluster" } ] }