Skip to content

AIP-81 Make list operations to return all results #49019

Description

@bugraoz93

Body

Make list operations to return all results. It is returning the first iteration of the list endpoint because the default limit is 100 for the API endpoints.
Limit:

def depends(cls, limit: NonNegativeInt = 100) -> LimitFilter:

Code:
# TODO: Get all with limit and offset to overcome default 100 limit for all list operations

def list(self) -> AssetCollectionResponse | ServerResponseError:
"""List all assets from the API server."""
try:
self.response = self.client.get("assets")
return AssetCollectionResponse.model_validate_json(self.response.content)
except ServerResponseError as e:
raise e
def list_by_alias(self) -> AssetAliasCollectionResponse | ServerResponseError:
"""List all assets by alias from the API server."""
try:
self.response = self.client.get("/assets/aliases")
return AssetAliasCollectionResponse.model_validate_json(self.response.content)
except ServerResponseError as e:
raise e

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Metadata

Metadata

Assignees

Labels

area:APIAirflow's REST/HTTP APIarea:CLIkind:featureFeature Requestskind:metaHigh-level information important to the community

Type

Fields

No fields configured for Task.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions