Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud API concepts
  • Basic principles
    • Overview
    • API endpoints
    • Standard methods
    • Additional methods
    • Pagination
    • Handling errors

In this article:

  • Examples
  • gRPC
  • REST
  1. API methods
  2. Pagination

Pagination

Written by
Yandex Cloud
Updated at April 23, 2025
  • Examples
    • gRPC
    • REST

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: Result page token. You can get the next page token from the next_page_token field when retrieving a list of resources (see the example below).

  • page_size: Number of results per page. Possible values: from 0 to 1000. Default: 100.

Examples

gRPC

gRPC description of the List method used for 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;
 }

REST

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

GET https://compute.api.cloud.yandex.net/compute/v1/disks?folderId=a3s17h9sbq5asdgss12&pageToken=1acdeb26078146e6

Response:

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

Was the article helpful?

Previous
Additional methods
Next
Handling errors
© 2025 Direct Cursus Technology L.L.C.