Resources

All GET methods also support HEAD with identical behavior except that no response body is returned.

REST APIs provide access to resources, or data entities, using URI paths. To use a REST API, a request is made using standard HTTP methods such as GET, PUT, POST, and DELETE. Representations are returned as a JSON or XML response accompanied by a status code. No authentication is required for these resources.

HTTP Methods

The primary HTTP verbs that are used in the SAS Business Data Network REST API are GET, PUT, POST, and DELETE. Here is a brief description.

GET is used to retrieve, or read, a representation of a resource. GET returns a representation in XML or JSON with a response code of 200 (OK) . If an error occurs, HTTP returns a status of 400 (Bad request), or 404 (Not found).

PUT is used to update a resource. HTTP returns a status 201 (Success) if the update is successful or a status 404 (Not found) if the resource could not be found. If an error occurs, HTTP returns a status of 400 (Bad request), or 404 (Not found).

POST is used for creation of new resources. On successful creation, HTTP returns a status of 200 (OK). If there is an error in the request, or HTTP returns status of 404 (Not found).

DELETE is used to delete a resource identified by a URI. On successful deletion, HTTP returns status 204 (Server Resource found and deleted). If the resource cannot be found, an HTTP status of 404 (Not Found) is returned.


Resource /

The / resource is the root resource that is used to get top-level links.

Methods

GET /: Get Links

Get Links returns the list of root level links. This resource supports the HEAD method as well.

Authentication required: false

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest

The request also supports the following request headers:

Accept

Indicate the media type of the response. This method supports the following media types:

Response

Returns the root level links as defined by application/vnd.sas.api.

Link relations
 

 

rel HTTP Method Description
self GET

Gets this list of links.
URI:
/SASBusinessDataNetwork/rest/
Type:
list of links

tags GET

Gets the collection of tags.
URI:
/SASBusinessDataNetwork/rest/tags
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.tag

createTag POST

Creates a tag.
URI:
/SASBusinessDataNetwork/rest/tags
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.tag

terms GET

Gets the collection of terms.
URI:
/SASBusinessDataNetwork/rest/terms
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.summary

createTerm POST

Creates a term.
URI:
/SASBusinessDataNetwork/rest/terms
Type:
application/vnd.sas.business.data.term

types GET

Gets the collection of types.
URI:
/SASBusinessDataNetwork/rest/types
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.term.type

snapshots GET

Gets the collection of snapshots.
URI:
/SASBusinessDataNetwork/rest/snapshots
Type:
application/vnd.sas.collection
Item type:
application/vnd.sas.business.data.snapshot

createSnapshot POST

Creates a snapshot.
URI:
/SASBusinessDataNetwork/rest/snapshot
Type:
application/vnd.sas.business.data.snapshot

HTTP response codes
200 
OK
Response media types

This operation can return the following media type representations by setting the Accept header of the request:

Indicate the media type of the response. This method supports the following media types:


Collection /tags

The /tags collection represents all tags.

Method

GET /tags: Get all tags

Get all the tags.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/tag

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

The request also support the following request headers:

Accept:
Indicate the media type of the response. This method supports the following media types:

Response

A collection of tags (application/vnd.sas.business.data.tag).

Link relations

In addition to the standard collection links (up, self, first, prev, next, and last), the tags collection will have the following links.

rel HTTP method Description
create POST

Creates a tag.
URI:
/SASBusinessDataNetwork/ rest/tags
Type:
application/vnd.sas.business.data.tag


HTTP response codes
200 
OK
400
Bad Request - the start or limit values are invalid
 
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST /tags: Create tag

Creates a tag with the specified name.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/tags

The request also support the following request headers:

Accept:
Indicate the media type of the response. This method supports the following media types:

This method accepts the following content types, as named by the Content-Type: header:

Only the name field will be used. Leading and trailing spaces will be trimmed from the name. If the name has already been used (case-sensitive) or if the name exceeds 50 characters, the creation will fail with a 400 - Bad Request.

Response

Returns the created tag.

Response Headers

ETag

The unique entity tag for this resource

Location

The location of this resource

HTTP response codes
201 
Created
400 
Bad Request - the name is already in use or is too long.
403 
Forbidden - the user does not have EditTags capability
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /tags/{tagId}

The /tags/{tagId} resource represents one tag.

URL parameters
Name Type Description
{tagId} String

The tag ID

Methods

GET /tags/{tagId}: Get Tag

Gets the tag. This resource also supports the HEAD method.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The tag.

Response Headers

ETag

The unique entity tag for this resource

HTTP response codes
200
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /tags/{tagId}: Update Tag

Updates the tag. Only the name of the tag can be updated.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}

Content types

This method accepts the following content types, as named by the Content-Type: header:

Only the name field will be used. Leading and trailing spaces will be trimmed from the name. If the name has already been used (case-sensitive) for a different tag or if the name exceeds 50 characters, the update will fail with a 400 - Bad Request.

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:
If-Match
The value of the ETag header, obtained from POST, GET, HEAD, or a previous PUT. If this header is missing, a 428 (Precondition Required) status is returned. If the value does not match the current ETag value, a 412 (Precondition failed) status is returned.

Response

The updated tag is returned.

Response Header

ETag

The unique entity tag for this resource

HTTP response codes
200 
OK
400 
Bad Request - the name has already been used (case-sensitive) for a different tag or the name exceeds 50 characters.
403 
Forbidden - the user does not have EditTags capability
404 
Not found
412 
Precondition failed (If-Match value does not match ETag)
428 
Precondition required (If-Match header is missing)
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /tags/{tagId}: Delete Tag

Deletes the tag.

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}

Response

None.

HTTP response codes
204 
No content (success)
403 
Forbidden - the user does not have the EditTags capability
404
Not Found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /tags/{tagId}/terms

The /tags/{tagId}/terms collection represents the collection of terms that have been associated to the tag.

URL parameters
Name Type Description
{tagId} string

The tag's ID

Methods

GET /tags/{tagId}/terms: Get Tag's Terms

Gets a tag's terms.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}/terms
Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The terms that have been associated to the tag represented as a collection of summary terms (application/vnd.sas.business.data.term.summary).

Link relations

In addition to the standard collection links (up, self, first, prev, next, and last), the tag's terms collection will have the following links.

relHTTP methodDescription
addTermsToTagPOST

Adds terms to the tag.
URI:
/SASBusinessDataNetwork /rest/tags/{tagId}/terms
Type:
vnd.sas.selection

removeTermsFromTagPOST

Removes terms from the tag.
URI:
/SASBusinessDataNetwork/rest/tags/{tagId}/terms/deletions
Type:
vnd.sas.selection

HTTP response codes
200 
OK
400
Bad Request - the start or limit values are invalid
404 
Not found
 
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST /tags/{tagId}/terms: Add Terms to Tag

Add relationships from the tag to one or more terms. If the tag is already related to the term, that term is ignored.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}/terms

Content types

This method accepts the following content types, as named by the Content-Type: header:

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

A map of tag IDs to error response objects. If the addition was successful, the error response object will be empty. Since this response creates multiple relationships, returning a LOCATION header is not appropriate.

HTTP response codes
200 
OK
403 
Forbidden - the user does not have EditTermsRelatedTags capability
404 
Not found - tag does not exist
 
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

 


Collection /tags/{tagId}/terms/deletions

The /tags/{tagId}/terms/deletions collection is used to support deleting relationships between the tag specified by tagId and multiple terms.

URL parameters
Name Type Description
{tagId} string

The tag's ID

Methods

POST /tags/{tagId}/terms/deletions: Remove Terms from Tag

Remove Terms from Tag removes the relationships between the tag and multiple terms. Only the relationships are removed. No terms are deleted. If a relationship between the tag and a specified term does not exist, the term is ignored.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}/terms/deletions

Content types

This method accepts the following content types, as named by the Content-Type: header:

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

A map of term IDs to error response objects. If the removal was successful, the error response object will be empty. Since this operation is a multi-POST for deletions, returning a LOCATION header is not appropriate.

HTTP response codes
200 
OK
403 
Forbidden - the user does not have EditTermsRelatedTags capability.
404 
Not found - the tag was not found.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /tags/{tagId}/terms/{termid}

The /tags/{tagId}/terms/{termId} resource represents the relationship between a term and tag.

URL parameters
Name Type Description
{tagId} string

The tag's ID

termId string

The term's ID

Methods

HEAD tags/{tagId}/terms/{termId}: Is Tag Related to Term?

Returns OK if there is a relationship between the tag and term. Both tag and term must exist.

Authentication required: true

Request

HEAD http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}/terms/{termId}

Response

HTTP response codes
200 
OK
404 
Not found - if there is no relationship between the specified tag and term
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

GET tags/{tagId}/terms/{termId}: Gets Term Related to Tag

Returns the term if there is a relationship between the tag and term.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}/terms/{termId}

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

HTTP response codes
200 
OK
404 
Not found - if there is no relationship between the specified term and tag
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /tags/{tagId}/terms/{termId}: Remove Term From Tag

Removes the relationship between the term and the tag. The term is not deleted. Both the tag specified by the tagId and the term specified by the termId must exist.

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/tags/{tagId}/terms/{termId}

Response

HTTP response codes
204 
No content (success)
403 
Forbidden - the user does not have EditTermsRelatedTags capability or does not have write permission on the term.
404 
Not found - if there is no relationship between the specified term and tag
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms

The /terms collection represents all terms.

Methods

GET /terms: Get All Terms

Get all terms as filtered by the query parameters. The collection returned is a collection of summary terms (application/vnd.sas.business.data.term.summary).

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

?includeParentedTerms boolean When false, only terms that have no parents are returned. The default value is true.
?type string Returns only terms of the type with the name specified
?typeId string Returns only terms of the type specified by the ID
?name string Returns only terms with the specified name
?nameContains string Returns only terms whose names contain the specified text
?search string Returns only terms that contain the search text in the term's name, status, importance, description, requirements, links, attributes, associated items, or comments
?status string Returns only terms that have the specified status. Multiple statuses may be specified in a comma delimited list surrounded by parentheses: (under review, editing, and published).
?importance string Returns only terms that have the specified importance. The importance value may be the label of the importance (ex: low) or the number of stars. Multiple importances may be specified in a comma delimited list surrounded by parentheses: (low, high, critical or 4, 5).
?contact string Returns only terms that have a contact with the specified user.

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

Returns a collection of summary terms (application/vnd.sas.business.data.term.summary) that match the specified query parameters

[Additional link relations]
rel HTTP method Description
create POST

Creates a term.
URI:
/SASBusinessDataNetwork/rest/terms
Type:
application/vnd.sas.business.data.term

HTTP response codes
200 
OK
400 
Bad Request - one of the request parameters were invalid
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST /terms: Create Term

Creates a term using the information supplied in the request body. The name of the term must be unique with in the scope of its parent term. The term is created as a draft. If the leaveAsDraft query parameter is true, the new term will be left in the draft state. If leaveAsDraft is false and the term's type has a create workflow template specified, a workflow instance is started for the term. Otherwise, the term is immediately published.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/terms

Query parameters
Name Type Description
?leaveAsDraft boolean

When true, the term is left in a draft state meaning no create workflow is started nor is the term published. False is the default value.

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

The following fields are used in creating the term:

Response

The newly created term resource is returned.

Response headers
ETag
The unique entity tag for this resource
Location
The location of this resource
HTTP response codes
201 
Created
400 
Bad Request - An invalid name, type, parentId, status, importance, or attribute will result in an invalid request.
403 
Forbidden - The user does not have EditTerms capability or does not have create children permission on the parent term.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}

The /terms/{termId} resource represents a term.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}: Get Term

Gets the specified term. HEAD is also supported for this resource.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

Gets the term.

Response headers
ETag
The unique entity tag for this resource
HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}: Update Term

Updates the specified term by creating a draft revision of the term. If the leaveAsDraft query parameter is true, the change is left in a draft state. If leaveAsDraft is false and the term's type has an edit workflow, an instance of the edit workflow is started. Otherwise, the new revision of the term is published.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}

Query parameters
Name Type Description
?leaveAsDraft boolean

When true, the term is left in a draft state meaning an edit workflow is not started nor is the update published. False is the default value.

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:
If-Match
The value of the ETag header, obtained from POST, GET, HEAD, or a previous PUT. If this header is missing, a 428 (Precondition Required) status is returned. If the value does not match the current ETag value, a 412 (Precondition failed) status is returned.

Content types

This method accepts the following content types, as named by the Content-Type: header:

The following fields are used in updating the term:

Response

The updated term is returned with updated revision and revision ID.

Response headers
ETag
The unique entity tag for this resource
HTTP response codes
200 
OK
403 
Forbidden - the user does not have EditTermContents capability or does not have write permission on the term.
404 
Not found
412 
Precondition failed (If-Match value does not match ETag)
428 
Precondition required (If-Match header is missing)
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /terms/{termId}: Delete Term

Deletes the term. If the term has never been published, the term is deleted. If the term's type does not have a delete workflow template specified, the term is deleted. If the type does have a workflow template specified and the term's state is "normal", a new delete workflow instance is started, the term's state is changed to "deleting", and a workflowKey is generated. If the term's state is "deleting" and the workflowKey matches the term's workflowKey, then the term is deleted. Otherwise, a bad request (400) response code is returned.

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}

Query parameters
Name Type Description
?workflowKey string

Key used to indicate that this request is from the delete workflow instance that was created

Response

HTTP response codes
202 
Accepted - a delete workflow was started
204 
No content - the term was deleted
400 
Bad request - a delete is pending on the term but the workflow key does not match.
403 
Forbidden - the user does not have EditTerms capability or delete permission on the term
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/children

The /terms/{termId}/children collection represents the term's child terms.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/children: Get Term's Children

Gets a term's child terms.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/children
Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The term's child terms represented as a collection of summary terms (application/vnd.sas.business.data.term.summary).

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

Collection /terms/{termId}/tags

The /terms/{termId}/tags collection represents the tags associated with the specified term.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/tags: Get Term's Tags

Gets a term's tags.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/tags
Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

A collection of the term's tags (application/vnd.sas.business.data.tag).

Link relations

In addition to the standard collection links (up, self, first, prev, next, and last), the term's tags collection will have the following links.

rel HTTP method Description
addTagsToTerm POST

Adds tags to the term. The selection contains tag ids.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/tags
Type:
application/vnd.sas.selection

removeTagsFromTerm POST

Removes tags from the term. The selection contains tag ids.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/tags/deletions
Type:
application/vnd.sas.selection

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST /terms/{termId}/tags: Add Tags to Term

Add relationships from the term to one or more tags. If the term is already related to the tag, that tag is ignored.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/tags

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

Response

A map of tag ids to error response objects. If the addition was successful, the error response object will be empty. Since this operation is a multi-POST, returning a LOCATION header is not appropriate.

HTTP response codes
200 
OK
403 
Forbidden - the user does not have EditTermsRelatedTags capability or write permission on the term
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/tags/deletions

The /terms/{termId}/tags/deletions collection is used to support deleting relationships between the term specified by termId and multiple tags.

[URL parameters]
Name Type Description
termId string

The term's ID

Methods

POST /terms/{termId}/tags/deletions: Remove Tags from Term

Remove Tags from Term removes the relationships between the term and multiple tags. Only the relationships are removed. No tags are deleted. If a relationship between the term and a specified tag does not exist, the tag is ignored.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/tags/deletions

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

Response

A map of tag ids to error response objects. If the removal was successful, the error response object will be empty. Since this operation is a multi-POST to deletions, returning a LOCATION header is not appropriate.

HTTP response codes
200 
OK
403 
Forbidden - the user does not have EditTermsRelatedTags capability or write permission on the term
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/tags/{tagId}

The /terms/{termId}/tags/{tagId} resource represents a relationship between a term and a tag.

URL parameters
Name Type Description
termId string

The term's ID

tagId string The tag's ID

Methods

HEAD terms/{termId}/tags/{tagId}: Is Term Related to Tag?

Returns OK if there is a relationship between the term and tag. Both term and tag must exist.

Authentication required: true

Request

HEAD http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/tags/{tagId}

Response

HTTP response codes
200 
OK
404
Not found - if there is no relationship between the specified term and tag
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

GET terms/{termId}/tags/{tagId}: Get Tag for Term

Returns the tag if there is a relationship between the term and tag.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/tags/{tagId}

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The tag

Response Headers
ETag
The unique entity tag for this resource
HTTP response codes
200 
OK
404 
Not found - if there is no relationship between the term and the tag.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /terms/{termId}/tags/{tagId}: Remove Tag From Term

Removes a tag from a term. Removing a tag from a term's collection of tags only deletes the relationship between the term and the tag.

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/tags/{tagId}

Response

HTTP response codes
204 
No content (success)
403 
Forbidden - The user does not have the EditTermsRelatedTags capability or write permission on the term.
404 
Not found - The term or tag does not exist.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/relatedTerms

The /terms/{termId}/relatedTerms collection represents the terms that are related to the specified term.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/relatedTerms: Get Term's Related Terms

Gets a term's related terms represented as a collection of term relationships (application/vnd.sas.business.data.term.relationship).

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The term's related terms represented as a collection of term relationships (application/vnd.sas.business.data.term.relationship).

Link relations

In addition to the standard collection links (up, self, first, prev, next, and last), the term's related terms collection will have the following links.

Name Type Description
addRelatedTermsToTerm POST

Adds related terms to the term.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms
Type:
application/vnd.sas.collection

removeRelatedTermsFromTerm POST

Removess related terms from the term.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/deletions
Type:
application/vnd.sas.selection

HTTP response codes
200 
OK
400 
Bad request - start or limit are invalid
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST terms/{termId}/relatedTerms: Add Related Terms to Term

Add relationships from the term to one or more terms. If a term is already related to the term, that term is ignored.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

Response

A map of term IDs to error response objects. If the addition was successful, the error response object will be empty. Since this operation is a multi-POST, returning a LOCATION header is not appropriate.

HTTP response codes
200 
OK
403 
Forbidden - The user does not have EditTermsRelatedTerms capability or write permission on the term.
404 
Not found - Term does not exist.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/relatedTerms/deletions

The /terms/{termId}/relatedTerms/deletions collection is used to support deleting relationships between the term specified by termId and multiple related terms.

URL parameters
Name Type Description
termId string

The term's ID

Methods

POST /terms/{termId}/relatedTerms/deletions: Remove Related Terms from Term

Remove Related Terms from Term removes the relationships between the term and multiple related terms. Only the relationships are removed. No related terms are deleted. If a relationship between the term and a specified related term does not exist, the related term is ignored.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/deletions

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

Response

A map of related term IDs to error response objects. If the removal was successful, the error response object will be empty. Since this operation is a multi-POST for deletions, returning a LOCATION header is not appropriate.

HTTP response codes
200 
OK
403 
Forbidden - The user does not have EditTermsRelatedTerms capability or write permission on the term.
404 
Not found - The term was not found.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/relatedTerms/{relatedTermId}

The /terms/{termId}/relatedTerms/{relatedTermId} resource represents the relationship between two terms.

URL parameters
Name Type Description
termId string

The term's ID

relatedTermId string The related term's ID

Methods

HEAD terms/{termId}/relatedTerms/{relatedTermId}: Is Term Related to the Related Term?

Returns OK if there is a relationship between the term and the related term. Both terms must exist.

Authentication required: true

Request

HEAD http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/{relatedTermId}

Response

HTTP response codes
200 
OK
404 
Not found -If there is no relationship between the specified term and related term
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

GET terms/{termId}/relatedTerms/{relatedTermId}: Get Related Term for Term

Returns the related term if there is a relationship between the term and the related term.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/{relatedTermId}

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The related term

Response Headers
ETag
The unique entity related term for this resource
HTTP response codes
200 
OK
404 
Not found - If there is no relationship between the specified term and related term
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}/relatedTerms/{relatedTermId}: Update Related Term of Term

Updates the label of the relationship between the related term and the term.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/{relatedTermId}

Content types

This method accepts the following content types, as named by the Content-Type: header:

Only the label field will be used.

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:
If-Match
The value of the ETag header, obtained from GET, HEAD, or a previous PUT.

Response

HTTP response codes
200 
OK
403 
Forbidden - The user does not have EditTermsRelatedTerms capability or write permission on the term.
404 
Not found - There is not relationship between the two terms
412 
Precondition failed (If-Match value does not match ETag)
428 
Precondition required (If-Match header is missing)
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /terms/{termId}/relatedTerms/{relatedTermId}: Remove Related Term from Term

Removes a related term from a term.

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/relatedTerms/{relatedTermId}

Response

HTTP response codes
204 
No content (success)
403 
Forbidden - The user does not have EditTermsRelatedTerms capability or write permission on the term.
404 
Not found - There is not a relationship between the two terms.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/comments

The /terms/{termId}/comments collection represents a term's comments.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/comments: Get Term's Comments

Gets a term's comments as a collection of comment resources.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/comments
Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The collection of the term's comments (application/vnd.sas.business.data.comment)

Link relations

In addition to the standard collection links (up, self, first, prev, next, and last), the term's comments collection will have the following links.

rel HTTP method Description
create POST

Adds a comment to the term.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/comments
Type:
text/plain

HTTP response codes
200 
OK
400 
Bad request - The start or limit parameters were invalid.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST /terms/{termId}/comments: Create Comment

Creates a comment for the term.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/comments

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

Response

The comment that was created

Response Headers
ETag
The unique entity tag for this resource
Location
The location of this resource
HTTP response codes
201 
Created
403 
Forbidden - The user does not have EditTermNotes capability or write permission on the term.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/comments/{commentId}

The /terms/{termId}/comments/{commentId} resource represents a term's comment resource.

URL parameters
Name Type Description
termId string

The term's ID

commentId string

The comment's ID

Methods

GET /terms/{termId}/comments/{commentId}: Get Comment

Gets a comment. This resource also supports the HEAD method.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/comments/{commentId}

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The comment

Response Headers
ETag
The unique entity tag for this resource
HTTP response codes
200 
OK
404 
Not found - Either the term or comment do not exist or the comment is not on the specified term.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}/comments/{commentId}: Update Comment

Updates the comment's text.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/comments/{commentId}

Content types

This method accepts the following content types, as named by the Content-Type: header:

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:
If-Match
The value of the ETag header, obtained from GET, HEAD, or a previous PUT.

Response

The updated comment is returned.

Response Headers
ETag
The unique entity tag for this resource
HTTP response codes
200 
OK
403 
Forbidden - The user does not have EditTermComments capability or does not have write permission on the term.
404 
Not found - Either the term or comment do not exist or the comment is not on the specified term.
412 
Precondition failed (If-Match value does not match ETag)
428 
Precondition required (If-Match header is missing)
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /terms/{termId}/comments/{commentId}: Delete Comment

Deletes the comment

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/comments/{commentId}

Response

HTTP response codes
204 
No content (success)
403 
Forbidden - The user does not have EditTermComments capability or does not have write permission on the term.
404 
Not found - Either the term or comment do not exist or the comment is not on the specified term.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/contacts

The /terms/{termId}/contacts collection represents the term's contacts.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/contacts: Get Term's Contacts

Gets a term's contacts

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/contacts

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Response

Returns a collection of contact information (application/vnd.sas.business.data.contact)

Link relations
 
rel HTTP method Description
create POST

Adds a contact to the term.
URI:
/SASBusinessDataNetwork/rest/terms/{termId}/contact
Type:
application/vnd.sas.business.data.contact

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST /terms/{termId}/contacts: Add Contact to Term

Adds a contact to the term.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/contacts

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

Only the user.id and businessRole.id are used. If a contact with the specified user and business role already exists, the request returns OK with out making any changes.

Response

HTTP response codes
201 
Created
400 
Bad request - the business role does not exist
403 
Forbidden - the user does not have EditTermContacts capability or does not have write permission on the term.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /terms/{termId}/contacts: Remove from Term's Contacts

Removes a contact from a term

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/contacts

Query parameters
Name Type Description
?userId string

The ID of the user in the contact. Required.

?businessRoleId string The ID of the user in the contact. Required.

Response

HTTP response codes
204 
No content (success)
200 
OK
403 
Forbidden - The user does not have EditTermComments capability or does not have write permission on the term.
404 
Not found - The term does not exist.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/status

The /terms/{termId}/status resource represents the current status of the specified term. This resource is intended to allow the workflows used by BDN to check and set a term's status. The values for status are user-defined values from the term's type.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/status: Get Term's Status

Gets a term's status. The values for status are defined by users in the term's type.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/status

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The label of the selected status value.The values for status are defined by users in the term's type.

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}/status: Set Term's Status

Sets the term's status. This PUT is not conditional as the only thing affected by this PUT is the status, and there is no way an update can be lost.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/status

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method accepts the following content types, as named by the Content-Type: header:

Response

HTTP response codes
400 
Bad Request - The status value does not exist
403 
Forbidden - The user does not have EditTermContents capability or write permission on the term
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/state

The /terms/{termId}/state resource represents the current state of the specified term. This resource is intended to allow the workflows used by BDN to check and set a term's state. The values for state are "normal" and "deleting". A term with a state of "deleting" indicates that a delete workflow has been started for the term.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/state: Get Term's State

Gets a term's state. The value for state can be "normal" or "deleting."

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/state

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The term's state

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}/state: Set Term's State

Sets the term's state. This PUT is not a conditional PUT as the state of the term can only be changed from "deleting" back to "normal" in order to abort a delete. There is no possibility of a "lost" update.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/state

Query parameters
Name Type Description
?value string

Normal is the only valid value. Required.

?workflowKey string The workflow's key. Required.

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

None

Response

The current state of the term

HTTP response codes
200 
OK
400 
Bad request - the term's state was not "deleting" or the workflowKey did not match the key of the term's delete workflow instance or the value specified was not "normal".
403 
Forbidden - the user does not have EditTermsCapability or the user does not have delete permission on the term.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/name

The /terms/{termId}/name resource is the name of the specified term. This resource is intended to allow renaming of terms.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/name: Get Term's Name

Gets a term's name

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/name

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The term's name

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}/name: Rename Term

Renames the term. There is no possibility of a "lost" update.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/name

Query parameters
Name Type Description
?value string

The new name. Required.

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

None

Response

The current state of the term

HTTP response codes
200 
OK
400 
Bad request - The term's new name is too long or not unique within the parent term's namespace.
403 
Forbidden - The user does not have EditTermsCapability or the user does not have update permission on the term.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/parentId

The /terms/{termId}/parentId resource represents the specified term's parent id. This resource is intended to allow the user to change a term's parent.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/parentId: Get Term's Parent's ID

Gets a term's parent's ID. If the term does not have a parent, a value of "none" is returned.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/parentId

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The term's parent's ID. A value of "none" means the term does not have a parent.

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}/parentId: Change Term's Parent

Changes the term's parent. This PUT is not a conditional PUT as there is no possibility of a "lost" update.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/parentId

Query parameters
Name Type Description
?value string

The ID of the term's new parent. A value of "none" means the term will have no parent. Required.

The term's name must be unique within the parent term's namespace. Otherwise, a 400, bad request, is returned.

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

None

Response

The new parent ID of the term

HTTP response codes
200 
OK
400 
Bad request - The term's name is not unique within the new parent term's namespace.
403 
Forbidden - The user does not have EditTermsCapability or the user does not have delete permission on the term.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/revisions

The /terms/{termId}/revisions collection is the collection of revisions to the term.

[URL parameters]
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/revisions: Get Term's Revisions

Get Term's Revisions gets the term's revisions, (in other words, the term's history).

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/revisions

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Note that sorting and filtering are not supported. Revisions are always sorted most recent to least recent.

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

A collection of application/vnd.sas.business.data.term.revision.summary representing the term's revisions

HTTP response codes
200 
OK
400 
Either start or limit values are invalid.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/revisions/{revisionId}

The /terms/{termId}/revisions/{revisionId} resource represents a revision of a term.

URL parameters
Name Type Description
termId string

The term's ID

revisionId string The revision's ID

Methods

GET /terms/{termId}/revisions/{revisionId}: Get Term's Revision

Get Term's Revision gets the specified revision of the term. Supports the HEAD method as well.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{revisionId}

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The term's revision

HTTP response codes
200 
OK
404 
Not found - Either the term or revision do not exist or the revision is not a revision of the term.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /terms/{termId}/revisions/{revisionId}/state}

The /terms/{termId}/revisions/{revisionId}/state} resource is the state of the specified revision.

URL parameters
Name Type Description
termId string

The term's ID

revisionId string The revision's ID

Methods

GET /terms/{termId}/revisions/{revisionId}/state: Get Term Revision's State

Get Term Revision's State gets the revision's state which can be "draft" or "published."

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{revisionId}/state

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The state

HTTP response codes
200 
OK
404 
Not found - Either the term or revision do not exist or the revision is not a revision of the term.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /terms/{termId}/revisions/{revisionId}/state: Publish Revision

Publish Revision publishes the last draft revision of the term. A new published revision is created from all the draft revisions which means the resulting revision will have a new ID. All the draft revisions are deleted. This method is only valid on the last draft revision of a term. If this method is called on a revision that is not the last draft revision, a 400, bad request, is returned. This PUT is not a conditional PUT because the only change to the state that is allowed is from "draft" to "published" and there is no possibility of a "lost" update.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/revisions/{revisionId}/state

Query parameters

Query parameters
Name Type Description
?value string

The value of the state. The only valid value is "published."

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Content types

This method has no content body.

Response

The newly published revision of the draft term is returned.

HTTP response codes
200 
Created
400 
Bad Request - Revision was not last draft revision of a term.
403 
Forbidden - Either the user does not have EditTermContents capability or does not have write permission on the term.
404 
Not found - Either the term or revision do not exist or the revision is not a revision of the term.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /terms/{termId}/drafts

The /terms/{termId}/drafts collection is the collection of draft revisions to the term.

URL parameters
Name Type Description
termId string

The term's ID

Methods

GET /terms/{termId}/drafts: Get Term's Drafts Revisions

Get Term's Draft Revisions gets the term's drafts revisions, which consist of changes to the term since it was last published. This method is essentially the same as filtering the revisions on state equal to "draft."

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/drafts

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Note: Sorting and filtering are not supported. Draft revisions are always sorted most recent to least recent.

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

A collection of application/vnd.sas.business.data.term.revision.summary representing the term's draft revisions

HTTP response codes
200 
OK
400 
Bad request - Either start or limit are invalid.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /terms/{termId}/drafts: Revert Term to Last Published Revision

Revert Term to Last Published Revision reverts the term to its last published revision by deleting all the draft revisions. If the term was never published, the term is deleted.

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/terms/{termId}/drafts

Response

HTTP response codes
204 
No content (success)
403 
Forbidden - The user does not have EditTerms capability or delete permission on the term.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /types

The /types collection represents the term types.

Methods

GET /types: Get Types

Gets all the term types.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/types

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Request headers

The request also support the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

A collection of application/vnd.sas.business.data.term.type that are term types.

HTTP response codes
200 
OK
400 
Bad request - Either the start or limit values are invalid
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /types/{typeId}

The /types/{typeId} resource represents a term type.

URL parameters
Name Type Description
typeId string

The type's ID

Method

GET /types/{typeId}: Get Type

Gets the specified term type. This resource also supports the HEAD method.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/types/{typeId}

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The term type

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /types/{typeId}/terms

The /types/{typeId}/terms collection represents the collection of all the terms of the specified type.

URL parameters
Name Type Description
typeId string

The type's ID

Methods

GET /types/{typeId}/terms: Get Type's Terms

Gets the terms of the specified type

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/types/{typeId}/terms
[Query parameters]
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Response

Gets a collection of summary term (application/vnd.sas.business.data.term.summary) resources representing the terms that are the specified type.

HTTP response codes
200 
OK
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Collection /snapshots

The /snapshots collection represents all snapshots.

Methods

GET /snapshots: Get Snapshots

Get Snapshots gets all the snapshots

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/rest/snapshots

Query parameters
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 items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. The default is 10.

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

A collection of snapshots (application/vnd.sas.business.data.snapshot)

Link relations
rel HTTP method Description
create POST

Creates a snapshot.
URI:
/SASBusinessDataNetwork/rest/snapshots
Type:
application/vnd.sas.business.data.snapshot

HTTP response codes
200 
OK
400 
Bad Request - The start or limit values are invalid.
403 
Forbidden - The user does not have ViewSnapshots capability.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

POST /snapshots: Create Snapshot

Create Snapshot creates a snapshot by copying the BDN database into a new schema.

Authentication required: true

Request

POST http://www.hostname.com/SASBusinessDataNetwork/rest/rest/snapshots

Content types

This method accepts the following content types, as named by the Content-Type: header:

Only the name and description fields will be used. Leading and trailing spaces will be trimmed from the name. If the name has already been used (case-sensitive) or if the name exceeds 100 characters, the creation will fail with a 400 - Bad Request.

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

Returns the created snapshot

Response Headers
ETag
The unique entity tag for the snapshot
Location
The location of the new snapshot
HTTP response codes
201 
Created
400 
Bad Request - The name is already in use or is too long.
403 
Forbidden - The user does not have EditSnapshots capability.
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:


Resource /snapshots/{snapshotId}

The /snapshots/{snapshotId} resource represents one snapshot.

URL parameters
Name Type Description
snapshotId string

The snapshot's ID

Methods

GET /snapshots/{snapshotId}: Get Snapshot

Get Snapshot gets a snapshot.

Authentication required: true

Request

GET http://www.hostname.com/SASBusinessDataNetwork/rest/rest/snapshots/{snapshotId}

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:

Response

The snapshot

Response Headers
ETag
The unique entity tag for this resource
HTTP response codes
200 
OK
403 
Forbidden - The user does not have ViewSnapshots capability.
404 
Not found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

PUT /snapshots/{snapshotId}: Update Snapshot

Update Snapshot updates the snapshot. Only the snapshot's name and description can be changed. Leading and trailing spaces will be trimmed from the name. If the name has already been used (case-sensitive) or if the name exceeds 100 characters, the update will fail with a 400 - Bad Request.

Authentication required: true

Request

PUT http://www.hostname.com/SASBusinessDataNetwork/rest/rest/snapshots/{snapshotId}

Content types

This method accepts the following content types, as named by the Content-Type: header:

Request headers

The request also supports the following request headers:

Accept
Indicate the media type of the response. This method supports the following media types:
If-Match
The value of the ETag header, obtained from the GET or HEAD

Response

The updated snapshot

Response Headers
ETag
The unique entity tag for this resource
HTTP response codes
200 
OK
400 
The name is not unique or is too long
403 
Forbidden - The user does not have EditSnapshots capability.
404 
Not found
412 
Precondition failed (If-Match value does not match ETag)
428 
Precondition required (If-Match header is missing)
 
Response media types

This operation can return the following media type representations by setting the Accept: header of the request:

DELETE /snapshots/{snapshotId}: Delete Snapshot

Delete Snapshot deletes a snapshot

Authentication required: true

Request

DELETE http://www.hostname.com/SASBusinessDataNetwork/rest/rest/snapshots/{snapshotId}

Response

None

HTTP response codes
204 
No content (success)
403 
Forbidden - The user does not have the EditSnapshots capability.
404
Not Found
Response media types

This operation can return the following media type representations by setting the Accept: header of the request: