@simonecoelhosfo/optimizely-mcp-server
Version:
Optimizely MCP Server for AI assistants with integrated CLI tools
1,331 lines • 234 kB
JSON
{
"components": {
"parameters": {
"environmentKey": {
"description": "The Environment identifier",
"example": "production",
"in": "path",
"name": "environment_key",
"required": true,
"schema": { "type": "string" }
},
"experimentId": {
"description": "Experiment Id",
"example": 12345,
"in": "path",
"name": "experiment_id",
"required": true,
"schema": { "type": "integer" }
},
"flagId": {
"description": "The Flag identifier",
"example": 12345,
"in": "path",
"name": "flag_id",
"required": true,
"schema": { "type": "integer" }
},
"flagKey": {
"description": "The Flag identifier",
"example": "recurring_deposit",
"in": "path",
"name": "flag_key",
"required": true,
"schema": { "type": "string" }
},
"groupId": {
"description": "The group identifier",
"example": 54321,
"in": "path",
"name": "group_id",
"required": true,
"schema": { "type": "integer" }
},
"pageNumber": {
"description": "Bypass page_token to jump to specific page",
"in": "query",
"name": "page_number",
"schema": { "format": "int64", "type": "integer" }
},
"pageToken": {
"description": "Pagination page token. Implements prev, next, last, first",
"in": "query",
"name": "page_token",
"schema": { "type": "string" }
},
"pageWindow": {
"description": "Number of previous and next page links to supply for the request (defaults to 1).",
"in": "query",
"name": "page_window",
"schema": { "type": "integer" }
},
"perPage": {
"description": "The max number of items to include per page or results.",
"in": "query",
"name": "per_page",
"schema": { "format": "int64", "type": "integer" }
},
"projectId": {
"description": "The project identifier",
"example": 12345,
"in": "path",
"name": "project_id",
"required": true,
"schema": { "type": "integer" }
},
"reportKey": {
"description": "The Report identifier. Get the key from the List Reports endpoint (key is not displayed in the Optimizely app)",
"example": "paid_users_45633910",
"in": "path",
"name": "report_key",
"required": true,
"schema": { "type": "string" }
},
"ruleKey": {
"description": "The Rule identifier",
"example": "rule_key",
"in": "path",
"name": "rule_key",
"required": true,
"schema": { "type": "string" }
},
"variableDefinitionKey": {
"description": "The Variable Definition identifier",
"example": "my_str",
"in": "path",
"name": "variable_definition_key",
"required": true,
"schema": { "type": "string" }
},
"variationKey": {
"description": "The Variation identifier",
"example": "high_discount",
"in": "path",
"name": "variation_key",
"required": true,
"schema": { "type": "string" }
}
},
"requestBodies": {
"FlagRequest": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/FlagRequestBody" }
}
},
"required": true
},
"GroupRequest": {
"content": {
"application/json": {
"example": {
"description": "Promo Group description",
"environment_key": "production",
"name": "Promo Group",
"rules": { "123": { "traffic_allocation": 2500 } }
},
"schema": { "$ref": "#/components/schemas/GroupRequestBody" }
}
},
"required": true
},
"VariationRequest": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/VariationRequestBody" }
}
},
"required": true
}
},
"responses": {
"BadRequestResponse": {
"content": {
"application/problem+json": {
"example": {
"detail": "Another entity already exists with this same key",
"status": 400,
"title": "Key example_entity already exists\"",
"uuid": "42c4c855-42f2-4c9a-8544-37b3dff706d2"
},
"schema": { "$ref": "#/components/schemas/ProblemDetail" }
}
},
"description": "Malformed requests and invalid parameter names and types"
},
"ChangeHistorySuccessResponse": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ChangeHistory" }
}
},
"description": "Successful retrieval of query params for change history.\n\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n"
},
"ConflictResponse": {
"content": {
"application/problem+json": {
"schema": { "$ref": "#/components/schemas/ProblemDetail" }
}
},
"description": "Conflicting resource state with requested action"
},
"EnvironmentMapSuccessResponse": {
"content": {
"application/json": {
"example": {
"development": {
"archived": false,
"key": "development",
"name": "Development",
"priority": 2
},
"production": {
"archived": false,
"key": "production",
"name": "Production",
"priority": 1
}
},
"schema": { "$ref": "#/components/schemas/EnvironmentMap" }
}
},
"description": "Successful update of Environments.\n\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n"
},
"FlagSuccessResponse": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Flag" }
}
},
"description": "Successful retrieval, creation or update of a Flag.\n\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n"
},
"ForbiddenResponse": {
"content": {
"application/problem+json": {
"example": {
"detail": "Permission denied",
"status": 403,
"title": "Forbidden"
},
"schema": { "$ref": "#/components/schemas/ProblemDetail" }
}
},
"description": "Do not have permission to perform the operation"
},
"GroupSuccessResponse": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Group" }
}
},
"description": "Successful retrieval, creation or update of a Group.\n\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n"
},
"NoContentResponse": { "description": "No content in the response" },
"NotFoundResponse": { "description": "Not found. No content" },
"ReportSuccessResponse": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Report" }
}
},
"description": "Successful retrieval of a Report.\n\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n"
},
"RuleSuccessResponse": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Rule" }
}
},
"description": "Successful retrieval of a Rule.\n"
},
"RulesetSuccessResponse": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Ruleset" }
}
},
"description": "Successful retrieval or update of a Ruleset.\n\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n"
},
"UnauthorizedResponse": {
"content": {
"application/problem+json": {
"schema": { "$ref": "#/components/schemas/ProblemDetail" }
}
},
"description": "Invalid credentials"
},
"UnprocessableEntityResponse": {
"content": {
"application/problem+json": {
"schema": { "$ref": "#/components/schemas/ProblemDetail" }
}
},
"description": "Missing required properties or unknown values for query parameters"
},
"VariationSuccessResponse": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Variation" }
}
},
"description": "Successful retrieval, creation or update of a Variation for a Flag.\n\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n"
}
},
"schemas": {
"AudienceConditions": {
"description": "An Audience Combination composed of other audiences. Each audience is a rule like 'User likes salads', and an Audience Combination is a Boolean combination of these rules, like 'User likes pizza NOT (User likes salads AND User likes soup)'.",
"oneOf": [
{ "$ref": "#/components/schemas/AudienceConditionsArray" },
{ "$ref": "#/components/schemas/AudienceConditionsString" }
]
},
"AudienceConditionsArray": {
"example": [
"or",
{ "audience_id": 123 },
["and", { "audience_id": 456 }, { "audience_id": 789 }]
],
"items": {
"anyOf": [
{
"description": "The logical operator to use (e.g. \"and\", \"or\", or \"not\"). This must be the first item in the audience_conditions array. The \"not\" operator may only be used in conjunction with a single condition or list.",
"type": "string"
},
{
"description": "An invidual conditional, consisting of a JSON object with an \"audience_id\" value.",
"properties": { "audience_id": { "type": "integer" } },
"required": ["audience_id"],
"type": "object"
},
{
"$ref": "#/components/schemas/AudienceConditionsArray",
"description": "A nested AudienceConditionsArray",
"example": [
["and", { "audience_id": 456 }, { "audience_id": 789 }]
]
}
]
},
"type": "array"
},
"AudienceConditionsString": {
"description": "A valid AudienceConditionsArray represented as a JSON string",
"example": "[\n \"or\",\n {\n \"audience_id\": 1038980040\n },\n {\n \"audience_id\": 1033280055\n },\n [\n \"not\",\n {\n \"audience_id\": 1120870079\n }\n ]\n]",
"type": "string"
},
"BrainstormError": {
"properties": {
"id": { "type": "string" },
"message": { "type": "string" },
"type": { "type": "string" }
},
"required": ["message", "type", "id"],
"type": "object"
},
"BrainstormUserChat": {
"properties": {
"id": { "type": "string" },
"type": { "type": "string" },
"user_chat": { "type": "string" }
},
"required": ["user_chat", "type"],
"type": "object"
},
"BrainstormVariableDefinition": {
"properties": {
"default_value": {
"description": "The default value for the variable.",
"type": "string"
},
"description": {
"description": "Additional context of the Flag Variable Definition",
"type": "string"
},
"key": {
"description": "Unique identifier for the variable.",
"type": "string"
},
"type": {
"description": "The data type of the variable.",
"enum": ["integer", "string", "boolean", "double", "json"],
"type": "string"
}
},
"required": ["key", "type", "default_value", "description"],
"type": "object"
},
"BrainstormVariablesChat": {
"properties": {
"interactions": {
"description": "A list of interactions including user chats and responses",
"items": {
"$ref": "#/components/schemas/BrainstormVariablesInteraction"
},
"type": "array"
}
},
"required": ["interactions"],
"type": "object"
},
"BrainstormVariablesInteraction": {
"discriminator": {
"mapping": {
"error": "#/components/schemas/BrainstormError",
"response": "#/components/schemas/BrainstormVariablesResponse",
"user_chat": "#/components/schemas/BrainstormUserChat"
},
"propertyName": "type"
},
"type": "object"
},
"BrainstormVariablesResponse": {
"properties": {
"id": { "type": "string" },
"type": { "type": "string" },
"variables": {
"items": {
"$ref": "#/components/schemas/BrainstormVariableDefinition"
},
"type": "array"
}
},
"required": ["variables", "type", "id"],
"type": "object"
},
"BrainstormVariation": {
"properties": {
"description": {
"description": "Additional context of the Variation",
"type": "string"
},
"key": {
"description": "Unique identifier for the variation.",
"type": "string"
},
"name": { "description": "Name of the variation.", "type": "string" },
"variables": {
"additionalProperties": {
"properties": {
"key": { "type": "string" },
"type": { "type": "string" },
"value": { "type": "string" }
},
"type": "object"
},
"default": {},
"type": "object"
}
},
"required": ["key", "name", "description", "variables"],
"type": "object"
},
"BrainstormVariationsChat": {
"properties": {
"interactions": {
"description": "A list of interactions including user chats and responses",
"items": {
"$ref": "#/components/schemas/BrainstormVariablesInteraction"
},
"type": "array"
}
},
"required": ["interactions"],
"type": "object"
},
"BrainstormVariationsInteraction": {
"discriminator": {
"mapping": {
"error": "#/components/schemas/BrainstormError",
"response": "#/components/schemas/BrainstormVariationsResponse",
"user_chat": "#/components/schemas/BrainstormUserChat"
},
"propertyName": "type"
},
"type": "object"
},
"BrainstormVariationsResponse": {
"properties": {
"id": { "type": "string" },
"type": { "type": "string" },
"variations": {
"items": { "$ref": "#/components/schemas/BrainstormVariation" },
"type": "array"
}
},
"required": ["variations", "type", "id"],
"type": "object"
},
"BulkOperationsRequestBody": {
"properties": {
"keys": {
"description": "The list of resource keys to perform the desired operation",
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
},
"ChangeHistory": {
"items": {
"properties": {
"entity_ids": {
"description": "Array of entity IDs",
"items": {
"anyOf": [{ "type": "integer" }, { "type": "string" }]
},
"type": "array"
},
"entity_type": {
"description": "Flag Key",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"Environment": {
"properties": {
"account_id": {
"description": "The ID of the Account",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"archived": { "example": false, "type": "boolean" },
"id": {
"description": "The ID of the Environment",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"key": {
"description": "User-facing key to identify this Environment.",
"example": "production",
"maxLength": 64,
"pattern": "^[a-zA-Z0-9_\\-]+$",
"type": "string"
},
"name": {
"description": "Name of the Environment.",
"example": "Production",
"type": "string"
},
"priority": {
"description": "Integer representing the priority of the Environment. This is used for ordering in the UI.",
"example": 1,
"type": "integer"
},
"project_id": {
"description": "The ID of the Project this Flag belongs to",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"revision": {
"description": "Revision number for tracking changes",
"readOnly": true,
"type": "integer"
},
"role": {
"description": "Granular permission role",
"example": "admin",
"readOnly": true,
"type": "string"
}
},
"required": ["key", "name", "archived", "priority", "project_id"],
"type": "object"
},
"EnvironmentMap": {
"additionalProperties": { "$ref": "#/components/schemas/Environment" },
"description": "Map of environments that include environment key as key and environment payload as value.",
"type": "object"
},
"Environments": {
"properties": {
"count": {
"description": "Number of Environments on the current page.",
"example": 2,
"type": "integer"
},
"filter_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Url template like '.../{?filter}'",
"example": "/projects/123/environments?archived=false"
},
"first_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to first page of Environments in a series.",
"example": "/projects/123/environments?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#1"
},
"items": {
"items": { "$ref": "#/components/schemas/Environment" },
"type": "array"
},
"last_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to the last page of Environments in a series.",
"example": "/projects/123/environments?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#10"
},
"next_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlList" }],
"description": "List of links to next pages of Environments in a series.\n\n The first element in the array is the exact next page after the current record, etc.\n",
"example": [
"/projects/123/environments?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#6",
"/projects/123/environments?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#7"
]
},
"page": {
"description": "Number of the current page. 1-index based.",
"example": 5,
"type": "integer"
},
"prev_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlList" }],
"description": "List of links to previous pages of Environments in a series.\n\nThe first element in the array is the exact previous page before the current record, etc.\n",
"example": [
"/projects/123/environments?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#4",
"/projects/123/environments?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#3"
]
},
"reset_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to the default pages of Environments",
"example": "..."
},
"total_count": {
"description": "Total number of Environments for this series.",
"example": 20,
"type": "integer"
},
"total_pages": {
"description": "Total number of pages for this series.",
"example": 10,
"type": "integer"
},
"url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to self"
}
},
"required": [
"url",
"first_url",
"last_url",
"count",
"page",
"total_count",
"total_pages",
"items"
],
"type": "object"
},
"EventPropertyCondition": {
"properties": {
"name": { "type": "string" },
"operator": {
"enum": [
"equal_to",
"not_equal_to",
"greater_than",
"greater_than_or_equal_to",
"less_than",
"less_than_or_equal_to",
"contains",
"does_not_contain"
],
"type": "string"
},
"type": { "enum": ["string", "number", "boolean"], "type": "string" },
"value": { "type": "string" }
},
"required": ["name", "type", "value", "operator"],
"type": "object"
},
"Flag": {
"example": {
"account_id": 12345,
"archive_url": "...",
"archived": false,
"created_by_user_email": "testuser@optimizely.com",
"created_time": "2019-05-08T00:00:00.000Z",
"delete_url": "string",
"description": "Flag used for driving customers to use recurring deposits by showing a graph of compound interest over time",
"environments": {
"development": {
"disable_url": "...",
"enable_url": "...",
"enabled": false,
"key": "development",
"name": "Development",
"priority": 2,
"rules_summary": [
{
"audience_ids": [1],
"created_time": "2022-01-08T00:00:00.000Z",
"days_running": 30,
"enabled": true,
"key": "a/b",
"name": "A/B Test",
"primary_metric": "conversion_rate",
"traffic_allocation": 100,
"type": "experiment",
"updated_time": "2022-01-08T00:00:00.000Z"
}
]
},
"production": {
"disable_url": "...",
"enable_url": "...",
"enabled": false,
"key": "production",
"name": "Production",
"priority": 1,
"rules_detail": [
{
"audience_ids": [1],
"created_time": "2022-01-08T00:00:00.000Z",
"days_running": 30,
"enabled": true,
"id": 123,
"key": "a/b",
"name": "A/B Test",
"primary_metric": "conversion_rate",
"traffic_allocation": 100,
"type": "experiment",
"updated_time": "2022-01-08T00:00:00.000Z"
}
],
"rules_summary": {
"a/b": { "keys": ["new_users"] },
"targeted_delivery": { "keys": ["paid_users", "trial_users"] }
}
}
},
"id": 45633994,
"key": "recurring_deposit",
"name": "Recurring Deposit",
"outlier_filtering_enabled": false,
"project_id": 12345,
"revision": 1,
"unarchive_url": "...",
"update_url": "...",
"updated_time": "2019-05-08T00:00:00.000Z",
"url": "...",
"urn": "flags.flag.optimizely.com::asdfsdf-2344-efadf03-343434-efrrr",
"variable_definitions": {
"advanced": {
"default_value": "{\n\t\"hello\": 123\n}",
"description": "This variable is used to configure the advanced used for advanced purposes",
"key": "advanced",
"type": "json"
},
"amount": {
"default_value": "0.0",
"description": "This variable is used to configure the amount used for computing the discount",
"key": "amount",
"type": "double"
},
"message": {
"default_value": "Use recurring deposits to compound interest",
"description": "This variable is used to configure the message used for displaying the discount",
"key": "message",
"type": "string"
}
}
},
"properties": {
"account_id": {
"description": "The ID of the Account this Flag belongs to",
"format": "int64",
"type": "integer"
},
"archive_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"example": "...",
"readOnly": true
},
"archived": { "example": false, "type": "boolean" },
"created_by_user_email": {
"example": "testuser@optimizely.com",
"readOnly": true,
"type": "string"
},
"created_time": {
"example": "2019-05-08T00:00:00.000Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"delete_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"readOnly": true
},
"description": {
"example": "Flag used for driving customers to use recurring deposits by showing a graph of compound interest over time",
"type": "string"
},
"environments": {
"additionalProperties": {
"$ref": "#/components/schemas/FlagEnvironment"
},
"readOnly": true,
"type": "object"
},
"id": { "example": 45633994, "readOnly": true, "type": "integer" },
"key": { "example": "recurring_deposit", "type": "string" },
"name": { "example": "Recurring Deposit", "type": "string" },
"outlier_filtering_enabled": {
"default": false,
"example": false,
"type": "boolean"
},
"project_id": {
"description": "The ID of the Project this Flag belongs to",
"format": "int64",
"type": "integer"
},
"revision": {
"description": "Revision number for tracking changes",
"readOnly": true,
"type": "integer"
},
"role": {
"description": "Granular permission role",
"example": "admin",
"readOnly": true,
"type": "string"
},
"unarchive_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"example": "...",
"readOnly": true
},
"update_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"example": "...",
"readOnly": true
},
"updated_time": {
"example": "2019-05-08T00:00:00.000Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to self",
"example": "...",
"readOnly": true
},
"urn": {
"description": "The URN for the Flag",
"example": "flags.flag.optimizely.com::asdfsdf-2344-efadf03-343434-efrrr",
"readOnly": true,
"type": "string"
},
"variable_definitions": {
"additionalProperties": {
"$ref": "#/components/schemas/VariableDefinition"
},
"default": {},
"type": "object"
}
},
"required": [
"id",
"urn",
"key",
"name",
"created_time",
"updated_time",
"environments",
"url"
],
"type": "object"
},
"FlagEnvironment": {
"properties": {
"created_time": {
"example": "2019-05-08T00:00:00.000Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"disable_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to disable this flag in the environment",
"example": "...",
"readOnly": true
},
"enable_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to enable this flag in the environment",
"example": "...",
"readOnly": true
},
"enabled": { "example": false, "type": "boolean" },
"has_restricted_permissions": { "example": false, "type": "boolean" },
"id": {
"description": "The ID of the Environment",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"key": { "example": "production", "type": "string" },
"name": { "example": "Production\"", "type": "string" },
"priority": {
"description": "Integer representing the priority of the Environment. This is used for ordering in the UI.",
"example": 1,
"type": "integer"
},
"rules_detail": {
"items": { "$ref": "#/components/schemas/RuleDetails" },
"type": "array"
},
"rules_summary": {
"additionalProperties": {
"$ref": "#/components/schemas/RulesetSummary"
},
"description": "Map of rules that include rule type as key and summary as value",
"type": "object"
},
"status": {
"description": "Status of the Flag",
"example": "draft",
"type": "string"
}
},
"required": ["name", "key", "priority"],
"type": "object"
},
"FlagMap": {
"additionalProperties": { "$ref": "#/components/schemas/Flag" },
"description": "Map of flags that include flag key as key and flag payload as value.",
"type": "object"
},
"FlagRequestBody": {
"properties": {
"description": {
"example": "Flag used for driving customers to use recurring deposits by showing a graph of compound interest over time",
"type": "string"
},
"key": { "example": "recurring_deposit", "type": "string" },
"name": { "example": "Recurring Deposit", "type": "string" },
"outlier_filtering_enabled": {
"default": false,
"example": false,
"type": "boolean"
},
"variable_definitions": {
"additionalProperties": {
"$ref": "#/components/schemas/VariableDefinition"
},
"example": {
"advanced": {
"default_value": "{\n\t\"hello\": 123\n}",
"description": "This variable is used to configure the advanced used for advanced purposes",
"key": "advanced",
"type": "json"
},
"amount": {
"default_value": "0.0",
"description": "This variable is used to configure the amount used for computing the discount",
"key": "amount",
"type": "double"
},
"message": {
"default_value": "Use recurring deposits to compound interest",
"description": "This variable is used to configure the message used for displaying the discount",
"key": "message",
"type": "string"
}
},
"type": "object"
}
},
"required": ["key"],
"type": "object"
},
"Flags": {
"properties": {
"count": {
"description": "Number of Flags on the current page.",
"example": 2,
"type": "integer"
},
"create_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }]
},
"fetch_flag_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "A url template to be used to find a particular Flag.\n"
},
"filter_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Url template like '.../{?filter}'"
},
"first_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to first page of Flags in a series.",
"example": "/projects/123/flags?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#1"
},
"items": {
"items": { "$ref": "#/components/schemas/Flag" },
"type": "array"
},
"last_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to the last page of Flags in a series.",
"example": "/projects/123/flags?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#10"
},
"next_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlList" }],
"description": "List of links to next pages of Flags in a series.\n\n The first element in the array is the exact next page after the current record, etc.\n",
"example": [
"/projects/123/flags?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#6",
"/projects/123/flags?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#7"
]
},
"page": {
"description": "Number of the current page. 1-index based.",
"example": 5,
"type": "integer"
},
"prev_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlList" }],
"description": "List of links to previous pages of Flags in a series.\n\nThe first element in the array is the exact previous page before the current record, etc.\n",
"example": [
"/projects/123/flags?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#4",
"/projects/123/flags?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#3"
]
},
"reset_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to the default pages of Flags",
"example": "..."
},
"sort_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Url template like '.../{?sort}'"
},
"total_count": {
"description": "Total number of Flags for this series.",
"example": 20,
"type": "integer"
},
"total_pages": {
"description": "Total number of pages for this series.",
"example": 10,
"type": "integer"
},
"url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to self"
}
},
"required": [
"url",
"first_url",
"last_url",
"count",
"page",
"total_count",
"total_pages",
"items"
],
"type": "object"
},
"Group": {
"example": {
"archive_url": "/projects/12345/groups/archived",
"archived": false,
"created_time": "2019-05-08T00:00:00.000Z",
"description": "Promo group description",
"environment_key": "production",
"id": 1,
"name": "Promo group",
"project_id": 12345,
"revision": 1,
"role": "viewer",
"rules": {
"321": {
"created_time": "2022-01-08T00:00:00.000Z",
"flag_key": "recurring_revenue",
"flag_name": "Recurring REvenue",
"flag_status": "unarchived",
"rule_key": "experiment_one",
"rule_name": "Experiment One",
"traffic_allocation": 2000,
"updated_time": "2022-01-08T00:00:00.000Z"
}
},
"unarchive_url": "/projects/12345/groups/unarchived",
"update_url": "/projects/12345/groups",
"updated_time": "2019-05-08T00:00:00.000Z",
"url": "/projects/12345/groups/123",
"urn": "groups.flag.optimizely.com::1"
},
"properties": {
"archive_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"example": "...",
"readOnly": true
},
"archived": { "example": false, "type": "boolean" },
"created_time": {
"example": "2019-05-08T00:00:00.000Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"delete_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"readOnly": true
},
"description": { "example": "promotion group", "type": "string" },
"environment_key": {
"example": "production",
"minLength": 1,
"type": "string"
},
"id": { "example": 1, "readOnly": true, "type": "integer" },
"name": { "example": "PromoGroup", "type": "string" },
"project_id": {
"description": "The ID of the Project this Group belongs to",
"format": "int64",
"type": "integer"
},
"revision": {
"description": "Revision number for tracking changes",
"readOnly": true,
"type": "integer"
},
"role": {
"description": "Granular permission role",
"example": "admin",
"readOnly": true,
"type": "string"
},
"rules": {
"allOf": [{ "$ref": "#/components/schemas/GroupRuleMap" }]
},
"unarchive_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"example": "...",
"readOnly": true
},
"update_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"example": "...",
"readOnly": true
},
"updated_time": {
"example": "2019-05-08T00:00:00.000Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to self",
"example": "...",
"readOnly": true
},
"urn": {
"description": "The URN for the Group",
"example": "groups.flag.optimizely.com::1",
"readOnly": true,
"type": "string"
}
},
"required": [
"id",
"urn",
"name",
"environment_key",
"created_time",
"updated_time"
],
"type": "object"
},
"GroupMap": {
"additionalProperties": { "$ref": "#/components/schemas/Group" },
"description": "Map of groups that include group id as key and group payload as value.",
"type": "object"
},
"GroupRequestBody": {
"properties": {
"description": { "example": "promotion group", "type": "string" },
"environment_key": { "example": "production", "type": "string" },
"name": {
"example": "PromoGroup",
"maxLength": 255,
"minLength": 1,
"type": "string"
},
"rules": {
"allOf": [{ "$ref": "#/components/schemas/GroupRuleMap" }]
}
},
"required": ["name", "environment_key"],
"type": "object"
},
"GroupRule": {
"example": { "traffic_allocation": 5000 },
"properties": {
"flag_key": {
"description": "The Key of the Flag this GroupRule is related",
"example": "flag_key",
"readOnly": true,
"type": "string"
},
"flag_name": {
"description": "The name of the Flag this GroupRule is related to.",
"example": "A Feature Flag",
"readOnly": true,
"type": "string"
},
"flag_status": {
"description": "Status of the Flag thie GroupRule is related",
"enum": ["archived", "unarchived"],
"example": "archived",
"readOnly": true,
"type": "string"
},
"rule_enabled": {
"description": "If the underlying Rule and Ruleset are both enabled",
"example": true,
"readOnly": true,
"type": "boolean"
},
"rule_key": {
"description": "The Key of the Rule this GroupRule belongs to",
"example": "paid_users",
"readOnly": true,
"type": "string"
},
"rule_name": {
"description": "The Name of the Rule this GroupRule belongs to",
"example": "Paid Users",
"readOnly": true,
"type": "string"
},
"rule_status": {
"description": "The status of the rule",
"example": "draft",
"readOnly": true,
"type": "string"
},
"traffic_allocation": {
"description": "The traffic allocation for the Rule",
"example": 2000,
"maximum": 10000,
"minimum": 0,
"type": "integer"
}
},
"required": ["traffic_allocation"],
"type": "object"
},
"GroupRuleMap": {
"additionalProperties": { "$ref": "#/components/schemas/GroupRule" },
"description": "Map of group rules that include rule id as key and group rule as value.",
"type": "object"
},
"Groups": {
"properties": {
"count": {
"description": "Number of Groups on the current page.",
"example": 2,
"type": "integer"
},
"create_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }]
},
"filter_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Url template like '.../{?filter}'"
},
"first_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to first page of Groups in a series.",
"example": "/projects/123/groups?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#1"
},
"items": {
"items": { "$ref": "#/components/schemas/Group" },
"type": "array"
},
"last_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to the last page of Groups in a series.",
"example": "/projects/123/groups?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#10"
},
"next_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlList" }],
"description": "List of links to next pages of Groups in a series.\n\n The first element in the array is the exact next page after the current record, etc.\n",
"example": [
"/projects/123/groups?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#6",
"/projects/123/groups?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#7"
]
},
"page": {
"description": "Number of the current page. 1-index based.",
"example": 5,
"type": "integer"
},
"prev_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlList" }],
"description": "List of links to previous pages of Groups in a series.\n\nThe first element in the array is the exact previous page before the current record, etc.\n",
"example": [
"/projects/123/groups?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#4",
"/projects/123/groups?page_token=gASVCQAAAAAAAACMBTF8MnwylC4%3D#3"
]
},
"reset_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to the default pages of Groups",
"example": "..."
},
"sort_url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Url template like '.../{?sort}'"
},
"total_count": {
"description": "Total number of Groups for this series.",
"example": 20,
"type": "integer"
},
"total_pages": {
"description": "Total number of pages for this series.",
"example": 10,
"type": "integer"
},
"url": {
"allOf": [{ "$ref": "#/components/schemas/UrlValue" }],
"description": "Link to self"
}
},
"required": [
"url",
"first_url",
"last_url",
"count",
"page",
"total_count",
"total_pages",
"items"
],
"type": "object"
},
"Metric": {
"properties": {
"aggregator": {
"description": "The aggregation function for the numerator of the metric. 'unique' measures the number of unique visitors/sessions that include the specified Event. 'count' measures the total number of occurrences of Event for the scope (visitor/session). 'sum' is the sum of the 'field' value",
"enum": ["unique", "count", "sum"],
"type": "string"
},
"display_title": {
"description": "An optional title for the unique metric configuration. If not provided, the event name will be used.",