{
  "info": {
    "title": "Athom Backup",
    "version": "1.0.0",
    "x-hide-docs": true
  },
  "host": "backup.athom.com",
  "basePath": "/api/v1",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "paths": {
    "/user/me": {
      "get": {
        "summary": "Get all of your own backups",
        "operationId": "getMyBackups",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "type": "string",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/user/me/homey/{homeyId}/backup/{backupId}": {
      "delete": {
        "summary": "Delete one of your own backups",
        "operationId": "deleteMyBackup",
        "parameters": [
          {
            "name": "homeyId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "backupId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "token",
            "in": "query",
            "type": "string",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/user/{userId}": {
      "get": {
        "summary": "Get all of a user's backups",
        "operationId": "getBackups",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "secret",
            "in": "query",
            "type": "string",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          }
        }
      },
      "delete": {
        "summary": "Delete all of a user's backups",
        "operationId": "deleteBackups",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "type": "string",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/user/{userId}/backup/{backupId}": {
      "get": {
        "summary": "Get a single backup",
        "operationId": "getBackup",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "backupId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "secret",
            "in": "query",
            "type": "string",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/user/{userId}/homey/{homeyId}": {
      "post": {
        "summary": "Create a backup of a user's Homey",
        "operationId": "createBackup",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "homeyId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "secret",
            "in": "query",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "x-unpack-parameters": true,
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "version",
                "channel",
                "homeyName"
              ],
              "properties": {
                "homeyName": {
                  "type": "string"
                },
                "homeyPlatform": {
                  "type": "string"
                },
                "homeyPlatformVersion": {
                  "type": "number"
                },
                "version": {
                  "type": "string"
                },
                "channel": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/user/{userId}/homey/{homeyId}/backup/{backupId}/complete": {
      "put": {
        "summary": "Mark a backup of a user's Homey as complete",
        "operationId": "setBackupComplete",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "homeyId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "backupId",
            "in": "path",
            "type": "string",
            "required": true
          },
          {
            "name": "secret",
            "in": "query",
            "type": "string",
            "required": true
          },
          {
            "name": "data",
            "in": "body",
            "x-unpack-parameters": true,
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "size",
                "hash",
                "meta"
              ],
              "properties": {
                "size": {
                  "type": "number"
                },
                "hash": {
                  "type": "string"
                },
                "meta": {
                  "type": "object"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}