2月 172016
 

REpresentational State Transfer (REST) is an architectural style for designing web services that access a system's resources using HTTP methods.

With the release of DataFlux Data Management 2.7 earlier this year, three new REST Application Programming Interfaces (APIs) are now available:

  • Data Management Server Batch Jobs
  • Data Management Server Real-time Data Jobs
  • Data Management Server Real-time Process Jobs

The Base URLs for the new Data Management Server REST APIs are:

Batch Jobs – http://<DM Server IP address or server name>:<port>/ SASDataMgmtBatchJob/rest

Real-time Data Services – http://<DM Server IP address or server name>:<port>/ SASDataMgmtRTDataJob/rest

Real-time Process Services – http://<DM Server IP address or server name>:<port>/ SASDataMgmtRTProcessJob/rest

Here is a sample call to the Base URL for Real-time Data Services:

http://my_dmserver.com:21036/SASDataMgmtRTDataJob/rest

RESTAPIs

The Data Management Server job or service name is referred to by its ID which is simply the name of the job or service (with its extension) Base64 encoded.  You can use this site to Base64 encode text.  Base64 encoding is a common standard use to encode paths or other resource names in any URL.  For example, without Base64 encoding, a filename and path that contains a space can cause problems.

Here is a sample call for a specific Real-time Data Service using its Base64 encoded name for its ID.

http://my_dmserver.com:21036/SASDataMgmtRTDataJob/rest/jobFlowDefns/ RGV0ZXJtaW5lX0dlbmRlci5kZGY=

RESTAPIs2

Note that the returned text contains information about the links to call (href), method to use as well as content type of the request.

Before reviewing the REST API metadata information for the service, let’s first look at testing the Determine Gender data service using the Data Management Server test service utility.

RESTAPIs3

The input of the service is Name and the output is Gender.

Here is an example of the REST API metadata information which includes the inputs and outputs for the Determine_Gender.ddf service.

http://my_dmserver.com:21036/SASDataMgmtRTDataJob/rest/jobFlowDefns/ RGV0ZXJtaW5lX0dlbmRlci5kZGY=/metadata

RESTAPIs4

The following are some common tools for testing REST APIs requests and responses:

Here is an example of the request/response information for executing the Determine Gender data service. The input Names of “John Smith” and “Jane Smith” were sent to the service and the Genders of “M” and “F” were returned.  (The Mozilla Firefox Add-on tool was used to generate this information.)

RESTAPIs5

The table below lists the possible HTTP status response codes that could be returned by a Data Management Server REST API request:

RESTAPIs6

For more information refer to the DataFlux Data Management Server 2.7: REST API Reference guide.

 

 

tags: data management, Data Management Server, REST API, SAS Professional Services

DataFlux Data Management Server 2.7: REST APIs was published on SAS Users.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)