Skip to content
Developer

MaintenanceCommand

System and settings2 EndpointsSettings / 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)
  • successboolean
  • dataarray<object>
    Show fields (6)
    • keystring
    • labelstring
    • descriptionstring
    • sectionstring
    • applyOptionstring
    • optionsarray<object>
Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/settings/maintenance_commands \
  --header 'x-iw-jwt-token: <TOKEN>'
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

  • keystring

    Command key from the list endpoint

  • optionsobject

    Option name => value, validated against the command definition

Responses

200The queued CronTaskCronTask

Show fields (9)
  • namestring

    Name of the cron task.

  • commandstring

    Command the cron task runs.

  • resultstring

    Result of the last run.

  • interval_lengthstring

    Interval 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.

  • runningboolean

    Whether the task is currently running.

  • doneboolean

    Whether the task is done.

  • delete_after_doneboolean

    Whether 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"}'
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
}