{
  "swagger": "2.0",
  "info": {
    "title": "evey/v1/backup.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "BackupService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/admin/backups": {
      "get": {
        "operationId": "BackupService_ListBackups",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListBackupsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "BackupService"
        ]
      },
      "post": {
        "operationId": "BackupService_CreateBackup",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1BackupManifest"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1CreateBackupRequest"
            }
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/api/v1/admin/backups/{id}": {
      "delete": {
        "operationId": "BackupService_DeleteBackup",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1DeleteBackupResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    }
  },
  "definitions": {
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "v1BackupManifest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "version": {
          "type": "string"
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "size": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "v1CreateBackupRequest": {
      "type": "object"
    },
    "v1DeleteBackupResponse": {
      "type": "object"
    },
    "v1ListBackupsResponse": {
      "type": "object",
      "properties": {
        "backups": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1BackupManifest"
          }
        }
      }
    }
  }
}
