As part of the Relativity Services API (RSAPI) Deprecation, content on this page refers to outdated information about using REST APIs for the RSAPI. For more information about alternative REST APIs, see the RSAPI deprecation process.

Paging

When retrieving a collection of Artifacts, the REST API supports paging to maintain performance. All code that retrieves a collection of Artifacts through the REST API returns data in multiple pages. For example, the REST API supports paging on Document objects and RDOs to accommodate large results sets that Relativity queries may return. Paging parameters include the start index and page size.

For an initial query, you can specify only the pageSize as exemplified in the following URL:

1
/Workspace/1015301/Document?pageSize=200

In a follow-up query, you can also specify the start index as well as the pageSize:

1
/Workspace/1015301/Document?start=0&pageSize=1000

If you don't specify any paging parameters in the URL, the default value is used. You can find this value in the PDVDefaultQueryCacheSize setting of the Instance setting table in the EDDS database. By default, this instance setting is set to 10000. See Instance setting table on the Relativity Documentation site.

Sample POST operation using paging

When you perform paging with a POST operation, the response contains a JSON property called NextPage. This property is a link (that is a URL) to the subsequent page of results. For example, you perform a query using a POST with this URL:

1
/localhost/Relativity.REST/Workspace/1017955/Document/QueryResult

To retrieve the second page of results, you execute a GET operation with the URL provided in the NextPage property:

1
/localhost/Relativity.REST/Workspace/1017955/Document/QueryResult/d413d9ed-c343-4b89-8383-205133b773cf?start=11&pageSize=10

Note: The previous and next page locations are empty on object types that don't support paging. For those object types, you can include paging parameters as part of the URL.