Reader small image

You're reading from  VMware vRealize Orchestrator Cookbook. - Second Edition

Product typeBook
Published inNov 2016
PublisherPackt
ISBN-139781786462787
Edition2nd Edition
Right arrow
Author (1)
Daniel Langenhan
Daniel Langenhan
author image
Daniel Langenhan

Daniel Langenhan is a Virtualisation expert with formidable skills in Architecture, Design and Implementation for large multi-tier systems. His experience and knowledge of process management, enterprise-level storage, Linux and Windows operation systems has made him and his business a highly sought after international consultancy in the Asia-Pacific and European regions for multinational clientele in the areas of Finance, Communication, Education and Government. Daniel has been working with VMware products since 2002 and is directly associated with VMWare since 2008. His proven track record of successful integrations of Virtualisation into different business areas while minimizing cost and maximizing reliability and effectiveness of the solution for his clients. Currently, Daniel is operating in the Europe and Asia-Pacific region with his company vLeet GmbH and Melbourne Business Boosters Pty Ltd. Daniel's expertise and practical approach to VMWare has resulted in the publication of the following books: Instant VMware vCloud Starter, Packt Publishing VMware View Security Essentials, Packt Publishing VMware vCloud Director Cookbook, Packt Publishing VMware vRealize Orchestrator Cookbook, Packt Publishing VMware vRealize Orchestrator Essentials, Packt Publishing He has also lent his expertise to many other publishing projects as a Technical Editor.
Read more about Daniel Langenhan

Right arrow

Using PHP to access the REST API


In this recipe, we will quickly look at how you can build an easy webpage using PHP to access the Orchestrator REST API.

Getting ready

We will make our life a bit easier and use a bit of help with PHP and REST. We will use Nate Good's HTTPFUL, which you can find at http://phphttpclient.com/ .

You need to download the following file, httpful.phar, from his website and place it in the same directory as your script.

You also need a Webserver that uses PHP and has cURL activated. I used LAMP stack from Turnkey https://www.turnkeylinux.org/lampstack . See the There's more section for a fast how-to.

How to do it...

This is a quick intro only:

  1. Edit a file such as callWorkflow.php

  2. Enter the following code:

          <?php 
          include('./httpful.phar'); 
     
          $usr = 'vroadmin@mylab.local'; 
          $pwd = 'What4Ever'; 
          $vroServer = '192.168.220.12:8281'; 
          // Example Workflow "07.01 Access via PowerShell" 
          $wfid = ...
lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
VMware vRealize Orchestrator Cookbook. - Second Edition
Published in: Nov 2016Publisher: PacktISBN-13: 9781786462787

Author (1)

author image
Daniel Langenhan

Daniel Langenhan is a Virtualisation expert with formidable skills in Architecture, Design and Implementation for large multi-tier systems. His experience and knowledge of process management, enterprise-level storage, Linux and Windows operation systems has made him and his business a highly sought after international consultancy in the Asia-Pacific and European regions for multinational clientele in the areas of Finance, Communication, Education and Government. Daniel has been working with VMware products since 2002 and is directly associated with VMWare since 2008. His proven track record of successful integrations of Virtualisation into different business areas while minimizing cost and maximizing reliability and effectiveness of the solution for his clients. Currently, Daniel is operating in the Europe and Asia-Pacific region with his company vLeet GmbH and Melbourne Business Boosters Pty Ltd. Daniel's expertise and practical approach to VMWare has resulted in the publication of the following books: Instant VMware vCloud Starter, Packt Publishing VMware View Security Essentials, Packt Publishing VMware vCloud Director Cookbook, Packt Publishing VMware vRealize Orchestrator Cookbook, Packt Publishing VMware vRealize Orchestrator Essentials, Packt Publishing He has also lent his expertise to many other publishing projects as a Technical Editor.
Read more about Daniel Langenhan