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. |
Authorization | string Example: Bearer ll352u9jujauoqz4gstvsae05 API Access Token used to authenticate requests to Smartsheet APIs. |
curl https://api.smartsheet.com/2.0/favorites \ -H "Authorization: Bearer ll352u9jujauoqz4gstvsae05"
{- "pageNumber": 1,
- "pageSize": 50,
- "totalPages": 25,
- "totalCount": 136,
- "data": [
- {
- "objectId": 0,
- "type": "folder"
}
]
}
Adds one or more items to the user's list of favorite items. 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 Example: Bearer ll352u9jujauoqz4gstvsae05 API Access Token used to authenticate requests to Smartsheet APIs. |
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" |
[ ]
{- "version": 0,
- "failedItems": [
- {
- "rowId": 0,
- "error": {
- "refId": "string",
- "errorCode": 0,
- "message": "string"
}, - "index": 0
}
], - "message": "SUCCESS",
- "resultCode": 0,
- "result": {
- "objectId": 0,
- "type": "folder"
}
}
Removes all favorites with the same type for the user.
favoriteType required | string Enum: "folder" "report" "sheet" "sight" "template" "workspace" The favorite type. |
Authorization | string Example: Bearer ll352u9jujauoqz4gstvsae05 API Access Token used to authenticate requests to Smartsheet APIs. |
curl 'https://api.smartsheet.com/2.0/favorites/{favoriteType}?objectIds=favoriteId1,favoriteId2' \ -H "Authorization: Bearer ll352u9jujauoqz4gstvsae05" \ -X DELETE
{- "version": 0,
- "failedItems": [
- {
- "rowId": 0,
- "error": {
- "refId": "string",
- "errorCode": 0,
- "message": "string"
}, - "index": 0
}
], - "message": "SUCCESS",
- "resultCode": 0
}
Removes a single favorite from the user's list of favorite items by type and ID.
favoriteType required | string Enum: "folder" "report" "sheet" "sight" "template" "workspace" The favorite type. |
favoriteId required | number Favorite Id, e.g., sheet Id, report Id. |
Authorization | string Example: Bearer ll352u9jujauoqz4gstvsae05 API Access Token used to authenticate requests to Smartsheet APIs. |
curl https://api.smartsheet.com/2.0/favorites/{favoriteType}/{folderId} \ -H "Authorization: Bearer ll352u9jujauoqz4gstvsae05" \ -X DELETE
{- "version": 0,
- "failedItems": [
- {
- "rowId": 0,
- "error": {
- "refId": "string",
- "errorCode": 0,
- "message": "string"
}, - "index": 0
}
], - "message": "SUCCESS",
- "resultCode": 0
}