Individual REST Services
Individual REST Services have the following services:
- Fetch Instance-Level Statistics
- Fetch Workspace-Level Statistics
- Application-Level Statistics
- Instance Overview
- REST Service Version Information
Parent topic: Using REST Administration Interface API
Fetch Instance-Level Statistics
This service returns usage statistics for the whole Oracle Application Express instance.
HTTP Request Syntax Parameter
Table 39-2 HTTP Request Syntax
Parameter | Description |
---|---|
HTTP Method |
|
URL |
|
HTTP Request Headers |
|
Returns
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 1809074264671554,
"workspace_name": "SOMEWORKSPACE",
"workspace_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/workspace/someworkspace"
},
"application_id": 4750,
"application_name": "Oracle APEX Packaged Applications",
"application_link": {
Parameters
Filtering is possible for each of the JSON attributes by appending a query to the request URL as follows:
http://application-express-host.../latest/instance?q=query
Examples
Get All Instance Statistics
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/instance
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/instance'
p_http_method => 'GET' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 267781782378434879,
"workspace_name": "SOMEWORKSPACE",
"workspace_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/workspace/someworkspace"
Get Instance Statistics Since August 1st, 2016
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/instance?q=%7B%22log_day%22:%7B%22$gt%22:%7B%22$date%22:%222016-08-01T00:00:00Z%22%7D%7D%7D
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/instance?q=' ||
utl_url.escape('{"log_day": {"$gt": {"$date": "2016-08-01T00:00:00Z"}}}'),
p_http_method => 'GET',
p_scheme => 'OAUTH_CLIENT_CRED' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 267781782378434879,
"workspace_name": "SOMEWORKSPACE",
"workspace_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/workspace/someworkspace"
See Also:
Oracle REST Data Services Installation, Configuration, and Development Guide for more information on how to build a query.
Parent topic: Individual REST Services
Fetch Workspace-Level Statistics
This service returns usage statistics for a specific Application Express workspace.
HTTP Request Syntax Parameter
Table 39-3 HTTP Request Syntax
Parameter | Description |
---|---|
HTTP Method |
|
URL |
|
HTTP Request Headers |
|
Returns
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 1809919633676005,
"application_id": 106,
"application_name": "Sample Calendar",
"application_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106"
},
"page_events": 94,
:
Parameters
Filtering is possible for each of the JSON attributes by appending a query to the request URL as follows:
http://application-express-host.../latest/instance?q=query
Examples
Get All Statistics For Workspace "MYWORKSPACE"
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/workspace/myworkspace
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/workspace/myworkspace'
p_http_method => 'GET',
p_scheme => 'OAUTH_CLIENT_CRED' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 1809919633676005,
"application_id": 106,
"application_name": "Sample Calendar",
"application_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106"
},
"page_events": 94,
:
Get Workspace Statistics For "MYWORKSPACE" Since August 1st, 2016
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/workspace/myworkspace?q=%7B%22log_day%22:%7B%22$gt%22:%7B%22$date%22:%222016-08-01T00:00:00Z%22%7D%7D%7D
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/workspace/myworkspace?q='||
utl_url.escape(' "log_day": "$gt":"$date": "2016-08-01T00:00:00Z" '),
p_http_method => 'GET' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 1809919633676005,
"application_id": 106,
"application_name": "Sample Calendar",
"application_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106"
},
"page_events": 94,
:
See Also:
Oracle REST Data Services Installation, Configuration, and Development Guide for more information on how to build a query.
Parent topic: Individual REST Services
Application-Level Statistics
This service returns usage statistics for a specific application.
HTTP Request Syntax Parameter
Table 39-4 HTTP Request Syntax
Parameter | Description |
---|---|
HTTP Method |
|
URL |
|
HTTP Request Headers |
|
Returns
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 1809919633676005,
"application_id": 106,
"application_name": "Sample Calendar",
"application_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106"
},
"page_events": 94,
:
Parameters
Filtering is possible for each of the JSON attributes by appending a query to the request URL as follows:
http://application-express-host.../stats/latest/application/application-id?q=query
Examples
Get All Statistics For Application "106"
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106'
p_http_method => 'GET',
p_scheme => 'OAUTH_CLIENT_CRED' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 1809919633676005,
"application_id": 106,
"application_name": "Sample Calendar",
"application_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106"
},
"page_events": 94,
:
Get Statistics For Application "106" Since August 1st, 2016
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106?q=%7B%22log_day%22:%7B%22$gt%22:%7B%22$date%22:%222016-08-01T00:00:00Z%22%7D%7D%7D
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106?q=' ||
utl_url.escape(' "log_day": "$gt": "$date": "2016-08-01T00:00:00Z" '),
p_http_method => 'GET' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"log_day": "2016-09-15T00:00:00Z",
"workspace_id": 1809919633676005,
"application_id": 106,
"application_name": "Sample Calendar",
"application_link": {
"$ref": "http://application-express-host:port/ords/apex_instance_admin_user/stats/latest/application/106"
},
"page_events": 94,
:
See Also:
Oracle REST Data Services Installation, Configuration, and Development Guide for more information on how to a build query.
Parent topic: Individual REST Services
Instance Overview
This service returns aggregated overview data for an Application Express instance.
HTTP Request Syntax Parameter
Table 39-5 HTTP Request Syntax
Parameter | Description |
---|---|
HTTP Method |
|
URL |
|
HTTP Request Headers |
|
Returns
{
"items": [
{
"workspaces_total": 1074,
"apps_total": 2827,
"schemas_total": 1065,
"reporting_timeframe_since": "2016-07-16T13:30:40Z",
"reporting_timeframe_to": "2016-10-14T13:30:40Z",
"active_apps_timeframe": 2827,
"active_developers_timeframe": 731,
"workspaces_timeframe": 1074
}
],
"first": {
"$ref": "https://apexea.oracle.com/pls/apex/apex_instance_admin_user/info/latest/instance/90"
}
}
Parameters
number-of-days
: Return the aggregated values from today to the given number of days into the past.
Example
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/info/latest/instance/90
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/info/latest/instance/90',
p_http_method => 'GET' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"workspaces_total": 1074,
"apps_total": 2827,
"schemas_total": 1065,
"reporting_timeframe_since": "2016-07-16T13:30:40Z",
"reporting_timeframe_to": "2016-10-14T13:30:40Z",
"active_apps_timeframe": 2827,
"active_developers_timeframe": 731,
"workspaces_timeframe": 1074
}
],
"first": {
"$ref": "https://apexea.oracle.com/pls/apex/apex_instance_admin_user/info/latest/instance/90"
}
}
Parent topic: Individual REST Services
REST Service Version Information
This service returns version information for the REST Administrative Interface.
HTTP Request Syntax Parameter
Table 39-6 HTTP Request Syntax
Parameter | Description |
---|---|
HTTP Method |
|
URL |
|
HTTP Request Headers |
|
Returns
{
"items": [
{
"version": "5.1.0"
}
]
}
Example
The example displays the following output when you execute command line utility curl
:
$ curl -H"Authorization: Bearer LfXJilIBdzj5JPRn4xb5QQ..
-i http://localhost:8081/ords/restauth/emp/list/
http://application-express-host:port/ords/apex_instance_admin_user/info/rest-service-version
The example displays the following output when you use the APEX_WEB_SERVICE
package in another Application Express instance:
Note:
The example assumes that the OAUTH_AUTHENTICATE
procedure is successful.
select apex_web_service.make_rest_request(
p_url => 'http://application-express-host:port/ords/apex_instance_admin_user/info/latest/rest-service-version',
p_http_method => 'GET' )
from dual;
The following is a JSON-Document response:
{
"items": [
{
"version": "5.1.0"
}
]
}
Parent topic: Individual REST Services