Skip to main content
POST
List datasources

Restrictions

Usage

  • Omit type and name to return every datasource you can query; type and name are exact-match filters. An unrecognized type returns an empty array. The result is not paginated.
  • Only datasources the caller can query are returned (see readonly_team_ids); each item carries my_perm (manage or readonly).
  • payload is always null in list items. Use /monit/datasource/info to read the configuration of a datasource you can manage.
  • address in list items has userinfo (user:password@), the query string and the fragment removed from each comma-separated entry. /monit/datasource/info returns the address as stored.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Filter parameters for listing datasources.

type
enum<string>

Return only datasources of this type; omit or leave empty to return all types. An unrecognized value matches nothing and returns an empty array.

Alerting types (can evaluate alert rules):

  • prometheus: Prometheus-compatible metrics.
  • loki: Grafana Loki logs.
  • mysql: MySQL.
  • oracle: Oracle Database.
  • postgres: PostgreSQL.
  • clickhouse: ClickHouse.
  • elasticsearch: Elasticsearch.
  • sls: Alibaba Cloud Simple Log Service.
  • tencent_cls: Tencent Cloud Log Service (CLS).
  • victorialogs: VictoriaLogs.

Diagnostic-only types (cannot evaluate alerts, alerting_enabled is always false):

  • redis_node: a single Redis node.
  • redis_sentinel: Redis Sentinel.
  • mongodb_mongod: a MongoDB mongod instance.
  • mongodb_mongos: a MongoDB mongos router.
  • kafka: a Kafka cluster.
Available options:
prometheus,
loki,
mysql,
oracle,
postgres,
clickhouse,
elasticsearch,
sls,
tencent_cls,
victorialogs,
redis_node,
redis_sentinel,
mongodb_mongod,
mongodb_mongos,
kafka
name
string

Return only the datasource whose name equals this value exactly (names are unique within the account, so at most one item). Omit or leave empty for no name filter.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object[]

Datasources of the account that the caller can query, sorted by name; an empty array when nothing matches. payload is null in every item because the list does not read it; each item also carries my_perm.