Skip to content

taskAgentApi.getEnvironmentDeploymentExecutionRecords() continuationToken does not work #623

Open
@ntodorov

Description

@ntodorov

Hi team,

Assume same ADO project and same environment (I'm using only yaml pipelines with stages that deploy to environment, no releases involved!)

By experimentation with this client and directly calling the API i see that this method is providing parameter for continuationToken but it does not come back in the response even when there are more records.

Default seems to be 25 returned records. If i provide continuation token the result is still only array with the 25 records even that i know I have more than 1000. The continuation token is not returned.
If I use postman and call the API directly I can see X-MS-ContinuationToken header and using it i can get more and more pages.

Is this a bug or I'm not using the method correctly?

On other methods that support continuationToken return object with the the token until there are no more records. This one returns only array of values.

buildApi.getBuilds(....) is working and this is how tested example is doing it:

 // Update continuationToken if available
    if (Array.isArray(buildsResponse)) {
      // If response is just an array, assume no pagination support
      hasMoreBuilds = builds.length === 100;
    } else {
      if (buildsResponse.continuationToken) {
        continuationToken = buildsResponse.continuationToken;
      } else {
        hasMoreBuilds = false;
      }
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions