Representations

Representations, or media types, are a standard of describing the format of content on the Internet. The SAS Federation Server Data 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 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.

The following is a list of representations that are available in the SAS Federation Server Data REST API. For a complete list of representations use WADL.

Representation application/json

Here is an example of this JSON representation:


Representation application/xml

Here is an example of this XML representation:


Representation application/vnd.sas.federation.server+json;version=1

Representation version: 1 (deprecated)

This media type is a JSON structure that represents a server.

Attributes

name (String)

is the URI path element and reference name. It should not contain any special characters such as &, ?, and $.

description (String)

is the description of the server.

hostname (String)

is the host name of the server.

port (Integer, non-negative)

is the port that is used to access the server.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.server+xml;version=1

Representation version: 1 (deprecated)

This media type is an XML structure that represents a server.

Attributes

See the previous JSON representation.

Here is an example of this XML representation:


Representation application/vnd.sas.federation.server+json

Representation version: 2

This media type is a JSON structure that represents a server.

Attributes

name (String)

is the URI path element and reference name. It should not contain any special characters such as &, ?, and $.

description (String)

is the description of the server.

hostname (String)

is the host name of the server.

port (Integer, non-negative)

is the port that is used to access the server.

id (String)

is an ID of the SAS Federation Server.

authenticationType (String)

is the Authentication type of the SAS Federation Server. authenticationType can be set to none, userPassword, prompt and authenticationToken.

authenticationDomain (String)

is the authentication domain of the SAS Federation Server.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.server+xml

Representation version: 2

This media type is an XML structure that represents a server.

Attributes

See the previous JSON representation.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.datasource+json

Representation version: 1

This media type is a JSON structure that represents a DSN or data source.

Attributes

name (String)

is the display and access name for the data source used to access a data service defined in SAS Federation Server.

description (String)

is the description of the data source or DSN.

ownerId (Integer)

is the user identity, as defined in SAS Federation Server, who created or owns this data source definition.

ownerType (String (1))

is the security owner type of permission.

serviceName (String)

is the name of the data service defined on the SAS Federation Server. The name and serviceName usually match, but not always. name is used exclusively in this API. To access data, the administrator must create and configure data services for SAS Federation Server. Data services contain connection information and driver specifics to connect with data sources such as Oracle or Base SAS data sets. The user connects to a data service through a data source name (DSN), which is the name attribute. For administrative actions requiring a data service, serviceName is used.

type (String)

is the type of data source you are connecting to. Possible values are: connect, grouping, noprompt, and file. Almost all usages will be connect for single DSN, or grouping for federated DSNs.

format (String)

is the content format of the data source. Must be a standard driver connection string. Future values might include XML (file DSN XML content).

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.datasource+xml

Representation version: 1

This media type is an XML structure that represents a DSN or data source.

Attributes

See the previous JSON representation.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.catalog+json

Representation version: 1

This media type is a JSON structure that represents a database catalog.

Attributes

name (String)

is the display and access name for the database catalog.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.catalog+xml

Representation version: 1

This media type is an XML structure that represents a database catalog.

Attributes

See the previous JSON representation.

Here is an example of this XML representation:


Representation application/vnd.sas.federation.schema+json

Representation version: 1

This media type is a JSON structure that represents a database schema.

Attributes

name (String)

is the display and access name for the database schema.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.schema+xml

Representation version: 1

This media type is an XML structure that represents a database schema.

Attributes:

See the previous JSON representation.

Here is an example of this XML representation:


Representation application/vnd.sas.federation.table+json

Representation version: 1

This media type is a JSON structure that represents a database table.

Attributes

name (String)

s the URI path element and reference name. This should not contain special characters such as &, ?, and $.

rowCount (Integer)

is the number of rows in this table.

schema (String)

is the schema this table is contained in. See application/vnd.sas.federation.table.info+json.

catalog (String)

is the catalog that contains this table and its schema. See application/vnd.sas.federation.table.info+json.

tableMetadata (Object)

is the metadata representation of the table. See application/vnd.sas.federation.table.meta+json.

rows (List)

is the data of the table itself. See application/vnd.sas.federation.table.data+json.

column (Object)

is the JDBC object serialized into JSON. The XML object type information follows the SQL-to-JDBC mapping and then follows the object-to-primitive data types in XML, as specified in this W3C recommendation: http://www.w3.org/TR/xmlschema-2/#built-in-primitive-datatypes. The missing value is handled in JSON as a (null) value and in XML as <column xsi:nil="true"/>.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.table+xml

Representation version: 1

This media type is an XML structure that represents a database table.

Attributes

See the previous JSON representation.

Here is an example of this XML representation:


Representation application/vnd.sas.federation.table.info+json

Representation version: 1

This media type is a JSON structure that represents a database table in summary.

Attributes

name (String)

is the URI path element and reference name. This should not contain special characters such as &, ?, or $.

schema (String)

is the schema that contains this table.

catalog (String)

is the catalog that contains this table and associated schema.

type (String)

specifies whether the data is a table or a view. Typical types are "table", "view", "system table", "global temporary", "local temporary", "alias", "synonym", or " " empty for not specified.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.table.info+xml

Representation version: 1

This media type is an XML structure that represents a database table in summary.

Attributes

See the previous JSON representation.

Here is an example of this XML representation:


Representation application/vnd.sas.federation.table.meta+json

Representation version: 1

This media type is a JSON structure that represents metadata for a database table.

Attributes

name (String)

is the name of this column.

label (String)

is the designated column's suggested title for use in printouts and displays.

schemaName (String)

is the designated column's table's schema.

tableName (String)

is the designated column's table name. This will be missing or empty for computed columns.

count (Integer)

is the number of columns in the table.

columns (List)

is the list of columnMetadata objects contained in the table.

columnMetadata (Object)

is the metadata information about the column. See application/vnd.sas.federation.column.meta for additional information about column metadata.

Here is an example of this JSON representation:



Representation application/vnd.sas.federation.table.meta+xml

Representation version: 1

This media type is an XML structure that represents database table metadata information.

Attributes

See the previous JSON representation.


Representation application/vnd.sas.federation.table.data+json

Representation version: 1

This media type is a JSON structure that represents database table data.

Attributes

count (Integer and is optional)

is the number of rows contained in this set of rows.

rows (List)

is the set of rows in the data.

row (Object)

is the collection of the columns in the row. This includes the index in the current table view.

column (Object)

is the value of the column. This can be typed and should include the type information needed. The column value is the JDBC object serialized into JSON. The XML object type information will follow the SQL to JDBC mapping and then follow the Object to primitive data types in XML, as specified in this W3C recommendation: http://www.w3.org/TR/xmlschema-2/#built-in-primitive-datatypes. The missing value is handled in JSON as a (null) value and in XML as <column xsi:nil="true"/>.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.table.data+xml

Representation version: 1

This media type is an XML structure that represents database table data.

Attributes

See the previous JSON representation.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.column+json

Representation version: 1

This media type is a JSON structure that represents database column data.

Attributes

displaySize (Integer)

is the designated column's normal maximum width in characters.

label (String)

is the display name of this column.

name (String)

is the name of this column to use in all requests and usages.

schemaName (String)

is the name of the schema that this columns table resides in.

tableName (String)

is the name of the table this column belongs to.

typeName (string)

is the SQL type name of this column.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.column+xml

Representation version: 1

This media type is an XML structure that represents database column data.

Attributes

See the previous JSON representation.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.column.meta+json

Representation version: 1

This media type is a JSON structure that represents a database column metadata.

Attributes

displaySize (Integer)

indicates the designated column's normal maximum width in characters.

index (Long)

is the index or location of the column in the returned value.

autoIncrement (Boolean)

indicates whether the designated column is automatically numbered.

caseSensitive (Boolean)

indicates whether a column's case matters.

currency (Boolean)

indicates whether the designated column is a cash value.

definitelyWritable (Boolean)

indicates whether a write on the designated column will definitely succeed.

nullable (Integer 1 or 0)

indicates the null-ability of values in the designated column.

readOnly (Boolean)

indicates whether the designated column is definitely not writable.

searchable (Boolean)

indicates whether the designated column can be used in a WHERE clause.

signed (Boolean)

indicates whether values in the designated column are signed numbers.

writeable (Boolean)

indicates whether it is possible for a write on the designated column to succeed.

precision (Integer)

is the designated column's specified column size. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime data types, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. 0 is returned for data types where the column size is not applicable.

scale (Integer)

is the designated column's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.column.meta+xml

Representation version: 1

This media type is an XML structure that represents database column metadata.

Attributes

See the previous JSON representation.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.result+json

Representation version: 1

This media type is a JSON structure that represents a result from a query.

Attributes

failure (Boolean)

indicates whether there was a failure executing this query. If true (yes), you need to look at returnCode and errorMessage.

returnCode (Integer)

is the return value from execution.

resultItems (List)

is the set of results for all operations.

resultItem (Object)

is the result from a single operation. This should include the rowCount to denote the number of returned rows.

resultItemData (Object)

is the result data information. This is analogous to a table or view of data.

resultItemMetadata (Object)

is the same as table metadata. See application/vnd.sas.federation.table.meta+xml.

resultItemColumnMetadata (Object)

is the column metadata for an individual column returned in the result item.

rows (List)

is the data rows returned from the query.

statement (String)

is the query statement this result is based on.

Here is an example of this JSON representation:


Representation application/vnd.sas.federation.result+xml

Representation version: 1

This media type is a JSON structure that represents a query result.

Attributes

See the previous JSON representation.

Here is an example of this JSON representation:



Representation application/vnd.sas.error+json

Representation version: 1

This media type is a JSON structure that represents an error in the action or operation.

Attributes

error (Object)

is the containing type of the error.

errorCode (String)

is the system error code for reference.

httpStatusCode (String)

is the http status code error number.

details (String)

is the information provided specific to this error type.

message (String)

is the back-end system error message in raw format.

remediation (Object/String)

are recommended actions to resolve the error.

version (Integer)

is the version information for this error format.

Here is an example of this JSON representation:


Representation application/vnd.sas.error+xml

Representation version: 1

This media type represents is an XML structure that represents an error in the action or operation.

Attributes

See the previous JSON representation.

Here is an example of this XML representation: