generated from peter-evans/swagger-github-pages
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgraph-report-api-doc.yaml
129 lines (119 loc) · 4.9 KB
/
graph-report-api-doc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
openapi: 3.0.0
info:
version: 4.4.3
title: goTom Graph Report API
x-explorer-enabled: false # this disables the "try me" button for test requests on readme.com
paths:
/app-api/graph-export/download/{savedReportId}:
get:
tags: [GraphReport]
summary: Download graph report as csv
description: >
Careful - custom reports must be retrieved via other endpoint.
Useful links
* [Introduction, Order API user, Requirements, End Points, Authentication, Up-to-dateness of the data, Contact](/docs/general-process-request-user-and-access)
* [Php example code graph export](/docs/example-graph-report-call-with-php)
parameters:
- in: path
name: savedReportId
description: >
You get this report ID by saving a graph report. For example:
1. Go to [https://example.com/statistic/graph-report/show](https://example.com/statistic/graph-report/show), enter a name for the report and press save.
2. Read out the resulting `savedReportId` in the following page e.g. `https://example.com/statistic/graph-report/saved/46` where 46 is the `savedReportId`
3. Use the `savedReportId` to call this endpoint with e.g. `/app-api/graph-export/download/46`
schema:
type: integer
required: true
responses:
'200':
description: The report as csv file
content:
text/csv;charset=UTF-8:
schema:
type: string
format: binary
example: |
"Column1","Column2","Column3"
"Value1","Value2","Value3"
"Value4","Value5","Value6"
'404':
description:
The report was not found. Did you save it and was it really a GraphReport (not CustomReport)? Correct environment test, staging or production?
content:
text/html:
schema:
type: string
example: |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>404 Not Found</title>
</head>
<body>
<h1>404 Not Found</h1>
<p>The requested report could not be found.</p>
</body>
</html>
'500':
description: Reason maybe you tried to retrieve a custom report mistakenly over this endpoint instead of the other
content:
text/html; charset=UTF-8: {}
/app-api/custom-report-export/download/{savedReportId}:
get:
tags: [GraphReport]
summary: Download custom graph report as csv
description: >
Careful - normal graph reports must be retrieved via other endpoint.
* [Introduction, Order API user, Requirements, End Points, Authentication, Up-to-dateness of the data, Contact](/docs/graphreport-actuality-of-the-data)
* [Php example code custom graph export](/docs/example-graph-report-call-with-php)
* [General code examples](/docs/example-api-call-code)
parameters:
- in: path
name: savedReportId
description: >
You get this report ID by saving a graph report. For example:
1. Go to [https://example.com/statistic/customreport](https://example.com/statistic/customreport), enter a name for the report and press save.
2. Read out the resulting `savedReportId` in the following page e.g. `https://example.com/statistic/customreport?saved_report_id=47` where 47 is the `savedReportId`
3. Use the `savedReportId` to call this endpoint with e.g. `/app-api/custom-report-export/download/47`
schema:
type: integer
required: true
responses:
'200':
description: The report as csv file
content:
text/csv;charset=UTF-8:
schema:
type: string
format: binary
example: |
"Column1","Column2","Column3"
"Value1","Value2","Value3"
"Value4","Value5","Value6"
'404':
description:
The report was not found. Did you save it and was it really a CustomReport (not GraphReport)? Correct environment test, staging or production?
content:
text/html:
schema:
type: string
example: |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>404 Not Found</title>
</head>
<body>
<h1>404 Not Found</h1>
<p>The requested report could not be found.</p>
</body>
</html>
components:
schemas:
{}
parameters:
{}
responses:
{}