{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "adminmanagement.local.azurestack.external",
  "info": {
    "description": "The Admin Backup Management Client.",
    "title": "BackupManagementClient",
    "version": "2016-05-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/Backups.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "azsadmin-Backups",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Authorization uses an Azure Active Directory OAuth2 flow.",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "BackupParameter": {
      "description": "Name of the backup.",
      "in": "path",
      "name": "backup",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups": {
      "get": {
        "description": "Returns a list of backups from a location.",
        "operationId": "Backups_List",
        "parameters": [
          {
            "description": "Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Name of the backup location.",
            "in": "path",
            "name": "location",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "default": "2016-05-01",
            "description": "Client API version.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/BackupList"
            }
          },
          "404": {
            "description": "NOT FOUND"
          }
        },
        "tags": [
          "Backups"
        ],
        "x-ms-examples": {
          "Returns a list of backups from a location.": {
            "parameters": {
              "api-version": "2016-05-01",
              "location": "local",
              "resourceGroupName": "System.local",
              "subscriptionId": "11111111-2222-3333-4444-555555555555"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": null,
                  "value": [
                    {
                      "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/de038ae0-294d-468d-90a1-fbe5ae028ce2",
                      "location": "local",
                      "name": "de038ae0-294d-468d-90a1-fbe5ae028ce2",
                      "properties": {
                        "backupInfo": {
                          "backupDataVersion": "",
                          "backupId": "de038ae0-294d-468d-90a1-fbe5ae028ce2",
                          "createdDateTime": "2018-02-16T16:06:10.1160531Z",
                          "deploymentID": "",
                          "oemVersion": "",
                          "roleStatus": [
                            {
                              "roleName": "NRP",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "SRP",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "CRP",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "KeyVaultInternalControlPlane",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "KeyVaultInternalDataPlane",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "KeyVaultControlPlane",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "KeyVaultDataPlane",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "KeyVaultNamingService",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "WAS",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "ECE",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "CA",
                              "status": "Succeeded"
                            },
                            {
                              "roleName": "ACS",
                              "status": "Succeeded"
                            }
                          ],
                          "stampVersion": "",
                          "status": "Succeeded",
                          "timeTakenToCreate": "PT5M1.5611298S"
                        }
                      },
                      "tags": {},
                      "type": "Microsoft.Backup.Admin/backupLocations/backups"
                    }
                  ]
                }
              },
              "404": {}
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}": {
      "get": {
        "description": "Returns a backup from a location based on name.",
        "operationId": "Backups_Get",
        "parameters": [
          {
            "description": "Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Name of the backup location.",
            "in": "path",
            "name": "location",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/BackupParameter"
          },
          {
            "default": "2016-05-01",
            "description": "Client API version.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Backup"
            }
          },
          "404": {
            "description": "NOT FOUND"
          }
        },
        "tags": [
          "Backups"
        ],
        "x-ms-examples": {
          "Returns a backup from a location based on name.": {
            "parameters": {
              "api-version": "2016-05-01",
              "backup": "de038ae0-294d-468d-90a1-fbe5ae028ce2",
              "location": "local",
              "resourceGroupName": "System.local",
              "subscriptionId": "11111111-2222-3333-4444-555555555555"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/de038ae0-294d-468d-90a1-fbe5ae028ce2",
                  "location": "local",
                  "name": "de038ae0-294d-468d-90a1-fbe5ae028ce2",
                  "properties": {
                    "backupInfo": {
                      "backupDataVersion": "",
                      "backupId": "de038ae0-294d-468d-90a1-fbe5ae028ce2",
                      "createdDateTime": "2018-02-16T16:06:10.1160531Z",
                      "deploymentID": "",
                      "oemVersion": "",
                      "roleStatus": [
                        {
                          "roleName": "NRP",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "SRP",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "CRP",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "KeyVaultInternalControlPlane",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "KeyVaultInternalDataPlane",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "KeyVaultControlPlane",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "KeyVaultDataPlane",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "KeyVaultNamingService",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "WAS",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "ECE",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "CA",
                          "status": "Succeeded"
                        },
                        {
                          "roleName": "ACS",
                          "status": "Succeeded"
                        }
                      ],
                      "stampVersion": "",
                      "status": "Succeeded",
                      "timeTakenToCreate": "PT5M1.5611298S"
                    }
                  },
                  "tags": {},
                  "type": "Microsoft.Backup.Admin/backupLocations/backups"
                }
              },
              "404": {}
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}/restore": {
      "post": {
        "description": "Restore a backup.",
        "operationId": "Backups_Restore",
        "parameters": [
          {
            "description": "Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the backup location.",
            "in": "path",
            "name": "location",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/BackupParameter"
          },
          {
            "default": "2016-05-01",
            "description": "Client API version.",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "202": {
            "description": "ACCEPTED"
          },
          "404": {
            "description": "NOT FOUND"
          }
        },
        "tags": [
          "Backups"
        ],
        "x-ms-examples": {
          "Restore a backup.": {
            "parameters": {
              "api-version": "2016-05-01",
              "backup": "de038ae0-294d-468d-90a1-fbe5ae028ce2",
              "location": "local",
              "resourceGroupName": "System.local",
              "subscriptionId": "11111111-2222-3333-4444-555555555555"
            },
            "responses": {
              "200": {},
              "202": {},
              "404": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      }
    }
  },
  "definitions": {
    "Backup": {
      "allOf": [
        {
          "description": "Base Resource Object",
          "properties": {
            "id": {
              "description": "URI of the resource.",
              "readOnly": true,
              "type": "string"
            },
            "location": {
              "description": "Location of the resource.",
              "readOnly": false,
              "type": "string"
            },
            "name": {
              "description": "Name of the resource.",
              "readOnly": true,
              "type": "string"
            },
            "tags": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "List of key value pairs.",
              "readOnly": false,
              "type": "object"
            },
            "type": {
              "description": "Type of resource.",
              "readOnly": true,
              "type": "string"
            }
          },
          "type": "object",
          "x-ms-azure-resource": true
        }
      ],
      "description": "Information related to a backup.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/BackupModel",
          "description": "Properties for a backup.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "BackupInfo": {
      "description": "Holds information for a backup.",
      "properties": {
        "backupDataVersion": {
          "description": "Version of the backup data.",
          "readOnly": true,
          "type": "string"
        },
        "backupId": {
          "description": "Unique GUID for the backup.",
          "readOnly": true,
          "type": "string"
        },
        "createdDateTime": {
          "description": "Creation time of the backup.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "deploymentID": {
          "description": "Deployment Id of the stamp.",
          "readOnly": true,
          "type": "string"
        },
        "oemVersion": {
          "description": "OEM version.",
          "readOnly": true,
          "type": "string"
        },
        "roleStatus": {
          "$ref": "#/definitions/RoleOperationStatusList",
          "description": "Backup status for each role.",
          "readOnly": true
        },
        "stampVersion": {
          "description": "Current version.",
          "readOnly": true,
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/OperationStatus",
          "description": "Current status of the backup.",
          "readOnly": true
        },
        "timeTakenToCreate": {
          "description": "Duration to create the backup.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "BackupList": {
      "description": "List of backups.",
      "properties": {
        "nextLink": {
          "description": "URI to the next page.",
          "type": "string"
        },
        "value": {
          "description": "List of backups.",
          "items": {
            "$ref": "#/definitions/Backup"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "BackupModel": {
      "description": "Properties for a backup.",
      "properties": {
        "backupInfo": {
          "$ref": "#/definitions/BackupInfo",
          "description": "Holds information for a backup.",
          "x-ms-client-flatten": true
        }
      }
    },
    "OperationStatus": {
      "description": "Status of an operation.",
      "enum": [
        "Creating",
        "Queued",
        "Running",
        "Deleted",
        "Failed",
        "PartialSucceeded",
        "Succeeded"
      ],
      "type": "string",
      "x-ms-enum": {
        "modelAsString": false,
        "name": "OperationStatus"
      }
    },
    "RoleOperationStatus": {
      "description": "Backup status for a role.",
      "properties": {
        "roleName": {
          "description": "Name of the role.",
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/OperationStatus",
          "description": "Status of the role."
        }
      },
      "type": "object"
    },
    "RoleOperationStatusList": {
      "description": "object",
      "items": {
        "$ref": "#/definitions/RoleOperationStatus"
      },
      "type": "array"
    }
  }
}