Closed ysemennikov closed 6 months ago
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.
For now, I'll remove the "invitation list with pagination" description from the API doc, in order not to cause any more confusion.
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.
Hey @charIeszhao, thank you for the response!
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?
You're right. They are not paginated now. Just get all invitations!
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