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.
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"
}Create Assignment Source response
A simple string explaining the result of the operation.
A single result.
Show child attributes
Unique identifier for the assignment source.
Detailed context and purpose of the assignment source.
Tags for categorization and search.
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.
Marks the assignment source as verified for internal trustworthiness.
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"
}