{
  "openapi": "3.0.1",
  "info": {
    "title": "Storage-API",
    "description": "EdgeЦентр provides an API that allows you to interact with the Storage service.<br><br>\nStorage allows for managing storages, their keys and getting statistics.\n\n# Overview\nOur API has resource-oriented, predictable URLs and uses the HTTP response codes to indicate API errors. We use\nstandard HTTP features, such as HTTP authentication and HTTP terminology, that HTTP clients can understand. JSON is\nreturned in all API responses, including errors.\n\n### Maximum body request\nMaximum API body request size is 1MB.\n### Rate limits\nThere is a general limit of 4 requests per second. If you go over the rate limit, you will receive a response\nstatus of 429.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.edgecenter.ru/storage/"
    }
  ],
  "security": [
    {
      "APIKey": []
    }
  ],
  "tags": [
    {
      "name": "Storages",
      "description": "Manages the storages in your account."
    },
    {
      "name": "Buckets",
      "description": "Manages the buckets in your S3 storages."
    },
    {
      "name": "Locations",
      "description": "Returns information about the Storage locations."
    },
    {
      "name": "Statistics",
      "description": "Returns various Storage statistics, e.g., on traffic volume, number of requests, number of files, etc."
    }
  ],
  "paths": {
    "/resource/v3/location": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Get locations",
        "description": "Returns a list of available Storage locations.",
        "operationId": "locationListHttp",
        "responses": {
          "200": {
            "description": "clientLocationRes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/clientLocationRes"
                  }
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource/v3/storage": {
      "get": {
        "tags": [
          "Storages"
        ],
        "summary": "Get all storages",
        "description": "Returns information about all storages in your account",
        "operationId": "storageListHttpV2",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Amount of records to skip before beginning to write in response",
            "schema": {
              "type": "integer",
              "format": "uint64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max number of records in response",
            "schema": {
              "type": "integer",
              "format": "uint64"
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "description": "Field name to sort by",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_direction",
            "in": "query",
            "description": "Ascending or descending order <br>\nChoose one of the values: <ul>\n<li><b>asc</b> — to set the ascending order;</li>\n<li><b>desc</b> — to set the descending order</li>\n</ul>",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "Specify a storage ID that should be displayed in the output.<br>\nNote: <ul>\n<li>If you type any number, all storage IDs that contain that number will be displayed</li>\n</ul>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Specify a storage name that should be displayed in the output.<br>\nNote:<ul>\n<li>If you type any letter, all storage names that contain that letter will be displayed</li>\n</ul>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Specify a storage location name that should be displayed in the output",
            "schema": {
              "type": "string",
              "enum": [
                "s-dt2"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Specify a storage type that should be displayed in the output",
            "schema": {
              "type": "string",
              "enum": [
                "s3"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Specify a storage status that should be displayed in the output",
            "schema": {
              "type": "string",
              "enum": [
                "ok",
                " deleted"
              ]
            }
          },
          {
            "name": "show_deleted",
            "in": "query",
            "description": "Specify whether you want to see deleted storages in the output.<br>\nChoose one of the values: <ul>\n<li><b>true</b> — to get details of deleted storages;</li>\n<li><b>false</b> — to get details about existing storages only</li>\n</ul>",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "StorageListEndpointRes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageListEndpointRes"
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Storages"
        ],
        "summary": "Create a storage",
        "description": "Creates a storage and returns it.",
        "operationId": "storageCreateHttp",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "generate_sftp_password": {
                    "type": "boolean"
                  },
                  "location": {
                    "type": "string",
                    "description": "Specify the storage location.\n<a href=\"https://apidocs.edgecenter.ru/storage#tag/location/operation/locationListHttp\">Get a list of\navailable locations here</a>",
                    "enum": [
                      "s-dt2"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "description": "Storage name"
                  },
                  "sftp_password": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "description": "Storage type",
                    "enum": [
                      "s3"
                    ]
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "Storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Storage"
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          },
          "409": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "Body"
      }
    },
    "/resource/v3/storage/{id}": {
      "get": {
        "tags": [
          "Storages"
        ],
        "summary": "Get a storage",
        "description": "Returns information about a specific storage in your account.",
        "operationId": "storageGetHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Storage"
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Storages"
        ],
        "summary": "Delete a storage",
        "description": "Deletes a storage from your account.",
        "operationId": "storageDeleteHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource/v3/storage/{id}/credentials": {
      "post": {
        "tags": [
          "Storages"
        ],
        "summary": "Update a storage credentials",
        "description": "Changes the credentials of your storage.",
        "operationId": "storageUpdateCredentialsHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delete_sftp_password": {
                    "type": "boolean",
                    "description": "Decide whether to delete the SFTP password.<br>\nChoose one of the values:<ul>\n<li><b>true</b> — to delete the SFTP password</li>\n<li><b>false</b> — not to delete the SFTP password</li>\n</ul>"
                  },
                  "generate_s3_keys": {
                    "type": "boolean",
                    "description": "Specify if new S3 keys should be generated.<br>\nChoose one of the values:<ul>\n<li><b>true</b> — to generate the S3 keys;</li>\n<li><b>false</b> — not to generate the S3 keys</li>\n</ul>"
                  },
                  "generate_sftp_password": {
                    "type": "boolean",
                    "description": "Specify if a new SFTP password should be generated.<br>\nChoose one of the values: <ul>\n<li><b>true</b> — to generate the SFTP password</li>\n<li><b>false</b> — not to generate the SFTP password</li>\n</ul>"
                  },
                  "reset_sftp_keys": {
                    "type": "boolean",
                    "description": "Decide whether to reset the SFTP keys.<br>\nChoose one of the values:<ul>\n<li><b>true</b> — to reset the SFTP keys</li>\n<li><b>false</b> — not to reset the SFTP keys</li>\n</ul>"
                  },
                  "sftp_password": {
                    "type": "string",
                    "description": "Specify if a new SFTP password"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "Storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Storage"
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "Body"
      }
    },
    "/resource/v3/storage/{id}/restore": {
      "post": {
        "tags": [
          "Storages"
        ],
        "summary": "Recover a deleted S3 storage",
        "description": "Recovers S3 storage that was deleted in the last 2 weeks. The storage will appear in your account.",
        "operationId": "storageRestoreHttp",
        "parameters": [
          {
            "name": "client_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource/v3/storage/{id}/s3/bucket/{name}": {
      "post": {
        "tags": [
          "Buckets"
        ],
        "summary": "Create a bucket",
        "description": "Creates a bucket in your S3 storage.",
        "operationId": "storageBucketCreateHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Bucket name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Buckets"
        ],
        "summary": "Delete a bucket",
        "description": "Deletes a bucket from your S3 storage.",
        "operationId": "storageBucketRemoveHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Bucket name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource/v3/storage/{id}/s3/bucket/{name}/cors": {
      "get": {
        "tags": [
          "Buckets"
        ],
        "summary": "Get a bucket CORS",
        "description": "Returns the CORS configuration for your bucket.",
        "operationId": "getStorageBucketCORSHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Bucket name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allowedOrigins": {
                    "type": "array",
                    "description": "Specify the origins for your CORS configuration",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "StorageGetBucketCorsEndpointRes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageGetBucketCorsEndpointRes"
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "Body"
      },
      "post": {
        "tags": [
          "Buckets"
        ],
        "summary": "Create a bucket CORS",
        "description": "Creates the CORS configuration for your bucket.",
        "operationId": "storageBucketCORSCreateHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Bucket name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allowedOrigins": {
                    "type": "array",
                    "description": "Specify the origins for your CORS configuration",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "Body"
      }
    },
    "/resource/v3/storage/{id}/s3/bucket/{name}/lifecycle": {
      "post": {
        "tags": [
          "Buckets"
        ],
        "summary": "Create a bucket lifecycle",
        "description": "Creates a lifecycle for your bucket. Lifecycle determines the number of days after which the objects in the\nbucket are considered expired.",
        "operationId": "storageBucketLifecycleCreateHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Bucket name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiration_days": {
                    "type": "integer",
                    "description": "Set the number of days after which the objects in the bucket will be considered expired",
                    "format": "int64"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "Body"
      },
      "delete": {
        "tags": [
          "Buckets"
        ],
        "summary": "Delete a bucket lifecycle",
        "description": "Delete a bucket lifecycle",
        "operationId": "storageBucketLifecycleDeleteHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Bucket name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource/v3/storage/{id}/s3/bucket/{name}/policy": {
      "post": {
        "tags": [
          "Buckets"
        ],
        "summary": "Create a bucket policy",
        "description": "Creates a policy for your bucket. Policies are used to set permissions for actions on buckets, objects, and\ngroups of objects.",
        "operationId": "storageBucketPolicyCreateHttp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Bucket name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A SuccessResponse is a response that shows that operations was completed successfully",
            "content": {}
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource/v3/storage/{id}/s3/buckets": {
      "get": {
        "tags": [
          "Buckets"
        ],
        "summary": "Get all buckets",
        "description": "Returns information about all the buckets created in your S3 storage.",
        "operationId": "storageListBucketsHttp",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Amount of records to skip before beginning to write in response",
            "schema": {
              "type": "integer",
              "format": "uint64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max number of records in response",
            "schema": {
              "type": "integer",
              "format": "uint64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "StorageListBucketsEndpointRes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageListBucketsEndpointRes"
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        }
      }
    },
    "/stats/v1/storage/usage/series": {
      "post": {
        "tags": [
          "Statistics"
        ],
        "summary": "Get storage usage statistics",
        "description": "Returns up to 1 year of storage statistics in a series format filtered by location, storage, and bucket.",
        "operationId": "storageUsageSeriesHttpPost",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "Specify the starting point of the required period (YYYY-MM-DD format)",
                    "example": "2023-01-15"
                  },
                  "granularity": {
                    "type": "string",
                    "description": "Set the time intervals for grouping the data.\nValid time units are \"s\", \"m\", \"h\"",
                    "example": "6h"
                  },
                  "locations": {
                    "type": "array",
                    "description": "Specify the storage locations for grouping the data",
                    "example": [
                      "s-dt2"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "storages": {
                    "type": "array",
                    "description": "Specify the storage names for grouping the data",
                    "example": [
                      "4554-test-storage"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "to": {
                    "type": "string",
                    "description": "Specify the end of the required period (YYYY-MM-DD format)",
                    "example": "2023-04-03"
                  },
                  "ts_string": {
                    "type": "boolean",
                    "description": "Decide whether to convert the response time format from the UNIX timestamp (1673809200) to RFC3339 (2023-01-15T19:00:00Z).<br>\nChoose one of the values:<ul>\n<li><b>true</b> — to convert the time to RFC3339 format;</li>\n<li><b>false</b> — to leave the time in the UNIX timestamp format</li>\n</ul>"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "StorageUsageSeriesEndpointRes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUsageSeriesEndpointRes"
                }
              }
            }
          },
          "400": {
            "description": "ErrResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "Body"
      }
    }
  },
  "components": {
    "schemas": {
      "BucketDto": {
        "type": "object",
        "properties": {
          "lifecycle": {
            "type": "integer",
            "description": "Number of days after which the objects in the bucket are considered expired. <br>\nNote: <ul>\n<li>No field is displayed if the lifecycle is not set</li>\n</ul>",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Bucket name"
          }
        },
        "description": "BucketDto for response"
      },
      "Client": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "product_enabled": {
            "type": "boolean"
          },
          "product_status": {
            "type": "string",
            "enum": [
              "trial",
              "activating",
              "trialend",
              "active",
              "paused",
              "new"
            ]
          },
          "reseller_id": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "ClientListEndpointRes": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ClientListServiceRes"
          }
        }
      },
      "ClientListServiceRes": {
        "type": "object",
        "properties": {
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client"
            }
          },
          "num_clients": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ClientStats": {
        "type": "object",
        "properties": {
          "file_quantity_sum_max": {
            "type": "integer",
            "description": "Maximum number of files within the specified time period",
            "format": "uint64"
          },
          "id": {
            "type": "integer",
            "description": "Your account ID",
            "format": "int64"
          },
          "locations": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/LocationStats"
            },
            "description": "Statistics grouped by storage locations"
          },
          "requests_in_sum": {
            "type": "integer",
            "description": "Total number of incoming requests within the specified time period",
            "format": "uint64"
          },
          "requests_out_edges_sum": {
            "type": "integer",
            "description": "Total number of requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming requests without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_sum": {
            "type": "integer",
            "description": "Total number of requests within the specified time period",
            "format": "uint64"
          },
          "requests_wo_edges_sum": {
            "type": "integer",
            "description": "RequestsWoEdgesSum is sum of requests without edges out requests for grouped period",
            "format": "uint64"
          },
          "size_sum_max": {
            "type": "integer",
            "description": "Maximum amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "size_sum_mean": {
            "type": "integer",
            "description": "Mean amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "traffic_in_sum": {
            "type": "integer",
            "description": "Total amount of incoming traffic within the specified time period",
            "format": "uint64"
          },
          "traffic_out_edges_sum": {
            "type": "integer",
            "description": "Total number of traffic from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming traffic without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_sum": {
            "type": "integer",
            "description": "Total amount of traffic within the specified time period",
            "format": "uint64"
          }
        }
      },
      "Credentials": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Key"
            }
          },
          "s3": {
            "$ref": "#/components/schemas/S3Credentials"
          },
          "sftp_password": {
            "type": "string"
          }
        }
      },
      "DataMeta": {
        "type": "object",
        "properties": {
          "ToMeta": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          }
        },
        "description": "Provide meta info through layers"
      },
      "ErrResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "Key": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "KeyListEndpointRes": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Key"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/DataMeta"
          }
        }
      },
      "Location": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "allow_for_new_storage": {
            "type": "string",
            "enum": [
              "deny",
              "undefined",
              "allow"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "title": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "type": {
            "type": "string"
          }
        }
      },
      "LocationStats": {
        "type": "object",
        "properties": {
          "file_quantity_sum_max": {
            "type": "integer",
            "description": "Maximum number of files within the specified time period",
            "format": "uint64"
          },
          "name": {
            "type": "string",
            "description": "Location name"
          },
          "requests_in_sum": {
            "type": "integer",
            "description": "Total number of incoming requests within the specified time period",
            "format": "uint64"
          },
          "requests_out_edges_sum": {
            "type": "integer",
            "description": "Total number of requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming requests without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_sum": {
            "type": "integer",
            "description": "Total number of requests within the specified time period",
            "format": "uint64"
          },
          "requests_wo_edges_sum": {
            "type": "integer",
            "description": "RequestsWoEdgesSum is sum of requests without edges out requests for grouped period",
            "format": "uint64"
          },
          "size_sum_max": {
            "type": "integer",
            "description": "Maximum amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "size_sum_mean": {
            "type": "integer",
            "description": "Mean amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "storages": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StorageStats"
            },
            "description": "a Storages grouped data"
          },
          "traffic_in_sum": {
            "type": "integer",
            "description": "Total amount of incoming traffic within the specified time period",
            "format": "uint64"
          },
          "traffic_out_edges_sum": {
            "type": "integer",
            "description": "Total number of traffic from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming traffic without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_sum": {
            "type": "integer",
            "description": "Total amount of traffic within the specified time period",
            "format": "uint64"
          }
        }
      },
      "RedefinedVar": {
        "type": "object",
        "properties": {
          "for": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "replace_to": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        },
        "description": "RedefinedVar entity"
      },
      "RespMeta": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/DataMeta"
          }
        },
        "description": "RespMeta Add Meta to response"
      },
      "S3Credentials": {
        "type": "object",
        "properties": {
          "access_key": {
            "type": "string"
          },
          "secret_key": {
            "type": "string"
          }
        }
      },
      "StatsMetrics": {
        "type": "object",
        "properties": {
          "file_quantity_sum_max": {
            "type": "integer",
            "description": "Maximum number of files within the specified time period",
            "format": "uint64"
          },
          "requests_in_sum": {
            "type": "integer",
            "description": "Total number of incoming requests within the specified time period",
            "format": "uint64"
          },
          "requests_out_edges_sum": {
            "type": "integer",
            "description": "Total number of requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming requests without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_sum": {
            "type": "integer",
            "description": "Total number of requests within the specified time period",
            "format": "uint64"
          },
          "requests_wo_edges_sum": {
            "type": "integer",
            "description": "RequestsWoEdgesSum is sum of requests without edges out requests for grouped period",
            "format": "uint64"
          },
          "size_sum_max": {
            "type": "integer",
            "description": "Maximum amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "size_sum_mean": {
            "type": "integer",
            "description": "Mean amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "traffic_in_sum": {
            "type": "integer",
            "description": "Total amount of incoming traffic within the specified time period",
            "format": "uint64"
          },
          "traffic_out_edges_sum": {
            "type": "integer",
            "description": "Total number of traffic from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming traffic without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_sum": {
            "type": "integer",
            "description": "Total amount of traffic within the specified time period",
            "format": "uint64"
          }
        }
      },
      "Storage": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "Storage address"
          },
          "can_restore": {
            "type": "boolean",
            "description": "Indicates whether storage can be recovered after deletion.<br>\nHas one of the values:<ul>\n<li><b>true</b> — this storage can be recovered within 2 weeks of deletion;</li>\n<li><b>false</b> — this storage cannot be recovered anymore</li>\n</ul>"
          },
          "client_id": {
            "type": "integer",
            "description": "Client ID",
            "format": "int64",
            "example": 2345
          },
          "created_at": {
            "type": "string",
            "description": "Storage creation date and time in ISO 8601, UTC format",
            "example": "2022-07-21 12:00:04.103287"
          },
          "credentials": {
            "$ref": "#/components/schemas/Credentials"
          },
          "custom_config_file": {
            "type": "boolean"
          },
          "deleted_at": {
            "type": "string",
            "description": "Storage deletion date and time in ISO 8601, UTC format",
            "example": "2022-07-25 12:00:45.102487"
          },
          "disable_http": {
            "type": "boolean",
            "description": "Is disabled http access to storage without credentials"
          },
          "expires": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "description": "Storage ID",
            "format": "int64",
            "example": 123
          },
          "location": {
            "type": "string",
            "description": "Storage region name",
            "enum": [
              "s-dt2"
            ]
          },
          "name": {
            "type": "string",
            "description": "Storage name",
            "example": "my-test-storage"
          },
          "provisioning_status": {
            "type": "string",
            "description": "Storage status",
            "enum": [
              "ok",
              "deleting",
              "updating"
            ]
          },
          "reseller_id": {
            "type": "integer",
            "description": "Reseller ID",
            "format": "int64",
            "example": 4765
          },
          "rewrite_rules": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "server_alias": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "Type of storage",
            "enum": [
              "s3"
            ]
          }
        }
      },
      "StorageGetBucketCorsEndpointRes": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "description": "CORS configuration details"
          }
        },
        "description": "StorageGetBucketCorsEndpointRes output"
      },
      "StorageListBucketsEndpointRes": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BucketDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/DataMeta"
          }
        },
        "description": "StorageListBucketsEndpointRes output"
      },
      "StorageListEndpointRes": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "Information about the storages in your account",
            "items": {
              "$ref": "#/components/schemas/Storage"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/DataMeta"
          }
        }
      },
      "StorageListServiceRes": {
        "type": "object",
        "properties": {
          "num_storages": {
            "type": "integer",
            "format": "int64"
          },
          "storages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Storage"
            }
          }
        }
      },
      "StorageStats": {
        "type": "object",
        "properties": {
          "buckets_series": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            },
            "description": "Statistics grouped by buckets",
            "example": {
              "bucketA": [
                [
                  1690192611,
                  1
                ],
                [
                  1690192612,
                  2
                ],
                [
                  1690192613,
                  2
                ],
                [
                  1690192614,
                  1
                ]
              ]
            }
          },
          "file_quantity_sum_max": {
            "type": "integer",
            "description": "Maximum number of files within the specified time period",
            "format": "uint64"
          },
          "name": {
            "type": "string",
            "description": "Storage name"
          },
          "requests_in_series": {
            "type": "array",
            "description": "Total number of incoming requests within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — number of requests</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "requests_in_sum": {
            "type": "integer",
            "description": "Total number of incoming requests within the specified time period",
            "format": "uint64"
          },
          "requests_out_edges_series": {
            "type": "array",
            "description": "Total number of requests from the edges within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — number of requests</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "requests_out_edges_sum": {
            "type": "integer",
            "description": "Total number of requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_out_wo_edges_series": {
            "type": "array",
            "description": "Total amount of outсoming requests without requests from the edges within the specified time period, displayed\nin series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — amount of requests</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "requests_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming requests without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "requests_series": {
            "type": "array",
            "description": "Total number of requests within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — number of requests</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "requests_sum": {
            "type": "integer",
            "description": "Total number of requests within the specified time period",
            "format": "uint64"
          },
          "requests_wo_edges_series": {
            "type": "array",
            "description": "Total number of outсoming requests without requests from the edges within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — number of requests</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "requests_wo_edges_sum": {
            "type": "integer",
            "description": "RequestsWoEdgesSum is sum of requests without edges out requests for grouped period",
            "format": "uint64"
          },
          "size_max_series": {
            "type": "array",
            "description": "Maximum amount of all file sizes within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — maximum amount of all file sizes</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "size_mean_series": {
            "type": "array",
            "description": "Mean amount of all file sizes within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — mean amount of all file sizes</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "size_sum_max": {
            "type": "integer",
            "description": "Maximum amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "size_sum_mean": {
            "type": "integer",
            "description": "Mean amount of all file sizes within the specified time period",
            "format": "uint64"
          },
          "traffic_in_series": {
            "type": "array",
            "description": "Total amount of incoming traffic within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — amount of traffic</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "traffic_in_sum": {
            "type": "integer",
            "description": "Total amount of incoming traffic within the specified time period",
            "format": "uint64"
          },
          "traffic_out_edges_series": {
            "type": "array",
            "description": "Total amount of outсoming traffic from the edges within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — amount of traffic</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "traffic_out_edges_sum": {
            "type": "integer",
            "description": "Total number of traffic from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_out_wo_edges_series": {
            "type": "array",
            "description": "Total amount of outсoming traffic without traffic from the edges within the specified time period, displayed\nin series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — amount of traffic</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "traffic_out_wo_edges_sum": {
            "type": "integer",
            "description": "Total number of outсoming traffic without requests from the edges within the specified time period",
            "format": "uint64"
          },
          "traffic_series": {
            "type": "array",
            "description": "Total amount of traffic within the specified time period, displayed in series format.<br>\nShows 2 values:<ul>\n<li><b>timestamp</b> — UNIX timestamp of data grouping;</li>\n<li><b>count</b> — amount of traffic</li>\n</ul>",
            "example": [
              [
                1690192611,
                1
              ],
              [
                1690192612,
                2
              ],
              [
                1690192613,
                2
              ],
              [
                1690192614,
                1
              ]
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "traffic_sum": {
            "type": "integer",
            "description": "Total amount of traffic within the specified time period",
            "format": "uint64"
          }
        }
      },
      "StorageUsageSeriesEndpointRes": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StorageUsageSeriesServiceRes"
          }
        }
      },
      "StorageUsageSeriesServiceRes": {
        "type": "object",
        "properties": {
          "clients": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ClientStats"
            },
            "description": "Statistics grouped by a specific account"
          }
        }
      },
      "clientLocationRes": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "Storage address"
          },
          "allow_for_new_storage": {
            "type": "string",
            "description": "Shows if you are allowed to create more storages.\nHas one of the values: <br><ul>\n<li><b>allow</b> — you can create more storages;</li>\n<li><b>deny</b> — you cannot create any more storages</li>\n</ul>",
            "enum": [
              "deny",
              "allow"
            ]
          },
          "id": {
            "type": "integer",
            "description": "Storage location ID",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Storage region name",
            "example": "s-dt2",
            "enum": [
              "s-dt2"
            ]
          },
          "type": {
            "type": "string",
            "description": "Storage type",
            "enum": [
              "s3"
            ]
          }
        }
      }
    },
    "responses": {
      "SuccessResponse": {
        "description": "A SuccessResponse is a response that shows that operations was completed successfully",
        "content": {}
      }
    },
    "securitySchemes": {
      "APIKey": {
        "type": "apiKey",
        "description": "<div id=\"authDescription\"> To get access to our API, you need to have an account registered.<br> <a href=\"https://auth.edgecenter.ru/login/signup\">Sign up</a> if you dont have one.<br> <br> Most API requests require an API token which is a unique key that allows you to interact with our services. Additionally, it helps the API check if the user is allowed to perform the action. <br> </div><br> Use a permanent <a href=\"https://accounts.edgecenter.ru/profile/api-tokens\">API token</a> for regular automated requests. You can set its validity period when creating it or issue a token for an unlimited time. Please address the API documentation of the specific product in order to check if it supports API tokens.<br><br> To manage services, add your permanent API token after <strong>APIKey</strong> in the <strong>Authorization</strong> header.<br> <pre><code><span class=\"token string\">'Authorization: APIKey eyJ0eXAiOiJKV'</span></code></pre> <br><br> <b>Important!</b> When authorizing via SAML SSO, be informed that our system does not have any information about permissions given to the user by the identity provider. Even if the provider revokes the user's access rights, their tokens remain active. Therefore, if necessary, the token will need to be deleted manually.",
        "name": "Authorization",
        "in": "header"
      }
    }
  }
}