Book Image

Hybrid Cloud Management with Red Hat CloudForms

By : Sangram Rath
Book Image

Hybrid Cloud Management with Red Hat CloudForms

By: Sangram Rath

Overview of this book

Table of Contents (17 chapters)
Hybrid Cloud Management with Red Hat CloudForms
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

REST API


Representational State Transfer (REST) is an APIs that works with standard HTTP and HTTPS protocols as a URL.

Accessing REST APIs

In CloudForms, REST can be accessed by prefixing the URL with /api, as follows:

https://<FQDN>/api

Here, FQDN is the public and fully-qualified domain name of the CloudForms server. Writing /api/ causes the current API version to be used by default, but you can also mention the version in the URL to target a specific version, for example, /api/V0.5.

When accessing it locally from the server, use the URL as follows:

http://localhost:3000/api

Port 3000 is the default port.

Content types

The Red Hat CloudForms API uses JavaScript Object Notation (JSON) format. JSON, based on the JavaScript programming language, is basically a format for data exchange and storing. One of the important advantages of JSON is its ease of use, both for humans and machines.

The content type is application/JSON for all API requests and responses.

An example of a CloudForms virtual...