15.1 Configuring REST Service Using ORDS
Oracle Trace File Analyzer includes REST support allowing invocation and query over HTTPS.
tfactl rest Command-Line Options to Configure REST Service
Syntax
To facilitate this REST support Oracle REST Data Services (ORDS) is included within the installation.
tfactl rest [-status|-start|-stop|] [-dir dir] [-port port] [-user user] [-debug [-level]]
Note:
You can run the REST command only as root
user.
Parameters
Table 15-1 REST Command Parameters
Parameter | Description |
---|---|
|
Prints the current status. |
|
Starts Oracle Trace File Analyzer REST services if not already running. |
|
Stops Oracle Trace File Analyzer REST services if running. |
|
Specify the directory to use to store the Oracle Trace File Analyzer REST configuration details. Defaults to the users home directory. |
|
Specify the port to run ORDS on. Defaults to 9090. |
|
Specify the user to run ORDS. Defaults to the GRID owner. |
|
Enables debug. |
|
The level of debug to use, where available levels are:
|
https://host:port/ords/api
https://host:port/ords/tfactl/print/status
REST Authentication
Oracle Trace File Analyzer REST uses first-party cookie-based authentication (basic authentication).
The Oracle Trace File Analyzer REST application is able to authenticate and authorize itself to the RESTful API using the same cookie session that the web application is using. The first party application has full access to the RESTful API.
During start-up Oracle Trace File Analyzer prompts you for the password for the
tfaadmin
and tfarest
users.
-
Use
tfarest
user for REST calls -
Use
tfaadmin
for making REST calls and to manage the REST service, for example, changing the logging level
# tfactl rest -start
Configuring TFA REST Services using ORDS :
This might take couple of minutes. Please be patient.
Adding Dependency Jars to ORDS
Adding users to ORDS :
Enter a password for user tfaadmin:
Confirm password for user tfaadmin:
Enter a password for user tfarest:
Confirm password for user tfarest:
Starting TFA REST Services
Successfully started TFA REST Services [PID : 32650]
URL : https://myserver:9090/ords/tfactl/print/status
https://host_name:9090/ords/tfactl/print/status
You are presented with a 401 message, which includes a sign in link. Click the link, sign in with tfarest
credentials you just created, and you will be directed to REST output.
Alternatively, you can also specify the credentials in a curl
command.
# curl -k --user tfarest:mypassword https://myserver:9090/ords/tfactl/print/status
[ {
"status" : "CheckOK",
"hostname" : "myserver",
"pid" : 2430,
"port" : 5000,
"version" : "latest-version",
"buildId" : "latest-build-ID",
"inventoryStatus" : "COMPLETE"
} ]
Parent topic: Using REST Service