{
  "swagger": "2.0",
  "schemes": [
    "http"
  ],
  "host": "maif.local",
  "basePath": "/api",
  "info": {
    "contact": {
      "email": "oss@maif.fr",
      "name": "Otoroshi Team"
    },
    "description": "Admin API of the Otoroshi reverse proxy",
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Otoroshi Admin",
    "version": "1.1.2",
    "x-apisguru-categories": [
      "developer_tools"
    ],
    "x-logo": {
      "backgroundColor": "#FFFFFF",
      "url": "https://api.apis.guru/v2/cache/logo/https_maif.github.io_otoroshi_assets_images_svg_otoroshi_logo.svg"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/MAIF/otoroshi/master/docs/manual/code/swagger.json",
        "version": "2.0"
      }
    ],
    "x-preferred": true,
    "x-providerName": "maif.local",
    "x-serviceName": "otoroshi",
    "x-datafire": {
      "name": "maif_local_otoroshi",
      "type": "openapi"
    }
  },
  "externalDocs": {
    "description": "Find out more about Otoroshi",
    "url": "https://maif.github.io/otoroshi/"
  },
  "securityDefinitions": {
    "otoroshi_auth": {
      "type": "basic"
    }
  },
  "tags": [
    {
      "description": "Everything about Otoroshi global configuration",
      "name": "configuration"
    },
    {
      "description": "Everything about Otoroshi import/export",
      "name": "import"
    },
    {
      "description": "Everything about Otoroshi entities templates",
      "name": "templates"
    },
    {
      "description": "Everything about Otoroshi Environments",
      "name": "environments"
    },
    {
      "description": "Everything about Otoroshi service groups",
      "name": "groups"
    },
    {
      "description": "Everything about Otoroshi api keys",
      "name": "apikeys"
    },
    {
      "description": "Everything about Otoroshi service descriptors",
      "name": "services"
    },
    {
      "description": "Everything about Otoroshi stats",
      "name": "stats"
    }
  ],
  "paths": {
    "/api/apikeys": {
      "get": {
        "deprecated": false,
        "description": "Get all api keys",
        "operationId": "allApiKeys",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/ApiKey"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all api keys",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/globalconfig": {
      "get": {
        "deprecated": false,
        "description": "Get the full configuration of Otoroshi",
        "operationId": "globalConfig",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/GlobalConfig"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get the full configuration of Otoroshi",
        "tags": [
          "configuration"
        ]
      },
      "patch": {
        "deprecated": false,
        "description": "Update the global configuration with a diff",
        "operationId": "patchGlobalConfig",
        "parameters": [
          {
            "description": "The updated global config as patch",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Patch"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/GlobalConfig"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update the global configuration with a diff",
        "tags": [
          "configuration"
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update the global configuration",
        "operationId": "putGlobalConfig",
        "parameters": [
          {
            "description": "The updated global config",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GlobalConfig"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/GlobalConfig"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update the global configuration",
        "tags": [
          "configuration"
        ]
      }
    },
    "/api/groups": {
      "get": {
        "deprecated": false,
        "description": "Get all service groups",
        "operationId": "allServiceGroups",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/Group"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all service groups",
        "tags": [
          "groups"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Create a new service group",
        "operationId": "createGroup",
        "parameters": [
          {
            "description": "The service group to create",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Group"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Group"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Create a new service group",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/groups/{groupId}/apikeys": {
      "get": {
        "deprecated": false,
        "description": "Get all api keys for the group of a service",
        "operationId": "apiKeysFromGroup",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/ApiKey"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all api keys for the group of a service",
        "tags": [
          "apikeys"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Create a new api key for a group",
        "operationId": "createApiKeyFromGroup",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The api key to create",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Create a new api key for a group",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/groups/{groupId}/apikeys/{clientId}": {
      "delete": {
        "deprecated": false,
        "description": "Delete an api key for a specified service group",
        "operationId": "deleteApiKeyFromGroup",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Deleted"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Delete an api key",
        "tags": [
          "apikeys"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get an api key for a specified service group",
        "operationId": "apiKeyFromGroup",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get an api key",
        "tags": [
          "apikeys"
        ]
      },
      "patch": {
        "deprecated": false,
        "description": "Update an api key for a specified service descriptor with a diff",
        "operationId": "patchApiKeyFromGroup",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The patch for the api key",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Patch"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update an api key with a diff",
        "tags": [
          "apikeys"
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update an api key for a specified service group",
        "operationId": "updateApiKeyFromGroup",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The updated api key",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update an api key",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/groups/{groupId}/apikeys/{clientId}/quotas": {
      "delete": {
        "deprecated": false,
        "description": "Reset the quota state of an api key",
        "operationId": "resetApiKeyFromGroupQuotas",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Quotas"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Reset the quota state of an api key",
        "tags": [
          "apikeys"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get the quota state of an api key",
        "operationId": "apiKeyFromGroupQuotas",
        "parameters": [
          {
            "description": "The api key group id",
            "in": "path",
            "name": "groupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Quotas"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get the quota state of an api key",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/groups/{serviceGroupId}": {
      "delete": {
        "deprecated": false,
        "description": "Delete a service group",
        "operationId": "deleteGroup",
        "parameters": [
          {
            "description": "The service group id",
            "in": "path",
            "name": "serviceGroupId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Deleted"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Delete a service group",
        "tags": [
          "groups"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get a service group",
        "operationId": "serviceGroup",
        "parameters": [
          {
            "description": "The service group id",
            "in": "path",
            "name": "serviceGroupId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Group"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get a service group",
        "tags": [
          "groups"
        ]
      },
      "patch": {
        "deprecated": false,
        "description": "Update a service group with a diff",
        "operationId": "patchGroup",
        "parameters": [
          {
            "description": "The service group id",
            "in": "path",
            "name": "serviceGroupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The patch for the service group",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Patch"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Group"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update a service group with a diff",
        "tags": [
          "groups"
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update a service group",
        "operationId": "updateGroup",
        "parameters": [
          {
            "description": "The service group id",
            "in": "path",
            "name": "serviceGroupId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The updated service group",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Group"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Group"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update a service group",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/groups/{serviceGroupId}/services": {
      "get": {
        "deprecated": false,
        "description": "Get all services descriptor for a group",
        "operationId": "serviceGroupServices",
        "parameters": [
          {
            "description": "The service group id",
            "in": "path",
            "name": "serviceGroupId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/ApiKey"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all services descriptor for a group",
        "tags": [
          "services"
        ]
      }
    },
    "/api/import": {
      "post": {
        "deprecated": false,
        "description": "Import the full state of Otoroshi as a file",
        "operationId": "fullImportFromFile",
        "parameters": [
          {
            "description": "The full export",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ImportExport"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Done"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Import the full state of Otoroshi as a file",
        "tags": [
          "import"
        ]
      }
    },
    "/api/live": {
      "get": {
        "deprecated": false,
        "description": "Get global otoroshi stats",
        "operationId": "globalLiveStats",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Stats"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get global otoroshi stats",
        "tags": [
          "stats"
        ]
      }
    },
    "/api/live/{id}": {
      "get": {
        "deprecated": false,
        "description": "Get live feed of global otoroshi stats (global) or for a service {id}",
        "operationId": "serviceLiveStats",
        "parameters": [
          {
            "description": "The service id or global for otoroshi stats",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json",
          "text/event-stream"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Stats"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get live feed of otoroshi stats",
        "tags": [
          "stats"
        ]
      }
    },
    "/api/otoroshi.json": {
      "get": {
        "deprecated": false,
        "description": "Export the full state of Otoroshi",
        "operationId": "fullExport",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ImportExport"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Export the full state of Otoroshi",
        "tags": [
          "import"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Import the full state of Otoroshi",
        "operationId": "fullImport",
        "parameters": [
          {
            "description": "The full export",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ImportExport"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Done"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Import the full state of Otoroshi",
        "tags": [
          "import"
        ]
      }
    },
    "/api/services": {
      "get": {
        "deprecated": false,
        "description": "Get all services",
        "operationId": "allServices",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/Service"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all services",
        "tags": [
          "services"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Create a new service descriptor",
        "operationId": "createService",
        "parameters": [
          {
            "description": "The service descriptor to create",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Service"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Create a new service descriptor",
        "tags": [
          "services"
        ]
      }
    },
    "/api/services/{serviceId}": {
      "delete": {
        "deprecated": false,
        "description": "Delete a service descriptor",
        "operationId": "deleteService",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Deleted"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Delete a service descriptor",
        "tags": [
          "services"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get a service descriptor",
        "operationId": "service",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get a service descriptor",
        "tags": [
          "services"
        ]
      },
      "patch": {
        "deprecated": false,
        "description": "Update a service descriptor with a diff",
        "operationId": "patchService",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The patch for the service",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Patch"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update a service descriptor with a diff",
        "tags": [
          "services"
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update a service descriptor",
        "operationId": "updateService",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The updated service descriptor",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Service"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update a service descriptor",
        "tags": [
          "services"
        ]
      }
    },
    "/api/services/{serviceId}/apikeys": {
      "get": {
        "deprecated": false,
        "description": "Get all api keys for the group of a service",
        "operationId": "apiKeys",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/ApiKey"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all api keys for the group of a service",
        "tags": [
          "apikeys"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Create a new api key for a service",
        "operationId": "createApiKey",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The api key to create",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Create a new api key for a service",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/services/{serviceId}/apikeys/{clientId}": {
      "delete": {
        "deprecated": false,
        "description": "Delete an api key for a specified service descriptor",
        "operationId": "deleteApiKey",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Deleted"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Delete an api key",
        "tags": [
          "apikeys"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get an api key for a specified service descriptor",
        "operationId": "apiKey",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get an api key",
        "tags": [
          "apikeys"
        ]
      },
      "patch": {
        "deprecated": false,
        "description": "Update an api key for a specified service descriptor with a diff",
        "operationId": "patchApiKey",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The patch for the api key",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Patch"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update an api key with a diff",
        "tags": [
          "apikeys"
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update an api key for a specified service descriptor",
        "operationId": "updateApiKey",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The updated api key",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update an api key",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/services/{serviceId}/apikeys/{clientId}/group": {
      "get": {
        "deprecated": false,
        "description": "Get the group of an api key",
        "operationId": "apiKeyGroup",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Group"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get the group of an api key",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/services/{serviceId}/apikeys/{clientId}/quotas": {
      "delete": {
        "deprecated": false,
        "description": "Reset the quota state of an api key",
        "operationId": "resetApiKeyQuotas",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Quotas"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Reset the quota state of an api key",
        "tags": [
          "apikeys"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get the quota state of an api key",
        "operationId": "apiKeyQuotas",
        "parameters": [
          {
            "description": "The api key service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "the api key id",
            "in": "path",
            "name": "clientId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Quotas"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get the quota state of an api key",
        "tags": [
          "apikeys"
        ]
      }
    },
    "/api/services/{serviceId}/targets": {
      "delete": {
        "deprecated": false,
        "description": "Delete a service descriptor target",
        "operationId": "serviceDeleteTarget",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/Target"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Delete a service descriptor target",
        "tags": [
          "services"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get a service descriptor targets",
        "operationId": "serviceTargets",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/Target"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get a service descriptor targets",
        "tags": [
          "services"
        ]
      },
      "patch": {
        "deprecated": false,
        "description": "Update a service descriptor targets",
        "operationId": "updateServiceTargets",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The patch for the service targets",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Patch"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/Target"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update a service descriptor targets",
        "tags": [
          "services"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Add a target to a service descriptor",
        "operationId": "serviceAddTarget",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The updated service descriptor",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Target"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/Target"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Add a target to a service descriptor",
        "tags": [
          "services"
        ]
      }
    },
    "/api/services/{serviceId}/template": {
      "delete": {
        "deprecated": false,
        "description": "Delete a service descriptor error template",
        "operationId": "deleteServiceTemplate",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Deleted"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Delete a service descriptor error template",
        "tags": [
          "services"
        ]
      },
      "get": {
        "deprecated": false,
        "description": "Get a service descriptor error template",
        "operationId": "serviceTemplate",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ErrorTemplate"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get a service descriptor error template",
        "tags": [
          "services"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Update a service descriptor targets",
        "operationId": "createServiceTemplate",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The patch for the service error template",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ErrorTemplate"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ErrorTemplate"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Create a service descriptor error template",
        "tags": [
          "services"
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update an error template to a service descriptor",
        "operationId": "updateServiceTemplate",
        "parameters": [
          {
            "description": "The service id",
            "in": "path",
            "name": "serviceId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The updated service descriptor template",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ErrorTemplate"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ErrorTemplate"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Update an error template to a service descriptor",
        "tags": [
          "services"
        ]
      }
    },
    "/health": {
      "get": {
        "deprecated": false,
        "description": "Import the full state of Otoroshi as a file",
        "operationId": "health",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/OtoroshiHealth"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "summary": "Return current Otoroshi health",
        "tags": [
          "health"
        ]
      }
    },
    "/lines": {
      "get": {
        "deprecated": false,
        "description": "Get all environments provided by the current Otoroshi instance",
        "operationId": "allLines",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Environment"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all environments",
        "tags": [
          "environments"
        ]
      }
    },
    "/lines/{line}/services": {
      "get": {
        "deprecated": false,
        "description": "Get all services for an environment provided by the current Otoroshi instance",
        "operationId": "servicesForALine",
        "parameters": [
          {
            "description": "The environment where to find services",
            "in": "path",
            "name": "line",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "items": {
                "$ref": "#/definitions/Service"
              },
              "type": "array"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get all services for an environment",
        "tags": [
          "environments"
        ]
      }
    },
    "/new/apikey": {
      "get": {
        "deprecated": false,
        "description": "Get a template of an Otoroshi Api Key. The generated entity is not persisted",
        "operationId": "initiateApiKey",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/ApiKey"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get a template of an Otoroshi Api Key",
        "tags": [
          "templates"
        ]
      }
    },
    "/new/group": {
      "get": {
        "deprecated": false,
        "description": "Get a template of an Otoroshi service group. The generated entity is not persisted",
        "operationId": "initiateServiceGroup",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Group"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get a template of an Otoroshi service group",
        "tags": [
          "templates"
        ]
      }
    },
    "/new/service": {
      "get": {
        "deprecated": false,
        "description": "Get a template of an Otoroshi service descriptor. The generated entity is not persisted",
        "operationId": "initiateService",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          },
          "400": {
            "description": "Bad resource format. Take another look to the swagger, or open an issue :)"
          },
          "401": {
            "description": "You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication"
          },
          "404": {
            "description": "Resource not found or does not exist"
          }
        },
        "security": [
          {
            "otoroshi_auth": []
          }
        ],
        "summary": "Get a template of an Otoroshi service descriptor",
        "tags": [
          "templates"
        ]
      }
    }
  },
  "definitions": {
    "ApiKey": {
      "description": "An Otoroshi Api Key. An Api Key is defined for a group of services to allow usage of the same Api Key for multiple services.",
      "properties": {
        "authorizedGroup": {
          "description": "The group id on which the key is authorized",
          "example": "a string value",
          "type": "string"
        },
        "clientId": {
          "description": "The unique id of the Api Key. Usually 16 random alpha numerical characters, but can be anything",
          "example": "a string value",
          "type": "string"
        },
        "clientName": {
          "description": "The name of the api key, for humans ;-)",
          "example": "a string value",
          "type": "string"
        },
        "clientSecret": {
          "description": "The secret of the Api Key. Usually 64 random alpha numerical characters, but can be anything",
          "example": "a string value",
          "type": "string"
        },
        "dailyQuota": {
          "description": "Authorized number of calls per day",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "enabled": {
          "description": "Whether or not the key is enabled. If disabled, resources won't be available to calls using this key",
          "example": true,
          "type": "boolean"
        },
        "metadata": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Bunch of metadata for the key",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "monthlyQuota": {
          "description": "Authorized number of calls per month",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "throttlingQuota": {
          "description": "Authorized number of calls per second, measured on 10 seconds",
          "example": 123,
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "clientId",
        "clientSecret",
        "clientName",
        "authorizedGroup",
        "enabled"
      ],
      "type": "object"
    },
    "Auth0Config": {
      "description": "Configuration for Auth0 domain",
      "properties": {
        "callbackUrl": {
          "description": "Auth0 callback URL",
          "example": "a string value",
          "type": "string"
        },
        "clientId": {
          "description": "Auth0 client id",
          "example": "a string value",
          "type": "string"
        },
        "clientSecret": {
          "description": "Auth0 client secret",
          "example": "a string value",
          "type": "string"
        },
        "domain": {
          "description": "Auth0 domain",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "clientId",
        "clientSecret",
        "domain",
        "callbackUrl"
      ],
      "type": "object"
    },
    "Canary": {
      "description": "The configuration of the canary mode for a service descriptor",
      "properties": {
        "enabled": {
          "description": "Use canary mode for this service",
          "example": true,
          "type": "boolean"
        },
        "root": {
          "description": "Otoroshi will append this root to any target choosen. If the specified root is '/api/foo', then a request to https://yyyyyyy/bar will actually hit https://xxxxxxxxx/api/foo/bar",
          "example": "a string value",
          "type": "string"
        },
        "targets": {
          "description": "The list of target that Otoroshi will proxy and expose through the subdomain defined before. Otoroshi will do round-robin load balancing between all those targets with circuit breaker mecanism to avoid cascading failures",
          "items": {
            "$ref": "#/definitions/Target"
          },
          "type": "array"
        },
        "traffic": {
          "description": "Ratio of traffic that will be sent to canary targets.",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        }
      },
      "required": [
        "enabled",
        "traffic",
        "targets",
        "root"
      ],
      "type": "object"
    },
    "CleverSettings": {
      "description": "Configuration for CleverCloud client",
      "properties": {
        "consumerKey": {
          "description": "CleverCloud consumer key",
          "example": "a string value",
          "type": "string"
        },
        "consumerSecret": {
          "description": "CleverCloud consumer token",
          "example": "a string value",
          "type": "string"
        },
        "orgaId": {
          "description": "CleverCloud organization id",
          "example": "a string value",
          "type": "string"
        },
        "secret": {
          "description": "CleverCloud oauth secret",
          "example": "a string value",
          "type": "string"
        },
        "token": {
          "description": "CleverCloud oauth token",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "consumerKey",
        "consumerSecret",
        "token",
        "secret",
        "orgaId"
      ],
      "type": "object"
    },
    "ClientConfig": {
      "description": "The configuration of the circuit breaker for a service descriptor",
      "properties": {
        "backoffFactor": {
          "description": "Specify the factor to multiply the delay for each retry",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "callTimeout": {
          "description": "Specify how long each call should last at most in milliseconds",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "globalTimeout": {
          "description": "Specify how long the global call (with retries) should last at most in milliseconds",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "maxErrors": {
          "description": "Specify how many errors can pass before opening the circuit breaker",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "retries": {
          "description": "Specify how many times the client will try to fetch the result of the request after an error before giving up.",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "retryInitialDelay": {
          "description": "Specify the delay between two retries. Each retry, the delay is multiplied by the backoff factor",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "sampleInterval": {
          "description": "Specify the sliding window time for the circuit breaker in milliseconds, after this time, error count will be reseted",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "useCircuitBreaker": {
          "description": "Use a circuit breaker to avoid cascading failure when calling chains of services. Highly recommended !",
          "example": true,
          "type": "boolean"
        }
      },
      "required": [
        "useCircuitBreaker",
        "retries",
        "maxErrors",
        "retryInitialDelay",
        "backoffFactor",
        "callTimeout",
        "globalTimeout",
        "sampleInterval"
      ],
      "type": "object"
    },
    "Deleted": {
      "properties": {
        "deleted": {
          "example": true,
          "type": "boolean"
        }
      },
      "required": [
        "deleted"
      ],
      "type": "object"
    },
    "Done": {
      "properties": {
        "done": {
          "example": true,
          "type": "boolean"
        }
      },
      "required": [
        "done"
      ],
      "type": "object"
    },
    "Environment": {
      "description": "The name of the environment for service descriptors",
      "example": "prod",
      "type": "string"
    },
    "ErrorTemplate": {
      "description": "Error templates for a service descriptor",
      "properties": {
        "messages": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Map for custom messages",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "serviceId": {
          "description": "The Id of the service for which the error template is enabled",
          "example": "a string value",
          "type": "string"
        },
        "template40x": {
          "description": "The html template for 40x errors",
          "example": "a string value",
          "type": "string"
        },
        "template50x": {
          "description": "The html template for 50x errors",
          "example": "a string value",
          "type": "string"
        },
        "templateBuild": {
          "description": "The html template for build page",
          "example": "a string value",
          "type": "string"
        },
        "templateMaintenance": {
          "description": "The html template for maintenance page",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "serviceId",
        "template40x",
        "template50x",
        "templateBuild",
        "templateMaintenance",
        "messages"
      ],
      "type": "object"
    },
    "ExposedApi": {
      "description": "The Open API configuration for your service (if one)",
      "properties": {
        "exposeApi": {
          "description": "Whether or not the current service expose an API with an Open API descriptor",
          "example": true,
          "type": "boolean"
        },
        "openApiDescriptorUrl": {
          "description": "The URL of the Open API descriptor",
          "example": "http://www.google.com",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "exposeApi"
      ],
      "type": "object"
    },
    "GlobalConfig": {
      "description": "The global config object of Otoroshi, used to customize settings of the current Otoroshi instance",
      "properties": {
        "alertsEmails": {
          "description": "Email addresses that will receive all Otoroshi alert events",
          "items": {
            "example": "admin@otoroshi.io",
            "format": "email",
            "type": "string"
          },
          "type": "array"
        },
        "alertsWebhooks": {
          "description": "Webhook that will receive all Otoroshi alert events",
          "items": {
            "$ref": "#/definitions/Webhook"
          },
          "type": "array"
        },
        "analyticsEventsUrl": {
          "description": "The URL to get analytics events from",
          "example": "http://www.google.com",
          "format": "uri",
          "type": "string"
        },
        "analyticsWebhooks": {
          "description": "Webhook that will receive all internal Otoroshi events",
          "items": {
            "$ref": "#/definitions/Webhook"
          },
          "type": "array"
        },
        "apiReadOnly": {
          "description": "If enabled, Admin API won't be able to write/update/delete entities",
          "example": true,
          "type": "boolean"
        },
        "autoLinkToDefaultGroup": {
          "description": "If not defined, every new service descriptor will be added to the default group",
          "example": true,
          "type": "boolean"
        },
        "backofficeAuth0Config": {
          "$ref": "#/definitions/Auth0Config",
          "description": "Optional configuration for the backoffice Auth0 domain"
        },
        "cleverSettings": {
          "$ref": "#/definitions/CleverSettings",
          "description": "Optional CleverCloud configuration"
        },
        "endlessIpAddresses": {
          "description": "IP addresses for which any request to Otoroshi will respond with 128 Gb of zeros",
          "items": {
            "example": "192.192.192.192",
            "format": "ipv4",
            "type": "string"
          },
          "type": "array"
        },
        "ipFiltering": {
          "$ref": "#/definitions/IpFiltering"
        },
        "limitConcurrentRequests": {
          "description": "If enabled, Otoroshi will reject new request if too much at the same time",
          "example": true,
          "type": "boolean"
        },
        "lines": {
          "description": "Possibles lines for Otoroshi",
          "items": {
            "example": "a string value",
            "type": "string"
          },
          "type": "array"
        },
        "mailGunSettings": {
          "$ref": "#/definitions/MailgunSettings",
          "description": "Optional mailgun configuration"
        },
        "maxConcurrentRequests": {
          "description": "The number of authorized request processed at the same time",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "maxHttp10ResponseSize": {
          "description": "The max size in bytes of an HTTP 1.0 response",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "maxLogsSize": {
          "description": "Number of events kept locally",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        },
        "middleFingers": {
          "description": "Use middle finger emoji as a response character for endless HTTP responses",
          "example": true,
          "type": "boolean"
        },
        "perIpThrottlingQuota": {
          "description": "Authorized number of calls per second globally per IP address, measured on 10 seconds",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "privateAppsAuth0Config": {
          "$ref": "#/definitions/Auth0Config",
          "description": "Optional configuration for the private apps Auth0 domain"
        },
        "streamEntityOnly": {
          "description": "HTTP will be streamed only. Doesn't work with old browsers",
          "example": true,
          "type": "boolean"
        },
        "throttlingQuota": {
          "description": "Authorized number of calls per second globally, measured on 10 seconds",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "u2fLoginOnly": {
          "description": "If enabled, login to backoffice through Auth0 will be disabled",
          "example": true,
          "type": "boolean"
        },
        "useCircuitBreakers": {
          "description": "If enabled, services will be authorized to use circuit breakers",
          "example": true,
          "type": "boolean"
        }
      },
      "required": [
        "streamEntityOnly",
        "autoLinkToDefaultGroup",
        "limitConcurrentRequests",
        "maxConcurrentRequests",
        "useCircuitBreakers",
        "apiReadOnly",
        "u2fLoginOnly",
        "ipFiltering",
        "throttlingQuota",
        "perIpThrottlingQuota",
        "analyticsEventsUrl",
        "analyticsWebhooks",
        "alertsWebhooks",
        "alertsEmails",
        "endlessIpAddresses"
      ],
      "type": "object"
    },
    "Group": {
      "description": "An Otoroshi service group is just a group of service descriptor. It is useful to be able to define Api Keys for the whole group",
      "properties": {
        "description": {
          "description": "The descriptoin of the group",
          "example": "a string value",
          "type": "string"
        },
        "id": {
          "description": "The unique id of the group. Usually 64 random alpha numerical characters, but can be anything",
          "example": "a string value",
          "type": "string"
        },
        "name": {
          "description": "The name of the group",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "type": "object"
    },
    "HealthCheck": {
      "description": "The configuration for checking health of a service. Otoroshi will perform GET call on the URL to check if the service is still alive",
      "properties": {
        "enabled": {
          "description": "Whether or not healthcheck is enabled on the current service descriptor",
          "example": true,
          "type": "boolean"
        },
        "url": {
          "description": "The URL to check",
          "example": "http://www.google.com",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "enabled"
      ],
      "type": "object"
    },
    "ImportExport": {
      "description": "The structure that can be imported to or exported from Otoroshi. It represent the memory state of Otoroshi",
      "properties": {
        "admins": {
          "description": "Current U2F admin at the time of export",
          "items": {
            "description": "Administrator using FIDO U2F device to access Otoroshi",
            "properties": {
              "createdAt": {
                "description": "The creation date of the user",
                "example": 123,
                "format": "int64",
                "type": "integer"
              },
              "label": {
                "description": "The label for the user",
                "example": "a string value",
                "type": "string"
              },
              "password": {
                "description": "The hashed password of the user",
                "example": "a string value",
                "type": "string"
              },
              "registration": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "The U2F registration slug",
                "example": {
                  "key": "value"
                },
                "type": "object"
              },
              "username": {
                "description": "The email address of the user",
                "example": "a string value",
                "type": "string"
              }
            },
            "required": [
              "username",
              "label",
              "password",
              "createdAt",
              "registration"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "apiKeys": {
          "description": "Current apik keys at the time of export",
          "items": {
            "description": "An Otoroshi Api Key. An Api Key is defined for a group of services to allow usage of the same Api Key for multiple services.",
            "properties": {
              "authorizedGroup": {
                "description": "The group id on which the key is authorized",
                "example": "a string value",
                "type": "string"
              },
              "clientId": {
                "description": "The unique id of the Api Key. Usually 16 random alpha numerical characters, but can be anything",
                "example": "a string value",
                "type": "string"
              },
              "clientName": {
                "description": "The name of the api key, for humans ;-)",
                "example": "a string value",
                "type": "string"
              },
              "clientSecret": {
                "description": "The secret of the Api Key. Usually 64 random alpha numerical characters, but can be anything",
                "example": "a string value",
                "type": "string"
              },
              "dailyQuota": {
                "description": "Authorized number of calls per day",
                "example": 123,
                "format": "int64",
                "type": "integer"
              },
              "enabled": {
                "description": "Whether or not the key is enabled. If disabled, resources won't be available to calls using this key",
                "example": true,
                "type": "boolean"
              },
              "metadata": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Bunch of metadata for the key",
                "example": {
                  "key": "value"
                },
                "type": "object"
              },
              "monthlyQuota": {
                "description": "Authorized number of calls per month",
                "example": 123,
                "format": "int64",
                "type": "integer"
              },
              "throttlingQuota": {
                "description": "Authorized number of calls per second, measured on 10 seconds",
                "example": 123,
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "clientId",
              "clientSecret",
              "clientName",
              "authorizedGroup",
              "enabled"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "appConfig": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Current env variables at the time of export",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "config": {
          "$ref": "#/definitions/GlobalConfig",
          "description": "Current global config at the time of export"
        },
        "date": {
          "example": "2017-07-21T17:32:28Z",
          "format": "date-time",
          "type": "string"
        },
        "dateRaw": {
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "errorTemplates": {
          "description": "Current error templates at the time of export",
          "items": {
            "description": "Error templates for a service descriptor",
            "properties": {
              "messages": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Map for custom messages",
                "example": {
                  "key": "value"
                },
                "type": "object"
              },
              "serviceId": {
                "description": "The Id of the service for which the error template is enabled",
                "example": "a string value",
                "type": "string"
              },
              "template40x": {
                "description": "The html template for 40x errors",
                "example": "a string value",
                "type": "string"
              },
              "template50x": {
                "description": "The html template for 50x errors",
                "example": "a string value",
                "type": "string"
              },
              "templateBuild": {
                "description": "The html template for build page",
                "example": "a string value",
                "type": "string"
              },
              "templateMaintenance": {
                "description": "The html template for maintenance page",
                "example": "a string value",
                "type": "string"
              }
            },
            "required": [
              "serviceId",
              "template40x",
              "template50x",
              "templateBuild",
              "templateMaintenance",
              "messages"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "label": {
          "example": "a string value",
          "type": "string"
        },
        "serviceDescriptors": {
          "description": "Current service descriptors at the time of export",
          "items": {
            "description": "An otoroshi service descriptor. Represent a forward HTTP call on a domain to another location with some optional api management mecanism",
            "properties": {
              "Canary": {
                "$ref": "#/definitions/Canary"
              },
              "additionalHeaders": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Specify headers that will be added to each client request. Useful to add authentication",
                "example": {
                  "key": "value"
                },
                "type": "object"
              },
              "api": {
                "$ref": "#/definitions/ExposedApi"
              },
              "buildMode": {
                "description": "Display a construction page when a user try to use the service",
                "example": true,
                "type": "boolean"
              },
              "clientConfig": {
                "$ref": "#/definitions/ClientConfig"
              },
              "domain": {
                "description": "The domain on which the service is available.",
                "example": "a string value",
                "type": "string"
              },
              "enabled": {
                "description": "Activate or deactivate your service. Once disabled, users will get an error page saying the service does not exist",
                "example": true,
                "type": "boolean"
              },
              "enforceSecureCommunication": {
                "description": "When enabled, Otoroshi will try to exchange headers with downstream service to ensure no one else can use the service from outside",
                "example": true,
                "type": "boolean"
              },
              "env": {
                "description": "The line on which the service is available. Based on that value, the name of the line will be appended to the subdomain. For line prod, nothing will be appended. For example, if the subdomain is 'foo' and line is 'preprod', then the exposed service will be available at 'foo.preprod.mydomain'",
                "example": "a string value",
                "type": "string"
              },
              "forceHttps": {
                "description": "Will force redirection to https:// if not present",
                "example": true,
                "type": "boolean"
              },
              "groupId": {
                "description": "Each service descriptor is attached to a group. A group can have one or more services. Each API key is linked to a group and allow access to every service in the group",
                "example": "a string value",
                "type": "string"
              },
              "healthCheck": {
                "$ref": "#/definitions/HealthCheck"
              },
              "id": {
                "description": "A unique random string to identify your service",
                "example": "110e8400-e29b-11d4-a716-446655440000",
                "format": "uuid",
                "type": "string"
              },
              "ipFiltering": {
                "$ref": "#/definitions/IpFiltering"
              },
              "localHost": {
                "description": "The host used localy, mainly localhost:xxxx",
                "example": "a string value",
                "type": "string"
              },
              "localScheme": {
                "description": "The scheme used localy, mainly http",
                "example": "a string value",
                "type": "string"
              },
              "maintenanceMode": {
                "description": "Display a maintainance page when a user try to use the service",
                "example": true,
                "type": "boolean"
              },
              "matchingHeaders": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Specify headers that MUST be present on client request to route it. Useful to implement versioning",
                "example": {
                  "key": "value"
                },
                "type": "object"
              },
              "matchingRoot": {
                "description": "The root path on which the service is available",
                "example": "a string value",
                "type": "string"
              },
              "metadata": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Just a bunch of random properties",
                "example": {
                  "key": "value"
                },
                "type": "object"
              },
              "name": {
                "description": "The name of your service. Only for debug and human readability purposes",
                "example": "a string value",
                "type": "string"
              },
              "privateApp": {
                "description": "When enabled, user will be allowed to use the service (UI) only if they are registered users of the private apps domain",
                "example": true,
                "type": "boolean"
              },
              "privatePatterns": {
                "description": "If you define a public pattern that is a little bit too much, you can make some of public URL private again",
                "items": {
                  "example": "a string value",
                  "type": "string"
                },
                "type": "array"
              },
              "publicPatterns": {
                "description": "By default, every services are private only and you'll need an API key to access it. However, if you want to expose a public UI, you can define one or more public patterns (regex) to allow access to anybody. For example if you want to allow anybody on any URL, just use '/.*'",
                "items": {
                  "example": "a string value",
                  "type": "string"
                },
                "type": "array"
              },
              "redirectToLocal": {
                "description": "If you work locally with Otoroshi, you may want to use that feature to redirect one particuliar service to a local host. For example, you can relocate https://foo.preprod.bar.com to http://localhost:8080 to make some tests",
                "example": true,
                "type": "boolean"
              },
              "root": {
                "description": "Otoroshi will append this root to any target choosen. If the specified root is '/api/foo', then a request to https://yyyyyyy/bar will actually hit https://xxxxxxxxx/api/foo/bar",
                "example": "a string value",
                "type": "string"
              },
              "secComExcludedPatterns": {
                "description": "URI patterns excluded from secured communications",
                "items": {
                  "example": "a string value",
                  "type": "string"
                },
                "type": "array"
              },
              "sendOtoroshiHeadersBack": {
                "description": "When enabled, Otoroshi will send headers to consumer like request id, client latency, overhead, etc ...",
                "example": true,
                "type": "boolean"
              },
              "statsdConfig": {
                "$ref": "#/definitions/StatsdConfig"
              },
              "subdomain": {
                "description": "The subdomain on which the service is available",
                "example": "a string value",
                "type": "string"
              },
              "targets": {
                "description": "The list of target that Otoroshi will proxy and expose through the subdomain defined before. Otoroshi will do round-robin load balancing between all those targets with circuit breaker mecanism to avoid cascading failures",
                "items": {
                  "$ref": "#/definitions/Target"
                },
                "type": "array"
              }
            },
            "required": [
              "id",
              "groupId",
              "name",
              "env",
              "domain",
              "subdomain",
              "targets",
              "root",
              "enabled",
              "privateApp",
              "forceHttps",
              "maintenanceMode",
              "buildMode",
              "enforceSecureCommunication"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "serviceGroups": {
          "description": "Current service groups at the time of export",
          "items": {
            "description": "An Otoroshi service group is just a group of service descriptor. It is useful to be able to define Api Keys for the whole group",
            "properties": {
              "description": {
                "description": "The descriptoin of the group",
                "example": "a string value",
                "type": "string"
              },
              "id": {
                "description": "The unique id of the group. Usually 64 random alpha numerical characters, but can be anything",
                "example": "a string value",
                "type": "string"
              },
              "name": {
                "description": "The name of the group",
                "example": "a string value",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "simpleAdmins": {
          "description": "Current simple admins at the time of export",
          "items": {
            "description": "Administrator using just login/password tuple to access Otoroshi",
            "properties": {
              "createdAt": {
                "description": "The creation date of the user",
                "example": 123,
                "format": "int64",
                "type": "integer"
              },
              "label": {
                "description": "The label for the user",
                "example": "a string value",
                "type": "string"
              },
              "password": {
                "description": "The hashed password of the user",
                "example": "a string value",
                "type": "string"
              },
              "username": {
                "description": "The email address of the user",
                "example": "a string value",
                "type": "string"
              }
            },
            "required": [
              "username",
              "label",
              "password",
              "createdAt"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "stats": {
          "$ref": "#/definitions/ImportExportStats",
          "description": "Current global stats at the time of export"
        }
      },
      "required": [
        "label",
        "dateRaw",
        "date",
        "stats",
        "config",
        "admins",
        "simpleAdmins",
        "serviceGroups",
        "apiKeys",
        "serviceDescriptors",
        "errorTemplates"
      ],
      "type": "object"
    },
    "ImportExportStats": {
      "description": "Global stats for the current Otoroshi instances",
      "properties": {
        "calls": {
          "description": "Number of calls to Otoroshi globally",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "dataIn": {
          "description": "The amount of data sent to Otoroshi globally",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "dataOut": {
          "description": "The amount of data sent from Otoroshi globally",
          "example": 123,
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "calls",
        "dataIn",
        "dataOut"
      ],
      "type": "object"
    },
    "IpFiltering": {
      "description": "The filtering configuration block for a service of globally.",
      "properties": {
        "blacklist": {
          "description": "Blacklisted IP addresses",
          "items": {
            "example": "192.192.192.192",
            "format": "ipv4",
            "type": "string"
          },
          "type": "array"
        },
        "whitelist": {
          "description": "Whitelisted IP addresses",
          "items": {
            "example": "192.192.192.192",
            "format": "ipv4",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "whitelist",
        "blacklist"
      ],
      "type": "object"
    },
    "MailgunSettings": {
      "description": "Configuration for mailgun api client",
      "properties": {
        "apiKey": {
          "description": "Mailgun Api Key",
          "example": "a string value",
          "type": "string"
        },
        "domain": {
          "description": "Mailgun domain",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "apiKey",
        "domain"
      ],
      "type": "object"
    },
    "OtoroshiHealth": {
      "description": "The structure that represent current Otoroshi health",
      "properties": {
        "datastore": {
          "enum": [
            "healthy",
            "unhealthy",
            "unreachable"
          ],
          "type": "string"
        },
        "otoroshi": {
          "enum": [
            "healthy",
            "unhealthy",
            "down"
          ],
          "type": "string"
        }
      },
      "required": [
        "otoroshi",
        "datastore"
      ],
      "type": "object"
    },
    "Patch": {
      "description": "A set of changes described in JSON Patch format: http://jsonpatch.com/ (RFC 6902)",
      "items": {
        "properties": {
          "op": {
            "enum": [
              "add",
              "replace",
              "remove",
              "copy",
              "test"
            ],
            "type": "string"
          },
          "path": {
            "example": "a string value",
            "type": "string"
          },
          "value": {}
        },
        "required": [
          "op",
          "path"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "Quotas": {
      "description": "Quotas state for an api key on a service group",
      "properties": {
        "authorizedCallsPerDay": {
          "description": "The number of authorized calls per day",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "authorizedCallsPerMonth": {
          "description": "The number of authorized calls per month",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "authorizedCallsPerSec": {
          "description": "The number of authorized calls per second",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "currentCallsPerDay": {
          "description": "The current number of calls per day",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "currentCallsPerMonth": {
          "description": "The current number of calls per month",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "currentCallsPerSec": {
          "description": "The current number of calls per second",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "remainingCallsPerDay": {
          "description": "The remaining number of calls per day",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "remainingCallsPerMonth": {
          "description": "The number of authorized calls per month",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "remainingCallsPerSec": {
          "description": "The remaining number of calls per second",
          "example": 123,
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "authorizedCallsPerSec",
        "currentCallsPerSec",
        "remainingCallsPerSec",
        "authorizedCallsPerDay",
        "currentCallsPerDay",
        "remainingCallsPerDay",
        "authorizedCallsPerMonth",
        "currentCallsPerMonth",
        "remainingCallsPerMonth"
      ],
      "type": "object"
    },
    "Service": {
      "description": "An otoroshi service descriptor. Represent a forward HTTP call on a domain to another location with some optional api management mecanism",
      "properties": {
        "Canary": {
          "$ref": "#/definitions/Canary"
        },
        "additionalHeaders": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Specify headers that will be added to each client request. Useful to add authentication",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "api": {
          "$ref": "#/definitions/ExposedApi"
        },
        "buildMode": {
          "description": "Display a construction page when a user try to use the service",
          "example": true,
          "type": "boolean"
        },
        "clientConfig": {
          "$ref": "#/definitions/ClientConfig"
        },
        "domain": {
          "description": "The domain on which the service is available.",
          "example": "a string value",
          "type": "string"
        },
        "enabled": {
          "description": "Activate or deactivate your service. Once disabled, users will get an error page saying the service does not exist",
          "example": true,
          "type": "boolean"
        },
        "enforceSecureCommunication": {
          "description": "When enabled, Otoroshi will try to exchange headers with downstream service to ensure no one else can use the service from outside",
          "example": true,
          "type": "boolean"
        },
        "env": {
          "description": "The line on which the service is available. Based on that value, the name of the line will be appended to the subdomain. For line prod, nothing will be appended. For example, if the subdomain is 'foo' and line is 'preprod', then the exposed service will be available at 'foo.preprod.mydomain'",
          "example": "a string value",
          "type": "string"
        },
        "forceHttps": {
          "description": "Will force redirection to https:// if not present",
          "example": true,
          "type": "boolean"
        },
        "groupId": {
          "description": "Each service descriptor is attached to a group. A group can have one or more services. Each API key is linked to a group and allow access to every service in the group",
          "example": "a string value",
          "type": "string"
        },
        "healthCheck": {
          "$ref": "#/definitions/HealthCheck"
        },
        "id": {
          "description": "A unique random string to identify your service",
          "example": "110e8400-e29b-11d4-a716-446655440000",
          "format": "uuid",
          "type": "string"
        },
        "ipFiltering": {
          "$ref": "#/definitions/IpFiltering"
        },
        "localHost": {
          "description": "The host used localy, mainly localhost:xxxx",
          "example": "a string value",
          "type": "string"
        },
        "localScheme": {
          "description": "The scheme used localy, mainly http",
          "example": "a string value",
          "type": "string"
        },
        "maintenanceMode": {
          "description": "Display a maintainance page when a user try to use the service",
          "example": true,
          "type": "boolean"
        },
        "matchingHeaders": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Specify headers that MUST be present on client request to route it. Useful to implement versioning",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "matchingRoot": {
          "description": "The root path on which the service is available",
          "example": "a string value",
          "type": "string"
        },
        "metadata": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Just a bunch of random properties",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "name": {
          "description": "The name of your service. Only for debug and human readability purposes",
          "example": "a string value",
          "type": "string"
        },
        "privateApp": {
          "description": "When enabled, user will be allowed to use the service (UI) only if they are registered users of the private apps domain",
          "example": true,
          "type": "boolean"
        },
        "privatePatterns": {
          "description": "If you define a public pattern that is a little bit too much, you can make some of public URL private again",
          "items": {
            "example": "a string value",
            "type": "string"
          },
          "type": "array"
        },
        "publicPatterns": {
          "description": "By default, every services are private only and you'll need an API key to access it. However, if you want to expose a public UI, you can define one or more public patterns (regex) to allow access to anybody. For example if you want to allow anybody on any URL, just use '/.*'",
          "items": {
            "example": "a string value",
            "type": "string"
          },
          "type": "array"
        },
        "redirectToLocal": {
          "description": "If you work locally with Otoroshi, you may want to use that feature to redirect one particuliar service to a local host. For example, you can relocate https://foo.preprod.bar.com to http://localhost:8080 to make some tests",
          "example": true,
          "type": "boolean"
        },
        "root": {
          "description": "Otoroshi will append this root to any target choosen. If the specified root is '/api/foo', then a request to https://yyyyyyy/bar will actually hit https://xxxxxxxxx/api/foo/bar",
          "example": "a string value",
          "type": "string"
        },
        "secComExcludedPatterns": {
          "description": "URI patterns excluded from secured communications",
          "items": {
            "example": "a string value",
            "type": "string"
          },
          "type": "array"
        },
        "sendOtoroshiHeadersBack": {
          "description": "When enabled, Otoroshi will send headers to consumer like request id, client latency, overhead, etc ...",
          "example": true,
          "type": "boolean"
        },
        "statsdConfig": {
          "$ref": "#/definitions/StatsdConfig"
        },
        "subdomain": {
          "description": "The subdomain on which the service is available",
          "example": "a string value",
          "type": "string"
        },
        "targets": {
          "description": "The list of target that Otoroshi will proxy and expose through the subdomain defined before. Otoroshi will do round-robin load balancing between all those targets with circuit breaker mecanism to avoid cascading failures",
          "items": {
            "$ref": "#/definitions/Target"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "groupId",
        "name",
        "env",
        "domain",
        "subdomain",
        "targets",
        "root",
        "enabled",
        "privateApp",
        "forceHttps",
        "maintenanceMode",
        "buildMode",
        "enforceSecureCommunication"
      ],
      "type": "object"
    },
    "SimpleAdmin": {
      "description": "Administrator using just login/password tuple to access Otoroshi",
      "properties": {
        "createdAt": {
          "description": "The creation date of the user",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "label": {
          "description": "The label for the user",
          "example": "a string value",
          "type": "string"
        },
        "password": {
          "description": "The hashed password of the user",
          "example": "a string value",
          "type": "string"
        },
        "username": {
          "description": "The email address of the user",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "username",
        "label",
        "password",
        "createdAt"
      ],
      "type": "object"
    },
    "Stats": {
      "description": "Live stats for a service or globally",
      "properties": {
        "calls": {
          "description": "Number of calls on the specified service or globally",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "concurrentHandledRequests": {
          "description": "The number of concurrent request currently",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "dataIn": {
          "description": "The amount of data sent to the specified service or Otoroshi globally",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "dataInRate": {
          "description": "The rate of data sent to the specified service or Otoroshi globally",
          "example": 42.2,
          "format": "double",
          "type": "integer"
        },
        "dataOut": {
          "description": "The amount of data sent from the specified service or Otoroshi globally",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "dataOutRate": {
          "description": "The rate of data sent from the specified service or Otoroshi globally",
          "example": 42.2,
          "format": "double",
          "type": "integer"
        },
        "duration": {
          "description": "The average duration for a call",
          "example": 42.2,
          "format": "double",
          "type": "integer"
        },
        "overhead": {
          "description": "The average overhead time induced by Otoroshi for each call",
          "example": 42.2,
          "format": "double",
          "type": "integer"
        },
        "rate": {
          "description": "The rate of data sent from and to the specified service or Otoroshi globally",
          "example": 42.2,
          "format": "double",
          "type": "integer"
        }
      },
      "required": [
        "calls",
        "dataIn",
        "dataOut",
        "rate",
        "duration",
        "overhead",
        "dataInRate",
        "dataOutRate",
        "concurrentHandledRequests"
      ],
      "type": "object"
    },
    "StatsdConfig": {
      "description": "The configuration for statsd metrics push",
      "properties": {
        "datadog": {
          "description": "Datadog agent",
          "example": true,
          "type": "boolean"
        },
        "host": {
          "description": "The host of the StatsD agent",
          "example": "a string value",
          "type": "string"
        },
        "port": {
          "description": "The port of the StatsD agent",
          "example": 123123,
          "format": "int32",
          "type": "integer"
        }
      },
      "required": [
        "host",
        "port",
        "datadog"
      ],
      "type": "object"
    },
    "Target": {
      "description": "A Target is where an HTTP call will be forwarded in the end from a service domain",
      "properties": {
        "host": {
          "description": "The host on which the HTTP call will be forwarded. Can be a domain name, or an IP address. Can also have a port",
          "example": "www.google.com",
          "format": "hostname",
          "type": "string"
        },
        "scheme": {
          "description": "The protocol used for communication. Can be http or https",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "host",
        "scheme"
      ],
      "type": "object"
    },
    "U2FAdmin": {
      "description": "Administrator using FIDO U2F device to access Otoroshi",
      "properties": {
        "createdAt": {
          "description": "The creation date of the user",
          "example": 123,
          "format": "int64",
          "type": "integer"
        },
        "label": {
          "description": "The label for the user",
          "example": "a string value",
          "type": "string"
        },
        "password": {
          "description": "The hashed password of the user",
          "example": "a string value",
          "type": "string"
        },
        "registration": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The U2F registration slug",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "username": {
          "description": "The email address of the user",
          "example": "a string value",
          "type": "string"
        }
      },
      "required": [
        "username",
        "label",
        "password",
        "createdAt",
        "registration"
      ],
      "type": "object"
    },
    "Webhook": {
      "description": "A callback URL where events are posted",
      "properties": {
        "headers": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Headers to authorize the call or whatever",
          "example": {
            "key": "value"
          },
          "type": "object"
        },
        "url": {
          "description": "The URL where events are posted",
          "example": "http://www.google.com",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "url",
        "headers"
      ],
      "type": "object"
    }
  }
}