Issues icon indicating copy to clipboard operation
Issues copied to clipboard

Page links in API don't contain all query filters in initial request

Open wspadafora opened this issue 1 year ago • 0 comments

Severity

No response

Version

2024.1.11885

Latest Version

None

What happened?

I made a request to the /tenants endpoint in the API in our self-hosted instance with a filter on project ID and tenant tags. My script recursively follows the Page.Next link that was returned to retrieve all tenants, but this link doesn't contain the tenant tag filter. The tenant tag filter worked properly on the initial request.

Initial request: /api/tenants?projectId=Projects-921&tags=Release%20Track/Continuous Returned payload:

"Links": {
		"Self": "/api/Spaces-1/tenants?skip=0&projectId=Projects-921&take=30",
		"Template": "/api/Spaces-1/tenants{?skip,projectId,ids,take,partialName,clonedFromTenantId}",
		"Page.All": "/api/Spaces-1/tenants?skip=0&projectId=Projects-921&take=2147483647",
		"Page.Next": "/api/Spaces-1/tenants?skip=30&projectId=Projects-921&take=30",
		"Page.Current": "/api/Spaces-1/tenants?skip=0&projectId=Projects-921&take=30",
		"Page.Last": "/api/Spaces-1/tenants?skip=60&projectId=Projects-921&take=30"
	}

Reproduction

Make a request to the /tenants endpoint with a tenant tag filter, then examine the Links that are returned.

Error and Stacktrace

No response

More Information

No response

Workaround

Perform the skip/take logic myself, or make the initial request with take=2147483647 to retrieve all.

wspadafora avatar Jun 05 '24 16:06 wspadafora