On 09/13/2018 04:42 PM, Daniel Gruno wrote:
On 09/13/2018 04:38 PM, Robert Munteanu wrote:
Hi,
I am trying to simplify my job of keeping the list of sources up-to-
date for the Kibble demo instance. Basically we add git repositories
periodically and I want to add them to Kibble as well.
I was thinking of using the Kibble API to retrieve the list of sources
and checking which of our repositories are not there, so I can easily
paste them in Kibble.
It's a bit convoluted at the moment, apologies.
First, you have to obtain a session cookie by logging in;
https://demo.kibble.apache.org/apidoc.html#put-api-session
when you have that cookie, pass it to the API end point you wish to use,
and it should work just fine.
I'll be working later next week on API tokens for use here, it's one of
the things that are still missing.
With regards,
Daniel.
I should add one important/easy thing here:
If you want to keep the list of sources up to date with e.g. github, you
can just PUT a request with all the sources you have, and it will both
update existing ones and add the ones it doesn't have, there are checks
against adding duplicates, so only sources that aren't in the DB would
get added even if you post old sources to the API.