Quick Start
You can use the Service Health Metrics REST APIs to monitor the overall health status of various services and features available within the Oracle B2C Service application.
Step 1: Consider Before You Start
Review the basics. If you're new to REST APIs, make sure you understand the basics of REST and JSON, and scan our list of important terms.
Choose a REST client. REST APIs connect software programs over the HTTP protocol. You need a software client to send the HTTP requests. In our examples, we use cURL. But, cURL isn't the only tool you can use. To help you choose one, see Work with your REST Client.
Validate Access. Make sure you've a site administrator account that has access to Configuration Assistant.
Step 2: Get Your Service Health Metrics Account Info
To make a REST HTTP request, you need to gather a few bits of information:
- REST Server URL. The URL of your Service Health Metrics server, which can
access all your Oracle B2C Service
sites:
https://monitoring.custhelp.com
- User name and password. A site administrator account that has access to Configuration Assistant.
Step 3: Configure Your Client
With the information gathered so far, you're ready to configure your client to send a REST HTTP request.
Construct the request URL. The URL consists of the server name and the resource path:https://<server>/<resource-path>
The <server> is the REST Server URL from Step 2, as in:
https://monitoring.custhelp.com
The <resource-path> is the relative path or endpoint to the resource you're working with. You can pick any endpoint in All REST Endpoints. For example, we're interested in getting all the metrics data for the site:
/v1/sitemetrics
Combine the REST Server URL and, in this example, the resource path and your request URL is complete. For more information, see URL Path.
https://monitoring.custhelp.com/v1/sitemetrics
If you're not familiar with any of the syntax used in the example, check out Work with your REST Client.
Step 4: Integrate Service Health Metrics with Configuration Assistant
- Open a command prompt.
- Generate a private key by using this
command:
openssl genpkey -out rsakey.pem -algorithm RSA -pkeyopt rsa_keygen_bits:2048
- Extract the public key from the private key by using this
command:
openssl pkey -in rsakey.pem -pubout -out rsapubkey.pem
- Copy the public key.
- Upload the public key in Configuration Assistant, to enable Service Health
integration for your site, by using these steps:
- Sign in to Configuration Assistant as a site administrator.
- From the Configuration Assistant main page, click the Service site for which you want to enable Service Health Metrics.
- Click the Integrations tile.
- Scroll down to Service Health Metrics.
- Click Enable.
- In the Enable Health Metrics Endpoint window, paste the public key.
- Click Save.
This creates the JSON Wek Key (JWK) for the site against which the JWT is validated.
Step 5: Authenticate and Authorize
Now that you've configured the client with a complete request URL, it's time to authenticate and authorize yourself. Authentication proves that your credentials are genuine, and authorization allows you to apply your access privileges.
Authentication
To make sure data access over a network is secure, you must pass a JSON Web Token (JWT) as a Bearer Authorization header when you access a REST API operation. For more information on how to generate a JWT token, see Use JSON Web Token for Authorization.
When passing the JWT token in Postman, the authorization type must be Bearer Token, as shown in this screenshot:

You can now access the REST APIs by passing the JWT authentication token in your requests.
Step 6: Send an HTTP Request
You're almost done. Now that your authentication and authorization are set, you're ready to send a test HTTP request. Continuing with our example, we want to get all the metrics data for the site. You can do this using the following command in cURL:
curl -X GET "https://monitoring.custhelp.com/v1/sitemetrics" -H "Authorization: Bearer HMeyJraWQiOiIxMDAwZXllc19sbiIsImFsZyI6Il"
This is how the request looks in Postman:

If your request for the report for named users is successful, you receive a response with a body similar to the following abbreviated example. If your request fails, and you're using cURL, review the response comments, adjust your request, and then try again. If you're using other clients, review the failure Status Codes, and then try again.
{
"serviceMetrics": [
{
"widgetserver": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 2.12,
"successRequests": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"customer_portal": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0,
"successRequests": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
},
{
"chat": {
"totalRequests": 809,
"averageLatency": 1311,
"totalPercentage": 2.37,
"successRequests": {
"totalRequests": 809,
"averageLatency": 1311,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 809,
"averageLatency": 1311,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"Chat_REST": {
"totalRequests": 242,
"averageLatency": 113,
"totalPercentage": 29.91,
"successRequests": {
"totalRequests": 242,
"averageLatency": 113,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 242,
"averageLatency": 113,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
},
{
"Chat_SOAP": {
"totalRequests": 567,
"averageLatency": 1822,
"totalPercentage": 70.09,
"successRequests": {
"totalRequests": 567,
"averageLatency": 1822,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 567,
"averageLatency": 1822,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
},
{
"Browser_UI": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 67.61,
"successRequests": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 20720,
"averageLatency": 38,
"totalPercentage": 89.94
}
},
{
"204": {
"totalRequests": 1315,
"averageLatency": 30,
"totalPercentage": 5.71
}
},
{
"302": {
"totalRequests": 1003,
"averageLatency": 177,
"totalPercentage": 4.35
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"other": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 100.0,
"successRequests": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 20720,
"averageLatency": 38,
"totalPercentage": 89.94
}
},
{
"204": {
"totalRequests": 1315,
"averageLatency": 30,
"totalPercentage": 5.71
}
},
{
"302": {
"totalRequests": 1003,
"averageLatency": 177,
"totalPercentage": 4.35
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
},
{
"webserver": {
"totalRequests": 9504,
"averageLatency": 85,
"totalPercentage": 27.89,
"successRequests": {
"totalRequests": 9504,
"averageLatency": 85,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 8639,
"averageLatency": 79,
"totalPercentage": 90.9
}
},
{
"302": {
"totalRequests": 263,
"averageLatency": 234,
"totalPercentage": 2.77
}
},
{
"201": {
"totalRequests": 240,
"averageLatency": 204,
"totalPercentage": 2.53
}
},
{
"404": {
"totalRequests": 121,
"averageLatency": 17,
"totalPercentage": 1.27
}
},
{
"206": {
"totalRequests": 121,
"averageLatency": 4,
"totalPercentage": 1.27
}
},
{
"401": {
"totalRequests": 120,
"averageLatency": 84,
"totalPercentage": 1.26
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"connectRest": {
"totalRequests": 720,
"averageLatency": 141,
"totalPercentage": 7.58,
"successRequests": {
"totalRequests": 720,
"averageLatency": 141,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 360,
"averageLatency": 119,
"totalPercentage": 50.0
}
},
{
"201": {
"totalRequests": 240,
"averageLatency": 204,
"totalPercentage": 33.33
}
},
{
"401": {
"totalRequests": 120,
"averageLatency": 84,
"totalPercentage": 16.67
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
},
{
"other": {
"totalRequests": 8301,
"averageLatency": 69,
"totalPercentage": 87.34,
"successRequests": {
"totalRequests": 8301,
"averageLatency": 69,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 7796,
"averageLatency": 65,
"totalPercentage": 93.92
}
},
{
"302": {
"totalRequests": 263,
"averageLatency": 234,
"totalPercentage": 3.17
}
},
{
"404": {
"totalRequests": 121,
"averageLatency": 17,
"totalPercentage": 1.46
}
},
{
"206": {
"totalRequests": 121,
"averageLatency": 4,
"totalPercentage": 1.46
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
},
{
"customer_portal": {
"totalRequests": 483,
"averageLatency": 270,
"totalPercentage": 5.08,
"successRequests": {
"totalRequests": 483,
"averageLatency": 270,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 483,
"averageLatency": 270,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
}
],
"siteMetrics": {
"totalRequests": 34075,
"averageLatency": 84,
"successPercentage": 100.0
},
"siteName": "my_site",
"updatedTime": "2025-01-28T06:56:00Z",
"timeInterval": 120
}
Congratulations! Now you're ready to do more with your REST APIs.
- Explore the Learn More section and find answers to frequently asked questions.
- Join the Oracle Developer Community, where you can share tips and advice with others.