---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Push Metrics API

# Push Metrics API {#ariaid-title1}

* Release version: Xanadu
* 
* Updated October 17, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

The Push Metrics API provides endpoints that enable you to push raw Metric Intelligence data from an external source to the MID Server.

This API is based on client-side tools that push the raw data from the external source to the MID Server. The Metric Intelligence extension is required to be configured with the Enable REST Listener option enabled. For more information on setting up the MID Server, see [Get started with Metric Intelligence](https://www.servicenow.com/docs/access?context=get-started-metrics&version=xanadu&pubname=xanadu-it-operations-management&ft:locale=en-US).

For information on authentication requirements, see [Configure the MID Web Server
extension](https://www.servicenow.com/docs/access?context=configure-mid-web-server-extension&version=xanadu&pubname=xanadu-it-operations-management&ft:locale=en-US).

## Push Metrics - POST /mid/sa/metrics {#ariaid-title2}

Pushes raw Operational Intelligence data from an external source to the MID Server.

### URL format {#sa-POST-metrics__section_nbn_xsv_3mb}

Default URL:
/api/mid/sa/metrics

### Supported request parameters

{#sa-POST-metrics__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 1. Path parameters]

{#sa-POST-metrics__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 2. Query parameters]

{#sa-POST-metrics__entry__10}

| Name | Description |
|-|-|
| ci2metric_id | List of key-value pairs to use to identify the configuration item (CI). It is formerly known as ci_identifier. The script continues to accept ci_identifier. Data type: Object |
| metric_type | Name of the metric. Data type: String |
| node | IP address, FQDN, name of the CI, or host. In the example below, the name of the Linux server where the disks are installed. Data type: String |
| resource_path | The path of the resource for which metric data is being collected. In the example below, `C:\` is the resource for which metric data is collected. Data type: String |
| source | Data source monitoring the metric type. Data type: String |
| timestamp | Epoch time stamp of the metric. Data type: Number Unit: Milliseconds |
| unit | Unit type that is associated with the source metric type. Table: Monitoring System Metric Types \[sa_source_metric_type\] Data type: String |
| value | Value of the metric. Data type: Number |
[Table 3. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#sa-POST-metrics__entry__28}{#sa-POST-metrics__content_type-RESTAPI}

| Header | Description |
|-|-|
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Table 4. Request headers]

{#sa-POST-metrics__entry__32}

| Header | Description |
|-|-|
| None |   |
[Table 5. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#sa-POST-metrics__entry__36}{#sa-POST-metrics__entry-200-status-code}{#sa-POST-metrics__entry-401-status-code}{#sa-POST-metrics__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 6. Status codes]

### Response body parameters (JSON or XML)

{#sa-POST-metrics__entry__44}

| Name | Description |
|-|-|
| None |   |
[ ]

### cURL request

The request body must be surrounded by square brackets, as shown in this example.

    curl -X POST "https://<mid-server-host>/api/mid/sa/metrics"
    -H "Content-Type: application/json"
    -U "username":"password"
    -d "[{
        "metric_type": "Disk C: % Free Space",
        "resource_path": "C:\\",
        "node": "lnux100",
        "value": 50,
        "timestamp": 1473183012000,
        "ci2metric_id": {
            "node": "lnux100"
        },
        "source": "Splunk"
    }]"


