Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
VMware vRealize Orchestrator Cookbook

You're reading from   VMware vRealize Orchestrator Cookbook Over 90 recipes to satisfy all your automation needs and leverage vRealize Orchestrator 7.1 for your projects

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781786462787
Length 556 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Daniel Langenhan Daniel Langenhan
Author Profile Icon Daniel Langenhan
Daniel Langenhan
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

VMware vRealize Orchestrator Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Installing and Configuring Orchestrator FREE CHAPTER 2. Optimizing Orchestrator Configuration 3. Distributed Design 4. Programming Skills 5. Visual Programming 6. Advanced Programming 7. Interacting with Orchestrator 8. Better Workflows and Optimized Working 9. Essential Plugins 10. Built-in Plugins 11. Additional Plugins 12. Working with vSphere 13. Working with vRealize Automation

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 = '[email protected]'; 
          $pwd = 'What4Ever'; 
          $vroServer = '192.168.220.12:8281'; 
          // Example Workflow "07.01 Access via PowerShell" 
          $wfid = ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images