You are here: Representations

SAS Data Loader 3.1 for Hadoop: REST API Reference

Representations (Media Types)

Representations, or media types, are a standard for describing the format of content on the Internet. The SAS Data Loader for Hadoop REST API contains a complete list of available media types it supports for requests and responses. An HTTP response with a body always contains a header with the content type set to a specific media type. A user can control the content type in a response by setting an accept header in a request.

Externally-defined media types include the following:

application/vnd.dataloader.directive

The application/vnd.sas.dataloader.directive media type is information about a directive.

Link Relations

Rel HTTP Method Description
up GET

Gets the list of directives. URI: /directives

Type: application/vnd.sas.collection

self GET

Gets the directive. URI: /directives/{directiveId}

Type: application/vnd.sas.dataloader.directive

alternate GET

Gets the directive in its alternate (summary) format. URI: /directives/{directiveId} with an Accept header of application/vnd.sas.dataloader.directive.summary.

Type: application/vnd.sas.dataloader.directive.summary

execute POST

Executes the directive. There is no request body. The response body is application/vnd.sas.dataloader.job.

URI: /job?directive={directiveId}

Members

This media type contains the following members:

Rel Type Description
version integer This media type's schema version number. This representation is version 1.
id string The system-assigned unique ID for this object
name string The directive's name
description string The directive's description
type string

The directive's type which is the template that was used to create the directive. Examples include :

  • chainDirectives
  • chainDirectivesSerial
  • chainDirectivesParallel
  • cleansDataInHadoop
  • copyTablesFromHadoop
  • copyTablesToHadoop
  • copyToLASR
  • transformDataInHadoop
  • joinTablesInHadoop
  • copyFilesToHadoop
  • mergeData
  • profileData
  • queryTablesInHadoop
  • hiveCode
  • sasCode
  • transposeDataInHadoop
category string

The directive's category, which is the category (group) of the template. Examples include:

  • utilities
  • dataQuality
  • dataMovement
  • dataIntegration
creationTimeStamp string The date and time the directive was created (yyyy-mm-ddThh:mm:ss.SSSZ).
modifiedTimeStamp string The date and time the directive was last modified (yyyy-mm-ddThh:mm:ss.SSSZ).
folderPath string The path to the folder that contains the directive.
links array of link objects A list of links to related resources and methods. See Link Relations.

 


 

application/vnd.dataloader.directive.summary

The application/vnd.sas.dataloader.directive.summary media type is summary information about a directive. It has the same members as application/vnd.dataloader.directive and additional fields might be added in the future.


application/vnd.dataloader.job

The application/vnd.sas.dataloader.job media type describes an instance of running a directive.

Link Relations

Rel HTTP Method Description
self GET

Gets information about this job. URI: /jobs/{jobId}

Type: application/vnd.sas.dataloader.job

delete DELETE

Deletes information about this job. URI:/jobs/{jobId}

state GET

Gets the job's state. URI:/jobs/{jobId}/state

Type: text/plain

cancel PUT

Cancels the job. There is no request body and the response body is text/plain. This link is present only if the job's state is "starting" or "running".

URI:/jobs/{jobId}/state?value=canceled

log GET

Gets the job's log. URI: /jobs/{jobId}/log

Type: text/plain

error GET

Gets the job's error. This link is only present if the job's status is "failed". URI: /jobs/{jobId}/error

Type: application/vnd.sas.error

results GET

Returns the collection of the job's results. If the job does not have any results, the link is not present. The collection contains application/vnd.sas.dataloader.job.result instances. URI:/jobs/{jobId}/results

Type: application/vnd.sas.collection

Members

This media type contains the following members:

Rel Type Description
version integer This media type's schema version number. This representation is version 1.
id string The system-assigned unique ID for this object
directiveName string The name of the directive
state string The job status. Values include "starting", "running", "completed", "failed", "canceling", "canceled", "abandoned", and "unknown".
startTimeStamp string The date and time (yyyy-mm-ddThh:mm:ss.SSSZ) the job was started. If the job has not been started, the value will be omitted.
stopTimeStamp string The date and time (yyyy-mm-ddThh:mm:ss.SSSZ) the job ended. If the job has not ended, the value will be omitted.
elapsedTime double The number of seconds that the directive has been executing. If the job has not started, the value will be 0.0.
folderPath string The path to the folder that stores the directive.
links array of link objects A list of links to related resources and methods. See Link Relations

 


 

application/vnd.dataloader.job.result

The application/vnd.sas.dataloader.job.result media type describes an instance of a result running a directive or a directive that has been run in the past.

Link Relations

Rel HTTP Method Description
job GET

Gets the job informationthat produced the result. URI: /jobs/{jobId}

Type: application/vnd.sas.dataloader.job

view GET

Displays the result.

HREF: /SASDataLoader/tableviewer?resource=path=HadoopServer%3D%28id%3D9d9dedc3-2158-4c90-9311-3af97f8a43f5%29%26Schema%3D%28name%3Ddefault%29%26Table%3D%28name%3DExampleResult%29

Type: text/html

Members

This media type contains the following members:

Rel Type Description
version integer This media type's schema version number. This representation is version 1.
name string The result's name.
type string The result's type. Values include "table" and "profile."
links array of link objects A list of links to related resources and methods. See Link Relations.