Skip to content

Commit fb04edf

Browse files
committed
chore: remove extra endpoint, tweak descriptions
1 parent 7284001 commit fb04edf

File tree

1 file changed

+53
-135
lines changed

1 file changed

+53
-135
lines changed

openapi.yml

Lines changed: 53 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ components:
3737
description: A unique identifier for the breach
3838
type: string
3939
domain:
40-
description: The domain of the primary website the breach occurred on. This may be used for identifying other assets external systems may have for the site.
40+
description: |
41+
The domain of the primary website the breach occurred on.
42+
This may be used for identifying other assets external systems may have for the site.
43+
This value comes from HIBP. See (their API docs)[https://haveibeenpwned.com/api/v3#BreachModel] for more information.
4144
type: string
4245
breachDate:
4346
description: The date (with no time) the breach originally occurred on in ISO 8601 format. This is not always accurate — frequently breaches are discovered and reported long after the original incident. Use this attribute as a guide only.
@@ -48,14 +51,17 @@ components:
4851
type: string
4952
format: date-time
5053
modifiedDate:
51-
description: The date and time (precision to the minute) the breach was modified in ISO 8601 format. This will only differ from the AddedDate attribute if other attributes represented here are changed or data in the breach itself is changed (i.e. additional data is identified and loaded). It is always either equal to or greater then the AddedDate attribute, never less than.
54+
description: >
55+
The date and time (precision to the minute) the breach was modified in ISO 8601 format.
56+
This will only differ from the AddedDate attribute if other attributes represented here are changed
57+
or data in the breach itself is changed (i.e. additional data is identified and loaded).
58+
It is always either equal to or greater then the AddedDate attribute, never less than.
5259
type: string
5360
format: date-time
5461
dataClasses:
55-
# Question: is this data only per-breach or do we have per-user impact?
56-
# If per-breach only, BreachResolution makes sense
57-
# If individual user, maybe need BreachImpact or something
58-
description: This attribute describes the nature of the data compromised in the breach and contains an alphabetically ordered string array of impacted data classes. See https://haveibeenpwned.com/api/v3/dataclasses for list of dataclasses.
62+
description: >
63+
This attribute describes the nature of the data compromised in the breach and contains an alphabetically
64+
ordered string array of impacted data classes. See https://haveibeenpwned.com/api/v3/dataclasses for list of dataclasses.
5965
type: array
6066
items:
6167
type: string
@@ -124,7 +130,6 @@ paths:
124130
required: false
125131
description: >
126132
Filter breaches to those whose breach.dataClasses includes any (but not necessarily all) of the specified values.
127-
Matching is performed at the breach level (not per monitored email).
128133
schema:
129134
type: array
130135
items:
@@ -143,9 +148,11 @@ paths:
143148
required: false
144149
description: >
145150
Filter breaches to those where one or more of the specified dataclasses
146-
are still unresolved for the authenticated user.
151+
are still unresolved for the authenticated user, for at least one breached account.
147152
A breach matches if any of the specified dataclasses are unresolved
148-
for at least one monitored email.
153+
for at least one monitored email. Note that the breached accounts in the response are
154+
not filtered by this parameter; the client will receive the complete set of breached account states
155+
for the given breach.
149156
schema:
150157
type: array
151158
items:
@@ -183,7 +190,7 @@ paths:
183190
summary: Breaches found
184191
value:
185192
- breach:
186-
id: 123
193+
id: "Breach1"
187194
domain: "example.com"
188195
breachDate: "2023-04-10"
189196
addedDate: "2023-05-01T12:34:00Z"
@@ -204,100 +211,6 @@ paths:
204211
"403":
205212
description: Not authorized
206213

207-
/user/breaches/{breachId}/resolutions:
208-
post:
209-
description: |
210-
Upsert resolution state for one breach across one or more monitored email addresses.
211-
212-
This operation is idempotent per `(email, dataClass)` within the breach. Repeating the same
213-
request results in the same stored state and does not produce an error.
214-
215-
If `emails` is omitted, the update applies to all monitored email addresses affected by this
216-
breach for the authenticated user.
217-
218-
**Authorization and privacy**
219-
- All `emails` provided must be monitored by the authenticated user.
220-
- For privacy reasons, if any provided email address is not associated with the authenticated
221-
user, the server treats the request as if the resource does not exist and returns
222-
`404 Not Found`.
223-
224-
**Atomicity**
225-
- Requests are atomic: the update is applied to all targeted emails and dataclasses, or to none.
226-
227-
parameters:
228-
- name: breachId
229-
in: path
230-
required: true
231-
schema:
232-
type: integer
233-
examples:
234-
example:
235-
summary: Example breach id
236-
value: 123
237-
requestBody:
238-
required: true
239-
content:
240-
application/json:
241-
schema:
242-
type: object
243-
additionalProperties: false
244-
required:
245-
- dataClasses
246-
- resolved
247-
properties:
248-
emails:
249-
type: array
250-
minItems: 1
251-
description: >
252-
Monitored email addresses to apply the update to. If omitted, applies to all
253-
monitored email addresses affected by this breach.
254-
items:
255-
type: string
256-
format: email
257-
dataClasses:
258-
type: array
259-
minItems: 1
260-
description: Dataclasses to mark resolved/unresolved for the selected emails.
261-
items:
262-
type: string
263-
resolved:
264-
type: boolean
265-
description: True to mark resolved; false to mark unresolved (undo).
266-
examples:
267-
resolvePasswordsOneEmail:
268-
summary: Resolve Passwords for one email in this breach
269-
value:
270-
emails: ["alice@example.com"]
271-
dataClasses: ["passwords"]
272-
resolved: true
273-
resolvePasswordsAllEmailsInBreach:
274-
summary: Resolve Passwords for all affected emails in this breach
275-
value:
276-
dataClasses: ["passwords"]
277-
resolved: true
278-
resolveMultipleDataClassesTwoEmails:
279-
summary: Resolve multiple dataclasses for multiple emails
280-
value:
281-
emails: ["alice@example.com", "bob@example.com"]
282-
dataClasses: ["passwords", "email-addresses"]
283-
resolved: true
284-
undoPasswordsAllEmailsInBreach:
285-
summary: Undo Passwords resolution for all affected emails in this breach
286-
value:
287-
dataClasses: ["passwords"]
288-
resolved: false
289-
responses:
290-
"204":
291-
description: Resolution state updated successfully.
292-
"400":
293-
description: Invalid request (e.g., empty dataClasses, invalid emails).
294-
"401":
295-
description: Authentication required
296-
"403":
297-
description: Not authorized
298-
"404":
299-
description: Breach or email not found (or not visible to this user)
300-
301214
/user/breaches/resolutions:
302215
post:
303216
description: |
@@ -330,45 +243,50 @@ paths:
330243
examples:
331244
example:
332245
summary: Example breach id
333-
value: 123
246+
value: "Breach1"
334247
requestBody:
335248
required: true
336249
content:
337250
application/json:
338251
schema:
339-
type: object
340-
additionalProperties: false
341-
required:
342-
- dataClasses
343-
- resolved
344-
- breachId
345-
properties:
346-
emails:
347-
type: array
348-
minItems: 1
349-
description: >
350-
Monitored email addresses to apply the update to. If omitted, applies to all
351-
monitored email addresses affected by the referenced breach.
352-
items:
353-
type: string
354-
format: email
355-
dataClasses:
356-
type: array
357-
minItems: 1
358-
description: Dataclasses to mark resolved/unresolved for the selected emails.
359-
items:
252+
type: array
253+
items:
254+
type: object
255+
additionalProperties: false
256+
required:
257+
- dataClasses
258+
- resolved
259+
- breachId
260+
properties:
261+
emails:
262+
type: array
263+
minItems: 1
264+
description: >
265+
Monitored email addresses to apply the update to. If omitted, applies to all
266+
monitored email addresses affected by the referenced breach.
267+
items:
268+
type: string
269+
format: email
270+
dataClasses:
271+
type: array
272+
minItems: 1
273+
description: Dataclasses to mark resolved/unresolved for the selected emails.
274+
items:
275+
type: string
276+
breachId:
277+
description: The unique breach identifier
360278
type: string
361-
resolved:
362-
type: boolean
363-
description: True to mark resolved; false to mark unresolved.
279+
resolved:
280+
type: boolean
281+
description: True to mark resolved; false to mark unresolved.
364282
examples:
365283
resolveMultipleBreaches:
366284
summary: Resolve multiple breaches
367285
value:
368-
- breachId: 123
286+
- breachId: "Breach1"
369287
dataClasses: ["passwords"]
370288
resolved: true
371-
- breachId: 456
289+
- breachId: "Breach2"
372290
dataClasses: ["passwords"]
373291
emails: ["alice@example.com"]
374292
resolved: true
@@ -377,22 +295,22 @@ paths:
377295
value:
378296
- emails: ["alice@example.com"]
379297
dataClasses: ["passwords"]
380-
breachId: 123
298+
breachId: "Breach1"
381299
resolved: true
382300
undoPasswordsAllEmailsInBreach:
383301
summary: Unresolve Passwords resolution for all affected emails in multiple breaches
384302
value:
385303
- dataClasses: ["passwords"]
386304
resolved: false
387-
breachId: 123
305+
breachId: "Breach1"
388306
- dataClasses: ["passwords"]
389307
resolved: false
390-
breachId: 456
308+
breachId: "Breach2"
391309
responses:
392310
"204":
393311
description: Resolution state updated successfully.
394312
"400":
395-
description: Invalid request (e.g., empty dataClasses, invalid emails, non-unique breach IDs).
313+
description: Invalid request (e.g., empty dataClasses, invalid email string format, non-unique breach IDs).
396314
"401":
397315
description: Authentication required
398316
"403":

0 commit comments

Comments
 (0)