RESTful knowledge exchange
Post Reply
vitor.c.souza
Service Provider
Posts: 8
Liked: 2 times
Joined: Aug 30, 2019 3:06 pm
Full Name: Vitor Cortes de Souza
Contact:

create/add Repositories via API

Post by vitor.c.souza »

Hey there!

Is there a way of creating/adding repositories via the API? I could not find anything in the documentation that would allow me to create repositories (something like (POST)/repositories). I know it is possible to provision cloud tenants, for example, but nothing related to repositories. If anyone could provide me with a link to the actual endpoint that would allow me to do that, that would be great!

What I actually need:
(POST)/repositories

But I could only find:
(GET)/repositories
Documentation link: https://helpcenter.veeam.com/docs/backu ... ml?ver=100

Thanks for the help!
chris.arceneaux
VeeaMVP
Posts: 667
Liked: 358 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: create/add Repositories via API

Post by chris.arceneaux » 1 person likes this post

Hi Vitor,

You can provision backup resources for a Cloud Connect tenant using the Enterprise Manager API call:

(POST) /cloud/tenants/{ID}/resources

If you're looking to automate Cloud Connect tenant sign-ups and resource changes, I'll also recommend you check out Veeam Availability Console as it is a free product for VCSPs and has the API calls you're looking for as well.
benyoung
Veeam Vanguard
Posts: 148
Liked: 47 times
Joined: May 25, 2016 3:29 am
Full Name: Ben Young
Contact:

Re: create/add Repositories via API

Post by benyoung » 1 person likes this post

I believe you are specifically looking at adding Backup repositories (Cloud connect, local ones etc) to the environment?

I have never done this but given there is not post/put methods in the docs for that + I just tested and got a HTTP 405 Method not supported I am guessing this has not been implemented into the EM API.

Also, the full entity list/view of the repos seems to be very light on detail too, really just gives the name, type and capacity I would expect there to be more like credentials, addresses, paths etc

You could use PS for this / create a wrapper if needed

https://helpcenter.veeam.com/docs/backu ... ml?ver=100
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: create/add Repositories via API

Post by oleg.feoktistov » 1 person likes this post

Hi guys,

@benyoung is right. Currently POST request to /repositories endpoint is not supported.
So, powershell with a wrapper could be a way here.
In addition, have a look at this cmdlet if you are planning to configure Scale-Out Backup Repository.

Best regards,
Oleg
vitor.c.souza
Service Provider
Posts: 8
Liked: 2 times
Joined: Aug 30, 2019 3:06 pm
Full Name: Vitor Cortes de Souza
Contact:

Re: create/add Repositories via API

Post by vitor.c.souza »

Thank you, guys!

@chris.arceneaux, thanks for the suggestion! But, what I really need is to add backup repositories to the environment via API, like suggested by @benyoung and @oleg.feoktistov. Specifically, I'm looking for creating Scale-Out Backup repositories. Since that option is not provided (at least not yet) by the API, I will look into powershell as an alternative, like suggested by @oleg.feoktistov.

Many thanks.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: create/add Repositories via API

Post by veremin »

RESTful API implement the same capabilities as Enterprise Manager does - so, there is no way to add repository neither in Enterprise Manager, nor in RESTful API.

So, yes, PowerShell is a preferable way, if you're after creating backup repositories in automatic fashion.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests