Loading...

Demystifying Azure CLI pagnination

Demystifying Azure CLI pagnination

Introduction  

Pagination in the context of the command line refers to the process of displaying long lists of information or text in a way that makes it more manageable for the user. When you execute a command that generates a large amount of output, such as a directory listing or the contents of a file, it may not all fit on the screen at once. Pagination allows you to view the information one screenful (or page) at a time. 

 

The main role of pagination is to retrieve data from a large table chunk by chunk so that the client does not need to make an API call that has a huge payload. Smaller payload results in less latency. 

 Once the data is on the client side, navigating between pages is generally faster because it doesn't require additional requests to the server. The client can quickly switch between pages without waiting for network communication. 

 

Usage 

Jeremy_Li_0-1713406484483.png

What’s the interface look like when applied pagination 

 

  • --max-items parameter 

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in `--next-token` argument of a subsequent command. 

 

  • --next-tokens parameter 

Token to specify where to start paginating. This is the token value from a previously truncated response. 

 

 

Future Improvements: 

  • Provide options for filtering and sorting the data, allowing users to customize the output to their needs. 
  • Users can navigate through the pages of data using the arrow keys or by typing in a page number. 
  • Provide a summary of the total number of items and the current page number. 

 

 

We love to hear your feedback, please do not hesitate share your thoughts with us via the direct comment here, or email us [email protected].

To report an issue, please create a GitHub issue: https://github.com/Azure/azure-cli/issues/new/choose

Published on:

Learn more
Azure Tools Blog articles
Azure Tools Blog articles

Azure Tools Blog articles

Share post:

Related posts

Automating Business PDFs Using Azure Document Intelligence and Power Automate

In today’s data-driven enterprises, critical business information often arrives in the form of PDFs—bank statements, invoices, policy document...

2 days ago

Azure Developer CLI (azd) Dec 2025 – Extensions Enhancements, Foundry Rebranding, and Azure Pipelines Improvements

This post announces the December release of the Azure Developer CLI (`azd`). The post Azure Developer CLI (azd) Dec 2025 – Extensions En...

5 days ago

Unlock the power of distributed graph databases with JanusGraph and Azure Apache Cassandra

Connecting the Dots: How Graph Databases Drive Innovation In today’s data-rich world, organizations face challenges that go beyond simple tabl...

7 days ago

Azure Boards integration with GitHub Copilot

A few months ago we introduced the Azure Boards integration with GitHub Copilot in private preview. The goal was simple: allow teams to take a...

8 days ago

Microsoft Dataverse – Monitor batch workloads with Azure Monitor Application Insights

We are announcing the ability to monitor batch workload telemetry in Azure Monitor Application Insights for finance and operations apps in Mic...

9 days ago

Copilot Studio: Connect An Azure SQL Database As Knowledge

Copilot Studio can connect to an Azure SQL database and use its structured data as ... The post Copilot Studio: Connect An Azure SQL Database ...

10 days ago

Retirement of Global Personal Access Tokens in Azure DevOps

In the new year, we’ll be retiring the Global Personal Access Token (PAT) type in Azure DevOps. Global PATs allow users to authenticate across...

12 days ago

Azure Cosmos DB vNext Emulator: Query and Observability Enhancements

The Azure Cosmos DB Linux-based vNext emulator (preview) is a local version of the Azure Cosmos DB service that runs as a Docker container on ...

13 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy