Update a Server's storage space statistics
PATCH/v2/ servers/ {serverId}/ storage-space-statistics/
API version
v2
Request method
PATCH
Operation ID
storagespace-update-server-statistics
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X PATCH \
-d '{"notificationThresholdInBytes":10000}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/servers/string/storage-space-statistics
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.project.storagespaceUpdateServerStatistics({
"serverId": "string",
"data": {
"notificationThresholdInBytes": 10000
}
});
assertStatus(response, 204);
use \Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceUpdateServerStatistics\StoragespaceUpdateServerStatisticsRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceUpdateServerStatistics\StoragespaceUpdateServerStatisticsRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// StoragespaceUpdateServerStatisticsRequestBody to learn how to construct a valid instance
$body = new StoragespaceUpdateServerStatisticsRequestBody(/* TODO: ... */);
$request = (new StoragespaceUpdateServerStatisticsRequest(
serverId: "string",
body: $body
));
$response = $client->project()->storagespaceUpdateServerStatistics($request);
var_dump($response->getBody();