REST API - getWorkListItemsForView

The table summarizes the REST API - getWorkListItemsForView.

Request

Format
GET <baseurl>/worklist/workitemsforview/<viewid>/<startposition>/<numberofitems>
Path parameters
  • Viewid : The ID of the work list view from which to get the page of work items.
  • startposition: Position in the work item list from which to start this page. (The list is zero-based. To start at the first item, specify 0.)
  • numberofitems: Number of work items (in the work item list) to include in this page.
Query parameters
  • getallocated=boolean (optional. Default=false). Whether to return allocated work items.
  • btotalreq=boolean (optional. Default=true). Boolean defining whether BRM builds a count of the total number of work items in the work item list. If ‘false’ is passed in this attribute, and:
    • there is at least one item in the list, the totalItems value returned in the response is -1.
    • there are no work items in the list, the totalItems value returned in the response is 0 (zero).
  • enhancedattributes=Boolean (optional, default=false). If true, all 40 work item attributes are returned with the work item; if false, only work item attributes 1-14 are returned with the work item.

Response

JSON Returns a JSON representation of the content of the getWorkListItemsForViewResponse element.
XML Returns the content of the getWorkListItemsForViewResponse element (from the WorkListService schema)

Example 1

Request
GET <baseurl>/worklist/workitemsforview/1/0/2
Response
{
    "xml-fragment": {
        "startPosition": 0,
        "endPosition": 0,
        "totalItems": 1,
        "workItems": {
            "id": {
                "@id": "8",
                "@version": "8"
            },
            "header": {
                "@distributionStrategy": "OFFER",
                "@priority": "50",
                "@startDate": "2013-01-22T14:24:20.077Z",
                "name": "GetUsersName",
                "description": "Get User's Name",
                "flags": {
                    "scheduleStatus": "DURING"
                },
                "itemContext": {
                    "activityID": "pvm:001i27",
                    "activityName": "GetUsersName",
                    "appInstance": "pvm:0a129",
                    "appName": "WelcomeUsersChained",
                    "appID": "_h3SuNATvEd-PnpTAZS_CFw"
                }
            },
            "state": "OPENED",
            "visible": true
        },
        "customData": "<ClientView><Columns><Column name=\"name\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><Column name=\"appInstanceDescription\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><Column name=\"description\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><Column name=\"state\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><Column name=\"id\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><Column name=\"priority\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><Column name=\"startDate\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><Column name=\"endDate\" isSelected=\"true\" sortDirection=\"true\" isSort=\"false\"/><PageSize size=\"10\"/></Columns></ClientView>"
    }
}

Example 2

Request
GET <baseurl>/worklist/workitemsforview/12/0/100?resourcetype=ALL
Response
<xml-fragment>
   <startPosition>0</startPosition>
   <endPosition>2</endPosition>
   <totalItems>-1</totalItems>
   <workItems>
      <id id="1" version="2"/>
      <header distributionStrategy="OFFER" priority="30" startDate="2013-06-26T09:19:17.570Z">
         <name>Test Work List Views</name>
         <description>Test Work List Views</description>
         <flags>
            <scheduleStatus>DURING</scheduleStatus>
         </flags>
         <itemContext>
            <activityID>SoapUI Scheduled Item</activityID>
            <activityName>SoapUI Scheduled Item</activityName>
            <appInstance>SoapUI</appInstance>
            <appName>SoapUI</appName>
            <appID>Model ID</appID>
         </itemContext>
      </header>
      <state>PENDED</state>
      <visible>true</visible>
   </workItems>
   <workItems>
      <id id="3" version="0"/>
      <header distributionStrategy="OFFER" priority="30" startDate="2013-06-26T09:19:30.983Z">
         <name>Test Work List Views</name>
         <description>Test Work List Views</description>
         <flags>
            <scheduleStatus>DURING</scheduleStatus>
         </flags>
         <itemContext>
            <activityID>Scheduled to test ALL on Work View</activityID>
            <activityName>SoapUI Scheduled Item</activityName>
            <appInstance>SoapUI</appInstance>
            <appName>SoapUI</appName>
            <appID>Model ID</appID>
         </itemContext>
      </header>
      <state>OFFERED</state>
      <visible>true</visible>
   </workItems>
</xml-fragment>