<< Back to GForge REST API

Entity: Myreport

GET

getData

Returns the result data for a report, with optional download support.

Parameters (7)

Name Type Description
id int Report id. Required.
sort_col string Field name to sort by. Default id.
sort_dir string Sort direction: asc or desc. Default asc.
download string When set, returns results as a download file.
format string Download format: csv, xml, or json. Default csv.
page_num int Page number (zero-based). Default 0.
page_size int Records per page. Default 20.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \gforge\core\models\api\PagedResponse

Report data rows for the current page, or null when streaming a download.

Name Type Description
paging \StdClass
items array
links array

getDetails

Returns the full details for a single report.

Parameters (1)

Name Type Description
id int Report id. Required.

Return: \gforge\core\models\api\MyReportDetails

The report detail record.

Name Type Description
sharedUsers \gforge\core\models\api\User[]
projects \gforge\core\models\api\Project[]
trackers \gforge\plugins\tracker\models\api\Tracker[]
fieldFilters \gforge\core\models\api\MyReportFieldFilter[]
displayFields \gforge\core\models\api\MyReportFieldDisplay[]
id int Unique database identifier for the my report
reportName string Name of the report
isShared bool If the report is shared to other users
reportType string The type of this report
user int The owner of this report
openDateStart \DateTime
openDateEnd \DateTime
closeDateStart \DateTime
closeDateEnd \DateTime

getFilters

Returns assignees and status values for the specified trackers, for use as report filter criteria.

Parameters (1)

Name Type Description
trackers string Comma-delimited list of tracker ids to include.

Return: \gforge\core\models\api\MyReportFilters

Assignees and statuses keyed by tracker id.

Name Type Description
assigneesByTracker string[]
statusesByTracker string[]

getMyReport

Returns the list of reports owned by or shared with the session user.

Parameters (4)

Name Type Description
sort_field string Field to sort by. Options: id, reportName, isShared, reportType, openDateStart, openDateEnd, closeDateStart, closeDateEnd. Default reportName.
sort_dir string Sort direction: asc or desc. Default asc.
page_num int Page number (zero-based). Default 0.
page_size int Records per page. Default 20.
Sortable
Use the sort_field and sort_dir parameters to control the order in which records are returned.
Pageable
Use the page_size and page_num parameters to control the set of records returned.

Return: \gforge\core\models\api\MyReportBasic[]

Zero or more report records.

Name Type Description
id int Unique database identifier for the my report
reportName string Name of the report
isShared bool If the report is shared to other users
reportType string The type of this report
user int The owner of this report
openDateStart \DateTime
openDateEnd \DateTime
closeDateStart \DateTime
closeDateEnd \DateTime

getProjects

Gets the basic criteria data for creating/editing tracker reports

Parameters (0)

Name Type Description
No parameters

Return: array

List of criteria data for the session user

POST

postDetails

Creates or updates a report definition including its projects, trackers, field filters, and display fields.

Parameters (1)

Name Type Description
id int Report id. When provided, updates the existing report.

Return: \gforge\core\models\api\MyReportDetails

The created or updated report.

Name Type Description
sharedUsers \gforge\core\models\api\User[]
projects \gforge\core\models\api\Project[]
trackers \gforge\plugins\tracker\models\api\Tracker[]
fieldFilters \gforge\core\models\api\MyReportFieldFilter[]
displayFields \gforge\core\models\api\MyReportFieldDisplay[]
id int Unique database identifier for the my report
reportName string Name of the report
isShared bool If the report is shared to other users
reportType string The type of this report
user int The owner of this report
openDateStart \DateTime
openDateEnd \DateTime
closeDateStart \DateTime
closeDateEnd \DateTime

PUT

DELETE

deleteMyReport

Deletes a report.

Parameters (1)

Name Type Description
id int Report id. Required.

Return: void