Module: PortfolioManager::Services::Reporting::CustomReportingReportManagement::Live
- Included in:
- All::Live
- Defined in:
- lib/portfolio_manager/services/reporting.rb
Overview
Live Environment
Instance Method Summary collapse
-
#edit_report(report_id, report) ⇒ PortfolioManager::Xml::ResponseType
Edit Report.
-
#generate_report(report_id) ⇒ PortfolioManager::Xml::ResponseType
Generate Report.
-
#get_report(report_id) ⇒ PortfolioManager::Xml::Report, PortfolioManager::Xml::ResponseType
Get Report.
-
#get_report_list(type = nil) ⇒ PortfolioManager::Xml::ResponseType
Get Report List.
-
#get_report_results(report_id, type = "XML") ⇒ PortfolioManager::Xml::Report, PortfolioManager::Xml::ResponseType
Get Report Results.
-
#get_report_status(report_id) ⇒ PortfolioManager::Xml::ReportStatusDef, PortfolioManager::Xml::ResponseType
Get Report Status.
Instance Method Details
#edit_report(report_id, report) ⇒ PortfolioManager::Xml::ResponseType
Edit Report
This web service updates a specified report based on the list of properties and timeframe provided in the XML request. The web service returns the unique identifier to the report and a link to the corresponding web service to retrieve it. The report must be owned by you.
The following are limitations you should be aware of:
-
The report cannot be updated if it’s already submitted for processing or is being generated.
-
A maximum of 5,000 properties is allowed and replaces the previous set of properties in the report.
-
A maximum of 2 million data points are allowed in a report (#properties * #metrics * #time periods).
198 199 200 |
# File 'lib/portfolio_manager/services/reporting.rb', line 198 def edit_report(report_id, report) request(Net::HTTP::Put, path_for("reports", report_id), {}, {}, report, "report", PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#generate_report(report_id) ⇒ PortfolioManager::Xml::ResponseType
Generate Report
This web service generates a specific report. It returns a link to the corresponding web service to retrieve the generation status. The report must be owned by you.
The following are limitations you should be aware of:
-
Similar to the user interface, generated reports will only be available for 90 days. After that time you just need to generate the report again to populate your template with data.
-
You can only have a maximum of 5 reports generating at one time. To submit more, you will need to wait for at least one of your 5 reports to finish generating.
239 240 241 |
# File 'lib/portfolio_manager/services/reporting.rb', line 239 def generate_report(report_id) request(Net::HTTP::Post, path_for("reports", report_id, "generate"), {}, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#get_report(report_id) ⇒ PortfolioManager::Xml::Report, PortfolioManager::Xml::ResponseType
Get Report
This web service retrieves the the list of properties, timeframe, current status, and the unique identifier to the corresponding template for a specific report. The report must be owned by you.
172 173 174 |
# File 'lib/portfolio_manager/services/reporting.rb', line 172 def get_report(report_id) request(Net::HTTP::Get, path_for("reports", report_id), {}, {}, nil, nil, PortfolioManager::Xml::Report, basic_auth: true) end |
#get_report_list(type = nil) ⇒ PortfolioManager::Xml::ResponseType
Get Report List
This web service returns a list of reports in your account.
279 280 281 282 283 |
# File 'lib/portfolio_manager/services/reporting.rb', line 279 def get_report_list(type = nil) request(Net::HTTP::Get, path_for("reports"), { "type" => type, }, {}, nil, nil, PortfolioManager::Xml::ResponseType, basic_auth: true) end |
#get_report_results(report_id, type = "XML") ⇒ PortfolioManager::Xml::Report, PortfolioManager::Xml::ResponseType
Get Report Results
This web service retrieves the results of a report. It returns a file stream of either an Excel file or a XML file. The report must be owned by you.
214 215 216 217 218 |
# File 'lib/portfolio_manager/services/reporting.rb', line 214 def get_report_results(report_id, type = "XML") request(Net::HTTP::Get, path_for("reports", report_id, "download"), { "type" => type, }, {}, nil, nil, PortfolioManager::Xml::Report, basic_auth: true) end |
#get_report_status(report_id) ⇒ PortfolioManager::Xml::ReportStatusDef, PortfolioManager::Xml::ResponseType
Get Report Status
This web service returns information on the status of the report. The report must be owned by you.
The following are valid statuses:
-
INITIALIZED - Indicates that the report was initially created or its configuration (i.e., timeframe, properties, metrics, etc.) has been updated.
-
SUBMITTED - Indicates that the report has been submitted for generation and is waiting to be generated.
-
IN_PROCESS - Indicates that the report is currently being generated.
-
FAILED - Indicates that the report encountered an unknown error during the generation step.
-
GENERATED - Indicates that report has completed generation and is available for download.
266 267 268 |
# File 'lib/portfolio_manager/services/reporting.rb', line 266 def get_report_status(report_id) request(Net::HTTP::Get, path_for("reports", report_id, "status"), {}, {}, nil, nil, PortfolioManager::Xml::ReportStatusDef, basic_auth: true) end |