Current API lacks support for adding and removal of projects and components. It would be nice to add it, and probably not so complicated.
Currently it is only possible by using of Django shell.
@nijel
What is the status of this issue?
Somebody's work on this feature?
AFAIK nobody is working on this right now.
@stanislav-brabec
Could you please share how to add project/component by Django shell ?
I'm looking for the way to create an project/component from api/commands,
but could not figure out how to do.
Did support ever get added for this? I'm getting ready to implement Weblate at my company and not being able to call an api to create a component is a big problem for us because we are dealing with dynamic data. Trying to create all the components manually would be super tedious and not scalable.
The issue is still open, so this hasn't been yet addressed. You can use import_json from the command line to create components. Or you can use component discovery if component names are predictable within a repository.
I don't know python, but I'd really like to have this feature. How difficult of a change would it be? Would you be open to a Pull Request that adds this feature?
It should not be too hard to extend the API with this. It just needs to integrate permission checking, otherwise it should be pretty easy. Pull requests are always welcome :-).
We think this is a great request and would be willing to sponsor this. Please contact us if the interest is still there. See also #1667
@ilocit that's great, @orangesunny will get in touch with you to arrange details.
Thank you for your report, the issue you have reported has just been fixed.
Super ! You rock!
Hello,
sorry for commenting on an closed issue. I can not find the documentation / examle on the post call to create an component. can you point me to that please ?
thanks !
https://docs.weblate.org/en/latest/api.html#post--api-projects- and https://docs.weblate.org/en/latest/api.html#post--api-projects-(string-project)-components-, but it lacks more detailed info and examples.
https://docs.weblate.org/en/latest/api.html#post--api-projects- and https://docs.weblate.org/en/latest/api.html#post--api-projects-(string-project)-components-, but it lacks more detailed info and examples.
Hi, thanks for the swift response !
just found out that our company did install 3.8 version.
that's why i got all the ok/200 without any real result.
will ask to update to 3.9.1
what the nice docu lacks is the info when it talks about parameter: does it mean header or body. parameter sounds like header, however in case of components it feels natural to take the response json from get-component call, adapt the name etc. and send it as a post
will find out when i am on the correct version.
Thanks again !
I've created separate issue for docs updates: https://github.com/WeblateOrg/weblate/issues/3208