# /api/task

## GET /task/{taskId}/log

>

```json
{"openapi":"3.0.2","info":{"title":"FYLR API","version":"1.0.0"},"paths":{"/task/{taskId}/log":{"get":{"parameters":[{"description":"The ID of the task.","in":"path","name":"taskId","required":true,"schema":{"format":"int64","type":"number"}},{"description":"Request the given `offset` of the log.","in":"query","name":"offset","schema":{"format":"int64","type":"number"}},{"description":"Request using the given `limit`.","in":"query","name":"limit","schema":{"format":"int64","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"idx":{"description":"Index of the log entry, starts at `0`.\n","format":"int","type":"number"},"level":{"description":"Severity of the log entry.\n","enum":["debug","info","warning","error"],"type":"string"},"msg":{"description":"Message of the log entry.\n","type":"string"},"status_percent":{"description":"The current status in percent, can be `null`. If set (per task module), the task runner updates the `status_percent` of the task to the latest data.\n","format":"int64","type":"number"},"timestamp":{"description":"UTC time of the entry.\n","format":"datetime","type":"string"}},"type":"object"},"type":"array"}}},"description":"Task runners can write log entries. This endpoint can be used to retrieve them.\n"}}}}}}
```

## POST /task/{taskId}/cancel

>

```json
{"openapi":"3.0.2","info":{"title":"FYLR API","version":"1.0.0"},"paths":{"/task/{taskId}/cancel":{"post":{"parameters":[{"description":"The ID of the task.","in":"path","name":"taskId","required":true,"schema":{"format":"int64","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"acknowledged":{"enum":["ok"],"type":"string"}},"type":"object"}}},"description":"The task was updated to be canceled. The task runner will cancel the task as soon as possible. The task will be in `status` _canceled_."}}}}}}
```

## DELETE /task/{taskId}

>

```json
{"openapi":"3.0.2","info":{"title":"FYLR API","version":"1.0.0"},"paths":{"/task/{taskId}":{"delete":{"parameters":[{"description":"The ID of the task.","in":"path","name":"taskId","required":true,"schema":{"format":"int64","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"acknowledged":{"enum":["ok"],"type":"string"}},"type":"object"}}},"description":"The task was successfully deleted.\n"},"403":{"description":"Insufficient rights.\n"}}}}}}
```

## GET /task/{taskId}

>

```json
{"openapi":"3.0.2","info":{"title":"FYLR API","version":"1.0.0"},"paths":{"/task/{taskId}":{"get":{"parameters":[{"description":"The ID of the task.","in":"path","name":"taskId","required":true,"schema":{"format":"int64","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/task"}}},"description":"The task was updated to be canceled. The task runner will cancel the task as soon as possible. The task will be in `status` _canceled_."}}}}},"components":{"schemas":{"task":{"properties":{"_user":{"properties":{"_basetype":{"enum":["user"],"type":"string"},"user":{"$ref":"#/components/schemas/user"}},"type":"object"},"task":{"properties":{"_id":{"description":"ID of the task. This is issued by the server.\n","format":"int64","type":"number"},"created_at":{"description":"UTC time of when the task was created.\n","format":"datetime","type":"string"},"description":{"description":"A user provided description of the task.\n","type":"string"},"email":{"properties":{"recipients":{"items":{"properties":{"email":{"description":"The email address of the recipient. Mails are send using the `To:` email header.\n","format":"email","type":"string"},"problems_only":{"description":"If set, emails are only sent if the task finished with a state other than `done`.\n","type":"boolean"}},"type":"object"},"type":"array"}},"type":"object"},"frontend_prefs":{"additionalProperties":true,"description":"Provided by API using Apps. The top level key of the map should reflect the name of your App. Apps are required to store unknown keys (and data) along with their own contribution.\n","type":"object"},"next_run_at":{"description":"The UTC time when the task will be started. It is possible that the task is run later that the given time (if other tasks are currently running), but not before. Set this to `null` to not execute this task. If a task is scheduled, the scheduler will update this property after the task has run.\n","format":"datetime","type":"string"},"run_canceled_at":{"description":"UTC time when the last run of the task was canceled. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"run_finished_at":{"description":"UTC time when the last run of the task has finished. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"run_started_at":{"description":"UTC time when the last run of the task was started. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"schedules":{"items":{"$ref":"#/components/schemas/schedule"},"type":"array"},"state":{"additionalProperties":true,"description":"Stores the state of a task. This can be used by the task module to continue interrupted work or otherwise. The data is provided over the API, so frontends may use it.\n","readOnly":true,"type":"object"},"status":{"description":"`status` is set by the **fylr** task runner.\n","enum":["new","running","done","canceled","error"],"readOnly":true,"type":"string"},"status_msg":{"description":"If the status is `error` or `canceled`, the status message gives more information.\n","readOnly":true,"type":"string"},"status_percent":{"description":"If supported by the task runner, a number in percent indicating the progress of a task in state `running`. This can be `null` if the task module has not started updating this yet, or it is not supported by the task module. Frontends should only show and use this if it is not `null`.\n","format":"int","readOnly":true,"type":"number"},"task_module":{"description":"Name of the task module to run the task. Retrieve a list with `/api/v1/task/module`.\n","type":"string"},"task_params":{"additionalProperties":true,"description":"The task properties. The schema for this is defined by the task module.\n","type":"object"},"task_timeout_sec":{"description":"When the task is run, this timeout is set. In case of a timeout the task will be in state `error`. Use `0` for no timeout.\n","format":"int","type":"number"},"updated_at":{"description":"UTC time of when the task was updated.\n","format":"datetime","type":"string"},"version":{"description":"Version of the task. The version must be incremented when saving a new\nversion of the task. While the task is running, the server may perform\nupdates on the task object without incrementing the version.\n","format":"int64","type":"number"}},"type":"object"}},"type":"object"},"user":{"properties":{"_generated_displayname":{"description":"The generated displayname of the user. This uses `login` and `email`.\n","type":"string"},"_id":{"description":"The id of the user. It is automatically assigned.\n","format":"int64","type":"number"}},"type":"object"},"schedule":{"description":"A schedule sets criterias to repeatedly start task or jobs. All defined criterias need to be met in order for a schedule to run.\n","properties":{"days_of_month":{"items":{"description":"The day of the month when this schedule should run.\n","format":"int","type":"number"},"type":"array"},"hours":{"items":{"description":"The hour when this schedule should run. Range `0`-`23`.\n","format":"int","type":"number"},"type":"array"},"minutes":{"items":{"description":"The minute when this schedule should run. Range `0`-`59`.\n","format":"int","type":"number"},"type":"array"},"timezone":{"description":"The timezone this schedule should be run in. Valid names are in [IANA format](https://www.iana.org/time-zones).\n","type":"string"},"weekdays":{"description":"The weekday when this schedule should run.\n","items":{"enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"type":"string"},"type":"array"}},"type":"object"}}}}
```

## GET /task/modules

>

```json
{"openapi":"3.0.2","info":{"title":"FYLR API","version":"1.0.0"},"paths":{"/task/modules":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"modules":{"properties":{"description":{"$ref":"#/components/schemas/lang"},"name":{"description":"Name of the module.\n","type":"string"},"params":{"$ref":"#/components/schemas/config_def"}},"type":"object"}},"type":"object"}}},"description":"Retrieve a list of available task modules.\n"}}}}},"components":{"schemas":{"lang":{"description":"Texts used to for language aware contexts.\n","properties":{"de-DE":{"type":"string"},"en-US":{"type":"string"}},"type":"object"},"config_def":{"items":{"description":"Each item describes a config setting.","properties":{"group":{"description":"The **group** sets the tab this config variable is in.","type":"string"},"name":{"description":"The unique name of this config","type":"string"},"parameters":{"$ref":"#/components/schemas/ConfigParam"},"require_system_right":{"description":"System right which this config requires, e.g. \"system.root\" if it requires root rights.","type":"string"},"unauthenticated_visible":{"description":"If true, this config is visible to unauthenticated sessions (access token with no user).","type":"boolean"}},"type":"object"},"type":"array"},"ConfigParam":{"discriminator":{"mapping":{"bool":"#/components/schemas/ConfigParamBool","email":"#/components/schemas/ConfigParamEmail","file":"#/components/schemas/ConfigParamFile","form":"#/components/schemas/ConfigParamForm","int":"#/components/schemas/ConfigParamInt","json":"#/components/schemas/ConfigParamJson","license":"#/components/schemas/ConfigParamLicense","location-select":"#/components/schemas/ConfigParamLocationSelect","secret":"#/components/schemas/ConfigParamSecret","select":"#/components/schemas/ConfigParamSelect","string-list":"#/components/schemas/ConfigParamStringList","string-list-sort":"#/components/schemas/ConfigParamStringListSort","table":"#/components/schemas/ConfigParamTable","tagfilter-select":"#/components/schemas/ConfigParamTagfilterSelect","text":"#/components/schemas/ConfigParamText","text-l10n":"#/components/schemas/ConfigParamTextLoca","text-l10n-multiline":"#/components/schemas/ConfigParamTextLocaMultiline","text-multiline":"#/components/schemas/ConfigParamTextMultiline"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ConfigParamBool"},{"$ref":"#/components/schemas/ConfigParamEmail"},{"$ref":"#/components/schemas/ConfigParamFile"},{"$ref":"#/components/schemas/ConfigParamForm"},{"$ref":"#/components/schemas/ConfigParamInt"},{"$ref":"#/components/schemas/ConfigParamJson"},{"$ref":"#/components/schemas/ConfigParamLicense"},{"$ref":"#/components/schemas/ConfigParamLocationSelect"},{"$ref":"#/components/schemas/ConfigParamSecret"},{"$ref":"#/components/schemas/ConfigParamSelect"},{"$ref":"#/components/schemas/ConfigParamStringList"},{"$ref":"#/components/schemas/ConfigParamStringListSort"},{"$ref":"#/components/schemas/ConfigParamTable"},{"$ref":"#/components/schemas/ConfigParamTagfilterSelect"},{"$ref":"#/components/schemas/ConfigParamTextLoca"},{"$ref":"#/components/schemas/ConfigParamTextMultiline"},{"$ref":"#/components/schemas/ConfigParamText"}]},"ConfigParamBool":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"type":"boolean"}},"type":"object"}],"description":"**bool** is a boolean"},"ConfigParamBase":{"properties":{"name":{"description":"name of the parameter as used in the API","type":"string"},"position":{"description":"Position of the parameter in the output.\n","format":"int32","minimum":0,"type":"number"},"type":{"description":"type of the parameter","type":"string"}},"required":["type"],"type":"object"},"ConfigParamEmail":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"type":"boolean"}},"type":"object"}],"description":"**email** is an email address consisting of loca part and domain name."},"ConfigParamFile":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"properties":{"_id":{"description":"An eas file id from fylr.","type":"integer"}},"type":"object"}},"type":"object"}],"description":"**file** is an eas file managed by fylr."},"ConfigParamForm":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"additionalProperties":true,"type":"object"},"parameters":{"$ref":"#/components/schemas/ConfigParam"}},"type":"object"}],"description":"**form** is one row of nested parameters."},"ConfigParamInt":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"type":"integer"}},"type":"object"}],"description":"**int** is an integer."},"ConfigParamJson":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"additionalProperties":true,"type":"object"},"plugin_type":{"description":"For some JSON, we support predefined schema.","type":"string"}},"type":"object"}],"description":"The value of this type is and abritrary JSON object."},"ConfigParamLicense":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"$ref":"#/components/schemas/License"}},"type":"object"}],"description":"**license** is an license object."},"License":{"properties":{"capabilities":{"type":"object"},"createdAt":{"description":"Timestamp when this license was created.","format":"date-time","type":"string"},"domains":{"description":"Must match fylr.externalURL, allows simple wildcard \"*\".","items":{"type":"string"},"type":"array"},"edition":{"description":"Edition of the license, such as \"workgroup\", \"department\", or \"organization\".","type":"string"},"holder":{"description":"Name of the holder of the license.","type":"string"},"issuer":{"description":"Name of the issuer of the license.","type":"string"},"key":{"description":"UUID of license file, e.g., for blacklisting.","type":"string"},"notes":{"description":"General notes for the customer.","type":"string"},"plugins":{"additionalProperties":{"description":"Set the capabilities for plugins."},"type":"object"},"type":{"description":"Type of license, such as \"subscription\" or \"buy\".","type":"string"},"valid":{"properties":{"from":{"description":"Valid from this date, if empty already valid.","format":"date-time","nullable":true,"type":"string"},"to":{"description":"Valid to this date, if empty license does not expire.","format":"date-time","nullable":true,"type":"string"}},"type":"object"}},"type":"object"},"ConfigParamLocationSelect":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"description":"Location is a name of a configured location","format":"location","type":"string"}},"type":"object"}],"description":"This presents a location select to the user."},"ConfigParamSecret":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"type":"boolean"}},"type":"object"}],"description":"**secret** is string which will be stored encrypted in the database, if `fylr.encryptionKey` is set."},"ConfigParamSelect":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"type":"string"},"options":{"description":"The list of options available for choice.","items":{"type":"string"},"type":"array"}},"type":"object"}],"description":"**select** is a choice select for one out of a list of options"},"ConfigParamStringList":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"choices":{"description":"The list of options available for choice.","items":{"type":"string"},"type":"array"},"default":{"items":{"type":"string"},"type":"array"}},"type":"object"}],"description":"**string-list** is a list of choices presented to the user."},"ConfigParamStringListSort":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"choices":{"description":"The list of options available for choice.","items":{"type":"string"},"type":"array"},"default":{"items":{"type":"string"},"type":"array"}},"type":"object"}],"description":"**string-list-sort** is a list of sortable choices presented to the user."},"ConfigParamTable":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"additionalProperties":true,"type":"object"},"fields":{"description":"Items of this array are of schema ConfigParam","items":{"$ref":"#/components/schemas/ConfigParam"},"type":"array"}},"type":"object"}],"description":"**table** is rows of parameters"},"ConfigParamTagfilterSelect":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"description":"Tagfilter is a map of sets of ids, as used in the fylr API.","format":"tagfilter","properties":{"all":{"items":{"type":"integer"},"type":"array"},"any":{"items":{"type":"integer"},"type":"array"},"not":{"items":{"type":"integer"},"type":"array"}}}},"type":"object"}],"description":"This presents a tagfilter select to the user."},"ConfigParamTextLoca":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"$ref":"#/components/schemas/lang"}},"type":"object"}],"description":"**text-l10n** is a localized string"},"ConfigParamTextMultiline":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"type":"string"}},"type":"object"}],"description":"**text-multiline** is like `text` but displayed in a mutliline form."},"ConfigParamText":{"allOf":[{"$ref":"#/components/schemas/ConfigParamBase"},{"properties":{"default":{"type":"string"}},"type":"object"}],"description":"**text** is a string"}}}}
```

## POST /task

>

```json
{"openapi":"3.0.2","info":{"title":"FYLR API","version":"1.0.0"},"paths":{"/task":{"post":{"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/task"},"type":"array"}}},"required":true},"responses":{"200":{"description":"Retrieve a list of tasks"}}}}},"components":{"schemas":{"task":{"properties":{"_user":{"properties":{"_basetype":{"enum":["user"],"type":"string"},"user":{"$ref":"#/components/schemas/user"}},"type":"object"},"task":{"properties":{"_id":{"description":"ID of the task. This is issued by the server.\n","format":"int64","type":"number"},"created_at":{"description":"UTC time of when the task was created.\n","format":"datetime","type":"string"},"description":{"description":"A user provided description of the task.\n","type":"string"},"email":{"properties":{"recipients":{"items":{"properties":{"email":{"description":"The email address of the recipient. Mails are send using the `To:` email header.\n","format":"email","type":"string"},"problems_only":{"description":"If set, emails are only sent if the task finished with a state other than `done`.\n","type":"boolean"}},"type":"object"},"type":"array"}},"type":"object"},"frontend_prefs":{"additionalProperties":true,"description":"Provided by API using Apps. The top level key of the map should reflect the name of your App. Apps are required to store unknown keys (and data) along with their own contribution.\n","type":"object"},"next_run_at":{"description":"The UTC time when the task will be started. It is possible that the task is run later that the given time (if other tasks are currently running), but not before. Set this to `null` to not execute this task. If a task is scheduled, the scheduler will update this property after the task has run.\n","format":"datetime","type":"string"},"run_canceled_at":{"description":"UTC time when the last run of the task was canceled. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"run_finished_at":{"description":"UTC time when the last run of the task has finished. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"run_started_at":{"description":"UTC time when the last run of the task was started. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"schedules":{"items":{"$ref":"#/components/schemas/schedule"},"type":"array"},"state":{"additionalProperties":true,"description":"Stores the state of a task. This can be used by the task module to continue interrupted work or otherwise. The data is provided over the API, so frontends may use it.\n","readOnly":true,"type":"object"},"status":{"description":"`status` is set by the **fylr** task runner.\n","enum":["new","running","done","canceled","error"],"readOnly":true,"type":"string"},"status_msg":{"description":"If the status is `error` or `canceled`, the status message gives more information.\n","readOnly":true,"type":"string"},"status_percent":{"description":"If supported by the task runner, a number in percent indicating the progress of a task in state `running`. This can be `null` if the task module has not started updating this yet, or it is not supported by the task module. Frontends should only show and use this if it is not `null`.\n","format":"int","readOnly":true,"type":"number"},"task_module":{"description":"Name of the task module to run the task. Retrieve a list with `/api/v1/task/module`.\n","type":"string"},"task_params":{"additionalProperties":true,"description":"The task properties. The schema for this is defined by the task module.\n","type":"object"},"task_timeout_sec":{"description":"When the task is run, this timeout is set. In case of a timeout the task will be in state `error`. Use `0` for no timeout.\n","format":"int","type":"number"},"updated_at":{"description":"UTC time of when the task was updated.\n","format":"datetime","type":"string"},"version":{"description":"Version of the task. The version must be incremented when saving a new\nversion of the task. While the task is running, the server may perform\nupdates on the task object without incrementing the version.\n","format":"int64","type":"number"}},"type":"object"}},"type":"object"},"user":{"properties":{"_generated_displayname":{"description":"The generated displayname of the user. This uses `login` and `email`.\n","type":"string"},"_id":{"description":"The id of the user. It is automatically assigned.\n","format":"int64","type":"number"}},"type":"object"},"schedule":{"description":"A schedule sets criterias to repeatedly start task or jobs. All defined criterias need to be met in order for a schedule to run.\n","properties":{"days_of_month":{"items":{"description":"The day of the month when this schedule should run.\n","format":"int","type":"number"},"type":"array"},"hours":{"items":{"description":"The hour when this schedule should run. Range `0`-`23`.\n","format":"int","type":"number"},"type":"array"},"minutes":{"items":{"description":"The minute when this schedule should run. Range `0`-`59`.\n","format":"int","type":"number"},"type":"array"},"timezone":{"description":"The timezone this schedule should be run in. Valid names are in [IANA format](https://www.iana.org/time-zones).\n","type":"string"},"weekdays":{"description":"The weekday when this schedule should run.\n","items":{"enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"type":"string"},"type":"array"}},"type":"object"}}}}
```

## GET /task

>

```json
{"openapi":"3.0.2","info":{"title":"FYLR API","version":"1.0.0"},"paths":{"/task":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/task"},"type":"array"}}},"description":"Retrieve a list of tasks"}}}}},"components":{"schemas":{"task":{"properties":{"_user":{"properties":{"_basetype":{"enum":["user"],"type":"string"},"user":{"$ref":"#/components/schemas/user"}},"type":"object"},"task":{"properties":{"_id":{"description":"ID of the task. This is issued by the server.\n","format":"int64","type":"number"},"created_at":{"description":"UTC time of when the task was created.\n","format":"datetime","type":"string"},"description":{"description":"A user provided description of the task.\n","type":"string"},"email":{"properties":{"recipients":{"items":{"properties":{"email":{"description":"The email address of the recipient. Mails are send using the `To:` email header.\n","format":"email","type":"string"},"problems_only":{"description":"If set, emails are only sent if the task finished with a state other than `done`.\n","type":"boolean"}},"type":"object"},"type":"array"}},"type":"object"},"frontend_prefs":{"additionalProperties":true,"description":"Provided by API using Apps. The top level key of the map should reflect the name of your App. Apps are required to store unknown keys (and data) along with their own contribution.\n","type":"object"},"next_run_at":{"description":"The UTC time when the task will be started. It is possible that the task is run later that the given time (if other tasks are currently running), but not before. Set this to `null` to not execute this task. If a task is scheduled, the scheduler will update this property after the task has run.\n","format":"datetime","type":"string"},"run_canceled_at":{"description":"UTC time when the last run of the task was canceled. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"run_finished_at":{"description":"UTC time when the last run of the task has finished. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"run_started_at":{"description":"UTC time when the last run of the task was started. It is set to `null` when the task re-starts.\n","format":"datetime","readOnly":true,"type":"string"},"schedules":{"items":{"$ref":"#/components/schemas/schedule"},"type":"array"},"state":{"additionalProperties":true,"description":"Stores the state of a task. This can be used by the task module to continue interrupted work or otherwise. The data is provided over the API, so frontends may use it.\n","readOnly":true,"type":"object"},"status":{"description":"`status` is set by the **fylr** task runner.\n","enum":["new","running","done","canceled","error"],"readOnly":true,"type":"string"},"status_msg":{"description":"If the status is `error` or `canceled`, the status message gives more information.\n","readOnly":true,"type":"string"},"status_percent":{"description":"If supported by the task runner, a number in percent indicating the progress of a task in state `running`. This can be `null` if the task module has not started updating this yet, or it is not supported by the task module. Frontends should only show and use this if it is not `null`.\n","format":"int","readOnly":true,"type":"number"},"task_module":{"description":"Name of the task module to run the task. Retrieve a list with `/api/v1/task/module`.\n","type":"string"},"task_params":{"additionalProperties":true,"description":"The task properties. The schema for this is defined by the task module.\n","type":"object"},"task_timeout_sec":{"description":"When the task is run, this timeout is set. In case of a timeout the task will be in state `error`. Use `0` for no timeout.\n","format":"int","type":"number"},"updated_at":{"description":"UTC time of when the task was updated.\n","format":"datetime","type":"string"},"version":{"description":"Version of the task. The version must be incremented when saving a new\nversion of the task. While the task is running, the server may perform\nupdates on the task object without incrementing the version.\n","format":"int64","type":"number"}},"type":"object"}},"type":"object"},"user":{"properties":{"_generated_displayname":{"description":"The generated displayname of the user. This uses `login` and `email`.\n","type":"string"},"_id":{"description":"The id of the user. It is automatically assigned.\n","format":"int64","type":"number"}},"type":"object"},"schedule":{"description":"A schedule sets criterias to repeatedly start task or jobs. All defined criterias need to be met in order for a schedule to run.\n","properties":{"days_of_month":{"items":{"description":"The day of the month when this schedule should run.\n","format":"int","type":"number"},"type":"array"},"hours":{"items":{"description":"The hour when this schedule should run. Range `0`-`23`.\n","format":"int","type":"number"},"type":"array"},"minutes":{"items":{"description":"The minute when this schedule should run. Range `0`-`59`.\n","format":"int","type":"number"},"type":"array"},"timezone":{"description":"The timezone this schedule should be run in. Valid names are in [IANA format](https://www.iana.org/time-zones).\n","type":"string"},"weekdays":{"description":"The weekday when this schedule should run.\n","items":{"enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"type":"string"},"type":"array"}},"type":"object"}}}}
```
