Restore volume snapshots
1 min
POST
https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot
Path Parameters
- datacenterIdstringrequiredDescription
- volumeIdstringrequiredDescription
Query Parameters
- prettybooleanDescriptionDefaulttrue
- depthinteger<int32>DescriptionDefault0Formatint32Minimum0Maximum10
Header Parameters
- X-Contract-Numberinteger<int32>DescriptionFormatint32
Body Parameters
- bodyRestoreSnapshotDescription
- propertiesRestoreSnapshotProperties
- snapshotIdstringDescription
Responses
202
Response Headers
- X-RateLimit-Remaininginteger<int32>DescriptionFormatint32
- X-RateLimit-Limitinteger<int32>DescriptionFormatint32
- X-RateLimit-Burstinteger<int32>DescriptionFormatint32
- LocationstringDescriptionPatternhttps://[apiBaseUri]/requests/[requestId]/status
default
- Error
- httpStatusinteger<int32>ExampleDescriptionFormatint32
- messagesErrorMessage[]
- errorCodestringExampleDescription
- messagestringExampleDescription
curl
curl --request POST \
--url 'https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot?pretty=true&depth=integer%3Cint32%3E' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot?pretty=true&depth=integer<int32>", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot?pretty=true&depth=integer<int32>")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot?pretty=true&depth=integer<int32>"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
202
// Successful operation
default
// Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).
{
"httpStatus": 400,
"messages": [
{
"errorCode": "123",
"message": "Error message example."
}
]
}Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.