# List sources in a source group

Returns a list of all sources in a specific source group.

[endpoint]
base_url = "https://telemetry.betterstack.com"
path = "/api/v1/source-groups/{id}/sources"
method = "GET"

[[path_param]]
name = "id"
description = "The ID of the source group."
required = true
type = "string"

[[query_param]]
name = "page"
description = "Page number"
required = false
type = "integer"

[[query_param]]
name = "per_page"
description = "The number of sources per page (max 50)"
required = false
type = "integer"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns a list of sources within the source group.'''
body = '''{
  "data": [
    {
      "id": "101",
      "type": "source",
      "attributes": {
        "team_id": 123,
        "team_name": "Test team",
        "name": "Production API Server",
        "source_group_id": 95251342,
        "table_name": "prod_api",
        "platform": "ruby",
        "token": "abcDefGhiJklMnoPqrStuVwx",
        "ingesting_host": "s101.eu-nbg-2.betterstackdata.com",
        "ingesting_paused": false,
        "logs_retention": 30,
        "metrics_retention": 30,
        "live_tail_pattern": null,
        "vrl_transformation": null,
        "created_at": "2023-10-26T10:00:00.000Z",
        "updated_at": "2023-10-26T10:00:00.000Z"
      }
    },
    {
      "id": "102",
      "type": "source",
      "attributes": {
        "team_id": 123,
        "team_name": "Test team",
        "name": "Staging Database",
        "source_group_id": 95251342,
        "table_name": "staging_db",
        "platform": "postgresql",
        "token": "yzaBcDefGhiJklMnoPqrStuV",
        "ingesting_host": "s102.eu-nbg-2.betterstackdata.com",
        "ingesting_paused": false,
        "logs_retention": 7,
        "metrics_retention": 7,
        "live_tail_pattern": null,
        "vrl_transformation": null,
        "created_at": "2023-10-25T12:00:00.000Z",
        "updated_at": "2023-10-25T12:00:00.00Z"
      }
    }
  ],
  "pagination": {
    "first": "https://telemetry.betterstack.com/api/v1/source-groups/95251342/sources?page=1",
    "last": "https://telemetry.betterstack.com/api/v1/source-groups/95251342/sources?page=1",
    "prev": null,
    "next": null
  }
}'''
[/responses]

#### Example cURL

```shell
[label Example]
curl --request GET \
  --url https://telemetry.betterstack.com/api/v1/source-groups/95251342/sources \
  --header "Authorization: Bearer $TOKEN"
```

[info]
#### Looking for the details of a specific parameter?
Explore [the list of all Sources API response parameters](https://betterstack.com/docs/logs/api/sources-api-response-parameters/).
[/info]
