# Reload task: Update

Information note**LOCKED.**   
  
This API is extremely reliable and will not be broken unless absolutely necessary.

## Method

POST

## Path

/qrs/reloadtask/update

## Description

Update a task and its triggers (that is, events). There are two types of triggers for a reload task:

* Composite event

  This event is triggered on condition of other events succeeding or failing, also known as task event trigger.

* Schema event

  This event is triggered according to a schedule (covers once-only as well as all repeating triggers).

## Body

```
{
    "task":{
        "id": "1489022b-ce31-46b9-8779-7c90bfb12369",
        "createdDate": "2018-09-11T14:21:18.854Z",
        "modifiedDate": "2018-09-13T11:11:17.699Z",
        "modifiedByUserName": "INTERNAL\\sa_repository",
        "customProperties": [],
        "app": {
            "id": "3963645d-7cee-4f7b-a228-af9c346230ee",
            "name": "Sales and Shipping Analysis",
            "appId": "",
            "publishTime": "1753-01-01T00:00:00.000Z",
            "published": false,
            "stream": null,
            "savedInProductVersion": "12.220.0",
            "migrationHash": "98d482c3f964dccf69cbfb9a00e0c048ea6eb221",
            "availabilityStatus": 0,
            "privileges": null
        },
        "isManuallyTriggered": false,
        "operational": null,
        "name": "Reload task of Sales and Shipping Analysis",
        "taskType": 0,
        "enabled": true,
        "taskSessionTimeout": 1440,
        "maxRetries": 0,
        "tags": [],
        "privileges": null,
        "schemaPath": "ReloadTask"
    },
    "schemaEvents": [{
        "id": "7e353aee-56bd-4b7b-bf06-e4242e2d9e20",
        "createdDate": "2018-09-18T12:53:50.450Z",
        "modifiedDate": "2018-09-18T12:54:46.121Z",
        "modifiedByUserName": "INTERNAL\\sa_repository",
        "timeZone": "America/New_York",
        "daylightSavingTime": 0,
        "startDate": "2018-09-18T08:58:37.000",
        "expirationDate": "9999-01-01T00:00:00.000",
        "schemaFilterDescription": [
             "* * - * * * * *"
        ],
        "incrementDescription": "0 1 0 0",
        "incrementOption": 1,
        "operational": null,
        "name": "HourlyShippingAnalysisTrig",
        "enabled": true,
        "eventType": 0,
        "reloadTask": {
            "id": "1489022b-ce31-46b9-8779-7c90bfb12369",
            "operational": null,
            "name": "Reload task of Sales and Shipping Analysis",
            "taskType": 0,
            "enabled": true,
            "taskSessionTimeout": 1440,
            "maxRetries": 0,
            "privileges": null
        },
        "userSyncTask": null,
        "externalProgramTask": null,
        "privileges": null,
        "schemaPath": "SchemaEvent"
    }],
    "compositeEvents": [{
        "id": "323d9283-9135-457f-bf83-53a42f39d7e8",
        "createdDate": "2018-09-11T14:21:18.854Z",
        "modifiedDate": "2018-09-13T11:11:17.699Z",
        "modifiedByUserName": "INTERNAL\\sa_repository",
        "timeConstraint": {
            "id": "323d9283-9135-457f-bf83-53a42f39d7e8",
            "createdDate": "2018-09-11T14:21:18.854Z",
            "modifiedDate": "2018-09-13T11:11:17.699Z",
            "modifiedByUserName": "INTERNAL\\sa_repository",
            "days": 0,
            "hours": 0,
            "minutes": 360,
            "seconds": 0,
            "schemaPath": "CompositeEvent.TimeConstraint"
        },
        "compositeRules": [{
            "id": "c8027d01-4c09-46ac-910a-d4652eeed3bc",
            "createdDate": "2018-09-11T14:21:18.854Z",
            "modifiedDate": "2018-09-13T11:11:17.699Z",
            "modifiedByUserName": "INTERNAL\\sa_repository",
            "ruleState": 1,
            "reloadTask": {
                "id": "6693e078-7e1b-4644-87f5-2724fde60c2a",
                "operational": null,
                "name": "Reload License Monitor",
                "taskType": 0,
                "enabled": true,
                "taskSessionTimeout": 1440,
                "maxRetries": 0,
                "privileges": null
            },
            "userSyncTask": null,
            "externalProgramTask": null,
            "operational": null,
            "schemaPath": "CompositeEvent.Rule"
        }],
        "operational": null,
        "name": "taskEventTrigShippingAnalysis",
        "enabled": true,
        "eventType": 1,
        "reloadTask": {
            "id": "1489022b-ce31-46b9-8779-7c90bfb12369",
            "operational": null,
            "name": "Reload task of Sales and Shipping Analysis",
            "taskType": 0,
            "enabled": true,
            "taskSessionTimeout": 1440,
            "maxRetries": 2,
            "privileges": null
        },
        "userSyncTask": null,
        "externalProgramTask": null,
        "privileges": null,
        "schemaPath": "CompositeEvent"
    }]
}
```

## Return value

```
{
    "id": "1489022b-ce31-46b9-8779-7c90bfb12369",
    "createdDate": "2018-09-11T14:21:18.854Z",
    "modifiedDate": "2018-09-18T14:21:39.585Z",
    "modifiedByUserName": "INTERNAL\\sa_repository",
    "customProperties": [],
    "app": {
        "id": "3963645d-7cee-4f7b-a228-af9c346230ee",
        "name": "Sales and Shipping Analysis",
        "appId": "",
        "publishTime": "1753-01-01T00:00:00.000Z",
        "published": false,
        "stream": null,
        "savedInProductVersion": "12.220.0",
        "migrationHash": "98d482c3f964dccf69cbfb9a00e0c048ea6eb221",
        "availabilityStatus": 0,
        "privileges": null
    },
    "isManuallyTriggered": false,
    "operational": {
        "id": "ca8816e9-ebb3-418c-b2b3-e0ce4c778725",
        "lastExecutionResult": {
            "id": "2940d713-2847-4dfc-b03c-775106d4a020",
            "executingNodeName": "user.example.com",
            "status": 7,
            "startTime": "2018-09-18T13:58:37.747Z",
            "stopTime": "2018-09-18T13:58:46.984Z",
            "duration": 9237,
            "fileReferenceID": "e8724677-6a45-41c4-80af-9917833d47f7",
            "scriptLogAvailable": false,
            "details": [{
                "id": "b94deb6e-04a0-4da8-958a-86b16a884336",
                "detailsType": 2,
                "message": "Reference to scriptlog added",
                "detailCreatedDate": "2018-09-18T13:58:46.761Z",
                "privileges": null
            },
            {
                "id": "1504320e-9061-4bf4-bbcf-99a44aca6270",
                "detailsType": 2,
                "message": "Changing task state from Started to FinishedSuccess",
                "detailCreatedDate": "2018-09-18T13:58:47.075Z",
                "privileges": null
            },
            {
                "id": "f7d471cb-8e19-47bd-ad9a-e5a717cd1065",
                "detailsType": 2,
                "message": "Changing task state to Triggered",
                "detailCreatedDate": "2018-09-18T13:58:37.749Z",
                "privileges": null
            },
            {
                "id": "2de7c232-ee7e-4c52-9cb8-fa21ffa009e2",
                "detailsType": 2,
                "message": "Trying to start task. Sending task to slave scheduler user.example.com",
                "detailCreatedDate": "2018-09-18T13:58:38.588Z",
                "privileges": null
            },
            {
                "id": "cc037012-54a0-4516-af4d-defb61a1c0aa",
                "detailsType": 2,
                "message": "Changing task state from Triggered to Started",
                "detailCreatedDate": "2018-09-18T13:58:39.448Z",
                "privileges": null
            }],
            "privileges": null
        },
        "nextExecution": "2018-09-18T14:58:37.000Z",
        "privileges": null
    },
    "name": "Reload task of Sales and Shipping Analysis",
    "taskType": 0,
    "enabled": true,
    "taskSessionTimeout": 1440,
    "maxRetries": 0,
    "tags": [],
    "privileges": [
        "create",
        "read",
        "update",
        "delete"
    ],
    "schemaPath": "ReloadTask"
}
```

## Optional parameters

-