Skip to content

Commit

Permalink
[TTAHUB-35]: Add a bit of API documentation for download endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dcloud committed Mar 26, 2021
1 parent 111a2fe commit d54affc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/openapi/paths/activity-reports/download.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
get:
tags:
- activity-reports
summary: Download activity reports, in various formats.
description: >-
Multiple report ids can be selected by repeat use of the `report` parameter.
parameters:
- name: report
in: query
description: Ids of reports to include in download
required: true
style: form
schema:
type: array
minItems: 1
items:
type: integer
- name: format
in: query
description: Format to download report in
required: false
style: form
schema:
type: string
enum:
- json
- csv
default: json

responses:
200:
description: Successfully retrieved activity reports
content:
text/csv; charset=utf-8:
schema:
type: string
application/json:
schema:
type: object
$ref: '../../index.yaml#/components/schemas/activityReport'
2 changes: 2 additions & 0 deletions docs/openapi/paths/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
$ref: './adminAllUsers.yaml'
'/activity-reports':
$ref: './activity-reports/activity-reports.yaml'
'/activity-reports/download':
$ref: './activity-reports/download.yaml'
'/activity-reports/goals':
$ref: './activity-reports/goals.yaml'
'/activity-reports/approvers':
Expand Down

0 comments on commit d54affc

Please sign in to comment.