Add the system to the caller's favorites. Favorites are personal and change nothing on the system, so read:systems is enough. Starring a system already starred succeeds without changes. The system must be visible to the caller and not archived.
Refused with an API key and with an impersonation token.
PUT
/systems/{id}/favorite
curl \
--request PUT 'https://my.nethesis.it/backend/api/systems/sys_123456789/favorite' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"code": 200,
"message": "system added to favorites",
"data": {
"system_id": "sys_123456789",
"is_favorite": true
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (404)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}