Skip to content

Commit 4f5821e

Browse files
author
Anton Benkevich
committed
Definitions Update
Subscriptions v1 Kalm v1 Iris v3
1 parent c4e0ddc commit 4f5821e

File tree

3 files changed

+974
-14
lines changed

3 files changed

+974
-14
lines changed

alsdkdefs/apis/iris/iris.v3.yaml

Lines changed: 228 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ paths:
2626
application/json:
2727
schema:
2828
$ref: '#/components/schemas/Incident'
29-
examples:
29+
examples:
3030
Get Incident response example:
3131
value:
3232
accountId: number
@@ -131,11 +131,9 @@ paths:
131131
examples:
132132
Friendly response example:
133133
value:
134-
- {
135-
accountId: number,
136-
humanFriendlyId: string,
134+
- accountId: number
135+
humanFriendlyId: string
137136
incidentId: string
138-
}
139137
'401':
140138
description: Unauthorized
141139
'403':
@@ -221,10 +219,10 @@ paths:
221219
Results: string
222220
TimeSlice: string
223221
Total Query: string
224-
'401':
225-
description: Unauthorized
226222
'400':
227223
description: Bad request
224+
'401':
225+
description: Unauthorized
228226
'404':
229227
description: Not found
230228
operationId: get_associated_elaborations
@@ -247,19 +245,19 @@ paths:
247245
name: incident_id
248246
in: path
249247
required: true
250-
description: Incident ID
248+
description: Incident ID
251249
- schema:
252250
type: string
253251
name: returnSource
254252
in: query
255-
description: To filter by source type. Allowed values - log, event
253+
description: 'To filter by source type. Allowed values - log, event'
256254
- schema:
257255
type: string
258256
name: return_value
259257
in: query
260-
description: Comma delimted list of 'dot-notation' string names of desired properties in the result set. Use if you want only a subset of attributes from results
258+
description: "Comma delimted list of 'dot-notation' string names of desired properties in the result set. Use if you want only a subset of attributes from results"
261259
'/iris/v3/{account_id}/incidents_by_time':
262-
'get':
260+
get:
263261
summary: Get incidents in a timespan for account
264262
tags:
265263
- Incident operations
@@ -354,18 +352,177 @@ paths:
354352
name: start_time
355353
in: query
356354
required: true
357-
description: Time to begin span, either epoch timestamp or an ISO string
355+
description: 'Time to begin span, either epoch timestamp or an ISO string'
358356
- schema:
359357
type: string
360358
name: end_time
361359
in: query
362360
required: true
363-
description: Time to end span, either epoch timestamp or an ISO string
361+
description: 'Time to end span, either epoch timestamp or an ISO string'
364362
- schema:
365363
type: string
366364
name: return_value
367365
in: query
368366
description: Comma delimited list of dot-notation string names of desired properties in the result set. Use if you only want a subset of attributes from each incident
367+
'/iris/v3/{account_id}/{incident_id}/complete':
368+
post:
369+
summary: Complete / close an incident
370+
tags:
371+
- UI operations
372+
responses:
373+
'200':
374+
description: OK
375+
content:
376+
application/json:
377+
schema:
378+
$ref: '#/components/schemas/CompleteIncident'
379+
examples:
380+
Complete incident response example:
381+
value:
382+
new:
383+
notes: This incident is closed because of x
384+
reason_code: further_action
385+
status: completed
386+
status_change_time: 2020-05-22T11:09:56.855569+00:00
387+
old:
388+
status: open
389+
status_change_time: 2020-05-22T07:54:33.555371+00:00
390+
'400':
391+
description: Bad request
392+
'401':
393+
description: Not authorized
394+
'404':
395+
description: Not found
396+
'500':
397+
description: Internal Server Error
398+
operationId: complete_incident
399+
description: Complete/Close an incident
400+
security:
401+
- X-AIMS-Auth-Token: []
402+
x-code-samples:
403+
- lang: Request Sample
404+
source: |
405+
curl -H "x-aims-auth-token: ${TOKEN}" -X POST https://api.cloudinsight.alertlogic.com/iris/v3/12341ab29e36-394e-11e9-a004-720004270420/complete -d '{"reason_code": "further_action", "notes": "This incident is closed because of y"}'
406+
requestBody:
407+
description: 'The value in notes will be displayed in the customer console as the reason for incident closure/completion. The value in reason code is used to classify the reason for closure.'
408+
required: true
409+
content:
410+
application/json:
411+
schema:
412+
type: object
413+
properties:
414+
notes:
415+
type: string
416+
description: Notes about completion
417+
reason_code:
418+
type: string
419+
description: Reason for completion
420+
enum:
421+
- further_action
422+
- acceptable_risk
423+
- compensating_control
424+
- threat_not_valid
425+
- not_concluded
426+
- other
427+
required:
428+
- notes
429+
- reason_code
430+
examples:
431+
Complete incident body:
432+
value:
433+
notes: This incident is because of X
434+
reason_code: compensating_control
435+
parameters:
436+
- schema:
437+
type: string
438+
name: account_id
439+
in: path
440+
required: true
441+
description: AIMS Account ID
442+
- schema:
443+
type: string
444+
name: incident_id
445+
in: path
446+
required: true
447+
description: Incident ID
448+
'/iris/v3/{account_id}/{incident_id}/feedback':
449+
post:
450+
summary: Add feedback to an incident
451+
tags:
452+
- UI operations
453+
responses:
454+
'200':
455+
description: OK
456+
content:
457+
application/json:
458+
schema:
459+
$ref: '#/components/schemas/CustomerFeedback'
460+
examples:
461+
Add feedback response example:
462+
value:
463+
feedback: My feedback
464+
feedback_datetime: '2020-05-25T19:21:04.854130+00:00'
465+
feedback_reason: further_action
466+
feedback_uid: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
467+
feedback_user: 'User Name <[email protected]>'
468+
'400':
469+
description: Bad request
470+
'401':
471+
description: Unauthorized
472+
'404':
473+
description: Not Found
474+
'500':
475+
description: Internal Server Error
476+
operationId: add_feedback
477+
description: Add feedback to incident
478+
security:
479+
- X-AIMS-Auth-Token: []
480+
x-code-samples:
481+
- lang: Request Sample
482+
source: |
483+
curl -H "x-aims-auth-token: ${TOKEN}" -X POST https://api.cloudinsight.alertlogic.com/iris/v3/1234/1ab29e36-394e-11e9-a004-720004270420/feedback -d '{"customer_feedback": "My feedback", "customer_feedback_reason": "further_action"}'
484+
requestBody:
485+
description: 'The value in customer_feedback will be added to the incident and visible in the customer console, the value in customer_feedback_reason is used to classify the type of feedback.'
486+
required: true
487+
content:
488+
application/json:
489+
schema:
490+
type: object
491+
properties:
492+
customer_feedback:
493+
type: string
494+
description: Feedback to add to incident
495+
customer_feedback_reason:
496+
type: string
497+
description: Reason for feedback
498+
enum:
499+
- further_action
500+
- acceptable_risk
501+
- compensating_control
502+
- threat_not_valid
503+
- not_concluded
504+
- other
505+
required:
506+
- customer_feedback
507+
- customer_feedback_reason
508+
examples:
509+
Add customer feedback body:
510+
value:
511+
customer_feedback: My feedback
512+
customer_feedback_reason: futher_action
513+
parameters:
514+
- schema:
515+
type: string
516+
name: account_id
517+
in: path
518+
required: true
519+
description: AIMS Account ID
520+
- schema:
521+
type: string
522+
name: incident_id
523+
in: path
524+
required: true
525+
description: Incident ID
369526
components:
370527
schemas:
371528
Incident:
@@ -496,9 +653,64 @@ components:
496653
IncidentsByTime:
497654
title: IncidentsByTime
498655
type: array
499-
items:
656+
items:
500657
$ref: '#/components/schemas/Incident'
501658
description: IncidentsByTime list
659+
CustomerFeedback:
660+
title: CustomerFeedback
661+
type: object
662+
description: Customer feedback response object
663+
properties:
664+
feedback:
665+
type: string
666+
feedback_user:
667+
type: string
668+
feedback_uid:
669+
type: string
670+
feedback_reason:
671+
type: string
672+
feedback_datetime:
673+
type: string
674+
required:
675+
- feedback
676+
- feedback_datetime
677+
- feedback_reason
678+
- feedback_uid
679+
- feedback_user
680+
CompleteIncident:
681+
title: Incident completion responses
682+
type: object
683+
description: Incident completion response object
684+
properties:
685+
new:
686+
type: object
687+
properties:
688+
notes:
689+
type: string
690+
reason_code:
691+
type: string
692+
status:
693+
type: string
694+
status_change_time:
695+
type: string
696+
required:
697+
- notes
698+
- reason_code
699+
- status
700+
- status_change_time
701+
old:
702+
type: object
703+
properties:
704+
status:
705+
type: string
706+
status_change_time:
707+
type: string
708+
required:
709+
- status
710+
- status_change_time
711+
required:
712+
- new
713+
- old
502714
securitySchemes:
503715
X-AIMS-Auth-Token:
504716
name: X-AIMS-Auth-Token
@@ -508,3 +720,5 @@ components:
508720
tags:
509721
- name: Incident operations
510722
description: IRIS incident operations
723+
- name: UI operations
724+
description: IRIS operations available through the console

0 commit comments

Comments
 (0)