WingifyGuides

Toggle Feature Flag Status For an Environment

#Request URI for Toggling Feature Flag Status for an Environment

PATCH accounts/1/environments/1/features/1/toggle

#OpenAPI definition

{
  "openapi": "3.1.0",
  "info": {
    "title": "fme-apis",
    "version": "4"
  },
  "servers": [
    {
      "url": "https://app.wingify.com/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "token"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/accounts/{account_id}/environments/{environment_id_or_key}/features/{feature_id_or_key}/toggle": {
      "patch": {
        "summary": "Toggle Feature Flag Status For an Environment",
        "description": "",
        "operationId": "fme-toggle-feature-flag-status-for-an-environment",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Use 'current' keyword to refer to the Main Workspace or the Integer Workspace Id",
            "schema": {
              "type": "string",
              "default": "current"
            },
            "required": true
          },
          {
            "name": "environment_id_or_key",
            "in": "path",
            "description": "Environment ID/Key for which Feature Flag needs to be evaluated",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "feature_id_or_key",
            "in": "path",
            "description": "Feature Flag ID/Key",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "isEnabled"
                ],
                "properties": {
                  "isEnabled": {
                    "type": "boolean",
                    "description": "Feature Flag Status"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"_errors\": [\n    {\n      \"code\": 400,\n      \"message\": \"Descriptive error message indicating the issue.\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "_errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "integer",
                            "example": 400,
                            "default": 0
                          },
                          "message": {
                            "type": "string",
                            "example": "Descriptive error message indicating the issue."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}