Check favorites
Returns, for each requested entity, whether the current user has marked it as a favorite.
Request
POST
https://api.datalens.tech/rpc/checkFavorites
Headers
|
Name |
Description |
|
x-dl-api-version |
Type: string API version header. Const: Example: |
Body
application/json
{
"entities": [
{
"entityId": "example",
"entityType": "entry"
}
]
}
|
Name |
Description |
|
entities |
Type: FavoriteEntityRef[] Entities to check. Max items: Example
|
FavoriteEntityRef
|
Name |
Description |
|
entityId |
Type: string ID of the entity. Example: |
|
entityType |
Type: string Type of the entity. Enum: |
Example
{
"entityId": "example",
"entityType": "entry"
}
Responses
200 OK
Response
Body
application/json
[
{
"entityId": "example",
"entityType": "entry",
"isFavorite": true,
"displayAlias": "example"
}
]
Type: CheckedFavorite[]
CheckedFavorite
|
Name |
Description |
|
displayAlias |
Type: string | null Custom name the user gave to the favorite, or null if there is none. Example: |
|
entityId |
Type: string ID of the entity. Example: |
|
entityType |
Type: string Type of the entity. Enum: |
|
isFavorite |
Type: boolean Whether the current user has marked the entity as a favorite. |
Example
{
"entityId": "example",
"entityType": "entry",
"isFavorite": true,
"displayAlias": "example"
}