Skip to content

Commit a1ed657

Browse files
authored
Merge pull request #94 from dfir-iris/api_v2_create_global_task
Api v2 create global task
2 parents 29970d4 + f63dcaa commit a1ed657

5 files changed

Lines changed: 109 additions & 1 deletion

File tree

docs/api_reference/reference/iris.v2.1.0.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ info:
8484
* Added GET /api/v2/alerts-filters/{identifier}
8585
* Added PUT /api/v2/alerts-filters/{identifier}
8686
* Added DELETE /api/v2/alerts-filters/{identifier}
87+
* Added POST /api/v2/global-tasks
8788
* Deprecated POST /manage/cases/add in favor of POST /api/v2/cases
8889
* Deprecated POST /manage/cases/update in favor of PUT /api/v2/cases/{case_identifier}
8990
* Deprecated POST /manage/cases/delete/{case_id} in favor of DELETE /api/v2/cases/{case_identifier}
@@ -137,6 +138,7 @@ info:
137138
* Deprecated GET /manage/customers/{customer_id}
138139
* Deprecated POST /manage/customers/update/{customer_id}
139140
* Deprecated POST /manage/customers/delete/{customer_id}
141+
* Deprecated POST /global/tasks/add
140142
* Added documentation of missing GET /manage/severities/list
141143
* Added documentation of missing GET /manage/tlp/list
142144
* Added documentation of missing GET /manage/event-categories/list
@@ -230,6 +232,8 @@ paths:
230232
$ref: v2.1.0/resources/api_v2_assets_{identifier}.yaml
231233
/api/v2/me:
232234
$ref: v2.1.0/resources/api_v2_me.yaml
235+
/api/v2/global-tasks:
236+
$ref: v2.1.0/resources/api_v2_global-tasks.yaml
233237
/manage/cases/update/{case_id}:
234238
$ref: v2.1.0/resources/manage_cases_update_{case_id}.yaml
235239
/case/summary/update:
@@ -547,6 +551,8 @@ tags:
547551
description: Endpoints to interact with tasks
548552
- name: Evidences
549553
description: Endpoints to interact with evidences
554+
- name: Global tasks
555+
description: Endpoints to interact with global tasks
550556
- name: Alerts
551557
description: Endpoints to interact with alerts
552558
- name: Customers
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
post:
2+
operationId: api_v2_global-tasks_post
3+
summary: Add a global task
4+
description: Add a global task and assign it to a user.
5+
tags:
6+
- Global tasks
7+
- Beta
8+
requestBody:
9+
content:
10+
application/json:
11+
schema:
12+
$ref: ../schemas/requestBodies/GlobalTask.yaml
13+
responses:
14+
'201':
15+
description: Global task successfully created
16+
content:
17+
application/json:
18+
schema:
19+
$ref: ../schemas/GlobalTask.yaml
20+
'400':
21+
$ref: ../responses/GenericError.yaml
22+
'403':
23+
$ref: ../responses/Forbidden.yaml
24+

docs/api_reference/reference/v2.1.0/resources/global_tasks_add.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
post:
22
summary: Add a global task
3+
description: This endpoint is deprecated. Use [POST /api/v2/global-tasks](#tag/Global-tasks/operation/api_v2_global-tasks_post) instead.
4+
deprecated: true
35
operationId: post-global-tasks-add
46
responses:
57
'200':
@@ -135,7 +137,6 @@ post:
135137
- Invalid user id for assignee
136138
message: Data error
137139
status: error
138-
description: 'Add a global task and assign it to a user. '
139140
security:
140141
- Bearer <bearer>: []
141142
requestBody:
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
type: object
2+
properties:
3+
task_id:
4+
type: number
5+
task_title:
6+
type: string
7+
minLength: 1
8+
task_description:
9+
type:
10+
- string
11+
- 'null'
12+
task_status_id:
13+
type: number
14+
task_assignee_id:
15+
type: number
16+
task_tags:
17+
type:
18+
- string
19+
- 'null'
20+
task_userid_open:
21+
type: integer
22+
task_open_date:
23+
type: string
24+
minLength: 1
25+
task_userid_update:
26+
type: number
27+
task_last_update:
28+
type: string
29+
minLength: 1
30+
task_userid_close:
31+
type:
32+
- integer
33+
- 'null'
34+
task_close_date:
35+
type:
36+
- integer
37+
- 'null'
38+
example:
39+
task_id: 9
40+
task_title: Task title
41+
task_description: My task description
42+
task_status_id: 15
43+
task_assignee_id: 1
44+
task_tags: ''
45+
task_userid_open: null
46+
task_open_date: '2022-01-21T17:07:10.005183'
47+
task_userid_update: 1
48+
task_last_update: '2022-01-21T17:07:10.005200'
49+
task_userid_close: null
50+
task_close_date: null
51+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
type: object
2+
properties:
3+
task_title:
4+
type: string
5+
minLength: 2
6+
task_description:
7+
type: string
8+
task_status_id:
9+
description: The initial status of the task
10+
type: integer
11+
task_assignee_id:
12+
type: integer
13+
description: A user ID for whom the task will be assigned
14+
task_tags:
15+
type: string
16+
required:
17+
- task_title
18+
- task_status_id
19+
- task_assignee_id
20+
example:
21+
task_title: Task title
22+
task_description: My task description
23+
task_status_id: 14
24+
task_assignee_id: 1
25+
task_tags: ''
26+

0 commit comments

Comments
 (0)