RESTapi – A teach yourself lab!

Here is a lab I put together for a recent event, it was well received and I think it is very valuable to the ManageIQ and CloudForms user bases.

In the lab you will GET and POST RESTapi actions. Its a basic look at some common use cases such as,

  • Query a VM’s hardware inventory.
  • Query the VMS for any who are tagged with “Function/Database”
  • Show the tags on a specific VM
  • Create new Category and Tag in the appliance
  • Assign a Category/Tag to a VM
  • Provision a VM
  • Query the status of the Provision request.

The lab expects you to have an appliance provisioned and connected to a provider (the lab uses AMAZON EC2) Therefore when querying attributes of a vm/instance the return list is specific to the provider. CPU’s are not available on AWS EC2, whereas availability zones are.

Note : Cut and Pasting the code from the slides can introduce ASCII translation errors depending on platform. Take care to ensure quotes are “.

I will do another post in the future to cover off “PUT, PATCH and DELETE” actions.

The slides are here in PDF format – https://www.dropbox.com/s/14vwhd1fcb97prg/RESTapi.pdf?dl=0

 

Slide02 Slide03 Slide04 Slide05 Slide06 Slide07 Slide08 Slide09 Slide10 Slide11 Slide12 Slide13 Slide14 Slide15 Slide16 Slide17 Slide18 Slide19 Slide20 Slide21 Slide22 Slide23 Slide24

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s