Docs » Other data ingestion methods » Observability Cloud REST APIs for sending traces and metrics

Observability Cloud REST APIs for sending traces and metrics 🔗

You can use the REST API to send telemetry directly to Splunk Observability Cloud. See Send data points and Send traces, metrics, and events in the developer documentation.

Start sending data using the API 🔗

Start experimenting by sending data using the following curl command:

curl --request POST \
  --header "Content-Type: application/json" \
  --header "X-SF-TOKEN: <ORG_TOKEN>" \
  --data \
  '{
      "gauge": [
          {
              "metric": "memory.free",
              "dimensions": { "host": "server1" },
              "value": 42
          }
      ]
  }' \
  https://ingest.<REALM>.signalfx.com/v2/datapoint

Send custom metrics using the API 🔗

To send custom metrics, replace <ORG_TOKEN> with an org token for your organization in the code block provided as an example.

In Observability Cloud UI, an org token is called an access token. To learn how to obtain an org token, see Create and manage organization access tokens using Splunk Observability Cloud.

When you send a request, use the endpoint specific to your realm. Replace <REALM> with the name of your realm, which you can find on your profile page in the user interface. To learn more, see Realms in endpoints.