-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
“/participations/{ID}/participants” sometimes fails for valid participation IDs #73
Comments
Ditto about the participations of the special group that is the Advisory Board: seems the only group for which retrieving participations errors: |
It's happening with other groups (not only with the AB); see participations of the Web Security IG: |
I think there's a misunderstanding about what /participations and /participations/xxx/participants are. That being said, for all groups there is /groups/xxx/users listing all users of a group regardless of how they joined the group (nominated by their AC Rep, through an individual PP commitment, or directly for groups not in IPP). But I realize this URL is not linked from /groups/xxx, and that is a mistake. I'm going to open a new issue about that. To summarize, /groups/xxx/participations should be used when you need to know who made PP commitments and /groups/xxx/users when you want to retrieve all users in a group. Does that clear things up? |
eg,
/participations/14935/participants?embed=true
Looking at some examples, I suspect that this query errors with a 404 when the participation is of type
individual==true
. It kind of makes sense, but this is the only case I've found until now in the API where I cannot fetch a (seemingly valid, logical) URL and be sure that it'll return something (a valid envelope containing an empty array, if nothing else).Until I noticed this, a client like Unitas could reliably hard-code all the hierarchy of objects and that worked in all cases. This breaks that assumption, and makes it a bit more complicated on my side1.
Can we have this method always return something valid (an empty list of participants, instead of 404)? Does it make sense?
1 To discover related URLs dynamically à la HAL looks like the right thing to do, instead of hard-coding fields etc. But in practice, there would be several disadvantages to that:
self
,_embedded
,_links
; IDs need to be translated into human-friendly labels (eg, “editor's draft” instead ofeditor-draft
)._links
(eg, info about a group does not include links to its services nor its users, even when it has some), so unless that relation is hard-coded, it won't be discovered by a client (am I right about this?).Because of all those “irregularities” or special needs, I ended up hard-coding the hierarchy of objects in Unitas.
The text was updated successfully, but these errors were encountered: