Using The Vshield Rest Api; Restful Workflow Patterns - VMware VSHIELD APP 1.0.0 UPDATE 1 - API Programming Manual

Vshield api
Hide thumbs Also See for VSHIELD APP 1.0.0 UPDATE 1 - API:
Table of Contents

Advertisement

Using the vShield REST API

I
All vShield REST requests require authorization. You can use the following basic authorization:
MPORTANT
Authorization: Basic YWRtaW46ZGVmYXVsdA==
YWRtaW46ZGVmYXVsdA== represents the Base 64 encoding of the vShield Manager default login credentials
(admin:default).
REST API uses HTTP requests (which are often executed by a script or other higher-level language) as a way
of making what are essentially idempotent remote procedure calls that create, modify, or delete the objects
defined by the API. This REST API (and others) is defined by a collection of XML documents that represent
the objects on which the API operates. The operations themselves (HTTP requests) are generic to all HTTP
clients.
To write a RESTful client, you need to understand only the HTTP protocol and the semantics of standard
HTML markup. To use the vShield API effectively in such a client, you need to know three things:
the set of objects that the API supports, and what they represent (What is a vDC? How does it relate to an
Org?)
how the API represents these objects (What does the XML schema for the vShield Edge firewall rule set
look like? What do the individual elements and attributes represent?)
how the client refers to an object on which it wants to operate
To answer these questions, you need to understand the vShield API resource schemas. These schemas define
a number of XML types, many of which are extended by other types. The XML elements defined in these
schemas, along with their attributes and composition rules (minimum and maximum number of elements or
attributes, for example, or the prescribed hierarchy with which elements can be nested) represent the data
structures of vShield objects. A client can "read" an object by making an HTTP GET request to the object's
resource URL. A client can "write" (create or modify) an object with an HTTP PUT or POST request that
includes a new or changed XML body document for the object. And a client can usually delete an object with
an HTTP DELETE request.
In this document, we present example requests and responses, and also provide reference information on the
XML schemas that define the request and response bodies.

RESTful Workflow Patterns

All RESTful workflows fall into a pattern that includes only two fundamental operations:
Make an HTTP request (typically GET, PUT, POST, or DELETE). The target of this request is either a
well-known URL (such as the vShield Manager) or a link obtained from the response to a previous
request. (For example, a GET request to an Org URL returns links to vDC objects contained by the Org.)
Examine the response, which can be an XML document or an HTTP response code. If the response is an
XML document, it may contain links or other information about the state of an object. If the response is
an HTTP response code, it indicates whether the request succeeded or failed, and may be accompanied
by a URL that points to a location from which additional information can be retrieved.
These two operations can repeat, in this order, for as long as necessary.
VMware, Inc.
Chapter 1 Overview of VMware vShield
11

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VSHIELD APP 1.0.0 UPDATE 1 - API and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents