List services

List the services a source detected, most recently seen first, as the Services page lists them.

GET https://telemetry.betterstack.com/api/v4/sources/{source_id}/services

URL parameters

source_id
required string

Query parameters

name
string
page
integer
per_page
DEFAULT 50 integer
team_id
string

Headers

Authorization
required string

Results are paginated

Use pagination.next and pagination.prev to move through pages or jump to a specific one using page and per_page. See Pagination.

200

Response body

{
  "data": [
    {
      "id": "123456789",
      "type": "service",
      "attributes": {
        "source_id": "123456",
        "name": "checkout",
        "namespace": null,
        "platform": "postgresql",
        "platform_title": "PostgreSQL",
        "matching": "exact",
        "source_types": [
          "logs",
          "spans"
        ],
        "name_fields": {
          "logs": [
            "kubernetes.container_name"
          ],
          "spans": [
            "resource.service.name"
          ]
        },
        "kubernetes_labels": {
          "app": "checkout"
        },
        "created_at": "2026-11-10T08:12:44.123Z",
        "last_seen_at": "2026-11-22T17:03:56.000Z"
      }
    }
  ],
  "pagination": {
    "first": "https://telemetry.betterstack.com/api/v4/sources/123456/services?page=1",
    "last": "https://telemetry.betterstack.com/api/v4/sources/123456/services?page=1",
    "prev": null,
    "next": null,
    "total_count": 1
  }
}
401

Response body

{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
403
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}
422

Response attributes

id
string
type
string
source_id
string
name
string
namespace
string or null
platform
string or null
platform_title
string or null
matching
string
source_types
array of strings
name_fields
object
kubernetes_labels
object
created_at
datetime
last_seen_at
datetime or null
pagination.first
string
pagination.last
string
pagination.prev
string or null
pagination.next
string or null
pagination.total_count
integer

Example cURL

List services
curl --request GET \
  --url https://telemetry.betterstack.com/api/v4/sources/123456/services \
  --header "Authorization: Bearer $TOKEN"