- Reference (v1)
- Cronjob
- Neuen cronjob anlegen
Version: API v1
Neuen cronjob anlegen
POST/v1/accounts/{accountIdentifier}/cronjobs
API-Version
v1
Request-Methode
POST
Operation-ID
createCronjob
Diese Operation legt einen neuen Cronjob an
Request
- accountIdentifierstringrequired
Name oder ID eines Accounts
Format
application/json
- customTimeoutModenumber (einer von: 0, 1)required
- customTimeoutValuenumber
- enabledbooleanrequired
- errorReportingstring (einer von: NONE, MAIL_ON_FAILURE, MAIL)required
- errorReportingEmailstring
- filestring
- urlstring
- interpreternumber
- intervalArray von stringrequired
- Array[
- *string
]
- namestringrequired
- paramsstring
- typestring (einer von: SERVER, BROWSER, INTERPRETER)required
Content-Type: application/json
{
"customTimeoutMode": 123,
"customTimeoutValue": 123,
"enabled": true,
"errorReporting": "NONE",
"errorReportingEmail": "string",
"file": "string",
"url": "string",
"interpreter": 123,
"interval": [
"string"
],
"name": "string",
"params": "string",
"type": "SERVER"
}
{
"type": "object",
"required": [
"customTimeoutMode",
"enabled",
"errorReporting",
"interval",
"name",
"type"
],
"properties": {
"customTimeoutMode": {
"type": "number",
"enum": [
0,
1
]
},
"customTimeoutValue": {
"type": "number"
},
"enabled": {
"type": "boolean"
},
"errorReporting": {
"type": "string",
"enum": [
"NONE",
"MAIL_ON_FAILURE",
"MAIL"
]
},
"errorReportingEmail": {
"type": "string"
},
"file": {
"type": "string"
},
"url": {
"type": "string"
},
"interpreter": {
"type": "number"
},
"interval": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"params": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"SERVER",
"BROWSER",
"INTERPRETER"
]
}
}
}
Responses
Format
application/json
Beschreibung
Der angelegte Cronjob
- uidintegerrequired
- namestringrequired
- enabledbooleanrequired
- errorReportingstring (einer von: NONE, MAIL_ON_FAILURE, MAIL)required
- errorReportingEmailstringrequired
- customTimeoutModenumber (einer von: 0, 1)required
Whether a custom timeout is set
- customTimeoutValuenumber
Amount of custom timeout
- typestring (einer von: SERVER, BROWSER, INTERPRETER)required
Type of cronjob (server based, browser based, custom interpreter)
- intervalArray von stringrequired
Crontab interval
- Array[
- *string
]
- statusnumberrequired
- filestring
- paramsstring
- urlstring
- interpreterobject
- hiddenbooleanrequired
- namestringrequired
- typestringrequired
- uidnumberrequired
Content-Type: application/json
{
"uid": 123,
"name": "string",
"enabled": true,
"errorReporting": "NONE",
"errorReportingEmail": "string",
"customTimeoutMode": 123,
"customTimeoutValue": 123,
"type": "SERVER",
"interval": [
"string"
],
"status": 123,
"file": "string",
"params": "string",
"url": "string",
"interpreter": {
"hidden": true,
"name": "string",
"type": "string",
"uid": 123
}
}
{
"title": "Cronjob",
"type": "object",
"required": [
"uid",
"name",
"enabled",
"errorReporting",
"errorReportingEmail",
"customTimeoutMode",
"type",
"interval",
"status"
],
"properties": {
"uid": {
"type": "integer"
},
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"errorReporting": {
"type": "string",
"enum": [
"NONE",
"MAIL_ON_FAILURE",
"MAIL"
]
},
"errorReportingEmail": {
"type": "string"
},
"customTimeoutMode": {
"description": "Whether a custom timeout is set",
"type": "number",
"enum": [
0,
1
]
},
"customTimeoutValue": {
"description": "Amount of custom timeout",
"type": "number"
},
"type": {
"description": "Type of cronjob (server based, browser based, custom interpreter)",
"type": "string",
"enum": [
"SERVER",
"BROWSER",
"INTERPRETER"
]
},
"interval": {
"description": "Crontab interval",
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "number"
},
"file": {
"type": "string"
},
"params": {
"type": "string"
},
"url": {
"type": "string"
},
"interpreter": {
"type": "object",
"required": [
"hidden",
"name",
"type",
"uid"
],
"properties": {
"hidden": {
"type": "boolean"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"uid": {
"type": "number"
}
}
}
}
}
Format
application/json
Beschreibung
Zugriff verweigert.
- messagestring
Content-Type: application/json
{
"message": "string"
}
{
"title": "Error",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
Format
application/json
Beschreibung
Bei der Verarbeitung der Anfrage ist ein Fehler aufgetreten.
- messagestring
Content-Type: application/json
{
"message": "string"
}
{
"title": "Error",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
Nutzungsbeispiele
$ curl \
--fail \
--location \
-X POST \
-d '{"customTimeoutMode":123,"customTimeoutValue":123,"enabled":true,"errorReporting":"NONE","errorReportingEmail":"string","file":"string","url":"string","interpreter":123,"interval":["string"],"name":"string","params":"string","type":"SERVER"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v1/accounts/string/cronjobs