Skip to main content

Links a container with a project licence

POST/v2/projects/{projectId}/ai-hosting-keys/{keyId}/actions/link-container
API version
v2
Request method
POST
Operation ID
ai-hosting-project-link-container

Links a container with a project licence. This will emit a WebUiContainerLinkedEvent and update the licence with the container metadata.

Request​

  • projectIdstringrequired
  • keyIdstringrequired

Responses​

No response content specified.

Usage examples​

$ curl \
--fail \
--location \
-X POST \
-d '{"containerId":"string","ingressId":"string","stackId":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/projects/string/ai-hosting-keys/string/actions/link-container
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.aiHosting.aiHostingProjectLinkContainer({
"projectId": "string",
"keyId": "string",
"data": {
"containerId": "string",
"ingressId": "string",
"stackId": "string"
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\AIHosting\AiHostingProjectLinkContainer\AiHostingProjectLinkContainerRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\AIHosting\AiHostingProjectLinkContainer\AiHostingProjectLinkContainerRequestBody;

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

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

$request = (new AiHostingProjectLinkContainerRequest(
projectId: "string",
keyId: "string",
body: $body
));
$response = $client->aiHosting()->aiHostingProjectLinkContainer($request);

var_dump($response->getBody();

On this page