Skip to content

API method GetItems with paged CAML query does not return paging information #3346

@nero120

Description

@nero120

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Querying list items using a POST request to /_api/Web/Lists/getByTitle('MyList')/GetItems with POST data:

{
    "query": {
        "ViewXml": "<View><RowLimit Paged='TRUE'>1</RowLimit></View>"
    }
}

gives the following response:

{
    "odata.metadata": "https://savillsukdev.sharepoint.com/sites/cpa-ci/_api/$metadata#SP.ApiData.ListItems",
    "value": [
        { ... }
    ]
}

Though the results appear to be paged (only one item returned), no paging information is included in the response object. I would expect to receive alongside the list items a ListItemCollectionPosition property that would include a PagingInfo string (as per the Client Object Model) which I can then use to retrieve the next batch (if any).

The data type returned by the query is SP.ApiData.ListItems which is not mentioned in the API Index and in fact should probably return a ListItemCollection which would include the paging information.

Please can you clarify?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions