Create to do tasks for a user
post
/fscmRestApi/resources/11.13.18.05/projectsUsers/{ResourceId}/child/ToDoTasks
Request
Path Parameters
-
ResourceId(required): integer(int64)
The unique identifier of the resource assigned to the task.
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
-
Upsert-Mode:
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
ElementType(required): string
Maximum Length:
30
The element type of the task. -
ElementVersionId: integer
(int64)
The unique identifier of the element version of the task.
-
ObjectType: string
Maximum Length:
30
Default Value:PJF_TASKS
The object type of the task. - OsnSharedTaskFlag: boolean
-
PlanLineId: integer
(int64)
The unique identifier of the plan line of the to do task.
-
TaskDescription: string
Title:
Description
Maximum Length:2000
The description of the task. -
TaskName(required): string
Title:
Task Name
Maximum Length:255
The name of the task. -
TaskPlannedFinishDate: string
(date)
Title:
Finish Date
The date when the task ends. -
TaskPlannedStartDate: string
(date)
Title:
Start Date
The date when the task starts. -
TaskPriority: number
Title:
Priority
The priority of the task. -
TaskProgressEnteredDate: string
(date)
The date when progress on a task was last entered.
-
TaskProgressStatusCode: string
Maximum Length:
20
The Code of progress status of the task. -
ToDoTaskFollowers: array
To Do Task Followers
Title:
To Do Task Followers
The to do task follower resource is used to store values while adding or removing followers on to do tasks.
Nested Schema : To Do Task Followers
Type:
array
Title:
To Do Task Followers
The to do task follower resource is used to store values while adding or removing followers on to do tasks.
Show Source
Nested Schema : projectsUsers-ToDoTasks-ToDoTaskFollowers-item-post-request
Type:
Show Source
object
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context(required):
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version(required):
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : projectsUsers-ToDoTasks-item-response
Type:
Show Source
object
-
CreatedBy: string
Read Only:
true
Maximum Length:64
The unique identifier of the user who created the task. -
CreationDate: string
(date-time)
Read Only:
true
The date when the task is created. -
ElementType: string
Maximum Length:
30
The element type of the task. -
ElementVersionId: integer
(int64)
The unique identifier of the element version of the task.
-
LastUpdateDate: string
(date-time)
Title:
Last Updated Date
Read Only:true
The date when the task is last updated. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
The unique identifier of the user who last updated the task. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
ObjectType: string
Maximum Length:
30
Default Value:PJF_TASKS
The object type of the task. - OsnSharedTaskFlag: boolean
-
PlanLineId: integer
(int64)
The unique identifier of the plan line of the to do task.
-
ProjElementId: integer
(int64)
Read Only:
true
The unique identifier of the project element of the task. -
TaskDescription: string
Title:
Description
Maximum Length:2000
The description of the task. -
TaskId: integer
(int64)
Read Only:
true
The unique identifier of the task. -
TaskName: string
Title:
Task Name
Maximum Length:255
The name of the task. -
TaskPlannedFinishDate: string
(date)
Title:
Finish Date
The date when the task ends. -
TaskPlannedStartDate: string
(date)
Title:
Start Date
The date when the task starts. -
TaskPriority: number
Title:
Priority
The priority of the task. -
TaskProgressEnteredDate: string
(date)
The date when progress on a task was last entered.
-
TaskProgressStatus: string
Read Only:
true
Maximum Length:80
The status of work completed on the task. -
TaskProgressStatusCode: string
Maximum Length:
20
The Code of progress status of the task. -
ToDoTaskFollowers: array
To Do Task Followers
Title:
To Do Task Followers
The to do task follower resource is used to store values while adding or removing followers on to do tasks.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : To Do Task Followers
Type:
array
Title:
To Do Task Followers
The to do task follower resource is used to store values while adding or removing followers on to do tasks.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Nested Schema : projectsUsers-ToDoTasks-ToDoTaskFollowers-item-response
Type:
Show Source
object
-
DisplayName: string
Title:
Name
Read Only:true
Maximum Length:240
The name of projects user. -
ElementVersionId: integer
(int64)
Read Only:
true
The unique identifier of the element version of the task. -
Email: string
Title:
Email
Read Only:true
Maximum Length:240
The e-mail address of the resource. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
Phone: string
Title:
Phone
Read Only:true
Maximum Length:240
The telephone number of the projects user. -
ResourceId: integer
(int64)
Read Only:
true
Unique identifier of the resource assigned to the task. -
TaskFollowerId: integer
(int64)
Read Only:
true
The unique identifier of the task follower.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Links
- ToDoTaskFollowers
-
Parameters:
- ResourceId:
$request.path.ResourceId
- ToDoTasksUniqID:
$request.path.ToDoTasksUniqID
The to do task follower resource is used to store values while adding or removing followers on to do tasks. - ResourceId:
Examples
The following example shows how to create a to do task for a user by submitting a POST request on the REST resource using cURL.
curl -i -u "<username>:<password>" -X GET https://<host>:<port>/fscmRestApi/resources/latest/projectsUsers/ResourceId/child/ToDoTasks
Example of Request Header
The following shows an example of the request header.
{ "TaskPriority":1, "TaskDescription": "New Task", "TaskName" : "CreateToDo", "ElementType":"TODO", "ObjectType":"PJF_TASKS" }
Example of Response Body
The following example shows the contents of the response body in JSON format:
{ "TaskName": "CreateToDo", "ProjElementId": 300100090655821, "ObjectType": "PJF_TASKS", "ElementType": "TODO", "TaskDescription": "New Task", "TaskPlannedFinishDate": null, "TaskPlannedStartDate": null, "TaskProgressStatusCode": "NOT_STARTED", "TaskProgressEnteredDate": "2017-01-09", "TaskPriority": 1, "TaskProgressStatus": "Not started", "ElementVersionId": 300100090655819, "TaskId": 300100090655821, "CreatedBy": "Connor.Horton", "CreationDate": "2017-01-09T09:48:05-08:00", "LastUpdateDate": "2017-01-09T09:48:06-08:00", "LastUpdatedBy": "Connor.Horton", "links": [ { "rel": "self", "href": "https://servername/projectsManagementApi/resources/11.1.13/projectsUsers/300100024326655/child/ToDoTasks/00040000000EACED00057708000110F07F4CF44D0000000EACED00057708000110F07F4CF44C0000000EACED00057708000110F07F4CF44B0000000EACED00057708000110F07F4CF44E", "name": "ToDoTasks", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000004770400000006737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787200106A6176612E6C616E672E4F626A65637400000000000000000000007870000000017371007E0002000000017371007E0002000000017371007E00020000000178" } }, { ... ] }