You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So neither Total-Number nor Link headers are presented. I've also tried the /api/users/{user_id}/organizations (response also has to be paginated), but no pagination headers are presented.
Please notice in reality there is only 1 invitation and only 1 user in the organization, maybe it makes sense.
Expected behavior
Both Total-Number and Link headers are presented in paginated responses.
How to reproduce?
Send a request to the Logto Management API using the M2M Access Token. Endpoint: /api/organization-invitations or /api/users/{user_id}/organizations
I use Python and the httpx package to send requests to the Management API. The logto-core-request-id header is presented, so I assume headers are not blocked.
The function:
fromhttpximportAsyncClientasyncdefget_invitations(
organization_id: str
) ->None:
"""Get all invitations for an organization."""asyncwithAsyncClient(base_url="https://<my-logto-endpoint>", headers={"Authorization": "Bearer <token>"}) asclient:
response=awaitclient.get(
"/api/organization-invitations",
params={
"organizationId": organization_id,
"page": 1,
"page_size": 50,
},
)
print(response.headers)
Context
Logto Cloud
Self-hosted, Logto version = 1.16.0
Container (Docker image)
Raw Node.js
The text was updated successfully, but these errors were encountered:
Yes, this is an acknowledged issue. Previously we use this internally for the Cloud collaboration feature, and we assume there won't be too many invitations for a single tenant, and thus the pagination headers were not included.
However, we can improve this in the future releases, but due to the limited bandwidth we can't guarantee when it will happen.
You are always welcome to contribute if you are interested in. Let me know if you need any help.
Yes, this is an acknowledged issue. Previously we use this internally for the Cloud collaboration feature, and we assume there won't be too many invitations for a single tenant, and thus the pagination headers were not included.
Is it right that these responses are not paginated now, so I simply get all the invitations that exist? Or they are still paginated, but headers are not being returned?
Describe the bug
I use the Management API to retrieve the invitations list of an organization. I use the following endpoint:
/api/organization-invitations
.As per the docs, the response is paginated and it must have a
Total-Number
header. Howewer, in the response there are only these headers:So neither
Total-Number
norLink
headers are presented. I've also tried the/api/users/{user_id}/organizations
(response also has to be paginated), but no pagination headers are presented.Please notice in reality there is only 1 invitation and only 1 user in the organization, maybe it makes sense.
Expected behavior
Both
Total-Number
andLink
headers are presented in paginated responses.How to reproduce?
Send a request to the Logto Management API using the M2M Access Token. Endpoint:
/api/organization-invitations
or/api/users/{user_id}/organizations
I use Python and the
httpx
package to send requests to the Management API. Thelogto-core-request-id
header is presented, so I assume headers are not blocked.The function:
Context
The text was updated successfully, but these errors were encountered: