Update report

Request

POST https://www.activityinfo.org/resources/reports

Request body

application/json

object
id string required
label string optional
sources object optional
components array[object] required
publish boolean optional
roleGrants array[object] required
analyses array[object] required
layout string Values:
SINGLE
This report has a single analysis.
NOTEBOOK
This report's components are laid out vertically.
DASHBOARD
This report's components are arranged in a grid across multiple pages.
optional
owner object optional
pages array[object] required

Successful response

application/json

object
id string The id of the report. required
ownerType string Values:
PERSONAL
This is a personal report and will be found in the "My Reports" section.
DATABASE
This report is part of a database.
required
ownerId string If this is a personal report, then this the id of the user who owns the report. optional
ownerName string If this is a personal report, then this is the name of the user who owns the report. required
databaseId string If this report is part of a database, then this is the id of the database to which it belongs. optional
label string The human-readable label of this report. required
published boolean True if this report has been published. required
components array[object] The list of components in this report. required
layout string The layout of this report's components. Values:
SINGLE
This report has a single analysis.
NOTEBOOK
This report's components are laid out vertically.
DASHBOARD
This report's components are arranged in a grid across multiple pages.
required
icon string The icon to use when listing this report. required
sources object The data sources that are included in this report. required
editType string Values:
EDITABLE
COPYABLE
READABLE
required
pages array[object] For reports with DASHBOARD layout, the list of pages. required

Error responses

Status Code Error Code Description
400 DATABASE_IN_GRANT_NOT_FOUND The database specified in a {@link ReportRoleGrant} cannot be found.
400 DATABASE_IN_OWNER_NOT_FOUND The database specified in a {@link ReportOwnerUpdate} cannot be found.
400 ID_IN_DATABASE_NOT_A_REPORT The ResourceId in {@link org.activityinfo.model.database.DatabaseTree} is not a report type.
400 MISSING_COMPONENT A report cannot be added without a component
400 MISSING_LABEL A report cannot be added without a label
400 MISSING_MODEL A report cannot be added without a label
400 MISSING_OWNER A report cannot be added without specifying an owner
400 MISSING_PAGES A dashboard report cannot be added without a page
400 MISSING_SOURCE A report cannot be added without a data source
400 ROLE_NOT_FOUND the role specified in a {@link ReportRoleGrant} cannot be found.
400 SINGLE_LAYOUT_REQUIRES_SINGLE_ANALYSIS The 'single' report layout requires a single analysis component.
401 AUTHENTICATION_REQUIRED The request must be authenticated
403 PERMISSION_DENIED You do not have permission to update this report
403 PUBLISHING_FORBIDDEN You do not have permission to publish a report that includes the given form or database.
403 ROLE_GRANT_FORBIDDEN You do not have permission to share this report with the given database role.
403 USER_IN_OWNER_NOT_AUTHENTICATED The user id specified in {@link ReportOwnerUpdate} doesn't match authenticated user.
404 DATABASE_IN_REPORT_NOT_FOUND The database specified in a {@link Report} cannot be found.
Next item
Upload attachment