Relationships

Loading...
This API is deprecated as of 2023.10 and will be removed in a future release. The Relationships API manages the storage and discovery of relationships, and the retrieval of networks of relationship data.

Relationships Management

The operations for relationships management.
get
Get a paginated list of relationships
Internal-Use OnlyReturns a paginated collection of relationships. The subject(s) are specified using either the resourceUri or the referenceId query parameter. Using resourceUri or referenceId in the filter parameter can conflict with the resourceUri or referenceId query parameter. Standard paging, filtering, and sorting options are provided. The media type of the returned items in the collection is application/vnd.sas.relationship+json. References may also be queried using POST /relationships#withQuery with the query string in the request body.
/relationships
post
Add a relationship
Internal-Use OnlyAdds a new relationship. A relationship requires a resource, a related resource and the relationship type. A resource can be specified by either a resource URI or a reference ID. The related resource can be defined by either a related resource URI or a related reference ID. Relationship uniqueness is defined by the combination of the resource and the related resource. If an invalid reference ID is provided a 404 is returned. If a reference does not exist for a resource URI a reeference will be created. When possible, additional resource information is queried and added to the reference. For resources external to the SAS system, the client should provide additional reference information. Attempting to add a relationship that already exists leaves the existing relationship unchanged.
/relationships
patch
Delete relationships
Internal-Use OnlyDelete a list of relationships. Uses a JSON Patch body with "op" : "remove" on a specific relationship ID. Clients which do not support PATCH can use POST and specify a query parameter of ?_method=PATCH. All referenced resources must exist for the PATCH to be applied.
/relationships
head
Check if relationship exists
Internal-Use OnlyReturns whether or not a relationship with the specified ID exists, along with appropriate headers.
/relationships/{relationshipId}
get
Get a relationship
Internal-Use OnlyReturns an existing relationship.
/relationships/{relationshipId}
put
Update a relationship
Internal-Use OnlyThe PUT will fail if the ID in the body does match not the relationshipId. Only the type field can be updated.
/relationships/{relationshipId}
delete
Remove a relationship
Internal-Use OnlyRemoves the specified relationship. This operation will not remove references even if there are no relationships which use the referenced resource.
/relationships/{relationshipId}
post
Update or create relationships
Internal-Use OnlyA relationship requires a resource, a related resource, and a relationship type. A resource can be specified by either a resource URI or a reference ID. The related resource can be defined by either a related resource URI or a related reference ID. Relationship uniqueness is defined by the combination of the resource and the related resource. When the ID is provided, this operation performs a full replacement of the relationship. When no ID is provided, and the relationship is not unique, the relationship is not updated. The parameter ?onConflict=update can be used to update existing relationships with a matching resource and related URIs. The ID field cannot be updated during this operation. The response is a collection of application/vnd.sas.relationship resources. When a resource creation or update fails, the collection includes an application/vnd.sas.error object that describes why the operation failed. If an invalid reference ID is provided a 404 is returned. If a reference does not exist for a resource URI a reeference will be created. When possible, additional resource information is queried and added to the reference. For resources external to the SAS system, the client should provide additional reference information. The media type application/vnd.sas.collection+json is required for this endpoint to prevent ambiguity with other POST operations to this collection.
/relationships
post
Get paginated list of relationships via query
Internal-Use OnlyReturns a paginated collection of relationships. Standard paging, filtering, and sorting options are provided. The media type of the returned items in the collection is application/vnd.sas.relationship+json. This call is an extended GET operation and therefore idempotent.
/relationships

References Management

The operations for references management.
get
Get references
Internal-Use OnlyReturns a collection of references. Standard paging, filtering, and sorting options are provided. The default media type of the returned items in the collection is application/vnd.sas.relationship.reference+json. References may also be queried using POST /references#withQuery with the query string in the request body.
/references
post
Create a new reference
Internal-Use OnlyThe resource URI must be set by the client within the request body, and this URI must be unique across the entire system.
/references
patch
Delete references
Internal-Use OnlyDelete a list of references. Uses a JSON Patch body with "op" : "remove" on a specific reference ID. Clients which do not support PATCH can use POST and specify a query parameter of ?_method=PATCH. All referenced resources must exist for the PATCH to be applied.
/references
post
Update or create references
Internal-Use OnlyUpdates or creates references. When the ID is provided for a reference in the collection, the operation performs a full replacement of the reference. If no ID is provided, and the resource URI is not unique in the system, the reference is not updated (the default). The parameter ?onConflict=update can be used to update existing references with a matching resource URI. The ID field can not be updated during this operation. If the reference does not exist, one is created. The response will be a collection of application/vnd.sas.relationship.reference resources. If a reference creation or update fails, the collection will include an application/vnd.sas.error object that describes why the reference failed. The specific media type of application/vnd.sas.collection+json is required for this endpoint to prevent ambiguity with other POST operations to this collection.
/references
post
Get a paginated list of references
Internal-Use OnlyReturns a paginated collection of references. Standard paging, filtering, and sorting options are provided. The default media type of the returned items in the collection is application/vnd.sas.relationship.reference+json. This call is an extended GET operation and therefore idempotent. The body of the request contains the query parameters and filters to apply to the request. To find references with the content type of table the body of the request would be eq(contentType, "table").
/references
get
Get reference
Internal-Use OnlyReturns information about a single reference based on its unique id. The default media type returned is application/vnd.sas.relationship.reference+json.
/references/{referenceId}
head
Check if reference exists
Internal-Use OnlyReturns whether or not a reference with the specified ID exists, along with appropriate headers.
/references/{referenceId}
put
Update a reference
Internal-Use OnlyUpdate a reference. The resourceUri can not be updated during this operation. The PUT will fail if the ID in the body does not match the referenceId.
/references/{referenceId}
delete
Delete a reference
Internal-Use OnlyDeletes the specified reference and permanently removes it from the system along with the relationships which use this reference.
/references/{referenceId}
get
Get the list values for a reference source
Internal-Use OnlyProvides a list of distinct values used for a reference source.
/references/referenceSources