Overview

Before you get started with using VIDIZMO REST APIs and being amazed at how powerful their scope is, this article shall walk you through the structure of REST API Request-Response for a better grip on how to use it. A REST API request/response pair can be categorized into five major components:


Request URI

The request URI, is made up of: {URI-scheme} :// {URI-host} / {resource-path} ? {query-string}. Although the request URI is included in the request message header, we call it out separately here because most languages or frameworks require you to pass it separately from the request message.


URI scheme: Indicates the protocol used to transmit the request. For example, http or https.

URI host: Specifies the domain name of the server where VIDIZMO REST service endpoint is hosted. This is your VIDIZMO portal's domain URL.

Resource path: Specifies the resource, which may include multiple segments used by the service in determining the selection of those resources. For example: user/forgot-password/[email protected] can be used to generate an email to reset password against the specified email-address.

Query string (optional): Provides additional simple parameters, such as selection criteria for the VIDIZMO resource.


Request Header

HTTP request message header fields:

  • A required HTTP method (also known as an operation or a verb), which tells the service what type of operation you are trying to perform on the resource being requested. VIDIZMO REST Services support GET, PUT, POST, and DELETE methods.
  • Optional additional header fields, as required by the specified URI and HTTP method. For example, for APIs that require authentication, an Authorization header provides a bearer token containing client authorization information for the request.


Request Body

HTTP request message body fields are usually optional and are included to support the URI and HTTP operation. For example, POST operations contain MIME-encoded objects that are passed as complex parameters. For POST or PUT operations, the MIME-encoding type for the body should be specified in the Content-type request header as well. VIDIZMO REST API services recommend you to use a specific MIME type, such as application/json.


Response Header

HTTP response message header fields:

  • An HTTP status code, ranging from 2xx success codes to 4xx or 5xx error codes. Alternatively, a service-defined status code may be returned, as indicated in the API documentation.
  • Optional additional header fields, as required to support the request's response, such as a Content-Type response header.


Response Body

Optional HTTP response message body fields:

  • MIME-encoded response objects are returned in the HTTP response body, such as a response from a GET method that is returning data related to a video uploaded in VIDIZMO Portal. Typically, these objects are returned in a structured format such as JSON or XML, as indicated by the Content-Type response header. For example, when you request a user profile from VIDIZMO, it is returned in the response body as the BasicInfo element, one of several name/value paired objects in a data collection (UserProfile Object). In this example, a response header of Content-Type: application/json is also included.