Skip to main content

Update a Server

PATCH/v2/servers/{serverId}
API version
v2
Request method
PATCH
Operation ID
project-update-server

Request​

  • serverIdstringrequired

    ID of the Server to be updated.

Responses​

No response content specified.

Usage examples​

$ curl \
--fail \
--location \
-X PATCH \
-d '{"description":"My first Server!"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/servers/string
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.updateServer({
"serverId": "string",
"data": {
"description": "My first Server!"
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateServer\UpdateServerRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateServer\UpdateServerRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// UpdateServerRequestBody to learn how to construct a valid instance
$body = new UpdateServerRequestBody(/* TODO: ... */);

$request = (new UpdateServerRequest(
serverId: "string",
body: $body
));
$response = $client->project()->updateServer($request);

var_dump($response->getBody();

On this page