> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happyuptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get data source

` GET /data-sources/{id} `

Get data source

## Servers

- ` https://happyuptime.com/api/v1 `

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` bearerAuth `: ` http `

  - HTTP scheme: ` bearer ` (hu_api_key)

  - API key with `hu_` prefix. Send exactly `Authorization: Bearer hu_...`. `X-API-Key` is not supported. Create keys in Dashboard → Settings → API Keys.

## Parameters

### ` id ` (path, required)

- ` value `: type ` string `

## Responses

### ` 200 ` — Data source with fields and child monitors

### ` 404 ` — Not found

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` object `

    - Required fields: ` code `, ` message `, ` status `

    - ` code `: type ` string `

      - example: ` "not_found" `

    - ` message `: type ` string `

      - example: ` "Monitor not found" `

    - ` status `: type ` integer `

      - example: ` 404 `

## Request examples

### cURL

```curl
curl -X GET 'https://happyuptime.com/api/v1/data-sources/string' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://happyuptime.com/api/v1/data-sources/string', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://happyuptime.com/api/v1/data-sources/string', headers=headers)
print(response.json())
```