Account Reports
API for accessing account reports.
A Report object looks like:
{
// The unique identifier for the report.
"id": 1,
// The type of report.
"report": "sis_export_csv",
// The url to the report download.
"file_url": "https://example.com/some/path",
// The attachment api object of the report. Only available after the report has
// completed.
"attachment": null,
// The status of the report
"status": "complete",
// The date and time the report was created.
"created_at": "2013-12-01T23:59:00-06:00",
// The date and time the report started processing.
"started_at": "2013-12-02T00:03:21-06:00",
// The date and time the report finished processing.
"ended_at": "2013-12-02T00:03:21-06:00",
// The time (in seconds) the report has been waiting to run, has been running so
// far, or took to run to completion, depending on its current state.
"run_time": 33.3,
// The report parameters
"parameters": {"course_id":2,"start_at":"2012-07-13T10:55:20-06:00","end_at":"2012-07-13T10:55:20-06:00"},
// The progress of the report
"progress": 100,
// This is the current line count being written to the report. It updates every
// 1000 records.
"current_line": 12000,
// The user that initiated the account report. See the Users API for details.
"user": null
}A ReportParameters object looks like:
List Available Reports
AccountReportsController#available_reports
GET /api/v1/accounts/:account_id/reports
Scope: url:GET|/api/v1/accounts/:account_id/reports
Returns a paginated list of reports for the current context.
Request Parameters:
include[]
string
Array of additional information to include.
"description_html":: an HTML description of the report, with example output
"parameters_html":: an HTML form for the report parameters Allowed values: description_html, params_html
API response field:
name
The name of the report.
parameters
The parameters will vary for each report
last_run
[Report] The last run of the report. This will be null if the report has never been run.
Example Request:
Example Response:
Start a Report
AccountReportsController#create
POST /api/v1/accounts/:account_id/reports/:report
Scope: url:POST|/api/v1/accounts/:account_id/reports/:report
Generates a report instance for the account. Note that "report" in the request must match one of the available report names. To fetch a list of available report names and parameters for each report (including whether or not those parameters are required), see List Available Reports.
Request Parameters:
parameters[]
Hash
The parameters will vary for each report. To fetch a list of available parameters for each report, see List Available Reports. A few example parameters have been provided below. Note that the example parameters provided below may not be valid for every report.
parameters[skip_message]
boolean
If true, no message will be sent to the user upon completion of the report.
parameters[course_id]
integer
The id of the course to report on. Note: this parameter has been listed to serve as an example and may not be valid for every report.
parameters[users]
boolean
If true, user data will be included. If false, user data will be omitted. Note: this parameter has been listed to serve as an example and may not be valid for every report.
Example Request:
Returns a Report object.
Index of Reports
AccountReportsController#index
GET /api/v1/accounts/:account_id/reports/:report
Scope: url:GET|/api/v1/accounts/:account_id/reports/:report
Shows all reports that have been run for the account of a specific type.
Example Request:
Returns a list of Report objects.
Status of a Report
GET /api/v1/accounts/:account_id/reports/:report/:id
Scope: url:GET|/api/v1/accounts/:account_id/reports/:report/:id
Returns the status of a report.
Example Request:
Returns a Report object.
Delete a Report
AccountReportsController#destroy
DELETE /api/v1/accounts/:account_id/reports/:report/:id
Scope: url:DELETE|/api/v1/accounts/:account_id/reports/:report/:id
Deletes a generated report instance.
Example Request:
Returns a Report object.
Abort a Report
AccountReportsController#abort
PUT /api/v1/accounts/:account_id/reports/:report/:id/abort
Scope: url:PUT|/api/v1/accounts/:account_id/reports/:report/:id/abort
Abort a report in progress
Example Request:
Returns a Report object.
Last updated
Was this helpful?