DataFlux Data Management Server 2.7: REST APIs

2

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.

 

 

Share

About Author

Mary Kathryn Queen

Principal Technical Training Consultant

Mary Kathryn Queen is a Principal Technical Training Consultant in the Global Enablement and Learning (GEL) Team within SAS R&D's Global Technical Enablement Division. Her primary focus is on SAS Data Management technologies, particularly data quality, data preparation, and data governance.

2 Comments

  1. Dear Mary,

    We are trying to send a POST request via REST API using the above method, but we are getting a connection timeout error. Can you please guide what are we missing? Is it some config parameters that needs to be set?

    Your help would be very very helpful

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top