Get a service

Get one service a source detected in its traces or logs.

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

URL parameters

source_id
required string
id
required string

Query parameters

team_id
string

Headers

Authorization
required string
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"
    }
  }
}
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"
}

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

Example cURL

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