Skip to main content

Recreate a Service

POST/v2/stacks/{stackId}/services/{serviceId}/actions/recreate
API version
v2
Request method
POST
Operation ID
container-recreate-service

Request​

  • stackIdstring (uuid)required

    ID of the Stack to recreate a Service for.

  • serviceIdstringrequired

    ID of the Service to recreate.

Responses​

No response content specified.

Usage examples​

$ curl \
--fail \
--location \
-X POST \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/stacks/f0f86186-0a5a-45b2-aa33-502777496347/services/string/actions/recreate
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.container.recreateService({
"stackId": "f0f86186-0a5a-45b2-aa33-502777496347",
"serviceId": "string"
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Container\RecreateService\RecreateServiceRequest;

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

$request = (new RecreateServiceRequest(
stackId: "f0f86186-0a5a-45b2-aa33-502777496347",
serviceId: "string"
));
$response = $client->container()->recreateService($request);

var_dump($response->getBody();

On this page