post
/v1/storage_fault_domain/update
Replaces the default storage fault domain on your system.
Request headers
X-XSRF-TOKEN
String
required
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
Example:
xXSRFTOKEN_example
Cookie
String
required
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
XSRF token header for CSRF security. Can be obtained as the value of a cookie by performing a GET on /csrf.
Example:
cookie_example
CLIENT REQUEST
curl -X 'POST'
\
-H
'Accept: application/json'
-H
'X-XSRF-TOKEN: xXSRFTOKEN_example'
-H
'Cookie: cookie_example'
'/mapi/v1/storage_fault_domain/update'
-d
'{
"name" : "name",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"tags" : "tags"
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'X-XSRF-TOKEN': "SOME_STRING_VALUE",
'Cookie': "SOME_STRING_VALUE",
'Authorization': "Bearer REPLACE_BEARER_TOKEN"
}
conn.request("POST", "/mapi/v1/storage_fault_domain/update", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://example.com/mapi/v1/storage_fault_domain/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["X-XSRF-TOKEN"] = 'SOME_STRING_VALUE'
request["Cookie"] = 'SOME_STRING_VALUE'
request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'
response = http.request(request)
puts response.read_bodyconst data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://example.com/mapi/v1/storage_fault_domain/update");
xhr.setRequestHeader("X-XSRF-TOKEN", "SOME_STRING_VALUE");
xhr.setRequestHeader("Cookie", "SOME_STRING_VALUE");
xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://example.com/mapi/v1/storage_fault_domain/update")
.header("X-XSRF-TOKEN", "SOME_STRING_VALUE")
.header("Cookie", "SOME_STRING_VALUE")
.header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
.asString();import Foundation
let headers = [
"X-XSRF-TOKEN": "SOME_STRING_VALUE",
"Cookie": "SOME_STRING_VALUE",
"Authorization": "Bearer REPLACE_BEARER_TOKEN"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://example.com/mapi/v1/storage_fault_domain/update")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://example.com/mapi/v1/storage_fault_domain/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer REPLACE_BEARER_TOKEN",
"Cookie: SOME_STRING_VALUE",
"X-XSRF-TOKEN: SOME_STRING_VALUE"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://example.com/mapi/v1/storage_fault_domain/update");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "X-XSRF-TOKEN: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Cookie: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://example.com/mapi/v1/storage_fault_domain/update");
var request = new RestRequest(Method.POST);
request.AddHeader("X-XSRF-TOKEN", "SOME_STRING_VALUE");
request.AddHeader("Cookie", "SOME_STRING_VALUE");
request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
IRestResponse response = client.Execute(request);Body parameters
required
idstringrequireduuid
namestring
tagsstring
*/*
idstringrequireduuidid of storage fault domain to update.
id of storage fault domain to update.
namestringnew name for storage fault domain.
new name for storage fault domain.
tagsstringnew tags for the storage fault domain.
new tags for the storage fault domain.
REQUEST
[*/* content]Responses