Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added get API spec for report exports #523

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 71 additions & 25 deletions reference/spender.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3481,31 +3481,6 @@ components:
Formula to transform the data in the column.
description: |
Configure the columns to show in the export file.
reports_exports_in:
type: object
additionalProperties: false
required:
- query_params
- notify_emails
- config
properties:
query_params:
allOf:
- $ref: '#/components/schemas/query_params'
nullable: false
notify_emails:
type: array
nullable: false
items:
$ref: '#/components/schemas/email'
description: |
List of emails to notify when the export is ready.
config:
allOf:
- $ref: '#/components/schemas/reports_export_config'
nullable: false
description: |
Configuration for the export.
reports_exports_out:
type: object
additionalProperties: false
Expand Down Expand Up @@ -3552,6 +3527,31 @@ components:
description: |
Status of the export.
example: PENDING
reports_exports_in:
type: object
additionalProperties: false
required:
- query_params
- notify_emails
- config
properties:
query_params:
allOf:
- $ref: '#/components/schemas/query_params'
nullable: false
notify_emails:
type: array
nullable: false
items:
$ref: '#/components/schemas/email'
description: |
List of emails to notify when the export is ready.
config:
allOf:
- $ref: '#/components/schemas/reports_export_config'
nullable: false
description: |
Configuration for the export.
advance_out_embed:
type: object
nullable: true
Expand Down Expand Up @@ -9949,6 +9949,52 @@ paths:
schema:
$ref: '#/components/schemas/404'
/spender/reports/exports:
get:
tags:
- Reports
summary: Get report export requests.
operationId: report_exports_get
description: |
This API supports very rich filtering on all response fields and pagination via query parameters. To understand how to use these parameters, please see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering)
parameters:
- $ref: '#/components/parameters/q'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
count:
description: |
The total number of objects that can be requested.
type: integer
example: 10000
offset:
description: |
offset is used to skip that many number of objects before counting. <br>
For example, if there are 2000 objects, <br>
The first request will have offset as 0 and limit as 1000 to return first 1000 objects. <br>
The second request will have offset as 1000 and limit as 1000 to return next 1000 objects. <br>
type: integer
example: 10
data:
type: array
items:
$ref: '#/components/schemas/reports_exports_out'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/401'
post:
tags:
- Reports
Expand Down
53 changes: 53 additions & 0 deletions src/spender/paths/spender@reports@exports.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
get:
tags:
- Reports
summary: Get report export requests.
operationId: report_exports_get
description: |
This API supports very rich filtering on all response fields and pagination via query parameters. To understand how to use these parameters, please see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering)
parameters:
- $ref: ../../components/parameters/q.yaml
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
count:
description: |
The total number of objects that can be requested.
type: integer
example: 10000
offset:
description: >
offset is used to skip that many number of objects before
counting. <br>

For example, if there are 2000 objects, <br>

The first request will have offset as 0 and limit as 1000 to
return first 1000 objects. <br>

The second request will have offset as 1000 and limit as 1000
to return next 1000 objects. <br>
type: integer
example: 10
data:
type: array
items:
$ref: '../../components/schemas/reports_exports.yaml#/reports_exports_out'
'400':
description: Bad request
content:
application/json:
schema:
$ref: ../../components/schemas/400.yaml
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '../../components/schemas/401.yaml'

post:
tags:
- Reports
Expand Down