Task

PATCH /ver2/TaskService.svc/tasks/{taskId}

Updates the properties of a simple (single occurrence) Task definition, potentially moving it to a new Location. Updating the object Location(s) of a Task effectively moves that Task to the new Location(s).

Security: Requires Manage Tasks right.

SDK API: envianceSdk.tasks.updateTask(taskId, taskInfo, onsuccess, onerror)

PATCH /ver2/TaskService.svc/tasks/9ca22677-2670-41a9-bafd-3b2825592863 HTTP/1.1
Content-Type: application/json; charset=UTF-8
 
{
  "taskInfo": {
    "name": "Check Valves Monthly",
    "description": "Perform a spot check every month on the steam valves.",
    "dueDate": "2012-12-08T09:00:00",
    "timeZone": "USA Pacific",
    "objects": [
      "/A Facility/A Unit/A POI/Check Valves",
      "/A Facility/A Unit/B POI/Check Valves",
      "/A Facility/A Unit/C POI/Check Valves"
    ]
  }
}

envianceSdk.tasks.updateTask

[
  "F04DD9CA-35CA-4579-A266-5050660D7012",
  {
    "name": "Task 1 updated",
    "description": "updated.",
    "timeZone": {
      "name": "Pacific Time (US \u0026 Canada) (UTC-08:00) (With DST)"
    },
    "assignor": "eoleg2",
    "assignees": [
      {
        "userIdOrName": "eoleg1"
      }
    ],
    "calendars": [
      "System",
      "My"
    ],
    "objects": [
      "/Area 1"
    ],
    "schedules": [
      {
        "startDate": "2014-02-22T00:00:00",
        "recurrenceType": "Monthly",
        "startTime": "00:00:00",
        "recurrenceInterval": 1,
        "dayOfMonth": 31
      }
    ],
    "notifications": [
      {
        "conditions": {
          "immediately": true,
          "whenDismissed": true,
          "byDueDate": {
            "conditionType": "IntervalBefore",
            "intervalValue": 5,
            "intervalType": "Hour"
          },
          "byCompletionStatus": {
            "comparisonLogic": "\u003E=",
            "completionPercent": 30
          }
        },
        "recipients": {
          "toAssignees": true,
          "toAssignor": true,
          "users": [
            "067A42E1-8FD4-4ADA-A7F5-0007473469AA"
          ],
          "groups": [
            "503DFFD2-FB1F-412E-B9C5-034796E4653D"
          ]
        },
        "deliveryMethod": "InboxAndEmail",
        "comments": "Notification comment 1"
      }
    ]
  },
  "onsuccess",
  "onerror"
]

Request

Path parameters

taskIdstring required

Headers

EnvApi-Systemidstring

Specify specific system to run instead of Home

EnvApi-Packageidstring

(optional) Clients application/package ID

EnvApi-Udf-DateTime-Iso-In-CustomFieldsstring

Udfs of DateTime should use Iso

EnvApi-Udf-DateTime-ReadInUserTzstring

(obsolete) Udfs of DateTime type whould be in ReadInUserTz

EnvApi-Udf-Value-Invariantstring

(optional) Udfs - Force Non-Localized (invariant) values

EnvApi-Localization-Allstring

(optional) Extend objects with User-given Localizations

x-client-request-idstring

(optional) Client ID for double submit prevention

Request body

Response

not available

Changes

No recorded changes to this operation across all 1 revision of this API.