VMware Cloud Community
Pipi12
Contributor
Contributor

HTTP method not allowed - Uploading vApp template through API / Power-CLI

vCloud Director Version 10.4.1

I'm trying to upload the OVF template through API version 37  or Power-CLI Version 13 which should be compatible with Vcloud 10.4 and I'm getting following error:

 

API:

 

curl -kiX POST \
> -H "Authorization: Bearer $TOKEN" \
> -H "Accept: application/*;version=37.0" \
> -H "content-Type: application/x-www-form-urlencoded" \
> -d "org=urn:vcloud:org:$ORGID&catalog=urn:vcloud:catalog:$CATALOG&file=@$FILE" \
> "https://vcloud/api/catalog/upload"

 

message="HTTP method not allowed" majorErrorCode="405" minorErrorCode="METHOD_NOT_ALLOWED"/>

 

As for the Power-CLI

 

PS /user/> Import-CIVAppTemplate -SourcePath $FILE -Name $NAME -OrgVdc $myOrgvdc -Catalog $myCatalog
Import-CIVAppTemplate: Import-CIVAppTemplate HTTP method not allowed

 

Is there anything I'm doing wrong, as it was working finee on vCloud version 10.2?

 

Uploading through GUI(Tenant) portal is working fine.

Reply
0 Kudos
3 Replies
Pipi12
Contributor
Contributor

Is it just me with this problem?

 

Version 10.3 has the same issue even when using API version 31:

 

Only thing I could find is:

Known Issues

    Running the Upload a vApp Template workflow fails

    Starting with API version 32, uploading a vApp Template directly to a virtual data center (VDC) is not supported. The Upload a vApp Template workflow fails with a METHOD_NOT_ALLOWED error.

    Workaround: To upload a vApp, run the Upload a vApp Template to Catalog workflow.

What does mean "run the upload a vApp template to Catalog workflow"?

Anyone has more details how to upload through API/PowerCLI as the error is only there, and through tenant portal it's fine.

Reply
0 Kudos
filjo2409
Enthusiast
Enthusiast

I'm having the same exact issue. Can't find any answers anywhere.

Reply
0 Kudos
dwaddell
Contributor
Contributor

Seeing the same issue here too, no matter what version combo I try:

vCloud Director 9.70

Powercli 11.5, 12.x, 13.x

Powershell 7.3.2, 7.1.5

On a different RHEL8 box it is working even though it's using one of the same version combos above which makes me think it must be an external dependency of powershell/powercli.

Reply
0 Kudos