RESTful plain XML endpoints
are available from the server resource
/SASBIWS/rest/
.
When accessing endpoints for stored processes, append the SAS folder
path for the stored process to the resource
/SASBIWS/rest/storedProcesses/
(for
example,
/SASBIWS/rest/storedProcesses/stored/process/path
).
Generated web services have a unique name and contain either a single
or multiple named stored processes. To access the RESTful plain XML
endpoint for generated web services, append the generated web service
name to the resource
/SASBIWS/rest/
(for
example,
/SASBIWS/rest/generatedServiceName
).
Because generated web services can contain multiple stored processes,
you need to identify which stored process that you want to invoke.
You can do this in one of two ways:
-
Use the stored process name as
the payload root in your request message (assuming that the message
is an HTTP POST). In this case, the input XML is very similar to the
SOAP input XML.
-
Append the stored process name
(omitting any spaces) to the resource /SASBIWS/rest/generatedServiceName
(for
example, /SASBIWS/rest/generatedServiceName/storedProcessName
).
For both generated and
stored process web services, you can tell SAS BI Web Services that
you are interested only in a single specific aspect of the stored
process output. You can do this by accessing the web service at a
specific URL. When you do this, the web service returns only that
specific output resource. Output parameters, output streams (also
called data targets), and packages are all supported output resources.
To access a specific
output parameter, append the resource /outputParameters/parameterName
to
the RESTful URL for your web service, replacing parameterName with
the name of the actual parameter. When you access the /outputParameters/
resource
of a RESTful web service, the HTTP response body contains only the
string value of that parameter and no additional XML.
To access a specific
output stream, append the resource /dataTargets/streamName
to
the RESTful URL for your web service, replacing streamName with
the name of the actual stream. When you access the /dataTargets/
resource
of a RESTful web service, the HTTP response is the exact output that
your stored process sends to that stream and the HTTP response headers
include an appropriate content type if it is available.
A stored process can
produce an output package during execution that can contain any number
of entries. You can access an individual entry within a package by
appending the resource /packageEntries/entryNum
to
the RESTful URL for your web service, replacing entryNum with
the index of the package entry. Entries in packages are not always
named, so you must use the package entry index. The index starts at
0 for the first entry in the package.
You cannot access more
than one output resource at a time by appending multiple
/outputParameters/
,
/dataTargets/
,
and
/packageEntries/
resources. You
can use only one at a time. You use this URL resource form whether
invoking a service with an HTTP GET (when no input parameters or streams
are required) or HTTP POST (when sending input prompt values or stream
values).
See Invoking RESTful Web Services for examples
that use various output parameter resources.