Set an asset's targets for a relationship type
States EXACTLY these targets: authored relations of this type from this asset that you do not list are removed. Projected relations are not touched. Use POST to add without removing.
Authorization
BearerAuth API authentication via Authorization: Bearer <your-api-key>. Obtain
your API key from Config → API in the Aplas web app.
In: header
Path Parameters
The workspace's slug.
The asset type's slug.
The asset's slug. Unique within its asset type, not across the workspace — which is why assets are addressed beneath their type.
The relationship type's slug.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.au.aplas.com/api/v3/workspaces/string/asset-types/string/assets/string/relations/string" \ -H "Content-Type: application/json" \ -d '{ "targets": [ { "type": "string", "id": "string" } ] }'{
"written": 0
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}{
"statusCode": 403,
"error": "Forbidden",
"message": "The permissions of your API key only allow read-only/GET calls."
}