Representations (Media Types)

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

Externally-defined media types

Externally-defined media types include the following:

An example of the selection application is shown below:

{

"type" : "id",

"resources" : { "12345678", "87654321" }

}

application/vnd.sas.business.data.term.summary

The application/vnd.sas.business.data.term.summary media type is a summary of a term that is appropriate to be used in lists of terms.

Link relations

Link relations
Rel HTTP Method Description
self GET

A self link to get the full term
URI:
/SASBusinessDataNetwork/rest/terms/{termId}
Type:
application/vnd.sas.business.data.term

up GET

A link to the collection of resources that contains this resource. In other words, this link will represent the link used to get the collection of summary term objects. The URI depends on how the collection was retrieved.
URI:
/SASBusinessDataNetwork/rest/...
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.summary

type GET

A link to the term's type
URI:
/SASBusinessDataNetwork/rest/types/{typeId}
Type:
application/vnd.sas.business.data.term

parent GET

A link to the term's parent term. If the term does not have a parent, this link will not be present.
URI:
/SASBusinessDataNetwork/rest/terms/{parentId}
Type:
application/vnd.sas.business.data.term

children GET

A link to this term's children
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/children
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.summary

isTermRelatedToTag HEAD

A link to check to see if the term is related to the tag. Only present if the representation was retrieved in a tag's collection of terms.
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}/terms/{termId}

getTermRelatedToTag GET

A link to get the term related to the tag. Only present if the representation was retrieved in a tag's collection of terms.
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}/terms/{termId}
Type:
application/vnd.sas.business.data.term.summary

removeTermFromTag DELETE

A link to remove the term from the specified tag's collection of terms. Only present if the representation was retrieved in a tag's collection of terms. The term itself is not deleted; only the relationship is deleted.
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}/terms/{termId}

Members

This media type contains the following members:

Members
Rel Type Description
version integer This media type's schema version number. This representation is version 1.
id string The unique identifier of the term
parentId string The ID of the parent term. A value of "none" indicates the term has no parent (i.e. the term is a root term).
revision string The current revision of the term. A value of "5.2" would indicate that the term has been published five times and currently has two draft versions. If the draft revision was then published, the current revision of the term would be "6.0."
typeId string The ID of the term's type
type string

The name of the term's type

name string The term's name
state string The term's state. The term's state can be "normal" or "deleting". "deleting" indicates that the term is in the process of being deleted in a "delete" workflow.
description string The term's description
status string The term's status which is the label on one of the status values defined in the term's type. These values are entered by users and can vary per type. Examples from the default type include "Editing," "Under Review," and "Published."
importance string The term's importance which is the label on one of the importance values defined in the term's type. These values are entered by users and can vary per type. Examples from the default type include "Critical," "High," and "Low."
modifiedBy string

User ID of user to last modify the term last. The user id can be used with the identities service to get the name of the user.

modifiedTimeStamp string

Date and time the term was last modified. String format is W3C standard in GMT (yyyy-mm-ddThh:mm:ss.SSSZ).

lockedBy string User ID of the user who locked the term. The user id can be used with the identities service to get the name of the user. If the term is not locked, this member will not be present.
lockedTimeStamp string

Date and time the term was locked. String format is W3C standard in GMT (yyyy-mm-ddThh:mm:ss.SSSZ). If the term is not locked, this member will not be present.

links list of link objects Zero or more links to related resources or operations. See the above link relations table for a description of the link types.

application/vnd.sas.business.data.term.relationship

The application/vnd.sas.business.data.term.relationship media type is a summary of a related term and its relationship that is appropriate to be used in a collection of related terms. It is the same as summary term media type (application/vnd.sas.business.data.term.summary). except it has a label added to the members. The label is used to describe the relationship between the two terms.

Link relations

All of the links specified in application/vnd.sas.business.data.term.summary with the subtraction of the "self" link and the addition of the following.

[Link relations]
Rel HTTP Method Description
self GET

Gets the relationship between the two terms.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/{relatedTermId}
Type:
application/vnd.sas.business.data.term.relationship

updateRelationship PUT

Updates the term relationship (i.e. the label on the relationship)
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/{relatedTermId}
Type:
application/vnd.sas.business.data.term.relationship

removeRelationship DELETE

Removes the relationships between the two terms.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/{relatedTermId}

Members

This media type contains the following members in addition to the members in application/vnd.sas.business.data.term.summary:

Members
Rel Type Description
label string The label the user added to the relationship between two terms. This member will not be present if the user did not add a label.

application/vnd.sas.business.data.term

The application/vnd.sas.business.data.term media type represents a term.

Link relations

These are the links in addition to the links from application/vnd.sas.business.data.term.summary. The "up" link is not included.

Link relations
Rel HTTP Method Description
alternate GET

Gets the summary version of the term
URI:
/SASBusinessDataNetwork/rest/terms/{termId}
Type:
application/vnd.sas.business.data.term.summary

update PUT

Updates the term
URI:
/SASBusinessDataNetwork/rest/terms/{termId}
Type:
application/vnd.sas.business.data.term

delete DELETE

Deletes the term
URI:
/SASBusinessDataNetwork/rest/terms/{termId}

state GET

Gets the term's state. Valid values are "normal" and "deleting." "deleting" indicates that the term is in a delete workflow.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/state
Type:
text/plain

abortDelete PUT

Aborts the delete of the term that is in a delete workflow. There is no request body and the response body is text/plain. This link is present only if the term's state is "deleting."
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/state?value=normal&workflowKey={workflowKey}

name GET

Gets the term's name.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/name
Type:
text/plain

rename PUT

Renames the term. The name may not be greater than 100 characters. The name must be unique, case sensitive, within the parent term's name space
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/name?value={newName}

parentId GET

Gets the term's parent's ID. If a term does not have a parent, "none" is returned.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/parentId
Type:
text/plain

reparent PUT

Changes a term's parent. To make a term a root (unparented) term, specify a value of "none." If a parent is specified, it must exist. The term's name must be unique within its new parent's namespace.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/parentId?value={parentId}

revisions GET

A link to this term's revisions
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/revisions
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.revision.summary

drafts GET

A link to this term's drafts. If the term does not have any draft revisions.
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.revision.summary

tags GET

A link to this term's tags
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/tags
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.tag

relatedTerms GET

A link to this term's relatedTerms
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.relationship

comments GET

A link to this term's comments
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/comments
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.comments

contacts GET

A link to this term's contacts
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/contacts
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.contact

Members

This media type contains all of the members from application/vnd.sas.business.data.term.summary in addition to the following members:

Members
Rel Type Description
resourceId string The ID of the term resource in the relationships service
requirements string The term's requirements
attributes list of attributes

A list of the term's attribute values. Each attribute may contain these members:

label 
the attribute's label (string). It must be unique.
value 
the attribute's value (string). For multi select attribute, the values will be separated by a comma followed by a space (ex. "one, two, three").
customAttributes list of attributes

A list of the term's custom attribute values. This member is included for backwards compatibility only and its use should be avoided. Each custom attribute may contain these members:

label 
the attribute's label (string). It must be unique.
value 
the attribute's value (string)
references list of references

A list of the term's references. Each reference will contain these members:

id 
the reference's ID (string)
description 
a description of the reference
label 
the reference's label (string)
value 
the reference's URL (string)
associatedItems list of associated items

A list of the term's associated item. Each associated item may contain these members:

id 
The ID of the item's association to the term (integer)
itemId 
The associated item's ID (string)
name 
The associated item's name (string)
description 
The associated item's description (string)
type 
The associated item's type (string)
note 
A note about the relationship with the associated item (string)

application/vnd.sas.business.data.term.revision.summary

The application/vnd.sas.business.data.term.revision.summary media type is a summary of a term's revision. The collection of revisions represents the history of the term.

Link relations

Link relations
Rel HTTP Method Description
self GET

A self link to get the full term revision
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{revisionId}
Type:
application/vnd.sas.business.data.term.revision

up GET

A link to the term's revisions
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/revisions
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.revision.summary

Members

This media type contains the following members:

Members
Rel Type Description
version integer This media type's schema version number. This representation is version 1.
id string The unique identifier of the term's revision
revision string

The term's revision (for example: "3.0", "0.2", "1.4")

state string

The state of the revision. The state can either be "draft" or "published."

createdBy string

The user ID of the user that created the term's revision. This ID can be used with the identity service to get information such as the user's name.

creationTimeStamp string

The date and time the revision was created. String format is W3C standard in GMT (yyyy-mm-ddThh:mm:ss.SSSZ).

revisionDescription string A description of the changes made in this revision
termId string The unique identifier of the term
links list of link objects Zero or more links to related resources or operations. See the above link relations table for a description of the link types.

application/vnd.sas.business.data.term.revision

The application/vnd.sas.business.data.term.revision media type is a revision of a term. It contains all the members from the summary revision media type for identification purposes as well as several members from the application/vnd.sas.business.data.term media type. The members from the term media type represent the contents of the term in that revision.

Link relations

Link relations
Rel HTTP Method Description
self GET

A self link
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{"revisionId"}
Type:
application/vnd.sas.business.data.term.revision

alternate GET

A self link to get the summary term revision
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{"revisionId"}
Type:
application/vnd.sas.business.data.term.revision.summary

state GET

A link to get the revision's state.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{revisionId}/state
Type:
text/plain

publish PUT

A link to publish the revision. There is no request body and the response body is text/plain. This link is present only on the last draft revision.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{revisionId}/state?value=published
Type:
string

term GET

A link to get the term.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}
Type:
application/vnd.sas.business.data.term

Members

This media type contains the members from the application/vnd.sas.business.data.term.revision.summary media type as well as:

 

Members
Rel Type Description
description string The term's description
requirements string The term's requirements
status string The term's status which is the label on one of the status values defined in the term's type. These values are entered by users and can vary per type. Examples from the default type include "Editing", "Under Review", and "Published."
importance string The term's importance which is the label on one of the importance values defined in the term's type. These values are entered by users and can vary per type. Examples from the default type include "Critical", "High", and "Low."
attributes list of attributes

A list of the term's attribute values. Each attribute may contain these members:

label 
the attribute's label (string). It must be unique.
value 
the attribute's value (string). For multi select attribute, the values will be separated by a comma followed by a space (ex. "one, two, three").
customAttributes list of attributes

A list of the term's custom attribute values. This member is included for backwards compatibility only and its use should be avoided. Each custom attribute may contain these members:

label 
the attribute's label (string). It must be unique.
value 
the attribute's value (string)
     
references list of references

A list of the term's references. Each reference will contain these members:

id 
the reference's ID (string)
description 
a description of the reference
label 
the reference's label (string)
value 
the reference's URL (string)
associatedItems list of associated items

A list of the term's associated items. Each associated item may contain these members:

id 
The ID of the item's association to the term (integer)
itemId 
The associated item's ID (string)
name 
The associated item's name (string)
description 
The associated item's description (string)
type 
The associated item's type (string)
note 
A note about the relationship with the associated item (string)

application/vnd.sas.business.data.tag

The application/vnd.sas.business.data.tag media type represents a tag.

Link relations

Link relations
Rel HTTP Method Description
self GET

A self link
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}
Type:
application/vnd.sas.business.data.tag

update PUT

Updates the tag
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}
Type:
application/vnd.sas.business.data.tag

delete DELETE

Deletes the tag
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}

terms GET

A link to this tag's terms
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}/terms
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.summary

up GET

A link to the tag's containing collection. If the tag was not retrieved as part of a collection, this link will not be present.
URI:
/SASBusinessDataNetwork/rest/... The actual URI is the URI of the collection of tags of which this tag is a member.
Type:
application/vnd.sas.collection

isTagRelatedToTerm HEAD

A link to check to see if the term is related to the tag. Only present if the representation was retrieved in a term's collection of tags.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/tags/{tagId}

getTagRelatedToTerm GET

A link to get the tag related to the term. Only present if the representation was retrieved in a term's collection of tags. If the tag is not related to the term, a 404 (Not Found) is returned.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/tags/{tagId}
Type:
application/vnd.sas.business.data.term.summary

removeTagFromTerm DELETE

A link to remove the tag from the specified term's collection of tags. Only present if the representation was retrieved in a term's collection of tags. The tag itself is not deleted; only the relationship is deleted.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/tags/{tagId}

Members

This media type contains the following members:

Members
Name Type Description
version integer This media type's schema version number. This representation is version 1.
id string The tag's ID
resourceId string

The ID of the term resource in the relationships service

name string

The tag's name

links list of link objects Zero or more links to related resources or operations. See the above link relations table for a description of the link types.

application/vnd.sas.business.data.comment

The application/vnd.sas.business.data.comment media type represents a term's comment.

Link relations

Link relations
Rel HTTP Method Description
self GET

A self linkURI:
/SASBusinessDataNetwork/rest/terms/{termId}/comments/{commentId}
Type:
application/vnd.sas.business.data.comment

update PUT

Updates the comment

URI:
/SASBusinessDataNetwork/rest/terms/{termId}/comments/{commentId}
Type:
application/vnd.sas.business.data.comment

delete DELETE

Deletes the comment
URI:
/SASBusinessDataNetwork/rest/terms/{termId/comments/{commentId}

up GET

A link to the term's comments
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/comments
Type:
application/vnd.sas.collection

Members

This media type contains the following members:

Members
Name Type Description
version integer This media type's schema version number. This representation is version 1.
id string The comment's ID
userId string

The user ID of the last user to update the comment

creationTimeStamp string

The date and time the comment was created. String format is W3C standard in GMT (yyyy-mm-ddThh:mm:ss.SSSZ).

 

text string The comment's text
links list of link objects Zero or more links to related resources or operations. See the above link relations table for a description of the link types.

application/vnd.sas.business.data.contact

The application/vnd.sas.business.data.contact media type represents a term's contact. A contact is really a combination of a user and the user's business role for the term. The business roles are defined as part of a term's type.

Link relations

Link relations
Rel HTTP Method Description
up GET

A link to the term's contacts
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/contacts
Type:
application/vnd.sas.collection

delete DELETE

A link to delete the term's contact
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/contacts?userId={userId}&businessRoleId={businessRoleId}

Members

This media type contains the following members:

Members
Name Type Description
version integer This media type's schema version number. This representation is version 1.
user object

The user that is a contact for the term. The user is a user obtained from the Identities service.

The user contains these members:

id 
The user's ID
name 
The user's name
businessRole object

The business role that the specified user has for the term. Business roles are defined in the term's type. The business role contains the following members:

id 
The business role's ID
name 
The business role's name

application/vnd.sas.business.data.term.type

The application/vnd.sas.business.data.term.type represents a term type.

Link relations

Link relations
Rel HTTP Method Description
self GET

A self link
URI:
/SASBusinessDataNetwork/rest/types/{typeId}
Type:
application/vnd.sas.business.data.type

up GET

Gets the collection of types. If the type was not retrieved as part of a collection, this link will not be present.
URI:
/SASBusinessDataNetwork/rest/types
Type:
application/vnd.sas.collection

terms GET

A link to all the terms of this type
URI:
/SASBusinessDataNetwork/rest/types/{typeId}/terms
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.summary

Members

Members
Name Type Description
id string The type's ID
name string

The type's name

description string

The type's description

modifiedBy string The user id that was last used to modified the type
modificationTimeStamp string

The time stamp of the last modification of the type. String format is W3C standard in GMT (yyyy-mm-ddThh:mm:ss.SSSZ).

state string The type's state. Current values are "enabled" and "disabled."
statusValues list of status values

A list of the possible values for status. Each status value contains the following members:

id 
The value's ID (integer)
label 
The value's display label (string)
color 
The color displayed for this status value (string). The valid values are "gray", "blue", "green", "yellow", "orange", "red", and "purple."
importanceValues list of importance values

A list of the possible values for importance. Each importance value contains the following members:

id 
The value's ID (integer)
label 
The value's display label (string)
stars
The number of stars displayed for this importance value (integer). The valid values are 0, 1, 2, 3, 4, and 5.
attributes list of user defined attributes

A list of the user defined attributes for the type. Each attribute contains the following members:

id 
The value's ID (integer)
label 
The value's display label (string)
renderer 
The renderer used to display and edit this attribute. The renderer values are "singleSelectList", "multiSelectList", "singleLineText", "multiLineText", "boolean," "date," "richText," and "url."
values 
The possible values for a single select or multi select attribute. If the renderer type is "singleSelectList" or "multiSelectList", values will be present. Otherwise, it will not be present.

Each value in the values list will have the following members:

id 
The value's ID (integer)
label 
The value's display label (string)
links list of link objects Zero or more links to related resources or operations. See the above link relations table for a description of the link types.

application/vnd.sas.business.data.snapshot

The application/vnd.sas.business.data.snapshot media type is a description of a snapshot.

Link relations

Link relations
Rel HTTP Method Description
self GET

A self link
URI:
/SASBusinessDataNetwork/rest/snapshots/{snapshotId}
Type:
application/vnd.sas.business.data.snapshot

up GET

A link to the collection of snapshots that contains this snapshot.
URI:
/SASBusinessDataNetwork/rest/snapshots
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.snapshot

update PUT

Updates a snapshot. Only the snapshot's name and description can be updated.
URI:
/SASBusinessDataNetwork/rest/snapshots/{snapshotId}
Type:
application/vnd.sas.business.data.snapshot

delete DELETE

Deletes a snapshot.
URI:
/SASBusinessDataNetwork/rest/snapshots/{snapshotId}

Members

This media type contains the following members:

Members
Name Type Description
version integer This media type's schema version number. This representation is version 1.
id string The unique identifier of the snapshot
name string

The snapshot's name

description string The snapshot's description
createdBy string

User ID of user that created the snapshot. The user ID can be used with the identities service to get the name of the user.

creationTimeStamp string

Date and time the snapshot was created. String format is W3C standard in GMT (yyyy-mm-ddThh:mm:ss.SSSZ).

modifiedBy string User ID of user to last modify the snapshot. The user ID can be used with the identities service to get the name of the user.
modifiedTimeStamp string

Date and time the snapshot was last modified. String format is W3C standard in GMT (yyyy-mm-ddThh:mm:ss.SSSZ).

schema string Name of the schema that contains the snapshot
links list of link objects Zero or more links to related resources or operations. See the above link relations table for a description of the link types.