Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini berisi penjelasan tentang cara penomoran halaman hasil
di berbagai alat dan library Cloud Storage. Penomoran halaman diperlukan saat mencantumkan sejumlah besar
objek atau bucket.
Konsol
Konsol Google Cloud akan otomatis memberi nomor halaman pada daftar bucket dan objek di
halaman Bucket dan Detail bucket.
Google Cloud CLI akan otomatis memberi nomor halaman pada daftar objek dan bucket.
Library klien
C++
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, iterator akan ditampilkan sebagai respons. Untuk
contoh cara penggunaan iterator ini, lihat dokumentasi
referensi C++ untuk ListObjects().
C#
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, iterator akan ditampilkan sebagai respons. Untuk
contoh cara penggunaan iterator ini, lihat dokumentasi
referensi C# untuk ListObjects().
Go
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, iterator akan ditampilkan sebagai respons. Untuk
contoh cara penggunaan iterator ini, lihat dokumentasi
referensi Go untuk Bucket.Objects.
Java
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, token halaman akan ditampilkan sebagai respons. Untuk
contoh cara penggunaannya, lihat
dokumentasi referensi Java.
Node.js
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, iterator akan ditampilkan sebagai respons. Untuk
contoh cara penggunaan iterator ini, lihat dokumentasi
referensi Node.js untuk getFiles().
PHP
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, iterator akan ditampilkan sebagai respons. Untuk
contoh cara penggunaan iterator ini, lihat dokumentasi
referensi PHP untuk Objects.
Python
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, iterator akan ditampilkan sebagai respons. Untuk
contoh cara penggunaan iterator ini, lihat dokumentasi
referensi Phyton untuk iterator halaman.
Ruby
Library klien melakukan penomoran halaman secara default. Saat Anda memanggil fungsi
yang mendukung penomoran halaman, iterator akan ditampilkan sebagai respons. Untuk
contoh cara penggunaan iterator ini, lihat dokumentasi
referensi Ruby untuk Google::Cloud::Storage::File::List.
REST API
JSON API
Saat Anda memanggil fungsi yang mendukung penomoran halaman, token
lanjutan nextPageToken akan ditampilkan dalam respons jika listingan belum
lengkap. nextPageToken mewakili
hasil terakhir yang ditampilkan. Jika Anda meneruskan nilai nextPageToken
ke parameter pageToken dari permintaan berikutnya, halaman hasil berikutnya
akan ditampilkan, dimulai setelah hasil terakhir.
Misalnya, permintaan Anda untuk mencantumkan objek dalam bucket bernama
my-bucket berisi nextPageToken dalam respons:
Permintaan HTTP yang akan Anda gunakan untuk melanjutkan pencantuman objek di
my-bucket adalah sebagai berikut:
GET https://storage.googleapis.com/storage/v1/b/my-bucket/o?pageToken=CgtzaGliYS0yLmpwZw==
Untuk informasi selengkapnya tentang penomoran halaman hasil, lihat dokumentasi
referensi JSON untuk Objects: list atau Buckets: list.
XML API
Saat Anda memanggil fungsi yang mendukung penomoran halaman, token
lanjutan NextContinuationToken akan ditampilkan dalam respons jika listingan
belum lengkap. NextContinuationToken mewakili hasil terakhir
yang ditampilkan. Jika Anda meneruskan nilai NextContinuationToken ke
parameter continuation-token dari permintaan berikutnya, halaman hasil berikutnya
akan ditampilkan, dimulai setelah hasil terakhir.
Misalnya, permintaan Anda untuk mencantumkan objek dalam bucket bernama
my-bucket berisi NextContinuationToken dalam respons:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[],[],null,["# Paginate results\n\nThis page describes how different Cloud Storage tools and libraries\npaginate results. Pagination is required when listing a high number of\n[objects](/storage/docs/objects) or [buckets](/storage/docs/buckets). \n\n### Console\n\nThe Google Cloud console automatically paginates bucket and object lists in\nthe **Buckets** and **Bucket details** pages.\n\n\u003cbr /\u003e\n\n[Open the Buckets page](https://console.cloud.google.com/storage/browser)\n\n### Command line\n\nThe Google Cloud CLI automatically paginates bucket and object lists.\n\n### Client libraries\n\n### C++\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, an iterator is returned in the response. For\nan example of how this iterator is used, see the C++ reference\ndocumentation for [`ListObjects()`](https://googleapis.dev/cpp/google-cloud-storage/latest/classgoogle_1_1cloud_1_1storage_1_1Client.html#ac632b30c61f6447eb35ce393a63070f5).\n\n### C#\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, an iterator is returned in the response. For\nan example of how this iterator is used, see the C# reference\ndocumentation for [`ListObjects()`](/dotnet/docs/reference/Google.Cloud.Storage.V1/latest/Google.Cloud.Storage.V1.StorageClient#Google_Cloud_Storage_V1_StorageClient_ListObjects_System_String_System_String_Google_Cloud_Storage_V1_ListObjectsOptions_).\n\n### Go\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, an iterator is returned in the response. For\nan example of how this iterator is used, see the Go reference\ndocumentation for [`Bucket.Objects`](https://pkg.go.dev/cloud.google.com/go/storage#hdr-Listing_objects).\n\n### Java\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, a page token is returned in the response. For\nan example of how this is used, see the\n[Java reference documentation](/java/docs/reference/google-cloud-storage/latest/com.google.cloud.storage.Storage#com_google_cloud_storage_Storage_list_java_lang_String_com_google_cloud_storage_Storage_BlobListOption____).\n\n### Node.js\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, an iterator is returned in the response. For\nan example of how this iterator is used, see the Node.js reference\ndocumentation for [`getFiles()`](https://googleapis.dev/nodejs/storage/latest/Bucket.html#getFiles).\n\n### PHP\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, an iterator is returned in the response. For\nan example of how this iterator is used, see the PHP reference\ndocumentation for [`Objects`](/php/docs/reference/cloud-storage/latest/Bucket#_Google_Cloud_Storage_Bucket__objects__).\n\n### Python\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, an iterator is returned in the response. For\nan example of how this iterator is used, see the Python reference\ndocumentation for [page iterators](https://googleapis.dev/python/google-api-core/latest/page_iterator.html).\n\n### Ruby\n\nClient libraries perform pagination by default. When you call a function\nthat supports pagination, an iterator is returned in the response. For\nan example of how this iterator is used, see the Ruby reference\ndocumentation for [`Google::Cloud::Storage::File::List`](https://googleapis.dev/ruby/google-cloud-storage/latest/Google/Cloud/Storage/File/List.html).\n\n### REST APIs\n\n### JSON API\n\nWhen you call a function that supports pagination, the continuation\ntoken `nextPageToken` is returned in the response if the listing is\nincomplete. The `nextPageToken` represents the\nlast result that's returned. When you pass the value of `nextPageToken`\nto the `pageToken` parameter of a subsequent request, you return the\nnext page of results, starting after the last result.\n\nFor example, say your request to list objects in a bucket named\n`my-bucket` contains a `nextPageToken` in the response: \n\n```\n{\n \"kind\": \"storage#objects\",\n \"nextPageToken\": \"CgtzaGliYS0yLmpwZw==\",\n \"items\": [\n {\n OBJECT_1_METADATA\n },\n {\n OBJECT_2_METADATA\n },\n …\n ]\n}\n```\n\nThe HTTP request you would use to continue listing objects in\n`my-bucket` would be the following: \n\n```\nGET https://storage.googleapis.com/storage/v1/b/my-bucket/o?pageToken=CgtzaGliYS0yLmpwZw==\n```\n\nFor more information on paginating results, see the JSON reference\ndocumentation for [`Objects: list`](/storage/docs/json_api/v1/objects/list) or [`Buckets: list`](/storage/docs/json_api/v1/buckets/list).\n\n### XML API\n\nWhen you call a function that supports pagination, the continuation\ntoken `NextContinuationToken` is returned in the response if the listing\nis incomplete. The `NextContinuationToken` represents the last result\nthat's returned. When you pass the value of `NextContinuationToken` to\nthe `continuation-token` parameter of a subsequent request, you return\nthe next page of results, starting after the last result.\n\nFor example, say your request to list objects in a bucket named\n`my-bucket` contains a `NextContinuationToken` in the response: \n\n```\n\u003c?xml version='1.0' encoding='UTF-8'?\u003e\n\u003cListBucketResult xmlns='http://doc.s3.amazonaws.com/2006-03-01'\u003e\n \u003cName\u003emy-bucket\u003c/Name\u003e\n \u003cNextContinuationToken\u003eCgtzaGliYS0yLmpwZw==\u003c/NextContinuationToken\u003e\n \u003cKeyCount\u003e2\u003c/KeyCount\u003e\n \u003cMaxKeys\u003e2\u003c/MaxKeys\u003e\n \u003cIsTruncated\u003etrue\u003c/IsTruncated\u003e\n \u003cContents\u003e\n ...\n \u003c/Contents\u003e\n ...\n\u003c/ListBucketResult\u003e\n```\n\nNote that `list-type` must be set to `2` in order to return a\n`NextContinuationToken` when listing objects.\n\nThe HTTP request you would use to continue listing objects in\n`my-bucket` would include the following: \n\n```\nGET /?continuation-token=CgtzaGliYS0yLmpwZw==&list-type=2 HTTP/1.1\n Host: my-bucket.storage.googleapis.com\n```\n\nFor more detailed instructions on paginating through results from a\nbucket, see the XML reference documentation for [`List Objects`](/storage/docs/xml-api/get-bucket-list).\n\nNext steps\n----------\n\n- [List objects in a bucket](/storage/docs/listing-objects).\n- [List buckets in a project](/storage/docs/listing-buckets)."]]