Example: Bookmark IDs in LoadCollection responses

This topic shows an example of a bookmark ID used in a LoadCollection response to an API request.

This response includes the data that is requested from the UserNames IDO, such as UserID, UserName and UserDesc, and an initial bookmark ID.

               {
      "Bookmark": "<B><P><p>UserId</p></P><D><f>false</f></D><F><v>1</v></F><L><v>2</v></L></B>",
      "Items": [
      [
      {
      "Name": "UserId",
      "Value": "1"
      },
      {
      "Name": "Username",
      "Value": "sa"
      },
      {
      "Name": "UserDesc",
      "Value": "WinStudio Admin user"
      },
      {
      "Name": "_ItemId",
      "Value": "PBT=[UserNames] UserNames.DT=[2019-06-13 14:02:44.003] UserNames.ID=[407c7a60-c627-436f-88b0-2bd544a07208]"
      }
      ],
      [
      {
      "Name": "UserId",
      "Value": "2"
      },
      {
      "Name": "Username",
      "Value": "FTAutomation"
      },
      {
      "Name": "UserDesc",
      "Value": null
      },
      {
      "Name": "_ItemId",
      "Value": "PBT=[UserNames] UserNames.DT=[2019-06-13 14:02:44.070] UserNames.ID=[cfb7d823-0f3c-4c27-b61e-618ad8dc2b5f]"
      }
      ]
      ],
      "MoreRowsExist": true,
      "Message": "Success",
      "MessageCode": 0
      }
    

Since rowcap=2 is specified, only two records are available initially. To get the next two records, specify the bookmark ID and the load type value Next in the next request:

http://server/IDORequestService/MGRESTService.svc/json/UserNames/adv?props=UserId,Username,UserDesc&rowcap=2&loadtype=Next&bookmark=<B><P><p>UserId</p></P><D><f>false</f></D><F><v>1</v></F><L><v>2</v></L></B>/

This request now returns the next two rows, a new bookmark ID value that you can use to navigate on your next request, and a MoreRowsExist flag.

The MoreRowsExist flag indicates that there are more rows that can be retrieved with a NEXT request. For custom load methods, the CLM must be written to support bookmarking.

{
    "Bookmark": "<B><P><p>UserId</p></P><D><f>false</f></D><F><v>3</v></F><L><v>4</v></L></B>",
    "Items": [
        [
            {
                "Name": "UserId",
                "Value": "3"
            },
            {
                "Name": "Username",
                "Value": "mpalanca"
            },
            {
                "Name": "UserDesc",
                "Value": null
            },
            {
                "Name": "_ItemId",
                "Value": "PBT=[UserNames] UserNames.DT=[2019-06-13 14:03:59.083] UserNames.ID=[c869bbbb-e5c0-4812-8e2a-b4447a1eceb9]"
            }
        ],
        [
            {
                "Name": "UserId",
                "Value": "4"
            },
            {
                "Name": "Username",
                "Value": "MarielElleynIna.Palanca@infor.com"
            },
            {
                "Name": "UserDesc",
                "Value": "MarielElleynIna Palanca"
            },
            {
                "Name": "_ItemId",
                "Value": "PBT=[UserNames] UserNames.DT=[2019-07-02 10:57:01.233] UserNames.ID=[b6bc0447-3621-4e21-9244-be4963eb3c5a]"
            }
        ]
    ],
    "MoreRowsExist": false,
    "Message": "Success",
    "MessageCode": 0
}

Once MoreRowsExist returns false, the last set of available records for this IDO is retrieved.