Returns a list of instances for a report that you requested to be run asynchronously. Each item in the list is treated as a separate instance of the report run with metadata in that snapshot of time.
sf_list_report_instances(report_id, as_tbl = TRUE, verbose = FALSE)
character
; the Salesforce Id assigned to a created
analytics report. It will start with "00O"
.
logical
; an indicator of whether to convert the parsed
JSON into a tbl_df
.
logical
; an indicator of whether to print additional
detail for each API call, which is useful for debugging. More specifically, when
set to TRUE
the URL, header, and body will be printed for each request,
along with additional diagnostic information where available.
tbl_df
by default, or a list
depending on the value of
argument as_tbl
Other Report Instance functions:
sf_delete_report_instance()
,
sf_get_report_instance_results()
if (FALSE) {
# first, get the Id of a report in your Org
all_reports <- sf_query("SELECT Id, Name FROM Report")
this_report_id <- all_reports$Id[1]
# second, execute an async report
results <- sf_execute_report(this_report_id, async=TRUE)
# third, pull a list of async requests ("instances") usually meant for checking
# if a recently requested report has succeeded and the results can be retrieved
instance_list <- sf_list_report_instances(this_report_id)
instance_status <- instance_list[[which(instance_list$id == results$id), "status"]]
}