MaintenanceCommand
Returns the maintenance commands that may be started from the interface, including the options each of them accepts.
GET/api/settings/maintenance_commands
Responses
200Returns all available maintenance commandsobject
Show fields (2)
successbooleandataarray<object>Show fields (6)
keystringlabelstringdescriptionstringsectionstringapplyOptionstringoptionsarray<object>
Request
curl --request GET \
--url https://your-instance.iw-erp.de/api/settings/maintenance_commands \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/settings/maintenance_commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/settings/maintenance_commands"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/settings/maintenance_commands', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/settings/maintenance_commands"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/settings/maintenance_commands")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/settings/maintenance_commands"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/maintenance_command_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await MaintenanceCommandController.getAll();
if (result.success) {
print(result.data);
}Response 200 application/json
{
"success": true,
"data": [
{
"description": "Text",
"key": "string",
"label": "string",
"section": "string",
"applyOption": "string"
}
]
}Queues a maintenance command as a CronTask and returns that task. The command output shows up in the task's result once the cron has run it.
POST/api/settings/maintenance_commands
Request body application/json
keystringCommand key from the list endpoint
optionsobjectOption name => value, validated against the command definition
Responses
200The queued CronTaskCronTask
Show fields (9)
namestringName of the cron task.
commandstringCommand the cron task runs.
resultstringResult of the last run.
interval_lengthstringInterval between two runs.
last_runstring (date-time)Point in time of the last run.
next_runstring (date-time)Point in time of the next run.
runningbooleanWhether the task is currently running.
donebooleanWhether the task is done.
delete_after_donebooleanWhether the task is deleted after it is done.
Request
curl --request POST \
--url https://your-instance.iw-erp.de/api/settings/maintenance_commands \
--header 'content-type: application/json' \
--header 'x-iw-jwt-token: <TOKEN>' \
--data '{"key":"string"}'const options = {
method: 'POST',
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: JSON.stringify({key: 'string'})
};
fetch('https://your-instance.iw-erp.de/api/settings/maintenance_commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/settings/maintenance_commands"
payload = { "key": "string" }
headers = {
"x-iw-jwt-token": "<TOKEN>",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-instance.iw-erp.de/api/settings/maintenance_commands', [
'body' => '{"key":"string"}',
'headers' => [
'content-type' => 'application/json',
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/settings/maintenance_commands"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
Content = new StringContent("{\"key\":\"string\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"key\":\"string\"}");
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/settings/maintenance_commands")
.post(body)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/settings/maintenance_commands"
payload := strings.NewReader("{\"key\":\"string\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/maintenance_command_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await MaintenanceCommandController.run('…');
if (result.success) {
print(result.data);
}Response 200 application/json
{
"name": "Beispiel",
"command": "string",
"result": "string",
"interval_length": "string",
"last_run": "2026-10-15T09:30:00+02:00",
"next_run": "2026-10-15T09:30:00+02:00",
"running": true,
"done": true,
"delete_after_done": true
}