curl --request GET \
--url https://statsigapi.net/console/v1/metrics/metric_source/{name} \
--header 'STATSIG-API-KEY: <api-key>'{
"message": "Metric source read successfully.",
"data": {
"name": "test_metric_source4",
"description": "Test description for metric source",
"tags": [
"non_production"
],
"sql": "SELECT * FROM `shoppy-sales.logging.events`",
"timestampColumn": "ts",
"timestampAsDay": true,
"idTypeMapping": [
{
"statsigUnitID": "userID",
"column": "user_id"
}
],
"sourceType": "table",
"tableName": "shoppy-sales.logging.events"
}
}curl --request GET \
--url https://statsigapi.net/console/v1/metrics/metric_source/{name} \
--header 'STATSIG-API-KEY: <api-key>'{
"message": "Metric source read successfully.",
"data": {
"name": "test_metric_source4",
"description": "Test description for metric source",
"tags": [
"non_production"
],
"sql": "SELECT * FROM `shoppy-sales.logging.events`",
"timestampColumn": "ts",
"timestampAsDay": true,
"idTypeMapping": [
{
"statsigUnitID": "userID",
"column": "user_id"
}
],
"sourceType": "table",
"tableName": "shoppy-sales.logging.events"
}
}Optional header to respect review settings for mutation endpoints.
name
Read metric source response
A simple string explaining the result of the operation.
A single result.
Show child attributes
The name of the metric source, serving as its primary identifier.
A detailed description of the metric source, providing context and usage information.
The SQL query or statement used to extract data from the metric source.
The name of the column containing timestamp data for the metric source.
Array defining the mapping between Statsig unit IDs and their respective source columns.
Optional tags for categorizing the metric source and improving searchability.
Indicates whether the timestamp should be treated as a day-level granularity.
The type of source, indicating whether it is a database table or a custom query.
table, query The name of the database table if the source type is "table".
Specifies if the source can only be edited via the Console API.
Schema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined.
Show child attributes
ID of the owner
"abc123"
Type of the owner (e.g., SDK_KEY or USER)
"USER"
The name of the owner. This field is optional.
"John Doe"
The email of the owner. This field is optional.
{
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "owner123@test.com"
}