-
Notifications
You must be signed in to change notification settings - Fork 25
/
api.yml
185 lines (178 loc) · 5.17 KB
/
api.yml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
---
openapi: "3.0.3"
info:
title: IETF Mail Archive API
version: 0.1.0
servers:
- url: https://mailarchive.ietf.org
description: server
paths:
/api/v1/stats/msg_counts/:
get:
summary: Number of messages for given list(s), date range
parameters:
- in: query
name: list
schema:
type: string
description: Email list(s). Optional. Comma separated list of Email Lists. If not provided return counts for all lists
examples:
one:
value: dnsop
summary: stats for one list
multi:
value: dnsop,v6ops
summary: stats for multiple lists
- in: query
name: start
schema:
type: string
format: date
example: 20200101
description: Start Date ISO Format. Optional. Defaults to thirty days ago
- in: query
name: end
schema:
type: string
format: date
example: 20201231
description: End Date ISO Format. Optional. Defaults to today
- in: query
name: duration
schema:
type: string
description: Time duration. Optional. N(years|months|weeks|days|hours|minutes)
examples:
none:
value:
summary: no duration
weeks:
value: 6weeks
summary: a duration of 6 weeks
years:
value: 2years
summary: a duration of 2 years
responses:
'200':
description: Returns message counts
content:
application/json:
schema:
type: object
properties:
start:
type: string
description: Start date
end:
type: string
description: End date
msg_counts:
type: object
description: Counts per list
example:
start: 20200101
end: 20201231
msg_counts:
dnsop: 1764
'400':
description: Error has occured.
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error description
/api/v1/stats/subscriber_counts/:
get:
summary: Number of subscribers for given list(s), for date
parameters:
- in: query
name: list
schema:
type: string
description: Email list(s). Optional. Comma separated list of Email Lists. If not provided return counts for all lists
examples:
one:
value: dnsop
summary: stats for one list
multi:
value: dnsop,v6ops
summary: stats for multiple lists
- in: query
name: date
schema:
type: string
format: date
example: 20200101
description: Start Date ISO Format. Optional. Defaults to first day of last month
responses:
'200':
description: Returns subscriber counts
content:
application/json:
schema:
type: object
properties:
date:
type: string
description: Date
subscriber_counts:
type: object
description: Counts per list
example:
date: 20200101
subscriber_counts:
dnsop: 315
'400':
description: Error has occured.
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error description
/api/v1/message/import/:
post:
summary: Import email message
security:
- ApiKeyAuth: []
requestBody:
description: base64 encoded email message
required: true
content:
application/json:
schema:
type: object
properties:
list_name:
type: string
minLength: 1
description: email list name (no domain)
list_visibility:
type: string
enum: [public, private]
description: email list visibility
message:
type: string
description: base64 encoded message
required:
- list_name
- list_visibility
- message
responses:
'201':
description: Created
'400':
description: Bad Request
'403':
description: Forbidden
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-KEY