VMware Cloud Community
EGarbuzov
VMware Employee
VMware Employee

Get Organization URL for users

Hi, All!

I'm using Orchestrator 5.1 to create Organizations in vCloud Director 5.1.

May be I miss something, but how can I get Organization full URL (i.e.: https://vcd-hostname/cloud/org/org-name/) from properties of new object vCloud:Organization?

0 Kudos
4 Replies
iiliev
VMware Employee
VMware Employee

From 'href' attribute?

Don't have a working vCloud environment at hand to check so I may me wrong.

0 Kudos
EGarbuzov
VMware Employee
VMware Employee

Unfortunately, "href" is not what I'm looking for.

Attribute "href", I guess, is for vCloud Director API-world and it's contain org id in form https://vcd-hastname/api/org/<some unique number>

Anyway, thx for replay.

0 Kudos
Burke-
VMware Employee
VMware Employee

Assuming your input variable is named "org" and is of type vCloud:Organization :

var vcdHost = org.parent;

var vcdUrlWithoutPort = vcdHost.url.split(":443")[0];

var orgUrl = vcdUrlWithoutPort + "/cloud/org/" + org.name + "/";

System.log("orgUrl: \n"+orgUrl);

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
EGarbuzov
VMware Employee
VMware Employee

Exactly what I have done already Smiley Happy

I think, this is enough to clarify that URL isn't already saved somewhere in attributes.

Thanks guys.

0 Kudos