{
  "openapi" : "3.0.1",
  "info" : {
    "title" : "Commons Rest Api",
    "description" : "Commons Rest endpoints",
    "license" : {
      "name" : "LGPL",
      "url" : "https://www.gnu.org/licenses/lgpl-3.0.en.html"
    },
    "version" : "1.0"
  },
  "tags" : [ {
    "name" : "/v1/features",
    "description" : "Manages product experimental features"
  }, {
    "name" : "/v1/settings",
    "description" : "Managing settings"
  } ],
  "paths" : {
    "/state/status" : {
      "get" : {
        "operationId" : "online",
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : { }
            }
          }
        }
      },
      "put" : {
        "operationId" : "setStatus",
        "parameters" : [ {
          "name" : "status",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "*/*" : { }
            }
          }
        }
      }
    },
    "/state/status/{userId}" : {
      "get" : {
        "operationId" : "getStatus",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : { }
            }
          }
        }
      },
      "put" : {
        "operationId" : "setStatus_1",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "status",
          "in" : "query",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "*/*" : { }
            }
          }
        },
        "deprecated" : true
      }
    },
    "/v1/features/{featureName}" : {
      "get" : {
        "tags" : [ "/v1/features" ],
        "summary" : "Check if a feature is enabled for a user",
        "description" : "Check if a feature is enabled for a user",
        "operationId" : "isFeatureActiveForUser",
        "parameters" : [ {
          "name" : "featureName",
          "in" : "path",
          "description" : "Feature name identifier",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Request fulfilled"
          },
          "400" : {
            "description" : "Invalid query input"
          },
          "401" : {
            "description" : "Unauthorized operation"
          },
          "500" : {
            "description" : "Internal server error"
          }
        }
      }
    },
    "/v1/settings/{context}/{scope}/{settingKey}" : {
      "get" : {
        "tags" : [ "/v1/settings" ],
        "summary" : "Gets a specific setting value",
        "description" : "Gets a specific setting value",
        "operationId" : "getSetting",
        "parameters" : [ {
          "name" : "context",
          "in" : "path",
          "description" : "Context - Format 'contextName,contextId' where 'contextId' is optional. Example: GLOBAL or USER,john",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "scope",
          "in" : "path",
          "description" : "Scope - Format 'scopeName,scopeId' where 'scopeId' is optional. Example: GLOBAL or APPLICATION,wiki or SPACE,marketing",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "settingKey",
          "in" : "path",
          "description" : "Setting key",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Request fulfilled"
          },
          "400" : {
            "description" : "Invalid query input"
          },
          "401" : {
            "description" : "User does not have permissions to get it"
          },
          "404" : {
            "description" : "Setting does not exist"
          },
          "500" : {
            "description" : "Internal server error"
          }
        }
      },
      "put" : {
        "tags" : [ "/v1/settings" ],
        "summary" : "Sets a specific setting value",
        "description" : "Sets a specific setting value",
        "operationId" : "setSetting",
        "parameters" : [ {
          "name" : "context",
          "in" : "path",
          "description" : "Context - Format 'contextName,contextId' where 'contextId' is optional. Example: GLOBAL or USER,john",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "scope",
          "in" : "path",
          "description" : "Scope - Format 'scopeName,scopeId' where 'scopeId' is optional. Example: GLOBAL or APPLICATION,wiki or SPACE,marketing",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "settingKey",
          "in" : "path",
          "description" : "Setting key",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "Setting value",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SettingValueEntity"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Request fulfilled"
          },
          "400" : {
            "description" : "Invalid query input"
          },
          "401" : {
            "description" : "User does not have permissions to update it"
          },
          "500" : {
            "description" : "Internal server error"
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "SettingValueEntity" : {
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "string"
          }
        }
      }
    }
  }
}