-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
JiraV2.yml
613 lines (613 loc) · 21.3 KB
/
JiraV2.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
category: Case Management
commonfields:
id: jira-v2
version: -1
configuration:
- display: 'Jira URL, for example: https://demisto.atlassian.net/'
name: url
required: true
type: 0
- display: Username (Basic Authentication)
name: username
type: 0
required: false
- display: Password (Deprecated - Use API token)
name: password
type: 4
required: false
- displaypassword: API token (Recommended)
name: credentials
type: 9
hiddenusername: true
display: ''
required: false
- defaultvalue: OauthKey
additionalinfo: This field is ignored if other required fields are not provided (for example both the access token and the private key).
display: Consumer key (OAuth 1.0)
name: consumerKey
type: 0
required: false
- display: Access Token
additionalinfo: This token is used for both OAuth 1.0 and personal access token authentication methods.
name: accessToken
type: 0
required: false
- display: Private key (PKCS8 format)
name: privateKey
type: 14
required: false
- defaultvalue: status!=done
display: Query (in JQL) for fetching incidents.
name: query
type: 0
required: false
- additionalinfo: This parameter is dismissed while "Use created field to fetch incidents" is checked.
display: Issue index to start fetching incidents from
name: idOffset
type: 0
required: false
- display: Trust any certificate (not secure)
name: insecure
type: 8
required: false
- defaultvalue: 'false'
display: Use system proxy settings
name: proxy
type: 8
required: false
- display: Fetch incidents
name: isFetch
type: 8
required: false
- defaultvalue: 'false'
display: Mirror incoming incidents
hidden:
- marketplacev2
name: incoming_mirror
type: 8
required: false
- display: Incident type
name: incidentType
type: 13
required: false
- display: Use created field to fetch incidents
name: fetchByCreated
type: 8
required: false
- display: Mirror outgoing incidents
hidden:
- marketplacev2
name: outgoing_mirror
type: 8
required: false
- additionalinfo: Choose the tag to add to an entry to mirror it as an attachment in Jira.
defaultvalue: attachment
display: File entry tag
hidden:
- marketplacev2
name: file_tag
type: 0
required: false
- additionalinfo: Choose the tag to add to an entry to mirror it as a comment in Jira.
defaultvalue: comment
display: Comment entry tag
hidden:
- marketplacev2
name: comment_tag
type: 0
required: false
- additionalinfo: Fetch comments for a Jira ticket.
display: Fetch comments
name: fetch_comments
type: 8
required: false
- additionalinfo: Fetch attachments for a Jira ticket.
display: Fetch attachments
name: fetch_attachments
type: 8
required: false
- display: API token (Deprecated)
name: APItoken
type: 4
additionalinfo: Use the "API Token (Recommended)" parameter instead.
required: false
- defaultvalue: '1'
display: Incidents Fetch Interval
name: incidentFetchInterval
type: 19
required: false
description: Use the Jira integration to manage issues, create Cortex XSOAR incidents from Jira projects, and mirror issues to existing issue incidents in Cortex XSOAR.
display: Atlassian Jira v2
name: jira-v2
script:
commands:
- arguments:
- default: true
description: The JQL query string.
name: query
required: true
- description: The index (integer) of the first issue to return (0-based).
name: startAt
- description: The maximum number of users to fetch when searching for a matching user (default is 50). The maximum allowed value is dictated by the Jira property 'jira.search.views.default.max'. If you specify a value greater than this number, your search results are truncated.
name: maxResults
- description: Displays the headers in human readable format.
name: headers
- description: Specify the result fields.
name: extraFields
description: Queries Jira issues.
name: jira-issue-query
outputs:
- contextPath: Ticket.Id
description: The ticket ID.
type: Unknown
- contextPath: Ticket.Key
description: The ticket key.
type: Unknown
- contextPath: Ticket.Assignee
description: The user assigned to the ticket.
type: Unknown
- contextPath: Ticket.Creator
description: The user who created the ticket.
type: Unknown
- contextPath: Ticket.Summary
description: The ticket summary.
type: Unknown
- contextPath: Ticket.Description
description: The ticket's project description.
type: String
- contextPath: Ticket.Labels
description: The ticket's project labels.
type: String
- contextPath: Ticket.Status
description: The ticket status.
type: Unknown
- contextPath: Ticket.Priority
description: The ticket priority.
type: String
- contextPath: Ticket.ProjectName
description: The ticket project name.
type: String
- contextPath: Ticket.DueDate
description: The due date.
type: Date
- contextPath: Ticket.Created
description: The time the ticket was created.
type: Date
- contextPath: Ticket.LastSeen
description: The last time the ticket was viewed.
type: Date
- contextPath: Ticket.LastUpdate
description: The last time the ticket was updated.
type: Date
- arguments:
- description: The user attribute value. Can be the username or email address. For OAuth 1.0, only the username works.
name: attribute
required: true
- predefined:
- 'true'
- 'false'
defaultValue: 'false'
description: Whether the server is on prem and uses the REST v2 API.
name: is_jirav2api
auto: PREDEFINED
- defaultValue: '50'
description: The maximum number of users to fetch when searching for a matching user (default is 50). The maximum allowed value is dictated by the Jira property 'jira.search.views.default.max'. If you specify a value greater than this number, your search results are truncated.
name: max_results
description: Gets the account ID for a given user attribute.
name: jira-get-id-by-attribute
outputs:
- contextPath: Jira.User.Attribute
description: The user's attribute.
type: string
- contextPath: Jira.User.AccountID
description: The user account ID.
type: string
- arguments:
- description: The issue ID.
name: issueId
required: true
- description: Displays the headers in human readable format.
name: headers
- auto: PREDEFINED
defaultValue: 'false'
description: If "true", retrieves the issue attachments.
name: getAttachments
predefined:
- 'true'
- 'false'
- auto: PREDEFINED
defaultValue: 'false'
description: If "true", expands the issue links.
name: expandLinks
predefined:
- 'true'
- 'false'
description: Fetches an issue from Jira.
name: jira-get-issue
outputs:
- contextPath: Ticket.Id
description: The ticket ID.
type: Unknown
- contextPath: Ticket.Key
description: The ticket key.
type: Unknown
- contextPath: Ticket.Assignee
description: The user assigned to the ticket.
type: Unknown
- contextPath: Ticket.Creator
description: The user who created the ticket.
type: Unknown
- contextPath: Ticket.Summary
description: The ticket summary.
type: Unknown
- contextPath: Ticket.Status
description: The ticket status.
type: Unknown
- contextPath: File.Size
description: The file size (Jira attachments are saved as files in Cortex XSOAR).
type: Unknown
- contextPath: File.SHA256
description: The file SHA256 hash (Jira attachments are saved as files in Cortex XSOAR).
type: Unknown
- contextPath: File.Name
description: The file name (Jira attachments are saved as files in Cortex XSOAR).
type: Unknown
- contextPath: File.SHA1
description: The file SHA1 hash (Jira attachments are saved as files in Cortex XSOAR).
type: Unknown
- contextPath: Ticket.Priority
description: The ticket priority.
type: String
- contextPath: Ticket.ProjectName
description: The ticket project name.
type: String
- contextPath: Ticket.DueDate
description: The due date.
type: Date
- contextPath: Ticket.Created
description: The time the ticket was created.
type: Date
- contextPath: Ticket.LastSeen
description: The last time the ticket was viewed.
type: Date
- contextPath: Ticket.LastUpdate
description: The last time the ticket was updated.
type: Date
- arguments:
- description: The issue object (in JSON format).
name: issueJson
- description: The summary of the issue.
name: summary
required: true
- description: The project key with which to associate the issue.
name: projectKey
- description: 'Selects an issue type by name, for example: "Problem".'
name: issueTypeName
- description: Selects an issue type by its numeric ID.
name: issueTypeId
- description: The project name with which to associate the issue.
name: projectName
- description: A description of the issue.
name: description
- description: A CSV list of labels.
name: labels
- description: 'The priority of the issue, for example: High, Medium.'
name: priority
- description: 'The due date for the issue (in the format: 2018-03-11).'
name: dueDate
- description: The name of the assignee. Relevant for Jira Server only. If you are using Jira Cloud, provide the assignee_id argument instead.
name: assignee
- description: The account ID of the assignee. Use the jira-get-id-by-attribute command to get the user's account ID.
name: assignee_id
- description: The account ID of the reporter. Use the jira-get-id-by-attribute command to get the user's account ID.
name: reporter_id
- description: The name of the of the reporter.
name: reporter
- description: The parent issue key (if you're creating a sub-task).
name: parentIssueKey
- description: The parent issue ID (if you're creating a sub-task).
name: parentIssueId
- description: A text field for describing the environment in which the issue occurred. For example environment="IE9 on Windows 7".
name: environment
- description: The security level of the issue. For example security="Anyone".
name: security
- description: The component names of the issue. For example components="component1,component2".
isArray: true
name: components
- description: A comma-separated list of account IDs for watching the issue. Use the jira-get-id-by-attribute command to get the user's account ID.
isArray: true
name: watchers
description: Creates a new issue in Jira.
name: jira-create-issue
outputs:
- contextPath: Ticket.Id
description: The ticket ID.
type: Unknown
- contextPath: Ticket.Key
description: The ticket key.
type: Unknown
- arguments:
- description: The issue ID.
name: issueId
required: true
- description: The entry ID to upload.
name: upload
- description: The attachment name to be displayed in Jira (overrides the original file name).
name: attachmentName
description: Uploads a file attachment to an issue.
name: jira-issue-upload-file
- arguments:
- default: true
description: The issue ID.
name: issueId
required: true
- description: The comment body.
name: comment
required: true
- description: 'The roles that can view the comment, for example: Administrators.'
name: visibility
description: Adds a new comment to an existing Jira issue.
name: jira-issue-add-comment
- arguments:
- description: If a globalId is provided and a remote issue link exists with that globalId, the remote issue link is updated.
name: globalId
- description: 'The object relationship to the issue, for example: causes.'
name: relationship
- description: The URL link.
name: url
required: true
- description: The link title.
name: title
required: true
- description: The link summary.
name: summary
- description: The issue ID.
name: issueId
required: true
- description: The application type of the linked remote application. For example "com.atlassian.confluence".
name: applicationType
- description: The application name of the linked remote application. For example "My Confluence Instance".
name: applicationName
description: Creates (or updates) an issue link.
name: jira-issue-add-link
- arguments:
- description: The ID of the issue to edit.
name: issueId
required: true
- description: 'The issue object (in JSON format). For example {"fields":{"customfield_10037": "field_value"}}.'
name: issueJson
- description: The issue summary.
name: summary
- description: The issue description.
name: description
- description: A CSV list of labels.
name: labels
- description: 'The issue priority, for example: High, Medium.'
name: priority
- description: The due date for the issue (in the format yyyy-mm-dd).
name: dueDate
- description: The name of the assignee. Relevant for Jira Server only. If you are using Jira Cloud, provide the assignee_id argument instead.
name: assignee
- description: The account ID of the assignee. Use the jira-get-id-by-attribute command to get the user's account ID.
name: assignee_id
- description: The issue status.
name: status
- description: The issue transition.
name: transition
- description: A text field for describing the environment in which the issue occurred. For example environment="IE9 on Windows 7".
name: environment
- description: The security level name of the issue. For example security="Anyone".
name: security
- description: The component names of the issue. For example components="component1,component2".
isArray: true
name: components
description: Modifies an issue in Jira.
name: jira-edit-issue
outputs:
- contextPath: Ticket.Id
description: The ticket ID.
type: Unknown
- contextPath: Ticket.Key
description: The ticket key.
type: Unknown
- contextPath: Ticket.Assignee
description: The user assigned to the ticket.
type: Unknown
- contextPath: Ticket.Creator
description: The user who created the ticket.
type: Unknown
- contextPath: Ticket.Summary
description: The ticket summary.
type: Unknown
- contextPath: Ticket.Status
description: The ticket status.
type: Unknown
- arguments:
- description: The ID of the issue to edit.
name: issueId
required: true
- description: 'The field object (in JSON format). For example {"customfield_10037": "New value"}'
name: field_json
required: true
description: |-
Modifies a specific field in an issue in Jira by appending to it instead of replacing its content.
Field must be either of type string (appending by using ',') or array.
name: jira-append-to-field
outputs:
- contextPath: Ticket.Id
description: The ticket ID.
type: Unknown
- contextPath: Ticket.Key
description: The ticket key.
type: Unknown
- contextPath: Ticket.Assignee
description: The user assigned to the ticket.
type: Unknown
- contextPath: Ticket.Creator
description: The user who created the ticket.
type: Unknown
- contextPath: Ticket.Summary
description: The ticket summary.
type: Unknown
- contextPath: Ticket.Status
description: The ticket status.
type: Unknown
- arguments:
- description: The ID of the issue to edit.
name: issueId
required: true
- description: The fields to retrieve from the issue. For example field="customfield_164,labels".
isArray: true
name: field
description: |-
Gets specific fields from a Jira issue and adds it to context dynamically.
name: jira-get-specific-field
outputs:
- contextPath: Ticket.Id
description: The ticket ID.
type: Unknown
- contextPath: Ticket.Key
description: The ticket key.
type: Unknown
- contextPath: Ticket.Assignee
description: The user assigned to the ticket.
type: Unknown
- contextPath: Ticket.Creator
description: The user who created the ticket.
type: Unknown
- contextPath: Ticket.Summary
description: The ticket summary.
type: Unknown
- contextPath: Ticket.Status
description: The ticket status.
type: Unknown
- arguments:
- description: The ID of the issue from which to get the comments.
name: issueId
required: true
description: Returns the comments added to a ticket.
name: jira-get-comments
outputs:
- contextPath: Ticket.Comment.Comment
description: The text of the comment.
type: string
- contextPath: Ticket.Comment.Created
description: The issue creation date.
type: string
- contextPath: Ticket.Comment.User
description: The user that created the comment.
type: string
- arguments:
- description: The issue ID or key.
name: issueIdOrKey
required: true
description: Deletes an issue in Jira.
name: jira-delete-issue
- description: Returns the ID offset. For example the first issue ID.
name: jira-get-id-offset
outputs:
- contextPath: Ticket.idOffSet
description: The ID offset.
type: string
arguments: []
- arguments:
- description: The remote incident ID (issue ID).
name: id
required: true
- defaultValue: '0'
description: The UTC timestamp in seconds of the last update. The incident is only updated if it was modified after the last update time.
name: lastUpdate
description: Gets remote data from a remote incident. This method is only used for debugging and does not update the current incident.
name: get-remote-data
- description: Returns the fields to map. This method is only used for debugging.
name: get-mapping-fields
arguments: []
- description: Gets incident changes. This method is only used for debugging and does not update the current incident.
name: update-remote-system
arguments: []
- arguments:
- description: The issue ID.
name: issueId
required: true
description: Lists all possible transitions for a given ticket.
name: jira-list-transitions
outputs:
- contextPath: Ticket.Transitions.ticketId
description: The issue ID.
type: Number
- contextPath: Ticket.Transitions.transitions
description: A list of all possible transitions.
type: Unknown
- description: Available from Cortex XSOAR version 6.1.0. This command queries for incidents that were modified since the last update. This method is only used for debugging.
name: get-modified-remote-data
arguments: []
- arguments: []
description: Gets the information related to the role, including assigned users.
name: jira-get-project-role
- arguments:
- description: User's email address.
name: user_email
- description: Project key.
name: project_key
- description: Role name to assign the user.
name: role_name
description: Adds the user to a project.
name: jira-add-user-to-project
- arguments:
- description: An ID or key for a service project to list all organizations associated with.
name: projectKey
required: false
- description: Start index for the returned objects. 0 by default.
name: start
required: false
defaultValue: "0"
- description: Maximum amount of organizations to list. 50 by default.
name: limit
required: false
defaultValue: "50"
- description: Account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5.
name: accountId
required: false
description: Lists all the organizations.
name: jira-get-organizations
- arguments:
- description: The ID of the issue to edit.
name: issueId
required: true
- description: The name of the assignee. Relevant for Jira Server only, If you are using Jira Cloud, provide the assignee_id argument instead.
name: assignee
- description: The account ID of the assignee. Use the jira-get-id-by-attribute command to get the user's account ID.
name: assignee_id
description: Edit the assignee of an existing issue.
name: jira-issue-assign
outputs:
- contextPath: Ticket.Id
description: The ticket ID.
type: String
- contextPath: Ticket.Key
description: The ticket key.
type: String
- contextPath: Ticket.Assignee
description: The user assigned to the ticket.
type: String
- contextPath: Ticket.Creator
description: The user who created the ticket.
type: String
- contextPath: Ticket.Summary
description: The ticket summary.
type: String
- contextPath: Ticket.Status
description: The ticket status.
type: String
dockerimage: demisto/oauthlib:1.0.0.72372
isfetch: true
ismappable: true
isremotesyncin: true
isremotesyncout: true
script: ''
subtype: python3
type: python
tests:
- Jira-v2-Test
defaultmapperin: classifier-mapper-incoming-JiraV2
fromversion: 5.0.0