Description | Example | Return Message | Group(s)

EditAssignment

HTTP Request Formats

PATCH api/task/{taskID}/assignment/{assignmentID}

To specify the schedule the command shall be sent to:

PATCH api/schedule/{scheduleName}/task/{taskID}/assignment/{assignmentID}

Description

The EditAssignment REST API command edits an assignment for a task in the active/specified schedule.

Request Body

  • Optional ShrinkToTimeslot: An optional boolean parameter: use ShrinkToTimeslot to automatically increase the assignment start times and decrease the assignment stop times so that they do not overrun timeslot boundaries.
  • StartTime: The format is a string of form YYYY/MM/DD_HH:MM:SS or YYYY/MM/DD_HH:MM:SS.fff for the assignment's start time.
  • StopTime: The format is a string of form YYYY/MM/DD_HH:MM:SS or YYYY/MM/DD_HH:MM:SS.fff for the assignment's stop time.
  • Optional AssignmentPossibilityName: An optional parameter: The array of strings of resources to use for this assignment. If omitted, the assignment's associated resources will not be altered. If included, the assignment's associated resources will be changed to the resources specified in this parameter.

Examples

Example 1

Edits an assignment with an ID of 1 for a task named DemoTask.

PATCH api/task/DemoTask/assignment/1

Body:

{

"Start" : "2022/11/21_04:00:00",

"Stop" : "2022/11/21_04:10:00"

}

Example 2

Edits an assignment with an ID of 1 for a task named DemoTask and increases the specified Start value and/or decreases the specified Stop value as applicable to fit within the task's timeslots.

PATCH api/task/DemoTask/assignment/1

Body:

{

"ShrinkToTimeslot" : true,

"Start" : "2022/11/21_04:00:00",

"Stop" : "2022/11/21_04:10:00"

}

Return Message

If successful, a standard response for a successful HTTP response shall be returned.

Group Membership

This command belongs to the following group(s):

Scheduler

Version

12.5