GET /data-sources
Returns all custom JSON API data sources for the project, including field count and child monitor count.

Authentication

Bearer Token (hu_api_key)

Responses

200 List of data sources
application/json
data object[]
Array of:
name string REQUIRED
description unknown
url string (uri) REQUIRED
method string
Enum: GET, POST
headers unknown
body unknown
auth_type unknown
auth_config unknown
root_path unknown
fetch_interval_s integer
timeout_ms integer
fields object[]
Array of:
id string
path string REQUIRED
name_template string REQUIRED
rule_type string REQUIRED
Enum: equals, in, diff_lte, truthy, http_ok
rule_config object REQUIRED
degraded_rule_config unknown
display_order number
401 Unauthorized
curl -X GET 'https://happyuptime.com/api/v1/data-sources' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://happyuptime.com/api/v1/data-sources', {  method: 'GET',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://happyuptime.com/api/v1/data-sources', headers=headers)print(response.json())
200 Response
{  "data": [    {      "name": "<string>",      "description": "<string>",      "url": "<uri>",      "method": "GET",      "headers": "<object>",      "body": "<string>",      "auth_type": "basic",      "auth_config": "<object>",      "root_path": "<string>",      "fetch_interval_s": 123,      "timeout_ms": 123,      "fields": [        {          "id": "<string>",          "path": "<string>",          "name_template": "<string>",          "rule_type": "equals",          "rule_config": "<object>",          "degraded_rule_config": {},          "display_order": 123        }      ]    }  ]}