Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api v2 paginated gets #34

Merged
merged 4 commits into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/api_reference/reference/iris.v2.1.0.yaml
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ info:
* Added POST /api/v2/cases/{identifier}/iocs
* Added GET /api/v2/cases/{identifier}/iocs
* Added GET /api/v2/iocs/{identifier}
* Added PUT /api/v2/iocs/{identifier}
* Added DELETE /api/v2/iocs/{identifier}
* Added POST /api/v2/cases/{identifier}/tasks
* Added GET /api/v2/tasks/{identifier}
@@ -67,6 +68,8 @@ paths:
$ref: v2.1.0/resources/api_v2_cases_{identifier}_assets.yaml
/api/v2/cases/{identifier}/tasks:
$ref: v2.1.0/resources/api_v2_cases_{identifier}_tasks.yaml
/manage/cases/update/{case_id}:
$ref: v2.1.0/resources/manage_cases_update_{case_id}.yaml
/api/v2/iocs/{identifier}:
$ref: v2.1.0/resources/api_v2_iocs_{identifier}.yaml
/api/v2/tasks/{identifier}:
@@ -239,8 +242,6 @@ paths:
$ref: v2.1.0/resources/manage_cases_reopen_{case_id}.yaml
/manage/cases/delete/{case_id}:
$ref: v2.1.0/resources/manage_cases_delete_{case_id}.yaml
/manage/cases/update/{case_id}:
$ref: v2.1.0/resources/manage_cases_update_{case_id}.yaml
/manage/customers/list:
$ref: v2.1.0/resources/manage_customers_list.yaml
/manage/customers/{customer_id}:
Original file line number Diff line number Diff line change
@@ -12,52 +12,39 @@ post:
schema:
type: object
properties:
data:
type: object
properties:
ioc_description:
type: string
minLength: 1
description: 'A short description of the ioc. This will be the summary of the ioc.'
required: true
ioc_id:
type: number
description: 'A ioc reference'
required: true
ioc_misp:
description: 'Misp of ioc'
ioc_tags:
type: string
description : 'Ioc tags'
required: true
ioc_tlp_id:
type: number
required: true
ioc_type:
type: number
required: true
ioc_type_id:
type: number
required: true
ioc_value:
type: string
minLength: 1
required: true
user_id:
type: number
required: true
ioc_value:
type: string
minLength: 1
required: true
ioc_type_id:
type: number
required: true
ioc_tlp_id:
type: number
required: true
ioc_description:
type: string
minLength: 1
description: 'A short description of the ioc. This will be the summary of the ioc.'
required: true
ioc_misp:
type:
- string
- 'null'
description: 'Misp of ioc'
ioc_tags:
type: string
description : 'Ioc tags'
required: true
examples:
Valid request:
value:
ioc_description: rewrw
ioc_id: 34
ioc_misp: null
ioc_tags: ''
ioc_tlp_id: 2
ioc_type: 1
ioc_type_id: 1
ioc_value: 8.8.8.8
user_id: 1
ioc_value: 8.8.8.8
ioc_type_id: 1
ioc_tlp_id: 2
ioc_description: rewrw
ioc_misp: null
ioc_tags: ''
responses:
'201':
description: Ioc successfully created
Original file line number Diff line number Diff line change
@@ -14,8 +14,59 @@ get:
application/json:
schema:
$ref: ../schemas/Ioc.yaml
'404':
$ref: ../responses/NotFound.yaml
'404':
$ref: ../responses/NotFound.yaml
put:
operationId: api_v2_iocs_{identifier}_put
tags:
- IOCs
- Beta
summary: Update an IOC
description: ''
requestBody:
content:
application/json:
schema:
type: object
properties:
ioc_value:
type: string
minLength: 1
ioc_type_id:
type: number
ioc_tlp_id:
type: number
ioc_description:
type: string
minLength: 1
description: 'A short description of the ioc. This will be the summary of the ioc.'
ioc_misp:
type:
- string
- 'null'
description: 'Misp of ioc'
ioc_tags:
type: string
description : 'Ioc tags'
examples:
Valid request:
value:
ioc_value: 8.8.8.8
ioc_type_id: 1
ioc_tlp_id: 2
ioc_description: rewrw
ioc_tags: ''
responses:
'200':
description: IOC successfully updated
content:
application/json:
schema:
$ref: ../schemas/Ioc.yaml
'404':
$ref: ../responses/NotFound.yaml
'400':
$ref: ../responses/GenericError.yaml
delete:
operationId: api_v2_iocs_{identifier}_delete
tags:
2 changes: 1 addition & 1 deletion docs/api_reference/reference/v2.1.0/schemas/Cases.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ type: object
properties:
total:
type: integer
cases:
data:
type: array
items:
$ref: ../schemas/Case.yaml
2 changes: 1 addition & 1 deletion docs/api_reference/reference/v2.1.0/schemas/Iocs.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ type: object
properties:
total:
type: integer
iocs:
data:
type: array
items:
$ref: ../schemas/Ioc.yaml