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.
URL Parameters
Section titled “URL Parameters”Parameter | Description |
---|---|
type | A single URL-encoded Asset Type code. |
code | A single URL-encoded Asset code. |
Query Parameters
Section titled “Query Parameters”Parameter | Expected | Description |
---|---|---|
totype | Optional | An Asset Type code. Will only return Associations to Assets of this type. Can be specified multiple times to include additional Asset Types. |
app | Optional | An Application identifier. Will only return Associations with context data for this Application. Can be specified multiple times to include additional Applications. |
Response
Section titled “Response”Code | Status | Description |
---|---|---|
200 | Success | The Asset was found. Content is a single AssociationsFromAsset object. |
404 | Failure | The Asset does not exist. |
422 | Failure | Invalid data was provided. Content is a JSON array of one or more error codes describing the problem. |
Add or update Associations from an Asset
Section titled “Add or update Associations from an Asset”POST /association/from/<type>/<code>
Adds or updates Associations From
the target Asset.
URL Parameters
Section titled “URL Parameters”Parameter | Description |
---|---|
type | A single URL-encoded Asset Type code. |
code | A single URL-encoded Asset code. |
POST Body
Section titled “POST Body”A single AssociationsFromAsset object describing the Assets and Associations.
Response
Section titled “Response”Code | Status | Description |
---|---|---|
204 | Success | Completed successfully. |
422 | Failure | Invalid data was provided. Content is a JSON array of one or more error codes describing the problem. |
Delete Associations from an Asset
Section titled “Delete Associations from an Asset”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
.
URL Parameters
Section titled “URL Parameters”Parameter | Description |
---|---|
type | A single URL-encoded Asset Type code. |
code | A single URL-encoded Asset code. |
Query Parameters
Section titled “Query Parameters”Parameter | Expected | Description |
---|---|---|
totype | Optional | An Asset Type code. Will only delete Associations to Assets of this type. Can be specified multiple times to include additional Asset Types. |
app | Optional | An Application identifier. Context data for this Application will be removed from the Associations. Can be specified multiple times to delete additional Applications. |
deleteOnEmpty | Optional | A boolean true/false. If true, and one or more app values are provided, Associations will be deleted when their context data is empty. |
Response
Section titled “Response”Code | Status | Description |
---|---|---|
204 | Success | Completed successfully. |
404 | Failure | The Asset does not exist. |
422 | Failure | Invalid data was provided. Content is a JSON array of one or more error codes describing the problem. |