Courseiva
API Automation →mediumMultiple Choice

UiPath-ADPv1 API Automation Practice Question

A developer is using the UiPath HTTP Request activity to call a REST API that returns a JSON array of customer records. The API paginates results and includes a 'nextPageToken' field in the response body when more data is available. The developer needs to retrieve all pages and aggregate the results into a single DataTable. Which approach should the developer use in the UiPath workflow?

⚠ Common exam trap

The trap here is assuming that the HTTP Request activity's Retry property or Parse JSON option handles pagination automatically.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use a Do While loop that repeats while the 'nextPageToken' is not empty, passing the token as a query parameter in each subsequent HTTP Request, and append each response's data to a list or DataTable.

Token-based pagination requires a loop that continues while the token is present, using the token as a query parameter in subsequent requests. Aggregating results into a DataTable or list ensures all records are collected. The other options either misunderstand retry logic, ignore the pagination mechanism, or assume non-existent auto-pagination features.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Use a Do While loop that repeats while the 'nextPageToken' is not empty, passing the token as a query parameter in each subsequent HTTP Request, and append each response's data to a list or DataTable.

    Why this is correct

    This correctly implements token-based pagination. The loop continues until no token remains, and each page is processed and aggregated. UiPath's HTTP Request activity supports dynamic query parameters, and appending results to a collection handles the aggregation. This is the standard pattern for APIs that return a continuation token.

  • ✗

    Configure the HTTP Request activity to use the 'Accept' header with value 'application/json' and enable the 'Parse JSON' option, which automatically follows pagination links.

    Why it's wrong here

    Setting the Accept header and enabling Parse JSON only affects response parsing; it does not automatically follow pagination links. UiPath's HTTP Request activity does not have an auto-pagination feature. The developer must manually handle the 'nextPageToken' to retrieve all pages.

  • ✗

    Use a For Each loop that iterates over the JSON array from the first response and makes a separate HTTP Request for each record's ID.

    Why it's wrong here

    Iterating over individual records and making a request per record is inefficient and does not follow the API's pagination design. The API provides a 'nextPageToken' to fetch the next set of records, not per-record endpoints. This approach would cause excessive API calls and likely fail to retrieve all data.

  • ✗

    Set the HTTP Request activity's 'Retry' property to a high number (e.g., 10) so it automatically retries and retrieves all pages in one call.

    Why it's wrong here

    The Retry property handles transient failures by reissuing the same request, not by requesting subsequent pages. It does not use the 'nextPageToken' and will repeatedly fetch the first page, leading to duplicate data. Pagination must be explicitly managed by the workflow logic.

About these practice questions

This UiPath-ADPv1 question is part of Courseiva's 276-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official UiPath exam blueprint

This UiPath-ADPv1 practice question is part of Courseiva's free UiPath certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the UiPath-ADPv1 exam.