Zum Hauptinhalt springen

Update the paths of an Ingress

PATCH/v2/ingresses/{ingressId}/paths
API-Version
v2
Request-Methode
PATCH
Operation-ID
ingress-update-ingress-paths

Request​

  • ingressIdstring (uuid)required

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X PATCH \
-d '[{"path":"string","target":{"url":"https://redirect-target.example"}}]' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/ingresses/f0f86186-0a5a-45b2-aa33-502777496347/paths
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.domain.ingressUpdateIngressPaths({
"ingressId": "f0f86186-0a5a-45b2-aa33-502777496347",
"data": [
{
"path": "string",
"target": {
"url": "https://redirect-target.example"
}
}
]
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\IngressUpdateIngressPaths\IngressUpdateIngressPathsRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Domain\IngressUpdateIngressPaths\IngressUpdateIngressPathsRequestBody;

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

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

$request = (new IngressUpdateIngressPathsRequest(
ingressId: "f0f86186-0a5a-45b2-aa33-502777496347",
body: $body
));
$response = $client->domain()->ingressUpdateIngressPaths($request);

var_dump($response->getBody();

Auf dieser Seite