Skip to content

Authority REST API - Association Controller

The association/from/<type>/<code> URL manages Associations from the From side of the relationship.

Retrieve direct Associations from an Asset

Section titled “Retrieve direct Associations from an Asset”

GET /association/from/<type>/<code>

Retrieves the requested Asset, along with any direct Associations From that Asset.

ParameterDescription
typeA single URL-encoded Asset Type code.
codeA single URL-encoded Asset code.
ParameterExpectedDescription
totypeOptionalAn Asset Type code. Will only return Associations to Assets of this type.
Can be specified multiple times to include additional Asset Types.
appOptionalAn Application identifier. Will only return Associations with context data for this Application.
Can be specified multiple times to include additional Applications.
CodeStatusDescription
200SuccessThe Asset was found.
Content is a single AssociationsFromAsset object.
404FailureThe Asset does not exist.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

POST /association/from/<type>/<code>

Adds or updates Associations From the target Asset.

ParameterDescription
typeA single URL-encoded Asset Type code.
codeA single URL-encoded Asset code.

A single AssociationsFromAsset object describing the Assets and Associations.

CodeStatusDescription
204SuccessCompleted successfully.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.

DELETE /association/from/<type>/<code>

Deletes all Associations from an Asset.

Alternatively, if one or more app codes are included, remove any matching context data instead. Deletion when there’s no more context data is controlled by deleteOnEmpty.

ParameterDescription
typeA single URL-encoded Asset Type code.
codeA single URL-encoded Asset code.
ParameterExpectedDescription
totypeOptionalAn Asset Type code. Will only delete Associations to Assets of this type.
Can be specified multiple times to include additional Asset Types.
appOptionalAn Application identifier. Context data for this Application will be removed from the Associations.
Can be specified multiple times to delete additional Applications.
deleteOnEmptyOptionalA boolean true/false. If true, and one or more app values are provided, Associations will be deleted when their context data is empty.
CodeStatusDescription
204SuccessCompleted successfully.
404FailureThe Asset does not exist.
422FailureInvalid data was provided.
Content is a JSON array of one or more error codes describing the problem.