Re: Gitlab API question: Fetching group ID works not reliably

2018-05-14 Thread Alexander Wirt
On Tue, 15 May 2018, Andreas Tille wrote: > Hi, > > I'm using the following script to fetch the group ID of a salsa team: > > #!/bin/sh > > SALSA_URL="https://salsa.debian.org/api/v4"; > SALSA_TOKEN="MYSECRETTOKEN" > > SALSA_GROUP="med-team" > #SALSA_GROUP="science-team" > #SALSA_GROUP="r-pkg-

Re: Gitlab API question: Fetching group ID works not reliably

2018-05-14 Thread Paul Wise
On Tue, May 15, 2018 at 2:30 PM, Andreas Tille wrote: > This would be very convenient but I have not found it. https://docs.gitlab.com/ce/api/groups.html#search-for-group https://salsa.debian.org/api/v4/groups?search=science-team -- bye, pabs https://wiki.debian.org/PaulWise

Re: Gitlab API question: Fetching group ID works not reliably

2018-05-14 Thread Andreas Tille
Hi Paul, On Tue, May 15, 2018 at 02:25:36PM +0800, Paul Wise wrote: > > I thought there was a way to lookup the id for a group by querying the name. This would be very convenient but I have not found it. The pagination solution is not very handy, thought. Kind regards Andreas. -- htt

Re: Gitlab API question: Fetching group ID works not reliably

2018-05-14 Thread Paul Wise
On Tue, May 15, 2018 at 2:18 PM, Andreas Tille wrote: > Any idea what might be wrong here? I thought there was a way to lookup the id for a group by querying the name. -- bye, pabs https://wiki.debian.org/PaulWise

Re: Gitlab API question: Fetching group ID works not reliably

2018-05-14 Thread Sebastiaan Couwenberg
On 05/15/2018 08:18 AM, Andreas Tille wrote: > If I try science-team or r-pkg-team it returns nothing. Any idea > what might be wrong here? You're not parsing the other pages of results. https://docs.gitlab.com/ce/api/#pagination Kind Regards, Bas

Gitlab API question: Fetching group ID works not reliably

2018-05-14 Thread Andreas Tille
Hi, I'm using the following script to fetch the group ID of a salsa team: #!/bin/sh SALSA_URL="https://salsa.debian.org/api/v4"; SALSA_TOKEN="MYSECRETTOKEN" SALSA_GROUP="med-team" #SALSA_GROUP="science-team" #SALSA_GROUP="r-pkg-team" SALSA_GROUP_ID=$(curl --silent -f -XGET --header "PRIVATE-TO