Some API methods support pagination. Pagination is when a server returns results in parts, page by page, and not all of them at once. Pagination is generally used for the List* method that returns a list.

To get the desired page with results, pass the following parameters in a request:

  • page_token — Token for the results page. The next page's token can be obtained from the next_page_token field when getting a list of resources (see the example below).

  • page_size — Number of results per page. Possible values: from 0 to 1000. The default value is 100.



Sample gRPC description of the List method used to get a list of disks:

 // The method returns a list of disks in the specified folder.
 rpc List (ListDisksRequest) returns (ListDisksResponse) {
   option (google.api.http) = { get: "/compute/v1/disks" };
 message ListDisksRequest {
   // Folder ID.
   // Required field.
   string folder_id = 1;

   // Maximum number of results per page.
   int64 page_size = 2;

   // Token of the requested result page.
   string page_token = 3;

 message ListDisksResponse {
   // List of disks.
   repeated Disk disks = 1;

   // Token of the next page.
   string next_page_token = 2;


Sample REST request used to get a list of disks in the folder:



  "disks": [
      "folderId": "de0m97h0gbq0foeuis03",
      "createdAt": "2018-08-09T12:54:53+00:00",
      "id": "de019dv504rmhoinn3nk",
      "name": "development",
      "zoneId" : "ru-central1-a",
      "typeId" : "network-ssd",
      "size" : 5368709120 
  "nextPageToken": "ae08rgjd5smu4bq5n1o4"