REST API knowledge exchange
Post Reply
MrWisski
Lurker
Posts: 2
Liked: never
Joined: Mar 19, 2018 1:47 am
Full Name: A D W
Contact:

"CreateCloudTenantSpecType not specified"

Post by MrWisski »

I've been troubleshooting for a couple of hours now, and I can't seem to figure this out. Attempting to create a bridge between our payment provider and veeam for an upcoming project. I've whipped up my own routines to access restful. Can log in fine. Can get every bit of data I need just fine. I try to create a new tenant through my PHP scripts, however, and I end up with the following response :

Code: Select all

            [Message] => CreateCloudTenantSpecType not specified
            [StatusCode] => 400
My XML is perfect, through every test i've run it through. :

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<CreateCloudTenantSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema">
	<Name>testy@mctest.com</Name>
	<Description>DELETE THIS GUY, PHP TESTING.</Description>
	<Password>DELETE</Password>
	<Enabled>0</Enabled>
	<LeaseExpirationDate>2018-03-19T01:51:39+00:00</LeaseExpirationDate>
	<Resources>
		<BackupResource>
			<Name>cloud-testy@mctestyface.com-01</Name>
			<RepositoryUid>urn:veeam:Repository:5f70aa6e-4772-43fe-9d34-c4e0c1517b2e</RepositoryUid>
			<QuotaMb>1025</QuotaMb>
		</BackupResource>
	</Resources>
	<ComputeResources />
	<ThrottlingEnabled>false</ThrottlingEnabled>
	<ThrottlingSpeedLimit>1</ThrottlingSpeedLimit>
	<ThrottlingSpeedUnit>MBps</ThrottlingSpeedUnit>
	<PublicIpCount>0</PublicIpCount>
	<BackupServerUid>urn:veeam:BackupServer:8846e83b-3041-4545-8161-b9024d72b113</BackupServerUid>
	<MaxConcurrentTasks>1</MaxConcurrentTasks>
</CreateCloudTenantSpec>
This runs through web/#/api/cloud/tenants just fine, and creates the tenant. I've checked vs the documentation, and I believe I'm sending everything it needs. Google has given me nothing. Even a forum search gives me nothing.

Anyone come across this? Is it something simple i've gone problem-blind to?
MrWisski
Lurker
Posts: 2
Liked: never
Joined: Mar 19, 2018 1:47 am
Full Name: A D W
Contact:

Re: "CreateCloudTenantSpecType not specified"

Post by MrWisski »

-_- Found it. Problem was sending raw simplexml object, instead of the XML as text/xml. Well, at least this will show up on google, and maybe prevent other people from spending so much time on a simple mistake.
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: "CreateCloudTenantSpecType not specified"

Post by nielsengelen »

Thank you for posting the solution. Do let us know if you would face any other text/xml or XML specific issues.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests