ApiAsset
Assign asset to parent
Links an asset to the given parent and appends it as the last sibling within that level.
Access restricted to roles:
- admin
- manufacturer-admin
- manufacturer-user
- producer-admin
Path Parameters
assetId*string
The unique identifier of the asset
Format
uuidRequest Body
application/json
Request payload carrying the parent identifier. The parent must be compatible with the child's asset type.
parentId*string
Identifier of the parent asset
Format
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://test.sweetconnect.io/api/asset/v1/assets/497f6eca-6276-4993-bfeb-53cbbbba6f08/assign" \ -H "Content-Type: application/json" \ -d '{ "parentId": "0c1b9613-7d6f-40b7-bf29-3179ac401fc9" }'Empty
{
"errors": [
{
"errorCode": "BadRequest",
"message": "The request payload is invalid.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "Unauthorized",
"message": "Authentication is required to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "NoPermission",
"message": "You do not have permission to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "NotFound",
"message": "The requested resource was not found.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "InternalServerError",
"message": "An unexpected internal server error occurred.",
"extension": {}
}
]
}