Example: Bookmark IDs in LoadCollection responses

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

This request would return the response shown below. It includes the data we 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]"
      }
      ]
      ],
      "Message": "Success",
      "MessageCode": 0
      }
    

Since we specified rowcap=2, we only get 2 records initially. If we’d like to get the next 2 records, we need to specify the bookmark ID in our next request along with the load type value:

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 2 rows and a new bookmark ID value that you can use to navigate on your next request:

{
    "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]"
            }
        ]
    ],
    "Message": "Success",
    "MessageCode": 0
}