Skip to content
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

How to get fields from all users in a specific group? #447

Open
phsmoura opened this issue Feb 23, 2023 · 11 comments
Open

How to get fields from all users in a specific group? #447

phsmoura opened this issue Feb 23, 2023 · 11 comments
Labels
documentation Improvements or additions to documentation EasyFix Good for newcomers

Comments

@phsmoura
Copy link
Contributor

Is it possible to get username, human_name and website fields from all users in a specific group?
This would be used in Fedora Planet to create the planet.ini file. The way it is now, the idea is to query members from the group and then query each user to get its info.

As we have +5k users in fedora-contributor, not all of them have website and it's needed to query 2 endpoints:
Would be possible to add an endpoint to get that info easier?
Or does an endpoint with this info already exist?
Or the idea of querying the group members first and then each user is really the one that should be used?

@abompard
Copy link
Member

abompard commented Feb 23, 2023

Yes, you can use the X-Fields header to select the fields you want:

curl -u : --negotiate \
  'https://fasjson.fedoraproject.org/v1/groups/fedora-contributor/members/?page_number=1' \
  -H 'X-Fields: username,human_name,website'

Would this work for you?

@phsmoura
Copy link
Contributor Author

Thanks! Yes, that will work

@abompard
Copy link
Member

Leaving the issue opened to add this example to the documentation

@abompard abompard reopened this Feb 27, 2023
@abompard abompard added the documentation Improvements or additions to documentation label Feb 27, 2023
@abompard abompard added the EasyFix Good for newcomers label Sep 1, 2023
@ginjardev
Copy link

ginjardev commented Mar 5, 2024

@abompard can this issue be assigned to me? I just wanted to let you know that I can get this done.
I'm an Outreachy intern.

@abompard
Copy link
Member

abompard commented Mar 6, 2024

Sure, could you try assigning it to yourself using the link on the top of the right column? Thanks.

@ginjardev
Copy link

ginjardev commented Mar 6, 2024

@abompard sorry, I currently do not have access to assign this to myself. Can you please help?

@onyiipaula
Copy link

Hello i'm an outreachy intern and i would love to be assigned to this

@anshikavashistha
Copy link

I want to work on this @phsmoura .Please assign me

@Precious000
Copy link

Hi @abompard can you please assign this project to me? I’ll really appreciate, thanks!

@abompard
Copy link
Member

I've assigned it to you @ginjardev , please tell me if you're no longer interested in this ticket.

@ginjardev
Copy link

ginjardev commented Mar 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation EasyFix Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants