Ownership & Favorites
Manage report ownership and user favorites.
Ownership
See Core CRUD - Owner Management for ownership endpoints:
GET /api/reports/\{id\}/owner- Get report ownerPUT /api/reports/\{id\}/owner- Change report owner
Favorites
Users can mark reports as favorites for quick access.
GET /api/reports/{id}/favorite
Check if a report is favorited by the current user.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Report ID |
Response:
{
"id": "uuid",
"userId": "john.doe",
"reportId": "team:sales-dashboard",
"createdAt": "2024-02-08T10:00:00Z",
"_links": {
"self": { "href": "/api/reports/team:sales-dashboard/favorite" }
}
}
Status Code: 200 OK if favorited, 404 Not Found if not favorited.
PUT /api/reports/{id}/favorite
Mark a report as a favorite.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Report ID |
Request Body:
Empty body or {}
Response:
{
"id": "uuid",
"userId": "john.doe",
"reportId": "team:sales-dashboard",
"createdAt": "2024-02-09T10:00:00Z",
"_links": {
"self": { "href": "/api/reports/team:sales-dashboard/favorite" }
}
}
Status Code: 200 OK (already favorited) or 201 Created (newly favorited)
Behavior:
- Creates a favorite entry for the current user
- Idempotent - safe to call multiple times
- Favorites are user-specific (other users' favorites are not affected)
Use Case:
Allow users to bookmark frequently accessed reports.
DELETE /api/reports/{id}/favorite
Remove a report from favorites.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Report ID |
Response:
204 No Content on success.
Behavior:
- Removes the favorite entry for the current user
- Does not affect other users' favorites
- Safe to call even if not currently favorited
Use Case:
Remove a report from the user's favorites list.
Favorite Workflow
Add to favorites
// Check if already favorited
GET /api/reports/team:sales-dashboard/favorite
// Returns 404 if not favorited
// Add to favorites
PUT /api/reports/team:sales-dashboard/favorite
// Returns 201 Created
Remove from favorites
DELETE /api/reports/team:sales-dashboard/favorite
// Returns 204 No Content
List user's favorites
// Use the search endpoint with a favorites filter
GET /api/reports-list
// Filter client-side for reports with favorite status
Copy Operation
POST /api/reports/{id}/_copy
Create a copy of a report.
Authentication: Required
Permissions: report:copy and reports:create
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Report ID to copy |
Request Body:
{
"name": "Copy of Sales Dashboard",
"progress": "progress-monitor-id"
}
Optional Fields:
| Field | Type | Description |
|---|---|---|
name | string | Name for the copied report (defaults to "Copy of [original name]") |
progress | string | Progress monitor ID for tracking |
Response:
{
"id": "user:john.doe:copy-of-sales-dashboard",
"type": "dashboard",
"name": "Copy of Sales Dashboard",
"ownerId": "user:john.doe",
"defn": {},
"createdAt": "2024-02-09T10:00:00Z",
"_links": {
"self": { "href": "/api/reports/user:john.doe:copy-of-sales-dashboard" }
}
}
Status Code: 201 Created
Location Header: URL of the copied report
Behavior:
- Copy report structure - All fields except
id,editingId,slug, timestamps - Copy dataset references - All
ReportDatasetentries with their configurations - Copy snapshot settings - Snapshot configurations and dataset associations
- Copy library - If the report has an associated library, it is also copied
- Set owner - New report is owned by the current user
- Generate new slug - Unique identifier is created
Notes:
- Copy operation runs in a database transaction
- Report drivers can customize copy behavior
- Copied report is independent - changes don't affect the original
- Sharing and comments are NOT copied
Use Case:
Create a personal version of a shared report for customization.
Ownership Transfer
To transfer report ownership:
// Change owner to a different user
PUT /api/reports/team:sales-dashboard/owner
{
"ownerId": "user:jane.smith"
}
// Change owner to a team
PUT /api/reports/team:sales-dashboard/owner
{
"ownerId": "team:marketing"
}
Requirements:
report:writepermission on the reportreport:changeOwnerToTeampermission (if changing to team owner)- New owner (user or team) must exist
- Creates a
reportAssignedactivity entry