Skip to main content

Get a cronjob execution analysis for failed executions

GET/v2/cronjobs/{cronjobId}/executions/{executionId}/analysis
API version
v2
Request method
GET
Operation ID
cronjob-get-execution-analysis

Request​

  • executionIdstringrequired

    ID of the CronjobExecution to be analyzed.

    Example:"cron-bd26li-28027320"
  • cronjobIdstringrequired

Responses​

Format
application/json
Description

OK

  • messagestringdeprecatedrequired

    Deprecated: contains summary and recommendation combined. Use the separate fields instead.

  • recommendationstring
  • summarystringrequired
Content-Type: application/json

{
"recommendation": "Check the URL in the cronjob configuration and correct it if necessary. Make sure the domain is valid and its DNS records are configured correctly.",
"summary": "The cronjob could not reach the configured URL because the domain could not be resolved."
}
{
"properties": {
"message": {
"deprecated": true,
"description": "Deprecated: contains summary and recommendation combined. Use the separate fields instead.",
"example": "The cronjob could not reach the configured URL because the domain could not be resolved.\n\nCheck the URL in the cronjob configuration and correct it if necessary.",
"type": "string"
},
"recommendation": {
"example": "Check the URL in the cronjob configuration and correct it if necessary. Make sure the domain is valid and its DNS records are configured correctly.",
"type": "string"
},
"summary": {
"example": "The cronjob could not reach the configured URL because the domain could not be resolved.",
"type": "string"
}
},
"required": [
"summary",
"message"
],
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/cronjobs/string/executions/string/analysis
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.getExecutionAnalysis({
"executionId": "string",
"cronjobId": "string"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Cronjob\GetExecutionAnalysis\GetExecutionAnalysisRequest;

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

$request = (new GetExecutionAnalysisRequest(
executionId: "string",
cronjobId: "string"
));
$response = $client->cronjob()->getExecutionAnalysis($request);

var_dump($response->getBody();

On this page