Overview
The Real User Monitoring (RUM) API provides a set of endpoints to manage your RUM website configurations.
Use cases
- Manage RUM websites — create, update, and delete configurations such as display name, monitored URL, Single Page Application (SPA) tracking, and URL fragments.
- Retrieve aggregated RUM metrics for custom reporting or integrations.
Prerequisites
Before using the RUM API, make sure you have:
RUM API endpoints
The RUM API exposes the following endpoints for managing RUM websites:
Manage RUMs
| Method | Endpoint | Description |
|---|---|---|
GET |
/RUM/Website |
Returns all RUM websites and their configurations. |
POST |
/RUM/Website |
Creates a RUM website using the request body. |
GET |
/Rum/Website/{rumWebsiteGuid} |
Returns the specified RUM website and its configuration. |
PUT |
/Rum/Website/{rumWebsiteGuid} |
Updates the specified RUM website. |
PATCH |
/Rum/Website/{rumWebsiteGuid} |
Partially updates the specified RUM website. |
DELETE |
/Rum/Website/{rumWebsiteGuid} |
Deletes the specified RUM website. |
GET |
/Rum/Website/{rumWebsiteGuid}/Metrics |
Returns metrics for the specified RUM website. |
GET |
/Rum/Website/Metrics |
Returns metrics for all RUM websites. |
For detailed request and response formats, and interactive API testing, refer to the Uptrends RUM API documentation.
RUM API response
RUM website
[
{
"RumWebsiteId": "a8686c1f-f662-424d-a1b2-0c1d0170e2f1",
"Description": "Production website - www.example.com",
"Url": "https://www.example.com",
"IsSpa": true,
"IncludeUrlFragment": true,
"RumScript": "<script>\n var _urconfig = { sid: \"89c1bfcc-fbfc-4d19-b5a5-963e606af25b\", aip: 0, usePageProtocol: false };\n (function (d, s) {\n var js = d.createElement(s),\n sc = d.getElementsByTagName(s)[0];\n js.src = \"https://hit.uptrendsdata.com/rum.min.js\";\n js.async = \"async\";\n sc.parentNode.insertBefore(js, sc);\n }(document, \"script\"));\n </script>"
}
]
RUM website with metrics
[
{
"RumWebsiteId": "a8686c1f-f662-424d-a1b2-0c1d0170e2f1",
"Description": "Production website - www.example.com",
"Url": "https://www.example.com",
"IsSpa": true,
"IncludeUrlFragment": true,
"MetricValues": [
{
"Metric": "PageViews",
"Median": 869,
"Minimum": 1,
"Maximum": 245764,
"Average": 2054,
"Count": 19571
},
{
"Metric": "DnsDuration",
"Median": 0,
"Minimum": 0,
"Maximum": 19918,
"Average": 14,
"Count": 29379
},
{
"Metric": "BackendDuration",
"Median": 297,
"Minimum": 0,
"Maximum": 71692,
"Average": 437,
"Count": 29379
},
...
]
}
]
RUM API parameters
| Field name | Description |
|---|---|
includeScripts |
RUM tracking script (<script>...</script>) embedded to your website. |
rumWebsiteGuid |
The unique identifier of the RUM website. Used for PUT, PATCH, and DELETE endpoints. Similar to the value of the RumWebsiteId field. |
Start |
A custom date parameter in YYYY-MM-DDTHH:MM:SS format (for example, 2025-01-20T08:00:00) used with the End parameter to specify the start date for the API response. This parameter cannot be used along with the PresetPeriod. |
End |
A custom date parameter in YYYY-MM-DDTHH:MM:SS format (for example, 2025-01-20T16:00:00) used with the Start parameter to specify the end date for the returned statistics records. This parameter cannot be used along with the PresetPeriod. |
PresetPeriod |
A list of time duration to filter information within a specific period. This cannot be used along with the Start and End parameters. The default value is Last24Hours. For more detailed explanation, refer to PresetPeriod.
|
WebsiteFilter |
Filter string for RUM website descriptions. Wildcards such as ? and * are supported. To filter multiple patterns, use the | symbol as separator. |
RUM API fields
RUM website resources use the following properties in request and response bodies:
| Field name | Description |
|---|---|
RumWebsiteId |
The unique identifier of the RUM website. Similar to the value of rumWebsiteGuid field. |
Description |
Display name of your RUM website. |
Url |
Monitored URL of your RUM website. |
IsSpa |
Returns true if the configured RUM website is a SPA, a type of website that initially loads one HTML page and then dynamically updates the content. Otherwise, false. |
IncludeUrlFragment |
Returns true if the configured RUM website accepts URL fragments, the last part of a URL that appears after the # symbol. |
RumScript |
The RUM script (<script>...</script>) inserted to your website. |
Metric |
Returns the type of metric measured in your RUM website. Possible values:
|
Median |
Returns an integer: the median of aggregated values for the selected Metric (middle value when sorted). |
Minimum |
Returns an integer: minimum aggregated value for the selected Metric. |
Maximum |
Returns an integer: maximum aggregated value for the selected Metric. |
Average |
Returns an integer: arithmetic mean of aggregated values for the selected Metric. |
Count |
Returns an integer: total for the selected Metric. For example, total page views when Metric is PageViews. |
Troubleshooting
This section covers common HTTP errors and troubleshooting steps for the RUM API.
Common errors
Common HTTP status codes and their descriptions:
| Status Code | Description |
|---|---|
| 200 | OK — request successful. |
| 204 | No content — the request completed successfully and no response was returned. This is for DELETE, PUT, PATCH, and POST requests. |
| 400 | Bad request — invalid request parameters or missing required fields. |
| 401 | Unauthorized — invalid or missing authentication credentials. |
| 403 | Forbidden — one or more validation errors occurred. This may be related to account permissions. |
| 404 | Not Found — the specified GUID does not exist. |
| 500 | Internal Server Error — a server-side error occurred. |
General troubleshooting guide
Ensure that you:
- Always validate your request data before sending API calls.
- Use appropriate HTTP methods for each operation. For further assistance, please reach out to our Support team.
Related articles
For more details, refer to the following articles:
- Uptrends RUM API documentation — an interactive API documentation with detailed endpoint specifications.
- API changelog - for latest API updates and deprecation notices.