Introduction

Representational State Transfer (REST) is an architectural style or pattern for designing web services that access a system's resources using HTTP methods. The resources are accessed using Uniform Resource Identifier (URI) paths.

Three REST Application Programming Interfaces (APIs) are included with DataFlux Data Management Server. This document describes two data management APIs that are associated with real-time services and one that is associated with batch jobs. These data management APIs are summarized in the following table.

Execution Modes and Associated APIs
Execution Mode Description Associated API
Real-time

The input is passed in the request and the output is immediately returned in the response (as soon as the service job finishes).

There are two types of real-time service job flows: data and process. Each has its own base or root URL. However, their APIs (functionality, media types, and resources) are very similar.

DataFlux Data Management Real-Time Data Job REST API

DataFlux Data Management Real-Time Process Job REST API

Batch

The client starts a job run and receives back a job run ID token.

The client must interrogate the server about the results of that job run.

DataFlux Data Management Batch Job REST API

 

 

Example

The following steps illustrate the process of creating and running a REST API request that runs a job on DataFlux Data Management Server. In this case, the job that is requested is a real-time data service.

  1. Open a REST API test application such as SOAPUI.

    Note: If security is enabled on the DataFlux Data Management Server, the request may require an appropriate authorization header on each request.
  2. Use the REST API test application to obtain the job ID of the real-time data service that you want to run. Submit a GET request with the following URI to receive information about the available real-time data service jobs:

    http://<host:port>/SASDataMgmtRTDataJob/rest/jobFlowDefns
  3. Submit a GET request with the following URI to return the metadata information of the job that you want to run:

    http://<host:port>/SASDataMgmtRTDataJob/rest/JobFlowDefns/<Job_ID>/metadata

    The metadata describes what you need to include in the POST request that runs the job. In this example, job metadata consists of input and output structures and content-type header requirements.
  4. Use the REST API test application to submit a POST request. The POST request requires a job input structure with the media type application/json. The input data structure is based on the inputs metadata obtained in Step 3.

    The POST request also requires a content-type header based on the metadata information in Step 3.

    Examine the output from the job and run additional tests as needed
  5. Incorporate the URI of your REST API request into your web client.

For more information about interacting with DataFlux Data Management Server, see the DataFlux Data Management Server: Administrator's Guide.