Zum Hauptinhalt springen

Update a Servers's description

PATCH/v2/servers/{serverId}/description
API-Version
v2
Request-Methode
PATCH
Operation-ID
deprecated-project-update-server-description

Request​

  • serverIdstringrequired

    ID of the Server to update the description of.

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ 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/description
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.deprecatedProjectUpdateServerDescription({
"serverId": "string",
"data": {
"description": "My first Server!"
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Project\DeprecatedProjectUpdateServerDescription\DeprecatedProjectUpdateServerDescriptionRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Project\DeprecatedProjectUpdateServerDescription\DeprecatedProjectUpdateServerDescriptionRequestBody;

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

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

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

var_dump($response->getBody();

Auf dieser Seite