v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
AI Configs

Show an AI Config's targeting

Retrieves a specific AI Config's targeting by its key

get/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting

Path parameters

projectKeystring required
configKeystring required

Response

Successful response

createdAtinteger required

Unix timestamp in milliseconds

environmentsobject required
keystring required
namestring required
tagsstring[] required
_versioninteger required

Example response

{
  "createdAt": 0,
  "defaults": {
    "onVariation": 6,
    "offVariation": 1
  },
  "environments": {
    "key": {
      "trackEventsFallthrough": true,
      "_environmentName": "_environmentName",
      "contextTargets": [
        {
          "values": [
            "values",
            "values"
          ],
          "contextKind": "contextKind",
          "variation": 5
        },
        {
          "values": [
            "values",
            "values"
          ],
          "contextKind": "contextKind",
          "variation": 5
        }
      ],
      "rules": [
        {
          "clauses": [
            {
              "op": "op",
              "negate": true,
              "values": [
                "",
                ""
              ],
              "attribute": "attribute",
              "id": "id"
            },
            {
              "op": "op",
              "negate": true,
              "values": [
                "",
                ""
              ],
              "attribute": "attribute",
              "id": "id"
            }
          ],
          "trackEvents": true
        },
        {
          "clauses": [
            {
              "op": "op",
              "negate": true,
              "values": [
                "",
                ""
              ],
              "attribute": "attribute",
              "id": "id"
            },
            {
              "op": "op",
              "negate": true,
              "values": [
                "",
                ""
              ],
              "attribute": "attribute",
              "id": "id"
            }
          ],
          "trackEvents": true
        }
      ],
      "lastModified": 2,
      "trackEvents": true,
      "fallthrough": {
        "rollout": {
          "experimentAllocation": {
            "defaultVariation": 2,
            "canReshuffle": true,
            "type": "type"
          },
          "seed": 7,
          "variations": [
            {
              "weight": 3,
              "_untracked": true,
              "variation": 9
            },
            {
              "weight": 3,
              "_untracked": true,
              "variation": 9
            }
          ],
          "contextKind": "contextKind",
          "bucketBy": "bucketBy"
        },
        "variation": 5
      },
      "offVariation": 4,
      "targets": [
        {
          "values": [
            "values",
            "values"
          ],
          "contextKind": "contextKind",
          "variation": 5
        },
        {
          "values": [
            "values",
            "values"
          ],
          "contextKind": "contextKind",
          "variation": 5
        }
      ],
      "_version": 7,
      "enabled": true
    }
  },
  "variations": [
    {
      "name": "name",
      "description": "description",
      "_id": "_id",
      "value": null
    },
    {
      "name": "name",
      "description": "description",
      "_id": "_id",
      "value": null
    }
  ],
  "experiments": {
    "baselineIdx": 1,
    "items": [
      {
        "metricKey": "my-metric",
        "environments": [
          "production",
          "test",
          "my-environment"
        ],
        "_environmentSettings": {
          "key": {
            "startDate": 7,
            "stopDate": 1,
            "enabledPeriods": [
              {
                "startDate": 4,
                "stopDate": 5
              },
              {
                "startDate": 4,
                "stopDate": 5
              }
            ]
          }
        },
        "_metric": {
          "_maintainer": {
            "firstName": "Ariel",
            "lastName": "Flores",
            "role": "admin",
            "_links": {
              "self": {
                "href": "/api/v2/members/569f183514f4432160000007",
                "type": "application/json"
              }
            },
            "_id": "569f183514f4432160000007",
            "email": "ariel@acme.com"
          },
          "_links": {
            "parent": {
              "href": "/api/v2/metrics/my-project",
              "type": "application/json"
            },
            "self": {
              "href": "/api/v2/metrics/my-project/my-metric",
              "type": "application/json"
            }
          },
          "description": "description",
          "activeExperimentCount": 2,
          "activeGuardedRolloutCount": 1,
          "randomizationUnits": [
            "user"
          ],
          "guardedRolloutCount": 0,
          "archived": true,
          "urls": [
            null,
            null
          ],
          "_access": {
            "allowed": [
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              },
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              }
            ],
            "denied": [
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              },
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              }
            ]
          },
          "_site": {
            "href": "href",
            "type": "type"
          },
          "selector": "selector",
          "_version": 1,
          "key": "metric-key-123abc",
          "percentileValue": 95,
          "kind": "custom",
          "_attachedFlagCount": 0,
          "metricGroupCount": 0,
          "filters": {
            "op": "op",
            "negate": false,
            "values": [
              "JP"
            ],
            "contextKind": "user",
            "attribute": "country",
            "type": "contextAttribute"
          },
          "_creationDate": 1,
          "tags": [],
          "eventDefault": {
            "disabled": true,
            "value": 0
          },
          "archivedAt": 6,
          "maintainerId": "569fdeadbeef1644facecafe",
          "unit": "unit",
          "lastSeen": 1,
          "successCriteria": "HigherThanBaseline",
          "releasePolicyCount": 0,
          "_versionId": "version-id-123abc",
          "isNumeric": true,
          "eventKey": "Order placed",
          "experimentCount": 0,
          "name": "My metric",
          "_id": "5902deadbeef667524a01290",
          "lastModified": {
            "date": "2021-08-05T19:46:31.148Z"
          },
          "unitAggregationType": "average",
          "category": "Error monitoring",
          "analysisType": "mean",
          "dataSource": {
            "_name": "_name",
            "_integrationKey": "_integrationKey",
            "key": "key",
            "environmentKey": "environmentKey"
          }
        }
      },
      {
        "metricKey": "my-metric",
        "environments": [
          "production",
          "test",
          "my-environment"
        ],
        "_environmentSettings": {
          "key": {
            "startDate": 7,
            "stopDate": 1,
            "enabledPeriods": [
              {
                "startDate": 4,
                "stopDate": 5
              },
              {
                "startDate": 4,
                "stopDate": 5
              }
            ]
          }
        },
        "_metric": {
          "_maintainer": {
            "firstName": "Ariel",
            "lastName": "Flores",
            "role": "admin",
            "_links": {
              "self": {
                "href": "/api/v2/members/569f183514f4432160000007",
                "type": "application/json"
              }
            },
            "_id": "569f183514f4432160000007",
            "email": "ariel@acme.com"
          },
          "_links": {
            "parent": {
              "href": "/api/v2/metrics/my-project",
              "type": "application/json"
            },
            "self": {
              "href": "/api/v2/metrics/my-project/my-metric",
              "type": "application/json"
            }
          },
          "description": "description",
          "activeExperimentCount": 2,
          "activeGuardedRolloutCount": 1,
          "randomizationUnits": [
            "user"
          ],
          "guardedRolloutCount": 0,
          "archived": true,
          "urls": [
            null,
            null
          ],
          "_access": {
            "allowed": [
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              },
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              }
            ],
            "denied": [
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              },
              {
                "reason": {
                  "role_name": "role_name",
                  "notActions": [
                    null,
                    null
                  ],
                  "notResources": [
                    "notResources",
                    "notResources"
                  ],
                  "effect": "allow",
                  "resources": [
                    "proj/*:env/*;qa_*:/flag/*"
                  ],
                  "actions": [
                    "*"
                  ]
                },
                "action": "action"
              }
            ]
          },
          "_site": {
            "href": "href",
            "type": "type"
          },
          "selector": "selector",
          "_version": 1,
          "key": "metric-key-123abc",
          "percentileValue": 95,
          "kind": "custom",
          "_attachedFlagCount": 0,
          "metricGroupCount": 0,
          "filters": {
            "op": "op",
            "negate": false,
            "values": [
              "JP"
            ],
            "contextKind": "user",
            "attribute": "country",
            "type": "contextAttribute"
          },
          "_creationDate": 1,
          "tags": [],
          "eventDefault": {
            "disabled": true,
            "value": 0
          },
          "archivedAt": 6,
          "maintainerId": "569fdeadbeef1644facecafe",
          "unit": "unit",
          "lastSeen": 1,
          "successCriteria": "HigherThanBaseline",
          "releasePolicyCount": 0,
          "_versionId": "version-id-123abc",
          "isNumeric": true,
          "eventKey": "Order placed",
          "experimentCount": 0,
          "name": "My metric",
          "_id": "5902deadbeef667524a01290",
          "lastModified": {
            "date": "2021-08-05T19:46:31.148Z"
          },
          "unitAggregationType": "average",
          "category": "Error monitoring",
          "analysisType": "mean",
          "dataSource": {
            "_name": "_name",
            "_integrationKey": "_integrationKey",
            "key": "key",
            "environmentKey": "environmentKey"
          }
        }
      }
    ]
  },
  "name": "name",
  "_version": 9,
  "key": "key",
  "tags": [
    "tags",
    "tags"
  ]
}