Resources and Collections

resource /

The root / returns links to the top-level resources surfaced through this API. The module’s collection is the only top-level resource. The GET link is for querying the module’s collection. The POST link is for creating a module.
The / resource uses the GET / method, which requires authentication, and has a request URL of GET http://www.example.com/SASMicroAnalyticService/rest/.
The response to the GET request is a collection of links to the resources. In this version, the module’s collection is the only top-level resource.
Here is a JSON representation of the top-level resource containing links:
{  
   "version":1,
   "links":[  
      {  
         "method":"GET",
         "rel":"modules",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
         "uri":"/modules"
      },
      {  
         "method":"POST",
         "rel":"createModule",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
         "uri":"/modules"
      }
   ]
}
Here are the HTTP response codes:
200
OK
401
Unauthorized
500
Server error.
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
GET / returns the application/json media type representation by setting the Accept: header of the request.

Collection /modules

The /modules resource collection is a collection of modules that are loaded in memory by SAS Micro Analytic Service.
The /modules resource allows the GET method, which requires authentication, and has a request URL of GET http://www.example.com/SASMicroAnalyticService/rest/modules.
Each module object in the collection contains fields and links that enable you to get detailed information about a specific module.
Here are the HTTP response codes:
200
OK
401
Unauthorized
500
Server error
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
Here are the query parameters for /modules:
Name
Type
Description
?start
integer
The starting index of the first item in a page. The index is 0-based. The default is 0.
?limit
integer
The maximum number of modules to return in this page of results. The actual number of returned modules might be less, if the collection has been exhausted. The default is 10.
?label
string
Filter by the name of the modules. Each module is checked if its name contains the label.
Here is an example of the JSON representation:
{  
   "links":[  
      {  
         "method":"GET",
         "rel":"self",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
         "uri":"/modules",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"first",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules?start=0&limit=5",
         "uri":"/modules?start=0&limit=5",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"last",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules?start=0&limit=5",
         "uri":"/modules?start=0&limit=5",
         "type":"application/vnd.sas.collection"
      }
   ],
   "name":"items",
   "accept":"application/vnd.sas.microanalytic.module",
   "start":0,
   "count":5,
   "items":[  
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       3eadfae7-583f-44ee-8c37-e201184c94da",
               "uri":"/modules/3eadfae7-583f-44ee-8c37-e201184c94da",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
               "uri":"/modules",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"GET",
               "rel":"source",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       3eadfae7-583f-44ee-8c37-e201184c94da/source",
               "uri":"/modules/3eadfae7-583f-44ee-8c37-e201184c94da/source",
               "type":"application/vnd.sas.microanalytic.module.source"
            },
            {  
               "method":"GET",
               "rel":"steps",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       3eadfae7-583f-44ee-8c37-e201184c94da/steps",
               "uri":"/modules/3eadfae7-583f-44ee-8c37-e201184c94da/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"PUT",
               "rel":"update",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       3eadfae7-583f-44ee-8c37-e201184c94da",
               "uri":"/modules/3eadfae7-583f-44ee-8c37-e201184c94da",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"DELETE",
               "rel":"delete",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       3eadfae7-583f-44ee-8c37-e201184c94da",
               "uri":"/modules/3eadfae7-583f-44ee-8c37-e201184c94da"
            }
         ],
         "description":"Module A",
         "version":1,
         "scope":"public",
         "id":"3eadfae7-583f-44ee-8c37-e201184c94da",
         "steps":[  
            "falls_on"
         ],
         "properties":[
         ],
         "revision":1,
         "creationTimeStamp":"2015-05-06T22:37:44.000-0400",
         "modifiedTimeStamp":"2015-05-06T22:37:44.000-0400",
         "name":"pkga"
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       de279ebf-f2a6-42ec-9342-29c363866a08",
               "uri":"/modules/de279ebf-f2a6-42ec-9342-29c363866a08",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
               "uri":"/modules",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"GET",
               "rel":"source",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       de279ebf-f2a6-42ec-9342-29c363866a08/source",
               "uri":"/modules/de279ebf-f2a6-42ec-9342-29c363866a08/source",
               "type":"application/vnd.sas.microanalytic.module.source"
            },
            {  
               "method":"GET",
               "rel":"steps",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       de279ebf-f2a6-42ec-9342-29c363866a08/steps",
               "uri":"/modules/de279ebf-f2a6-42ec-9342-29c363866a08/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"PUT",
               "rel":"update",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       de279ebf-f2a6-42ec-9342-29c363866a08",
               "uri":"/modules/de279ebf-f2a6-42ec-9342-29c363866a08",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"DELETE",
               "rel":"delete",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       de279ebf-f2a6-42ec-9342-29c363866a08",
               "uri":"/modules/de279ebf-f2a6-42ec-9342-29c363866a08"
            }
         ],
         "description":"Module B",
         "version":1,
         "scope":"public",
         "id":"de279ebf-f2a6-42ec-9342-29c363866a08",
         "steps":[  
            "this_year"
         ],
         "properties":[
         ],
         "revision":1,
         "creationTimeStamp":"2015-05-06T22:37:45.000-0400",
         "modifiedTimeStamp":"2015-05-06T22:37:45.000-0400",
         "name":"pkgb"
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016",
               "uri":"/modules/f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
               "uri":"/modules",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"GET",
               "rel":"source",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016/source",
               "uri":"/modules/f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016/source",
               "type":"application/vnd.sas.microanalytic.module.source"
            },
            {  
               "method":"GET",
               "rel":"steps",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016/steps",
               "uri":"/modules/f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"PUT",
               "rel":"update",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016",
               "uri":"/modules/f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"DELETE",
               "rel":"delete",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016",
               "uri":"/modules/f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016"
            }
         ],
         "description":"Module C",
         "version":1,
         "scope":"public",
         "id":"f1dcd1af-6ab2-4ac0-a5c6-5c64d5c09016",
         "steps":[  
            "get_date"
         ],
         "properties":[
         ],
         "revision":1,
         "creationTimeStamp":"2015-05-06T22:37:46.000-0400",
         "modifiedTimeStamp":"2015-05-06T22:37:46.000-0400",
         "name":"pkgc"
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/
                       modules/617aad65-36fa-4079-b1cb-03fe948874d4",
               "uri":"/modules/617aad65-36fa-4079-b1cb-03fe948874d4",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
               "uri":"/modules",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"GET",
               "rel":"source",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       617aad65-36fa-4079-b1cb-03fe948874d4/source",
               "uri":"/modules/617aad65-36fa-4079-b1cb-03fe948874d4/source",
               "type":"application/vnd.sas.microanalytic.module.source"
            },
            {  
               "method":"GET",
               "rel":"steps",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       617aad65-36fa-4079-b1cb-03fe948874d4/steps",
               "uri":"/modules/617aad65-36fa-4079-b1cb-03fe948874d4/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"PUT",
               "rel":"update",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       617aad65-36fa-4079-b1cb-03fe948874d4",
               "uri":"/modules/617aad65-36fa-4079-b1cb-03fe948874d4",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"DELETE",
               "rel":"delete",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       617aad65-36fa-4079-b1cb-03fe948874d4",
               "uri":"/modules/617aad65-36fa-4079-b1cb-03fe948874d4"
            }
         ],
         "description":"Module D",
         "version":1,
         "scope":"public",
         "id":"617aad65-36fa-4079-b1cb-03fe948874d4",
         "steps":[  
            "holiday_reminder"
         ],
         "properties":[
         ],
         "revision":1,
         "creationTimeStamp":"2015-05-06T22:37:46.000-0400",
         "modifiedTimeStamp":"2015-05-06T22:37:46.000-0400",
         "name":"pkgd"
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
               "uri":"/modules",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"GET",
               "rel":"source",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
               "type":"application/vnd.sas.microanalytic.module.source"
            },
            {  
               "method":"GET",
               "rel":"steps",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"PUT",
               "rel":"update",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
               "type":"application/vnd.sas.microanalytic.module"
            },
            {  
               "method":"DELETE",
               "rel":"delete",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232"
            }
         ],
         "description":"Sample module",
         "version":1,
         "scope":"public",
         "warnings":{  
            "errorCode":0,
            "message":"Module compiled with warnings.",
            "details":[  
               "In declaration of method copy_arrays: parameter out_charN_array is 'in_out';
                therefore, the type size (12) will be ignored.",
               "In declaration of method copy_arrays: parameter out_varchar_array is 'in_out';
                therefore, the type size (512) will be ignored.",
               "In declaration of method copy_charN_array: parameter out_array is 'in_out';
                therefore, the type size (12) will be ignored."
            ],
            "remediation":"",
            "links":[  
 
            ],
            "version":1,
            "httpStatusCode":0
         },
         "id":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "steps":[  
            "copy_arrays",
            "copy_bigint_array",
            "copy_charN_array",
            "copy_float_array",
            "copy_int_array",
            "copy_varchar_array"
         ],
         "properties":[
         ],
         "revision":1,
         "creationTimeStamp":"2015-05-06T22:41:02.000-0400",
         "modifiedTimeStamp":"2015-05-06T22:41:02.000-0400",
         "name":"samplemodule"
      }
   ],
   "limit":5,
   "version":1
}
GET returns the following media type representations by setting the Accept: header of the request:
  • application/vnd.sas.collection
  • application/json
This operation can return the application/vnd.sas.error media type for failure. This media type is returned when the server encounters an error. An example of an error is when a node in a clustered deployment has become out of sync.
The POST method returns a module resource for the module that is loaded in memory by SAS Micro Analytic Service. The module resource that is returned contains links to the compiled and loaded steps.
The POST method requires authentication and has a request URL of POST http://www.example.com/SASMicroAnalyticService/rest/modules.
Here is an example of the JSON representation:
{
"version": "1",
"description": "Sample module",
"scope" : "public",
"type" : "text/vnd.sas.source.ds2",
"properties" : [],
"code" : "ds2_options sas;\n package sampleModule / overwrite=yes; \n \n
method copy_charN_array(char(12) in_array[4], in_out char(12)  out_array[4]);\n
out_array := in_array;\n end;\n \n method copy_varchar_array(varchar(512) in_array[3],
in_out varchar out_array[3]);\n out_array := in_array;\n end;\n \n
method copy_int_array(int in_array[5], in_out int out_array[5]);\n out_array := in_array;\n
end;\n \n method copy_float_array(double in_array[2], in_out double out_array[2]);\n
out_array := in_array;\n end;\n \n method copy_bigint_array(bigint in_array[1],
in_out bigint out_array[1]);\n out_array := in_array;\n end;\n \n method copy_arrays( char(12)
in_charN_array[4],\n varchar(512) in_varchar_array[1],\n int in_int_array[5], \n
double in_double_array[2], \n bigint in_bigint_array[1], \n in_out char(12)  out_charN_array[4],\n
in_out varchar(512) out_varchar_array[1],\n in_out int out_int_array[5],\n
in_out double out_double_array[2],\n in_out bigint out_bigint_array[1]);\n \n
copy_charN_array(in_charN_array, out_charN_array);\n copy_int_array(in_int_array,
out_int_array);\n copy_float_array(in_double_array, out_double_array);\n
copy_bigint_array(in_bigint_array, out_bigint_array);\n \n end;\n \n endpackage;\n \n \n"
         }
The POST method accepts the following content types, as named by the Content-Type: header:
  • application/json
  • application/vnd.sas.microanalytic.module.definition+json
Here are the HTTP response codes:
201
Created
400
Bad Request
401
Unauthorized
403
Forbidden
500
Server error.
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
One situation that causes a 403 code to be returned is when the POST is initiated from an untrusted site.
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module+json
This operation returns the application/vnd.sas.error media type for failure. This media type is returned when there is an error creating the module. An example is when the source code contains a syntax error. Another example is when the module name is already taken.
Here is an example of a successfully compiled module with no warnings:
{  
   "links":[  
      {  
         "method":"GET",
         "rel":"self",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
          36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"GET",
         "rel":"up",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
         "uri":"/modules",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"source",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "type":"application/vnd.sas.microanalytic.module.source"
      },
      {  
         "method":"GET",
         "rel":"steps",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"PUT",
         "rel":"update",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"DELETE",
         "rel":"delete",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232"
      }
   ],
   "description":"Sample module",
   "version":1,
   "scope":"public",
   "id":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
   "steps":[  
      "copy_arrays",
      "copy_bigint_array",
      "copy_charN_array",
      "copy_float_array",
      "copy_int_array",
      "copy_varchar_array"
   ],
   "properties":[
   ],
   "revision":1,
   "creationTimeStamp":"2015-05-06T22:14:17.000-0400",
   "modifiedTimeStamp":"2015-05-06T22:14:17.000-0400",
   "name":"samplemodule"
}
Here is an example of a successfully compiled module with warnings:
{  
   "links":[  
      {  
         "method":"GET",
         "rel":"self",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"GET",
         "rel":"up",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
         "uri":"/modules",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"source",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "type":"application/vnd.sas.microanalytic.module.source"
      },
      {  
         "method":"GET",
         "rel":"steps",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"PUT",
         "rel":"update",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"DELETE",
         "rel":"delete",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232"
      }
   ],
   "description":"Sample module",
   "version":1,
   "scope":"public",
   "warnings":{  
      "errorCode":0,
      "message":"Module compiled with warnings.",
      "details":[  
         "In declaration of method copy_arrays: parameter out_charN_array is 'in_out';
          therefore, the type size (12) will be ignored.",
         "In declaration of method copy_arrays: parameter out_varchar_array is 'in_out'; 
          therefore, the type size (512) will be ignored.",
         "In declaration of method copy_charN_array: parameter out_array is 'in_out'; 
          therefore, the type size (12) will be ignored."
      ],
      "remediation":"",
      "links":[  
      ],
      "version":1,
      "httpStatusCode":0
   },
   "id":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
   "steps":[  
      "copy_arrays",
      "copy_bigint_array",
      "copy_charN_array",
      "copy_float_array",
      "copy_int_array",
      "copy_varchar_array"
   ],
   "properties":[
   ],
   "revision":1,
   "creationTimeStamp":"2015-05-06T22:41:02.000-0400",
   "modifiedTimeStamp":"2015-05-06T22:41:02.000-0400",
   "name":"samplemodule"
}
Here is an example of an error response:
{  
   "errorCode":-30,
   "message":"Invalid source code.  ",
   "details":[  
      "Line 1: Parse failed:  int out_int); out_int=3; end;
       >>> endpackages <<< ; package ship_backen",
      "Parse encountered identifier when expecting end of input."
   ],
   "remediation":"",
   "links":[  
 
   ],
   "version":1,
   "httpStatusCode":400
}

resource /modules/{moduleId}

The /modules/{moduleId} resource is a single compiled module that is loaded in memory by SAS Micro Analytic Service.
The /modules/{moduleId} resource has the following methods:
  • GET
  • PUT
  • DELETE
The GET method requires authentication and has a request URL of GET http://www.example.com/SASMicroAnalyticService/modules/{moduleId}.
Here are the HTTP response codes:
200
OK
401
Unauthorized
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module+json
This operation returns the application/vnd.sas.error media type for failure. This media type is returned when the resource cannot be located either because the module ID is incorrect or the module has been deleted.
Here is an example of a JSON response:
{
    "links":[  
         {  
            "method":"GET",
            "rel":"self",
            "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                    45e7118a-c61b-4e59-b5b1-9a415355551f",
            "uri":"/modules/45e7118a-c61b-4e59-b5b1-9a415355551f",
            "type":"application/vnd.sas.microanalytic.module"
         },
         {  
            "method":"GET",
            "rel":"up",
            "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
            "uri":"/modules",
            "type":"application/vnd.sas.collection"
         },
         {  
            "method":"GET",
            "rel":"source",
            "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                    45e7118a-c61b-4e59-b5b1-9a415355551f/source",
            "uri":"/modules/45e7118a-c61b-4e59-b5b1-9a415355551f/source",
            "type":"application/vnd.sas.microanalytic.module.source"
         },
         {  
            "method":"GET",
            "rel":"steps",
            "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                    45e7118a-c61b-4e59-b5b1-9a415355551f/steps",
            "uri":"/modules/45e7118a-c61b-4e59-b5b1-9a415355551f/steps",
            "type":"application/vnd.sas.collection"
         },
         {  
            "method":"PUT",
            "rel":"update",
            "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                    45e7118a-c61b-4e59-b5b1-9a415355551f",
            "uri":"/modules/45e7118a-c61b-4e59-b5b1-9a415355551f",
            "type":"application/vnd.sas.microanalytic.module"
         },
         {  
            "method":"DELETE",
            "rel":"delete",
            "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                    45e7118a-c61b-4e59-b5b1-9a415355551f",
            "uri":"/modules/45e7118a-c61b-4e59-b5b1-9a415355551f"
         }
   ],
   "version":1,
   "description":"Decision Tree Model",
   "scope":"private",
   "id":"45e7118a-c61b-4e59-b5b1-9a415355551f",
   "steps":[  
      "score"
   ],
   "properties":[
   ],
   "creationTimeStamp":"2015-04-13T01:11:44.000-0400",
   "modifiedTimeStamp":"2015-04-13T01:11:44.000-0400",
   "revision":1,
   "name":"tree"
}
Here is an example of a JSON error response:
{
  "errorCode": 4001,
  "message": "No module with the module id 48B9A582-ADA4-C64D-9759-BBEB8E1DAA8B exists.",
  "details": [],
  "remediation": "",
  "links": [],
  "version": 1,
  "httpStatusCode": 404
}
The PUT method updates a module resource for the module that is loaded in memory by SAS Micro Analytic Service. It is an error to change the name of the module in a PUT operation. The module resource that is returned contain links to the compiled and loaded steps. The latest revision supersedes previous revisions. Previous revisions are not retrievable.
The PUT method requires authentication and has a request URL of PUT http://www.example.com/SASMicroAnalyticService/rest/modules/{moduleId}.
The PUT method accepts the following media type representations by setting the Content-Type: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module.definition+json
Here are the HTTP response codes:
200
OK
400
Bad request
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
One situation that causes a 403 code to be returned is when the PUT is initiated from an untrusted site.
Here is an example of the JSON representation:
{
"version": "1",
"description": "Expanded sample module",
"scope" : "public",
"type" : "text/vnd.sas.source.ds2",
"properties" : [  {"name" : "connectionString", "value" : "DRIVER=base;"} ],
"code" : "ds2_options sas;\n package sampleModule / overwrite=yes; \n \n
method produce_warnings(char(12) in_string, in_out char(12) out_string);\n 
out_string = in_string;\n end;\n \n method copy_char12(char(12) in_string,
in_out char out_string);\n out_string=in_string;\n end;\n \n
method copy_varchar(varchar(32767) in_string, in_out varchar out_string);\n
out_string=in_string;\n end;\n \n method copy_bigint(bigint in_int,
in_out bigint out_int);\n out_int=in_int;\n end;\n \n method copy_float(double in_float,
in_out double out_float);\n out_float=in_float;\n end;\n \n
method copy_int(int in_int, in_out int out_int);\n out_int=in_int;\n end;\n \n
method copy_scalars(char(12) in_char12, varchar(32767) in_varchar, int in_int,\n
bigint in_bigint, double in_float, \n in_out char out_char, in_out char out_char12,\n
in_out varchar out_varchar, in_out int out_int,\n in_out bigint out_bigint,
in_out double out_float);\n \n copy_char12(in_char12, out_char12);\n
copy_varchar(in_varchar, out_varchar);\n copy_bigint(in_bigint, out_bigint);\n
copy_float(in_float, out_float);\n copy_int(in_int, out_int);\n end;\n \n
method copy_charN_array(char(12) in_array[4], in_out char(12)  out_array[4]);\n
out_array := in_array;\n end;\n \n method copy_varchar_array(varchar(512) in_array[3],
in_out varchar out_array[3]);\n out_array := in_array;\n end;\n \n
method copy_int_array(int in_array[5], in_out int out_array[5]);\n out_array := in_array;\n
end;\n \n method copy_float_array(double in_array[2], in_out double out_array[2]);\n
out_array := in_array;\n end;\n \n method copy_bigint_array(bigint in_array[1],
bigint out_array[1]);\n out_array := in_array;\n end;\n \n method copy_arrays( char(12)
in_charN_array[4],\n varchar(512) in_varchar_array[1],\n int in_int_array[5], \n
double in_double_array[2], \n bigint in_bigint_array[1], \n in_out char(12) 
out_charN_array[4],\n in_out varchar(512) out_varchar_array[1],\n in_out int out_int_array[5],\n
in_out double out_double_array[2],\n in_out bigint out_bigint_array[1]);\n \n
copy_charN_array(in_charN_array, out_charN_array);\n copy_int_array(in_int_array,
out_int_array);\n copy_float_array(in_double_array, out_double_array);\n
copy_bigint_array(in_bigint_array, out_bigint_array);\n \n end;\n \n endpackage;\n \n \n"
      }
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module+json
This operation returns the application/vnd.sas.error media type when there is an error. For example, this media type is returned when you attempt to change the name of the module, or the source code contains a syntax error. Another example is when the server fails to acquire a resource.
Here is an example of a successfully compiled module response body:
{  
   "links":[  
      {  
         "method":"GET",
         "rel":"self",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"GET",
         "rel":"up",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
         "uri":"/modules",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"source",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "type":"application/vnd.sas.microanalytic.module.source"
      },
      {  
         "method":"GET",
         "rel":"steps",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"PUT",
         "rel":"update",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"DELETE",
         "rel":"delete",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232"
      }
   ],
   "description":"Expanded sample module",
   "version":1,
   "scope":"public",
   "id":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
   "steps":[  
      "copy_arrays",
      "copy_bigint",
      "copy_bigint_array",
      "copy_char12",
      "copy_charN_array",
      "copy_float",
      "copy_float_array",
      "copy_int",
      "copy_int_array",
      "copy_scalars",
      "copy_varchar",
      "copy_varchar_array",
      "produce_warnings"
   ],
   "properties":[
      {
         "name" : "connectionString",
         "value" : "DRIVER=base;"
      }
   ],
   "revision":2,
   "creationTimeStamp":"2015-05-06T22:41:02.000-0400",
   "modifiedTimeStamp":"2015-05-07T00:15:47.000-0400",
   "name":"samplemodule"
}
Here is an example of a successfully compiled module with a warnings response body:
{  
   "links":[  
      {  
         "method":"GET",
         "rel":"self",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"GET",
         "rel":"up",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules",
         "uri":"/modules",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"source",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/source",
         "type":"application/vnd.sas.microanalytic.module.source"
      },
      {  
         "method":"GET",
         "rel":"steps",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"PUT",
         "rel":"update",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      },
      {  
         "method":"DELETE",
         "rel":"delete",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232"
      }
   ],
   "description":"Expanded sample module",
   "version":1,
   "scope":"public",
   "warnings":{  
      "errorCode":0,
      "message":"Module compiled with warnings.",
      "details":[  
         "In declaration of method copy_arrays: parameter out_charN_array is 'in_out';
          therefore, the type size (12) will be ignored.",
         "In declaration of method copy_arrays: parameter out_varchar_array is 'in_out';
          therefore, the type size (512) will be ignored.",
         "In declaration of method copy_charN_array: parameter out_array is 'in_out';
          therefore, the type size (12) will be ignored.",
         "In declaration of method produce_warnings: parameter out_string is 'in_out';
          therefore, the type size (12) will be ignored."
      ],
      "remediation":"",
      "links":[  
      ],
      "version":1,
      "httpStatusCode":0
   },
   "id":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
   "steps":[  
      "copy_arrays",
      "copy_bigint",
      "copy_bigint_array",
      "copy_char12",
      "copy_charN_array",
      "copy_float",
      "copy_float_array",
      "copy_int",
      "copy_int_array",
      "copy_scalars",
      "copy_varchar",
      "copy_varchar_array",
      "produce_warnings"
   ],
   "properties":[
     {
         "name" : "connectionString",
         "value" : "DRIVER=base;"
      }
   ],
   "revision":3,
   "creationTimeStamp":"2015-05-06T22:41:02.000-0400",
   "modifiedTimeStamp":"2015-05-07T00:22:19.000-0400",
   "name":"samplemodule"
}
Here is an example of an error response body:
{  
   "errorCode":-33,
   "message":"Module name cannot be changed from a PUT operation.",
   "details":[  
   ],
   "remediation":"",
   "links":[  
   ],
   "version":1,
   "httpStatusCode":400
}
The DELETE method deletes all revisions of a module resource through the module ID.
The DELETE method requires authentication and has a request URL of DELETE http://www.example.com/SASMicroAnalyticService/modules/{moduleId}.
Here are the HTTP response codes:
204
No content
401
Unauthorized
403
Forbidden
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
One situation that causes a 403 code to be returned is when the PUT is initiated from an untrusted site.
This operation returns the application/vnd.sas.error media type for failure. This media type is returned when the server cannot locate the module either because the module ID is incorrect, the module does not exist anymore, or the module cannot be deleted (for example, when another operation is taking place on this module).

Resource /modules/{moduleId}/source

The /modules/{moduleId}/source resource is the source code of the module.
The GET method returns the source code of a module. It requires authentication and has a request URL of GET http://www.example.com/SASMicroAnalyticService/modules/{moduleId}/source.
Here are the HTTP response codes:
200
OK
401
Unauthorized
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module.source+json
This operation returns the application/vnd.sas.error media type for failure. This media type is returned when the server encounters an error. An example of an error is when a node in a clustered deployment has become out of sync.
Here is an example of the JSON response:
{  
   "moduleId":"fafbf5d4-01c0-48ea-a3e5-ef36fc3dfb64",
   "source":"ds2_options sas;package methods ;\n method echo_char(char in_string,
in_out char out_string);\n out_string=in_string;\n end;\n method echo_char12_implicit(char(12)
in_string, in_out char out_string);\n out_string=in_string;\n end;\n
method echo_char12_explicit(char(12) in_string, in_out char(12) out_string);\n
out_string=in_string;\n end;\n method echo_varchar_implicit(varchar(32767) in_string,
in_out varchar out_string);\n out_string=in_string;\n end;\n
method echo_varchar_explicit(varchar(32767) in_string, in_out varchar(32767) out_string);\n
out_string=in_string;\n end;\n method echo_bigint(bigint in_int, in_out bigint out_int);\n
out_int=in_int;\n end;\n method echo_float(double in_float, in_out double out_float);\n
out_float=in_float;\n end;\n method echo_int(int in_int, in_out int out_int);\n
out_int=in_int;\n end;\n method echo_scalars(char in_char, char(12) in_char12, varchar(32767)
in_varchar, int in_int,\n bigint in_bigint, double in_float, \n in_out char out_char,
in_out char(12) out_char12,\n in_out varchar out_varchar, in_out int out_int,\n
in_out bigint out_bigint, in_out double out_float);\n out_char = in_char;\n
out_char12 = in_char12;\n out_string=in_string;\n out_int=in_int;\n out_bigint=in_bigint;\n
out_float=in_float;\n end;\n method echo_char1_array(char  in_array[4],
in_out char out_array[4]);\n dcl int count;\n do count = 1 to 4;\n
out_array[count] = in_array[count];\n end;\n end;\n method echo_charN_array(char(12)
in_array[4], in_out char(12)  out_array[4]);\n dcl int count;\n do count = 1 to 4;\n
out_array[count] = in_array[count];\n end;\n end;\n method echo_int_array(int in_array[17],
in_out int out_array[37]);\n dcl int count;\n do count = 1 to 17;\n
out_array[count] = in_array[count];\n end;\n end;\n method echo_float_array(double in_array[2048],
in_out double out_array[2048]);\n dcl int count;\n do count = 1 to 2048;\n
out_array[count] = in_array[count];\n end;\n end;\n method echo_bigint_array(bigint in_array[1],
bigint out_array[1]);\n dcl int count;\n do count = 1 to 1;\n out_array[count] = in_array[count];\n
end;\n end;\n method echo_arrays(char  in_char1_array[4], \n char(12) in_charN_array[4],\n
varchar(512) in_varchar_array[1],\n int in_int_array[17], \n double in_double_array[2048], \n
bigint in_bigint_array[1], \n in_out char out_char1_array[4],\n in_out char(12)
 out_charN_array[4],\n in_out varchar(512) out_varchar_array[1],\n in_out int out_int_array[37],\n
in_out double out_double_array[2048],\n bigint out_bigint_array[1]);\n \n dcl int count;\n \n
do count = 1 to 4;\n out_char1_array[count] = in_char1_array[count];\n end;\n \n do count = 1 to 4;\n
out_charN_array[count] = in_charN_array[count];\n end;\n \n do count = 1 to 1;\n
out_varchar_array[count] = in_varchar_array[count];\n end;\n \n do count = 1 to 17;\n
out_int_array[count] = in_int_array[count];\n end;\n \n do count = 1 to 2048;\n
out_double_array[count] = in_double_array[count];\n end;\n \n do count = 1 to 1;\n
out_bigint_array[count] = in_bigint_array[count];\n end;\n \n end;\n \n endpackage;\n \n ",
   "links":[  
      {  
         "method":"GET",
         "rel":"self",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 fafbf5d4-01c0-48ea-a3e5-ef36fc3dfb64/source",
         "uri":"/modules/fafbf5d4-01c0-48ea-a3e5-ef36fc3dfb64/source",
         "type":"application/vnd.sas.microanalytic.module.source"
      },
      {  
         "method":"GET",
         "rel":"up",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 fafbf5d4-01c0-48ea-a3e5-ef36fc3dfb64",
         "uri":"/modules/fafbf5d4-01c0-48ea-a3e5-ef36fc3dfb64",
         "type":"application/vnd.sas.microanalytic.module"
      }
   ],
   "version":1
}
Here is an example of an error response body:
{
  "errorCode": 4001,
  "message": "No module with the module ID a1511cb8-58b3-475a-a4d6-8a5817d936 exists.",
  "details": [],
  "remediation": "",
  "links": [],
  "version": 1,
  "httpStatusCode": 404
}

Collection /modules/{moduleId}/steps

The /modules/{moduleId}/steps collection is a collection of steps within a specific module that is loaded in memory by SAS Micro Analytic Service.
The /modules/{moduleId}/steps collection uses the GET method, which returns a resource collection of steps corresponding to a specific module. It requires authentication, and has a request URL of GET http://www.example.com/SASMicroAnalyticService/modules/{moduleId}/steps.
Here are the HTTP response codes:
200
OK
401
Unauthorized
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
Here are the query parameters for /modules/{moduleId}/steps:
Name
Type
Description
?start
integer
The starting index of the first item in a page. The index is 0-based. Default is 0.
?limit
integer
The maximum number of steps to return in this page of results. The actual number of returned steps might be less if the collection has been exhausted. The default is 10.
?label
string
Filter by the name of the steps. Each step is checked if its name contains the label.
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.collection
This operation returns the application/vnd.sas.error media type for failure. This media type is returned when the server encounters an error. An example of an error is when a node in a clustered deployment has become out of sync.
Here is an example of the JSON response:
{  
   "links":[  
      {  
         "method":"GET",
         "rel":"self",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"first",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps?start=0&limit=10",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps?start=0&limit=10",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"next",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps?start=10&limit=10",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps?start=10&limit=10",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"last",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps?start=3&limit=10",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps?start=3&limit=10",
         "type":"application/vnd.sas.collection"
      },
      {  
         "method":"GET",
         "rel":"up",
         "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                 36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "type":"application/vnd.sas.microanalytic.module"
      }
   ],
   "name":"items",
   "accept":"application/vnd.sas.microanalytic.module.step",
   "start":0,
   "count":13,
   "items":[  
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_arrays",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_arrays",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_arrays/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_arrays/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_arrays",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_arrays",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_arrays",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_charN_array",
               "type":"stringArray",
               "dim":4,
               "size":12
            },
            {  
               "name":"in_varchar_array",
               "type":"stringArray",
               "dim":1,
               "size":512
            },
            {  
               "name":"in_int_array",
               "type":"integerArray",
               "dim":5,
               "size":0
            },
            {  
               "name":"in_double_array",
               "type":"decimalArray",
               "dim":2,
               "size":0
            },
            {  
               "name":"in_bigint_array",
               "type":"bigintArray",
               "dim":1,
               "size":0
            }
         ],
         "outputs":[  
            {  
               "name":"out_charN_array",
               "type":"stringArray",
               "dim":4,
               "size":12
            },
            {  
               "name":"out_varchar_array",
               "type":"stringArray",
               "dim":1,
               "size":512
            },
            {  
               "name":"out_int_array",
               "type":"integerArray",
               "dim":5,
               "size":0
            },
            {  
               "name":"out_double_array",
               "type":"decimalArray",
               "dim":2,
               "size":0
            },
            {  
               "name":"out_bigint_array",
               "type":"bigintArray",
               "dim":1,
               "size":0
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_bigint",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_int",
               "type":"bigint",
               "dim":0,
               "size":0
            }
         ],
         "outputs":[  
            {  
               "name":"out_int",
               "type":"bigint",
               "dim":0,
               "size":0
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint_array",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint_array/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint_array/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_bigint_array",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_bigint_array",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_array",
               "type":"bigintArray",
               "dim":1,
               "size":0
            },
            {  
               "name":"out_array",
               "type":"bigintArray",
               "dim":1,
               "size":0
            }
         ],
         "outputs":null,
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_char12",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_char12",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_char12/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_char12/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_char12",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_char12",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_char12",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_string",
               "type":"string",
               "dim":0,
               "size":12
            }
         ],
         "outputs":[  
            {  
               "name":"out_string",
               "type":"string",
               "dim":0,
               "size":0
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_charN_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_charN_array",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_charN_array/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_charN_array/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_charN_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_charN_array",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_charN_array",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_array",
               "type":"stringArray",
               "dim":4,
               "size":12
            }
         ],
         "outputs":[  
            {  
               "name":"out_array",
               "type":"stringArray",
               "dim":4,
               "size":12
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_float",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_float",
               "type":"decimal",
               "dim":0,
               "size":0
            }
         ],
         "outputs":[  
            {  
               "name":"out_float",
               "type":"decimal",
               "dim":0,
               "size":0
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float_array",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float_array/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float_array/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_float_array",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_float_array",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_array",
               "type":"decimalArray",
               "dim":2,
               "size":0
            }
         ],
         "outputs":[  
            {  
               "name":"out_array",
               "type":"decimalArray",
               "dim":2,
               "size":0
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_int",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_int",
               "type":"integer",
               "dim":0,
               "size":0
            }
         ],
         "outputs":[  
            {  
               "name":"out_int",
               "type":"integer",
               "dim":0,
               "size":0
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int_array",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int_array/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int_array/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int_array",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_int_array",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_int_array",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_array",
               "type":"integerArray",
               "dim":5,
               "size":0
            }
         ],
         "outputs":[  
            {  
               "name":"out_array",
               "type":"integerArray",
               "dim":5,
               "size":0
            }
         ],
         "description":null,
         "version":1
      },
      {  
         "links":[  
            {  
               "method":"GET",
               "rel":"self",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_scalars",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_scalars",
               "type":"application/vnd.sas.microanalytic.module.step"
            },
            {  
               "method":"GET",
               "rel":"up",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps",
               "type":"application/vnd.sas.collection"
            },
            {  
               "method":"POST",
               "rel":"validate",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_scalars/validations",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_scalars/validations",
               "type":"application/vnd.sas.microanalytic.module.step.input.validity"
            },
            {  
               "method":"POST",
               "rel":"execute",
               "href":"http://www.example.com/SASMicroAnalyticService/rest/modules/
                       36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_scalars",
               "uri":"/modules/36af8e3c-6a37-4494-a8e0-9cc96ad62232/steps/copy_scalars",
               "type":"application/vnd.sas.microanalytic.module.step.output"
            }
         ],
         "id":"copy_scalars",
         "moduleId":"36af8e3c-6a37-4494-a8e0-9cc96ad62232",
         "inputs":[  
            {  
               "name":"in_char12",
               "type":"string",
               "dim":0,
               "size":12
            },
            {  
               "name":"in_varchar",
               "type":"string",
               "dim":0,
               "size":32767
            },
            {  
               "name":"in_int",
               "type":"integer",
               "dim":0,
               "size":0
            },
            {  
               "name":"in_bigint",
               "type":"bigint",
               "dim":0,
               "size":0
            },
            {  
               "name":"in_float",
               "type":"decimal",
               "dim":0,
               "size":0
            }
         ],
         "outputs":[  
            {  
               "name":"out_char",
               "type":"string",
               "dim":0,
               "size":0
            },
            {  
               "name":"out_char12",
               "type":"string",
               "dim":0,
               "size":0
            },
            {  
               "name":"out_varchar",
               "type":"string",
               "dim":0,
               "size":0
            },
            {  
               "name":"out_int",
               "type":"integer",
               "dim":0,
               "size":0
            },
            {  
               "name":"out_bigint",
               "type":"bigint",
               "dim":0,
               "size":0
            },
            {  
               "name":"out_float",
               "type":"decimal",
               "dim":0,
               "size":0
            }
         ],
         "description":null,
         "version":1
      }
   ],
   "limit":10,
   "version":1
}
Here is an example error response:
{
  "errorCode": 4001,
  "message": "No module with the module ID a1511cb8-58b3-475a-a4d6-8a5817d936 exists.",
  "details": [],
  "remediation": "",
  "links": [],
  "version": 1,
  "httpStatusCode": 404
}

Resource /modules/{moduleId}/steps/{stepId}

The /modules/{moduleId}/steps/{stepId} resource is a single step of a compiled module.
The /modules/{moduleId}/steps/{stepId} collection uses the GET method. It returns detailed information about input and output signatures used to execute a specific step of the module. It requires authentication, and has a request URL of GET http://www.example.com/SASMicroAnalyticService/rest/modules/{moduleId}/steps/{stepId}.
Here are the HTTP response codes:
200
OK
401
Unauthorized
404
Not found
500
Server error
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module.step+json
This operation returns the application/vnd.sas.error media type for failure. This media type is returned when the module cannot be located, either because the module ID is incorrect or the module does not exist anymore. This media type is also returned when the module ID corresponds to an existing module. However, the step ID is incorrect.
Here is an example of the JSON response:
{
    "id": "test_all_types",
    "moduleId": "8eee3045-83fa-4725-88ef-471ddb5ac4f9",
    "description": null,
    "inputs": [
      {
        "name": "in_string",
        "type": "string",
        "dim": 0,
        "size": 32767
      },
      {
        "name": "in_bigint",
        "type": "bigint",
        "dim": 0,
        "size": 0
      },
      {
        "name": "in_int",
        "type": "integer",
        "dim": 0,
        "size": 0
      },
      {
        "name": "in_double ",
        "type": "decimal",
        "dim": 0,
        "size": 0
      }
    ],
    "outputs": [
      {
        "name": "out_string",
        "type": "string",
        "dim": 0,
        "size": 8
      },
      {
        "name": "out_bigint",
        "type": "bigint",
        "dim": 0,
        "size": 0
      },
      {
        "name": "out_int",
        "type": "integer",
        "dim": 0,
        "size": 0
      },
      {
        "name": "out_double",
        "type": "decimal",
        "dim": 0,
        "size": 0
      },
      {
        "name": "string_arr",
        "type": "stringArray",
        "dim": 3,
        "size": 32767
      },
      {
        "name": "bigint_arr",
        "type": "bigIntArray",
        "dim": 3,
        "size": 0
      },
      {
        "name": "int_arr",
        "type": "intArray",
        "dim": 3,
        "size": 0
      },
      {
        "name": "double_arr",
        "type": "decimalArray",
        "dim": 3,
        "size": 0
      }
  ],
  "links": [
      {
        "method": "GET",
        "rel": "self",
        "href": "http://www.example.com/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/
                 steps/test_all_types",
        "uri": "/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/steps/test_all_types",
        "type": "application/vnd.sas.microanalytic.module.step"
      },
      {
        "method": "GET",
        "rel": "up",
        "href": "http://www.example.com/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/
                 steps/test_all_types",
        "uri": "/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/steps",
        "type": "application/vnd.sas.collection"
      },
      {
        "method": "POST",
        "rel": "validate",
        "href": "http://www.example.com/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/
                 steps/test_all_types/validations",
        "uri": "/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/steps/test_all_types/validations",
        "type": "application/vnd.sas.microanalytic.module.step.input.validity"
      },
      {
        "method": "POST",
        "rel": "execute",
        "href": "http://www.example.com/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/
                 steps/test_all_types",
        "uri": "/modules/8eee3045-83fa-4725-88ef-471ddb5ac4f9/steps/test_all_type",
        "type": "application/vnd.sas.microanalytic.module.step.output"
      }
  ],
  "version": 1
}
Here is an example of an error response:
{
  "errorCode": 4001,
  "message": "No module with the module ID a1511cb8-58b3-475a-a4d6-8a5817d936 exists.",
  "details": [],
  "remediation": "",
  "links": [],
  "version": 1,
  "httpStatusCode": 404
}
There are two POST methods. The first POST method validates step inputs. The request body for each POST contains the input values that are used to execute the steps. The input values are validated against the expected input signature of the step. The POST methodrequires authentication, and has a request URL of POST http://www.example.com/SASMicroAnalyticService/rest/modules/{moduleId}/steps/{stepId}/validations.
Here are the HTTP response codes:
200
OK
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not found
500
Server error.
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
One situation that causes a 403 code to be returned is when the POST is initiated from an untrusted site.
Here is an example of the JSON request:
{
  "inputs": [
    {
      "name": "in_string",
      "value": "This is a test..."
    },
    {
      "name": "in_bigint",
      "value": 987654321
    },
    {
      "name": "in_int",
      "value": 7654321
    },
    {
      "name": "in_double",
      "value": 0.9997
    }
  ]
}
This operation accepts the following media type representations by setting the Content-Type: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module.step.input+json
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module.step.input.validity+json
This operation returns the application/vnd.sas.error media type for failure. This media type is returned whenever there is an error in performing the validation, not when the input parameter is invalid.
Here is an example of the JSON response:
{
  "moduleId": "052209DE-DF4D-6D44-B469-9094AC95F18E",
  "stepId": "test_all_types",
  "version": 1,
  "results": {},
  "valid": true
}
Here is an example response body for an instance when an input value is invalid:
{
  "moduleId": "052209DE-DF4D-6D44-B469-9094AC95F18E",
  "stepId": "test_all_types",
  "version": 1,
  "results": {
    "in_integer ": "Integer value expected but found 0.9997."
  },
  "valid": false
}
The second POST method executes a step. This method creates the output from executing a step on the provided input values. The request body contains the input values. The response body contains the results as output values. This POST method has a request URL of POST http://www.example.com/SASMicroAnalyticService/rest/modules/{moduleId}/steps/{stepId} .
Here are the HTTP response codes:
200
OK
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not found
500
Server error.
Note: These are the most common HTTP response codes. You should be prepared to handle all valid HTTP response codes, including 3xx redirection response codes.
One situation that causes a 403 code to be returned is when the POST is initiated from an untrusted site.
Here is an example of the JSON request:
{
  "inputs": [
    {
      "name": "in_string",
      "value": "This is a test..."
    },
    {
      "name": "in_bigint",
      "value": 987654321
    },
    {
      "name": "in_int",
      "value": 7654321
    },
    {
      "name": "in_double ",
      "value": 0.9997
    }
  ]
}
This operation accepts the following media type representations by setting the Content-Type: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module.step.input+json
This operation returns the following media type representations by setting the Accept: header of the request:
  • application/json
  • application/vnd.sas.microanalytic.module.step.output+json
This operation might return the following media types for failure:
application/vnd.sas.microanalytic.module.step.input.validity+json
This media type is returned when the input is invalid.
application/vnd.sas.error
This media type is returned when there is problem executing the step.
Here is an example of the JSON response:
{
  "moduleId": "0BCA724F-53D7-3540-8A62-4E2731D69813",
  "stepId": "test_all_types",
  "output": [
    {
      "name": "out_string",
      "value": "This is a test..."
    },
    {
      "name": "out_bigint",
      "value": 987654321
    },
    {
      "name": "out_int",
      "value": 7654321
    },
    {
      "name": "out_double",
      "value": 0.9997
    },
    {
      "name": "string_arr",
      "value": [
        "This is a test...",
        "This is a test...",
        "This is a test..."
      ]
    },
    {
      "name": "bigint_arr",
      "value": [
        987654321,
        987654321,
        987654321
      ]
    },
    {
      "name": "int_arr",
      "value": [
        7654321,
        7654321,
        7654321
      ]
    },
    {
      "name": "double_arr",
      "value": [
        0.9997,
        0.9997,
        0.9997
      ]
    }
  ],
  "version": 1
}
Here is an example response body for the instances when the input is invalid:
{
  "moduleId": "0BCA724F-53D7-3540-8A62-4E2731D69813",
  "stepId": "test_all_types",
  "version": 1,
  "results": {
    "in_double ": "Integer value expected but found 0.9997."
  },
  "valid": false
}
Here is an example error response:
{  
   "errorCode":-1958744015,
   "message":"Step ID echo_arrays failed to execute.",
   "details":[  
      "Method not found."
   ],
   "remediation":"",
   "links":[],
   "version":1,
   "httpStatusCode":400
}