Send Requests
Use the following guidelines when sending requests using the Oracle WebLogic Server REST APIs.
URL Structure
Here's the URL structure for the requests:
http://<host>:<port>/management/weblogic/<version>/<resource-path>
-
<host>:<port>
are the host and port where WebLogic Server is running. For example,localhost:7001
. -
management
is the context root for all resources. -
<version>
is the WebLogic REST object version.latest
is used to indicate that the object is the latest version. -
<resource-path>
is the relative path that identifies the resource with which to interact. Optionally, append the action to perform on that resource. For example, use the following REST endpoint to start a server:management/weblogic/<version>/domainRuntime/serverRuntimes/<serverName>/start
Supported Methods
Perform basic CRUD operations (create, read, update, and delete) on a resource by using standard HTTP method requests, as summarized in the following table.
HTTP Method | Description |
GET |
Retrieve information about WebLogic Server resources. |
POST |
Create, update, or modify WebLogic Server resources. |
OPTIONS |
Retrieve information about the options and requirements for WebLogic Server resources. |
DELETE |
Delete WebLogic Server resources. |
Media Types
WebLogic Server REST APIs use media type application/json
for all request and response bodies.
Supported Headers
The following table describes the standard headers that clients should use to send WebLogic Server REST requests.
Header | Description |
Accept:application/json |
Indicates that the client wants the response to contain JSON. This header is used when invoking the GET, POST, and DELETE methods. |
Content-Type:application/json |
Indicates that the client is sending in a request containing JSON. This header is required for the POST method. Other supported content types (for example, when uploading deployments) and when they are supported are specified in the examples. |
X-Requested-By:MyClient |
Used to protect against Cross-Site Request Forgery (CSRF) attacks via REST. This header is mandatory for the POST and DELETE methods and ignored for the OPTIONS and GET methods. |