Get All Assignments API

Introduction

The Get All Assignments API returns all open assignments with limited OData filter support. This allows to filter data for specific User or Solution by passing OData filter in API URL. This API uses GET method to return all open assignments.

Request and Response body

The API returns all open assignments with limited OData filter support with following format for response:

Request Data Contract:

No Request Body Required.

Response Data Contract:

User can apply Odata filters on all fields available in response Data Contract.

Name Type Restriction Description
Id guid - Assignment id.
AppId guid - App Name id. This should be added.
Assignee string - Task assignee Display Name .
AssigneeUserName string - Task assignee User Name.
ActivityName string - Assignment Name .
AppName string - Returns the App Name.
AssignedDate datetime - Assigned date.
ReviewDate datetime - Assignment review date.
DueDate datetime - Assignment due date.
ProcessId guid - Assignment process id
AssignmentType int -

Assignment Type

  • 3 Activity

  • 4 Approval

  • 10 Plug-In

PerformerDefName string - Swimlane Name of the assignment.

Request and Response sample

Request Examples with ODATA filters:

  1. To get all open assignment.

    {{RoutePrefix}}/api/v1/Processextn/GetAllAssignments
  2. To get all open assignment of specific user from all apps:

     {{RoutePrefix}}/api/v1/Processextn/GetAllAssignments?$filter=AssigneeUserName eq 'mydomain\UserName'
  3. To get all open assignment of specific App:

    {{RoutePrefix}}/api/v1/Processextn/GetAllAssignments?$filter=AppName eq 'My App Name' 
  4. To get all open assignments of an app and specific user:

    {{RoutePrefix}}/api/v1/Processextn/GetAllAssignments?$filter=AppName eq 'My App Name' and AssigneeUserName eq 'mydomain\UserName'
  5. To get all open assignments of specific DueDate :

     {{RoutePrefix}}/api/v1/Processextn/GetAllAssignments?$filter=DueDate eq 2021-06-17
  6. To get open assignment with specific ProcessId :

    {{RoutePrefix}}/api/v1/Processextn/GetAllAssignments?$filter=ProcessId eq 7e8b0239-c81e-4d9f-965c-fa8932c4fa2b
  7. To get all open assignemnt with Specific AssignmentType:

    {{RoutePrefix}}/api/v1/Processextn/GetAllAssignments?$filter=AssignmentType eq 4

Response Data

[
    {
        "Id": "0b013c34-85ff-4c01-8aa5-00e3c5f0e4e9",
        "AppId": "7e8b0239-c81e-4d9f-965c-fa8932c4fa2b",
        "Assignee": "Central User",
        "AssigneeUserName": "WSDT\\centraluser",
        "ActivityName": "Lösungsprüfung",
        "AppName": "Arpit App",
        "AssignedDate": "2021-06-17T11:22:34.47",
        "ReviewDate": null,
        "DueDate": "2021-06-18T11:22:34.47",
        "ProcessId": "4039c8b3-0b14-418d-b8c4-aefd23e7da5c",
        "AssignmentType": 4,
        "PerformerDefName": "Reviewer_User"
    },
       {
        "Id": "13851040-240b-4b3c-94fd-01f88b7c6333",
        "AppId": "7e8b0239-c81e-4d9f-965c-fa8932c4fa2b",
        "Assignee": "Central User",
        "AssigneeUserName": "WSDT\\centraluser",
        "ActivityName": "Lösungsprüfung",
        "AppName": "Arpit App",
        "AssignedDate": "2021-06-17T12:57:31.937",
        "ReviewDate": null,
        "DueDate": "2021-06-18T12:57:31.937",
        "ProcessId": "49cd38ce-1cb6-496d-916b-9b87f6785079",
        "AssignmentType": 4,
        "PerformerDefName": "Reviewer_User"
    },
]

Error

Error

[{"ErrorCode":"SOMETHING_WENT_WRONG_ADMIN","Message":"An error has occured on the server","errorPrameters":null}]