Internal Server Error when editing tenant

RESTful knowledge exchange

Internal Server Error when editing tenant

Veeam Logoby jzitny » Fri Jan 30, 2015 6:04 pm

Hi,

we're testing the new part of api working with /cloud/tenants. However, when trying to PUT a request to change specific tenant at /cloud/tenants/{id} we're receiving 500 Internal Server Error. The same is happening when trying to POST a request to add storage quota on a resource at /cloud/tenants/{id}/resources.

The response body looks like this:

Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Error xmlns="http://www.veeam.com/ent/v1.0 xmlns:xsd="http://www.w3.org/2001/XMLSchema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance StatusCode="500" Message="Object reference not set to an instance of an object.">
    <FirstChanceExceptionMessage>Object reference not set to an instance of an object.</FirstChanceExceptionMessage>
    <StackTrace>Veeam.Backup.Interaction.RestAPI.CRestAPICommunicationException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.&#xD;
   at Veeam.Backup.Enterprise.RestAPIService.CRestApiCloudTenantsScope.EditCloudTenant(String tenantIdStr, CloudTenantEntityType entity)&#xD;
   at Veeam.Backup.Enterprise.RestAPIService.CEnterpriseRestServiceStub.EditCloudTenant(String tenantIdOrName, CloudTenantEntityType entity)&#xD;
   at SyncInvokeEditCloudTenant(Object , Object[] , Object[] )&#xD;
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)&#xD;
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)&#xD;
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)&#xD;
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)&#xD;
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)&#xD;
   --- End of inner exception stack trace ---</StackTrace>
</Error>

- although object instance id is correct and when GETting it, the response is allright.

Another question, is it possible to create a tenant from API? There is no documentation on creating /cloud/tenant with POST. Is there any other way to create the tenant or is there a plan to add this feature to the API?

Thanks.
jzitny
Lurker
 
Posts: 2
Liked: never
Joined: Fri Jan 30, 2015 5:41 pm

Re: Internal Server Error when editing tenant

Veeam Logoby agtcovert » Mon Feb 02, 2015 1:29 am

I am very also interested in the answer to the question about adding a user via the API. I've been up and down the documentation and don't see anything documented that leads me to believe adding a cloud tenant is supported by the REST API currently. There's a Powershell command to do it--all I've found.
agtcovert
Novice
 
Posts: 3
Liked: 2 times
Joined: Thu Jul 14, 2011 1:28 am

Re: Internal Server Error when editing tenant

Veeam Logoby v.Eremin » Mon Feb 02, 2015 11:03 am

Can you provide a whole request you're experiencing problems with?

As to tenant's creation, you can issue a POST request to /api/cloud/tenants resources and provide a similar spec:

Code: Select all
<CreateCloudTenantSpec xmlns="http://www.veeam.com/ent/v1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><BackupServerIdOrName>BackupServerIDorName</BackupServerIdOrName><Name>Tenant's Name</Name><Password>Tenant's Password</Password><Enabled>true</Enabled></CreateCloudTenantSpec>


Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Internal Server Error when editing tenant

Veeam Logoby jzitny » Tue Feb 17, 2015 2:07 pm

Hi, thanks for the reply and sorry for late response. The problem was in the request format indeed.

We've found a project for creation of vcc tennants at github and we're extending it — https://github.com/poulpreben/veeam-cloudconnect.

Also the POST entry for API at /cloud/tenants has been added to docs — http://helpcenter.veeam.com/backup/80/r ... nmngr.html.

Thanks.
jzitny
Lurker
 
Posts: 2
Liked: never
Joined: Fri Jan 30, 2015 5:41 pm

Re: Internal Server Error when editing tenant

Veeam Logoby v.Eremin » Tue Feb 17, 2015 2:20 pm

Glad to hear you've come across Preben's (our team leader solution architects) project part of which he demonstrated during our session at VeeamON 2014.

As to our online help center, whenever you feel the information provided there is either misleading or incomplete you can use the "send feedback" link at the bottom of the page. Tech writers team behind that resource reacts to such feedback in timely fashion.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to RESTful API



Who is online

Users browsing this forum: No registered users and 2 guests