Gets a list of all of the user's favorite items.
includeAll | boolean Default: false If true, include all results, that is, do not paginate. Mutually exclusive with page and pageSize (they are ignored if includeAll=true is specified). |
page | number Default: 1 Which page to return. Defaults to 1 if not specified. If you specify a value greater than the total number of pages, the last page of results is returned. |
pageSize | number Default: 100 The maximum number of items to return per page. Unless otherwise stated for a specific endpoint, defaults to 100. If only page is specified, defaults to a page size of 100. For reports, the default is 100 rows. If you need larger sets of data from your report, returns a maximum of 10,000 rows per request. |
include | string A comma-separated list of optional elements to include in the response. |
Authorization | string API Access Token used to authenticate requests to Smartsheet APIs. Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 |
x-smar-sc-actor-id | string UserId of the user Example: 100012 |
curl https://api.smartsheet.com/2.0/favorites \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789"
{- "pageNumber": 1,
- "pageSize": 50,
- "totalPages": 25,
- "totalCount": 136,
- "data": [
- {
- "objectId": 0,
- "type": "folder"
}
]
}
Adds one or more favorite items for the current user. This operation supports both single-object and bulk semantics. For more information, see Optional Bulk Operations. If called with a single Favorite object, and that favorite already exists, error code 1129 is returned. If called with an array of Favorite objects, any objects specified in the array that are already marked as favorites are ignored and omitted from the response.
Authorization | string API Access Token used to authenticate requests to Smartsheet APIs. Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 |
x-smar-sc-actor-id | string UserId of the user Example: 100012 |
Content-Type | string Default: application/json Required for POST and PUT requests. Defines the structure for the request body. |
A list of favorites to be added.
objectId | number The Id of the favorited item. If type is template, only private sheet-type template Id is allowed. |
type | string Enum: "folder" "report" "sheet" "sight" "template" "workspace" |
[ ]
{- "message": "SUCCESS",
- "resultCode": 0,
- "result": {
- "objectId": 0,
- "type": "folder"
}
}
Deletes all favorites with the same type for the user.
favoriteType required | string The favorite type. |
objectIds required | string A comma-separated list of Ids of the favorited item. |
Authorization | string API Access Token used to authenticate requests to Smartsheet APIs. Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 |
x-smar-sc-actor-id | string UserId of the user Example: 100012 |
curl 'https://api.smartsheet.com/2.0/favorites/{favoriteType}?objectIds=favoriteId1,favoriteId2' \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -X DELETE
{- "message": "SUCCESS",
- "resultCode": 0
}
Deletes a single favorite from the user's list of favorite items by type and ID.
favoriteType required | string The favorite type. |
favoriteId required | number Favorite Id, e.g., sheet Id, report Id. |
Authorization | string API Access Token used to authenticate requests to Smartsheet APIs. Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 |
x-smar-sc-actor-id | string UserId of the user Example: 100012 |
curl https://api.smartsheet.com/2.0/favorites/{favoriteType}/{folderId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -X DELETE
{- "message": "SUCCESS",
- "resultCode": 0
}
Checks whether an item has been tagged as a favorite for the current user by type and ID.
favoriteType required | string The favorite type. |
favoriteId required | number Favorite Id, e.g., sheet Id, report Id. |
include | string A comma-separated list of optional elements to include in the response. |
Authorization | string API Access Token used to authenticate requests to Smartsheet APIs. Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 |
x-smar-sc-actor-id | string UserId of the user Example: 100012 |
curl -i -X GET \ 'https://api.smartsheet.com/2.0/favorites/{favoriteType}/{favoriteId}?include={directId}' \ -H 'Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789' \ -H 'x-smar-sc-actor-id: 100012'
{- "objectId": 0,
- "type": "folder"
}