Zum Hauptinhalt springen

Confirm the notification email of a cronjob

POST/v2/cronjobs/{cronjobId}/actions/verify-notification-email
API-Version
v2
Request-Methode
POST
Operation-ID
cronjob-verify-notification-email

Confirms a pending notification email with the token from the verification mail. Afterwards failed executions are reported to this address. Callable without authentication; the token is the authorization.

Request​

  • cronjobIdstring (uuid)required

    ID of the Cronjob.

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X POST \
-d '{"token":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/cronjobs/f0f86186-0a5a-45b2-aa33-502777496347/actions/verify-notification-email
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.cronjob.verifyNotificationEmail({
"cronjobId": "f0f86186-0a5a-45b2-aa33-502777496347",
"data": {
"token": "string"
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Cronjob\VerifyNotificationEmail\VerifyNotificationEmailRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Cronjob\VerifyNotificationEmail\VerifyNotificationEmailRequestBody;

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

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

$request = (new VerifyNotificationEmailRequest(
cronjobId: "f0f86186-0a5a-45b2-aa33-502777496347",
body: $body
));
$response = $client->cronjob()->verifyNotificationEmail($request);

var_dump($response->getBody();

Auf dieser Seite