curl --request POST \
--url https://statsigapi.net/console/v1/experiments/assignment_sources \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"sql": "<string>",
"timestampColumn": "<string>",
"experimentIDColumn": "<string>",
"groupIDColumn": "<string>",
"idTypeMapping": [
{
"statsigUnitID": "<string>",
"column": "<string>"
}
],
"description": "<string>",
"isVerified": true,
"tags": [
"<string>"
],
"isReadOnly": true,
"owner": {
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "owner123@test.com"
}
}
'{
"message": "Assignment Source created successfully",
"data": {
"name": "exposures4",
"description": "",
"tags": [],
"sql": "SELECT * FROM shoppy-sales.experiment_data.exposures",
"timestampColumn": "ts",
"groupIDColumn": "group_id",
"experimentIDColumn": "experiment_name",
"idTypeMapping": [
{
"statsigUnitID": "stableID",
"column": "user_id"
}
]
}
}curl --request POST \
--url https://statsigapi.net/console/v1/experiments/assignment_sources \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"sql": "<string>",
"timestampColumn": "<string>",
"experimentIDColumn": "<string>",
"groupIDColumn": "<string>",
"idTypeMapping": [
{
"statsigUnitID": "<string>",
"column": "<string>"
}
],
"description": "<string>",
"isVerified": true,
"tags": [
"<string>"
],
"isReadOnly": true,
"owner": {
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "owner123@test.com"
}
}
'{
"message": "Assignment Source created successfully",
"data": {
"name": "exposures4",
"description": "",
"tags": [],
"sql": "SELECT * FROM shoppy-sales.experiment_data.exposures",
"timestampColumn": "ts",
"groupIDColumn": "group_id",
"experimentIDColumn": "experiment_name",
"idTypeMapping": [
{
"statsigUnitID": "stableID",
"column": "user_id"
}
]
}
}Optional header to respect review settings for mutation endpoints.
Unique identifier for the assignment source.
SQL query defining the data source for assignments.
Column name representing the timestamp of assignments.
Column name for the experiment ID associated with the assignments.
Column name for the group ID linked to the assignments.
Mappings of Statsig units to their respective columns.
Show child attributes
Optional detailed context for the assignment source.
Marks the assignment source as verified for internal trustworthiness.
Optional tags for categorization.
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
{
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "owner123@test.com"
}