Skip to content

Create Automation

POST
/users/{user_id}/metric-definitions/{definition_id}/automations
curl --request POST \
--url https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metric-definitions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/automations \
--header 'Content-Type: application/json' \
--data '{ "action_config": {}, "action_type": "notify", "enabled": true, "trigger_config": {}, "trigger_type": "no_data_by_time" }'
user_id
required
User Id
string format: uuid
definition_id
required
Definition Id
string format: uuid
Media typeapplication/json
AutomationCreate
object
action_config
Action Config
object
key
additional properties
any
action_type
required
Action Type
string
Allowed values: notify flag_day
enabled
Enabled
boolean
default: true
trigger_config
Trigger Config
object
key
additional properties
any
trigger_type
required
Trigger Type
string
Allowed values: no_data_by_time threshold_cross manual_fallback

Successful Response

Media typeapplication/json
AutomationRead
object
action_config
required
Action Config
object
key
additional properties
any
action_type
required
Action Type
string
enabled
required
Enabled
boolean
id
required
Id
string format: uuid
trigger_config
required
Trigger Config
object
key
additional properties
any
trigger_type
required
Trigger Type
string
Examplegenerated
{
"action_config": {},
"action_type": "example",
"enabled": true,
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"trigger_config": {},
"trigger_type": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}