Three lines

Uber

Developers

[Overview] Overview for the async reporting apis

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

This document provides an overview on how to use the different apis in order to send a request to generate report.

User Flow

In order to generate the report and get the report there are 3 steps to be followed.

  1. Send a request to initiate the generate report.
  2. Poll for the status of the report request in above step.
  3. Once the status of report is REPORT_STATUS_COMPLETED then trigger a request to get a signed url for the report that was generated.

In addition to above if there is a need to list all the reports generated in the organization then List all reports for the organization API will provide that information in a paginated manner. The generated file will be of csv format.

APIs to be used
  1. For sending the request to generate report use Generate Report API.
    • This endpoint takes reportType and other filter types needed for generating the report.
    • The response of the endpoint will return the report’s metadata information with report status and reportId.
    • Use the reportId for further subsequent API calls(mentioned in step 2 & 3).
  2. Poll the status of the report using Get Report By Report ID API.
    • This endpoint takes reportId as input and returns the report metadata having report status.
    • Use this endpoint for fetching the report status and once the report status is a terminating status (ie REPORT_STATUS_COMPLETED or REPORT_STATUS_FAILED) move to step 3.
  3. If the report status is REPORT_STATUS_COMPLETED then use the Create Report URL for the report API to get the signed url for the generated report.
    • This endpoint takes the reportId as input and returns the signed url.
    • Open this signed url and it will contain the downloadable content for the requested report.
    • This signed url will be valid only for 60sec. Post which we need to generate the url again for the same reportId.
  4. If the report status is REPORT_STATUS_FAILED then check the field failedReason present in the repose of Get Report By Report ID API for more information.
Available APIs

Currently there are 4 endpoints which are exposed for supporting the async reporting workflow. Below are the mentioned 4 apis

  1. Generate Report API
  2. Get Report By Report ID API
  3. List all reports for the organization API
  4. Create Report URL for the report API
Optimal way to use async reporting APIs for generating reports for multiple organisation

Notes

  • The generated report file will contain data for all the child organizations present under the organization uuid passed in the request of Generate Report API.

Uber

Developers
© 2023 Uber Technologies Inc.