Send Requests

Use the following guidelines when sending requests using the REST API for Oracle Enterprise Manager.

URL Structure

Access the Oracle Enterprise Manager REST resources using the following URL structure:
https://<subdomain>.<domain>.com:<port>/<resource-path>
Where:
  • <subdomain.domain>.com:<port> is the REST endpoint URL of the site in which you want to manage Enterprise Manager resources.

  • <resource-path> Relative path that defines the resource.

Note: The example REST API request URLs use EM_CONSOLE_HTTPS_PORT as the port placeholder. You can map the port for EM_CONSOLE_HTTPS_PORT from your emgc.properties file or by running the emctl status oms -details command and viewing the HTTPS Console Port line in the output.

Supported Methods

You can perform basic CRUD operations (create, read, update, and delete) using standard HTTP method requests, as summarized in the following table.

HTTP Method Description
GET Retrieve information about Oracle Enterprise Manager resources such as targets or target types.
HEAD Retrieve header information about Oracle Enterprise Manager.
PATCH Update specific attributes of Oracle Enterprise Manager resources.
POST Create or update resources for Oracle Enterprise Manager such as entities or entity Types.
PUT Typically used to replace existing Oracle Enterprise Manager resources. This method updates all (or most user-controllable) attributes of a resource.

Media Types

The following media types are supported by the REST API for Oracle Enterprise Manager:

  • application/json

Supported Headers

The REST API for Oracle Enterprise Manager supports the following headers that may be passed in the header section of the HTTP request or response.

Header Description Example
Accept-Encoding List of acceptable encodings to support compression. Accept-Encoding: gzip
Content-Encoding List of acceptable encodings to support compression. Content-Encoding: deflate
Content-Type Media type of the body of the request. Required for POST and PUT requests. Content-Type: application/json