{ "swagger": "2.0", "info": { "title": "KeyVaultClient", "description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", "version": "7.4" }, "x-ms-parameterized-host": { "hostTemplate": "{vaultBaseUrl}", "useSchemePrefix": false, "positionInOperation": "first", "parameters": [ { "name": "vaultBaseUrl", "description": "The vault name, for example https://myvault.vault.azure.net.", "required": true, "type": "string", "in": "path", "x-ms-skip-url-encoding": true } ] }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/backup": { "post": { "tags": [ "FullBackup" ], "operationId": "FullBackup", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "description": "Creates a full backup using a user-provided SAS token to an Azure blob storage container.", "parameters": [ { "in": "body", "name": "azureStorageBlobContainerUri", "schema": { "$ref": "#/definitions/SASTokenParameter" }, "description": "Azure blob shared access signature token pointing to a valid Azure blob container where full backup needs to be stored. This token needs to be valid for at least next 24 hours from the time of making this call" }, { "$ref": "common.json#/parameters/ApiVersionParameter" } ], "responses": { "202": { "description": "Started full backup", "headers": { "Retry-After": { "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.", "type": "integer" }, "Azure-AsyncOperation": { "description": "The URI to poll for completion status.", "type": "string" } }, "schema": { "$ref": "#/definitions/FullBackupOperation" } }, "default": { "description": "Key Vault error response describing why the operation failed.", "schema": { "$ref": "common.json#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Create full backup": { "$ref": "./examples/FullBackup-example.json" } } } }, "/backup/{jobId}/pending": { "get": { "tags": [ "FullBackup" ], "operationId": "FullBackupStatus", "description": "Returns the status of full backup operation", "parameters": [ { "name": "jobId", "in": "path", "required": true, "type": "string", "description": "The id returned as part of the backup request" }, { "$ref": "common.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK - Returns the full backup status", "schema": { "$ref": "#/definitions/FullBackupOperation" } }, "default": { "description": "Key Vault error response describing why the operation failed.", "schema": { "$ref": "common.json#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Full backup status": { "$ref": "./examples/FullBackup-pending-example.json" } } } }, "/restore": { "put": { "tags": [ "FullRestore" ], "operationId": "FullRestoreOperation", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "description": "Restores all key materials using the SAS token pointing to a previously stored Azure Blob storage backup folder", "parameters": [ { "name": "restoreBlobDetails", "in": "body", "schema": { "$ref": "#/definitions/RestoreOperationParameters" }, "description": "The Azure blob SAS token pointing to a folder where the previous successful full backup was stored" }, { "$ref": "common.json#/parameters/ApiVersionParameter" } ], "responses": { "202": { "description": "Started restore operation from the previously stored backup", "headers": { "Retry-After": { "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.", "type": "integer" }, "Azure-AsyncOperation": { "description": "The URI to poll for completion status.", "type": "string" } }, "schema": { "$ref": "#/definitions/RestoreOperation" } }, "default": { "description": "Key Vault error response describing why the operation failed.", "schema": { "$ref": "common.json#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Create full restore from backup": { "$ref": "./examples/FullRestore-example.json" } } } }, "/restore/{jobId}/pending": { "get": { "tags": [ "FullRestore" ], "operationId": "RestoreStatus", "description": "Returns the status of restore operation", "parameters": [ { "name": "jobId", "in": "path", "required": true, "type": "string", "description": "The Job Id returned part of the restore operation" }, { "$ref": "common.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK - Returns the full restore status", "schema": { "$ref": "#/definitions/RestoreOperation" } }, "default": { "description": "Key Vault error response describing why the operation failed.", "schema": { "$ref": "common.json#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Restore status": { "$ref": "./examples/Restore-pending-example.json" } } } }, "/keys/{keyName}/restore": { "put": { "tags": [ "Keys" ], "operationId": "SelectiveKeyRestoreOperation", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "description": "Restores all key versions of a given key using user supplied SAS token pointing to a previously stored Azure Blob storage backup folder", "parameters": [ { "name": "keyName", "in": "path", "required": true, "type": "string", "description": "The name of the key to be restored from the user supplied backup" }, { "name": "restoreBlobDetails", "in": "body", "schema": { "$ref": "#/definitions/SelectiveKeyRestoreOperationParameters" }, "description": "The Azure blob SAS token pointing to a folder where the previous successful full backup was stored" }, { "$ref": "common.json#/parameters/ApiVersionParameter" } ], "responses": { "202": { "description": "Started selective key restore operation from the previously stored backup", "headers": { "Retry-After": { "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.", "type": "integer" }, "Azure-AsyncOperation": { "description": "The URI to poll for completion status.", "type": "string" } }, "schema": { "$ref": "#/definitions/SelectiveKeyRestoreOperation" } }, "default": { "description": "Key Vault error response describing why the operation failed.", "schema": { "$ref": "common.json#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Selectively restore key from a backup": { "$ref": "./examples/SelectiveRestore-example.json" } } } } }, "definitions": { "RestoreOperationParameters": { "properties": { "sasTokenParameters": { "$ref": "#/definitions/SASTokenParameter" }, "folderToRestore": { "type": "string", "description": "The Folder name of the blob where the previous successful full backup was stored" } }, "required": [ "folderToRestore", "sasTokenParameters" ] }, "SelectiveKeyRestoreOperationParameters": { "properties": { "sasTokenParameters": { "$ref": "#/definitions/SASTokenParameter" }, "folder": { "type": "string", "description": "The Folder name of the blob where the previous successful full backup was stored" } }, "required": [ "folder", "sasTokenParameters" ] }, "SelectiveKeyRestoreOperation": { "properties": { "status": { "type": "string", "description": "Status of the restore operation." }, "statusDetails": { "type": "string", "description": "The status details of restore operation." }, "error": { "$ref": "common.json#/definitions/Error", "description": "Error encountered, if any, during the selective key restore operation." }, "jobId": { "type": "string", "description": "Identifier for the selective key restore operation." }, "startTime": { "type": "integer", "format": "unixtime", "description": "The start time of the restore operation" }, "endTime": { "type": "integer", "format": "unixtime", "description": "The end time of the restore operation", "x-nullable": true } }, "description": "Selective Key Restore operation" }, "SASTokenParameter": { "properties": { "storageResourceUri": { "type": "string", "description": "Azure Blob storage container Uri" }, "token": { "type": "string", "description": "The SAS token pointing to an Azure Blob storage container" } }, "required": [ "storageResourceUri", "token" ] }, "FullBackupOperation": { "properties": { "status": { "type": "string", "description": "Status of the backup operation." }, "statusDetails": { "type": "string", "description": "The status details of backup operation." }, "error": { "$ref": "common.json#/definitions/Error", "description": "Error encountered, if any, during the full backup operation." }, "startTime": { "type": "integer", "format": "unixtime", "description": "The start time of the backup operation in UTC" }, "endTime": { "type": "integer", "format": "unixtime", "description": "The end time of the backup operation in UTC", "x-nullable": true }, "jobId": { "type": "string", "description": "Identifier for the full backup operation." }, "azureStorageBlobContainerUri": { "type": "string", "description": "The Azure blob storage container Uri which contains the full backup" } }, "description": "Full backup operation" }, "RestoreOperation": { "properties": { "status": { "type": "string", "description": "Status of the restore operation." }, "statusDetails": { "type": "string", "description": "The status details of restore operation." }, "error": { "$ref": "common.json#/definitions/Error", "description": "Error encountered, if any, during the restore operation." }, "jobId": { "type": "string", "description": "Identifier for the restore operation." }, "startTime": { "type": "integer", "format": "unixtime", "description": "The start time of the restore operation" }, "endTime": { "type": "integer", "format": "unixtime", "description": "The end time of the restore operation", "x-nullable": true } }, "description": "Restore operation" } } }