Adaptive triggers

Create an adaptive trigger

POST
/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers

Create a new adaptive trigger for a resource.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
environmentKey*string

Request Body

application/json

name*string
resourceKind*AdaptiveTriggerResourceKind

Value in

  • "flag"
  • "ai-config"
resourceKey*string
triggerSource*
task*

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/projects/string/environments/string/adaptive-triggers" \  -H "Content-Type: application/json" \  -d '{    "resourceKind": "flag",    "task": {      "instructions": [        {          "variationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",          "kind": "updateFallthroughVariationOrRollout",          "ruleId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"        },        {          "variationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",          "kind": "updateFallthroughVariationOrRollout",          "ruleId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"        }      ]    },    "resourceKey": "resourceKey",    "name": "name",    "triggerSource": {      "alertId": 0,      "type": "observabilityAlert"    }  }'
{  "resourceKind": "flag",  "createdAt": 6,  "task": {    "instructions": [      {        "variationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",        "kind": "updateFallthroughVariationOrRollout",        "ruleId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"      },      {        "variationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",        "kind": "updateFallthroughVariationOrRollout",        "ruleId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"      }    ]  },  "resourceKey": "resourceKey",  "name": "name",  "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",  "triggerSource": {    "alertId": 0,    "type": "observabilityAlert"  },  "enabled": true,  "updatedAt": 1}