Skip to main content
POST
/
console
/
v1
/
experiments
/
entity_property
/
{name}
Post Entity Property Source
curl --request POST \
  --url https://statsigapi.net/console/v1/experiments/entity_property/{name} \
  --header 'Content-Type: application/json' \
  --header 'STATSIG-API-KEY: <api-key>' \
  --data '
{
  "sql": "<string>",
  "idTypeMapping": [
    {
      "statsigUnitID": "<string>",
      "column": "<string>"
    }
  ],
  "name": "<string>",
  "description": "<string>",
  "tags": [
    "<string>"
  ],
  "timestampColumn": "<string>",
  "timestampAsDay": true,
  "isReadOnly": true,
  "owner": {
    "ownerID": "user123",
    "ownerType": "USER",
    "ownerName": "John Doe",
    "ownerEmail": "owner123@test.com"
  }
}
'
{
  "message": "Entity Property Sources updated successfully.",
  "data": {
    "name": "Location",
    "description": "This is the the location description",
    "tags": [],
    "sql": "SELECT * FROM  shoppy-sales.setup.user_properties",
    "timestampColumn": "",
    "idTypeMapping": [
      {
        "statsigUnitID": "stableID",
        "column": "user_id"
      }
    ],
    "timestampAsDay": true
  }
}

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Optional header to respect review settings for mutation endpoints.

Path Parameters

name
string
required

name

Body

application/json
sql
string
required

SQL query defining the data source.

idTypeMapping
object[]
required

Mappings of Statsig units to their columns.

name
string

Optional new name for the entity property source.

description
string

Optional updated context for the entity property source.

tags
string[]

Optional updated tags for categorization.

timestampColumn
string

Optional column name for timestamp.

timestampAsDay
boolean

Indicates if the timestamp is treated as a day.

isReadOnly
boolean

Specifies if the source can only be edited via the Console API.

owner
object

Schema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined.

Example:
{
"ownerID": "user123",
"ownerType": "USER",
"ownerName": "John Doe",
"ownerEmail": "owner123@test.com"
}

Response

Post Entity Property Source response

message
string
required

A simple string explaining the result of the operation.

data
object
required

A single result.