Help Center>Foundation Help

Assignment API

This API enables you to get task assignment information details. These details are tabulated below.

Data Contract - Assignment API
Name Description Type

Restriction

Inde-

xed

AssignmentID Assignment ID of a task or assignment (Reporting database table - FAssignmentDW; Column - WFAssignmentID). Integer Primary Key Y
DBStoreID

ID to identify the Foundation database for that

workflow database instance.

Integer Primary Key Y
AssignmentTag

The internal tag assigned to each workflow node (Reporting database table - WFAssignmentDW;

Column - InternalTag).

Integer    
ProcessID Process ID of this assignment. Integer   Y
AssignedDate Assignment assigned date datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.    
DueDate Assignment due date datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.    
ReviewDate Assignment review date datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.    
CompleteDate Assignment complete date datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.    
Status Assignment status value Integer   Y
Code Description
0 - Draft
1 - Assigned
2 - Active
3 - Completed
4 - Approved
5 - Rejected
6 - Cancelled
7 - Pending
8 - Blocked
9 - ReAssigned
Assignee Task Assignee login ID. Format: domain\username String    
AssigneeFullName

Task assignee full name from the UserProfileDW

table in the reporting database. Format: FirstName MiddleName LastName

     
AssigneeManagerID Assignee Manager ID Integer    
Note Assignment Notes when any action was taken on this. String    
ReminderNotified Reminder Notification is sent or not. Integer    
0 means reminder not sent.
1 means reminder notification sent.
LateNotified Set to 1 when late notices have been sent, else 0. Integer    
AutoApproved Set to 1 when the assignment got approved automatically, else 0. Integer    
Disposition Text to show when the disposition for the assignment was rendered. String    
AssignmentType Assignment type value. Integer   Y
Code  Description
1 - Start
2 -  End
3 - Task
4 - Approval
5 - Decision
6 - Notification
7 - And Join
8 - Xor Join
9  - Loop
10 - Plug-In
11 - Set
Duration Assignment duration value in hours Integer    
Name Assignment name      
AssignmentDefID Assignment definition ID Integer    
ProcessOriginator Login ID of the user who is originator of workflow instance String    
ProcessName Name of the process String    
ProcessCreationDate Creation date of the process datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.    
ProcessParentProcessId ID of the parent process Integer    
ProcessTaskItemTitle Title of the SharePoint List item on which process is working String    
ProcessInheritanceLabel Process inheritance label property value String    
ProcessDueDate Due date of the process datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.    
ProcessCompletionDate Completion date of process datetime format - YYYY-MM-DDTHH:mm:ss.fff 24 hour time format up to 3 digit milliseconds.    
ProcessStatus Process status value:  Integer    
Code           Description
0 - Undefined 
1 - Draft 
2 - Running 
3 - Completed 
4 - Canceled 
5 - Approved 
6 - Rejected 
7 - Blocked
SolutionKey Solution Dimension Key  Integer   Y
SolutionName(DefName)

Solution Name from the solution name

dimension table.

String   Y
SolutionID(DefID) Solution Name ID Integer    
WebPath WebPath from the solution name dimension table. String   Y
SPWebID Web GUID from the solution name dimension table. String   Y
SPSiteID Site GUID from the solution name dimension table. String   Y
WebName

Name of SharePoint site's web. Example URL http://abcabc.def.ghmain.local/sites/works/WSForm1/

default.aspx

Here “WSForm1” is web name inside “works” site collection which is hosted on base url “abcabc.def.ghmain.local”.

WebName: “WSForm1”

WebAppName: http://abcabc.def.ghmain.local/

WebPath: /sites/works/WSForm1

String   Y
WebAppID GUID of the Web App. String   Y
WebAppName

Name of the SharePoint Web Application. Example URL http://abcabc.def.ghmain.local/sites/works/WSForm1/

default.aspx

Here “WSForm1” is web name inside “works” site collection which is hosted on base url “abcabc.def.ghmain.local”.

WebAppName: http://abcabc.def.ghmain.local/

String   Y

Note: It is recommended that you do not use the HistoryFlag parameter.

Endpoints and Methods

HTTP Method only GET is implemented.

  • Route: /v1/assignments – Get all assignments.
  • You can use the query parameters ($filter, $orderby, %$top, $skip, $select) to get assignments as per filtering, sorting, paging, and search.
  • Route: /v1/assignments/getcount – Get only count of the assignments. It can used with $filter.
  • Route: v1/assignments/{dbstoreid}/{assignmentid} – Get a specific assignment.

URL

The URL is as follows: <<host>>/dwapi/v1/assignments

Query Parameters, Descriptions, and Examples

Select

$select: This query option specifies that only the requested properties are returned. Use commas to specify multiple properties.

For example -

You can get only the AssignmentID from assignment data by the following: /dwapi/v1/assignments?$select=AssignmentID

Filter

$filter: This query option restricts the data to be returned for the requested resource.

You can use the following to further specify your results:

  • Built-in Filter Operations
    • Comparison operators – eq Equal, ne Not equal etc.
    • Logical operators – and Logical and, or Logical or, not Logical negation.
    • Arithmetic operators – add Addition, sub Subtraction etc.
    • Grouping operators – () Precedence grouping
  • Built-in Query Functions
    • String Functions – contains, endswith etc.
    • Date Functions – year, month, day etc.
    • Match Functions – round, floor etc.

For example -

You can restrict to get the assignments from a particular Assignee's Manager using the person’s ID by the following:

/dwapi/v1/assignments?$filter= AssigneeManagerID eq '123456'

Orderby

$orderby: This query option requests the service to return the result set in the specified order requested.

This parameter can include asc for asending or desc for descending. Default is ascending if not specified.

For Example -

You can get the assignments in ascending order on due date by the following:

/dwapi/v1/assignments?$orderby=duedate

$top and $skip

$top: This query option limits the items from result set.

$skip: This query option excludes the first n items from the result set.

Using $orderyby with $top and $skip results in more consistent data.

For example -

You can choose to get the top 10 assignments only by the following:

/dwapi/v1/assignments?$top=10

getcount

/getcount: This gets the count of result set or data queried. $filter can be used with getcount to know the count of filters result set.

This is not an Odata standard operation, it is only for the Foundation APIs.

For example -

You can choose to get a count of assignments by the following:

/dwapi/v1/assignments/getcount