curl --request POST \
--url https://statsigapi.net/console/v1/metrics/metric_source/{name} \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '{
"name": "<any>",
"description": "<string>",
"tags": [
"<string>"
],
"sql": "<string>",
"timestampColumn": "<string>",
"timestampAsDay": true,
"idTypeMapping": [
{
"statsigUnitID": "<string>",
"column": "<string>"
}
],
"sourceType": "table",
"tableName": "<string>",
"datePartitionColumn": "<string>",
"customFieldMapping": [
{
"key": "<string>",
"formula": "<string>"
}
],
"isReadOnly": true,
"isVerified": false,
"owner": {
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "[email protected]"
},
"team": "<string>",
"teamID": "<string>",
"dryRun": true
}'