mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ TheHive: Add Mark as Read operation to alerts (#1541)
* ⚡ Add Mark as Read operation to TheHive 4 Alerts * Remove version check from Mark as Read operation * Add Mark as Unread operation * Show Alert ID for markAsUnread operation * ⚡ Add Ignore SSL Issues parameter to credentials * ⚡ Add TheHive and Cortex SVG logos Co-authored-by: Mika Luhta <12100880+mluhta@users.noreply.github.com>
This commit is contained in:
@@ -67,7 +67,7 @@ export class TheHive implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'TheHive',
|
||||
name: 'theHive',
|
||||
icon: 'file:thehive.png',
|
||||
icon: 'file:thehive.svg',
|
||||
group: ['transform'],
|
||||
subtitle: '={{$parameter["operation"]}} : {{$parameter["resource"]}}',
|
||||
version: 1,
|
||||
@@ -216,6 +216,8 @@ export class TheHive implements INodeType {
|
||||
{ name: 'Execute Responder', value: 'executeResponder', description: 'Execute a responder on the specified alert' },
|
||||
{ name: 'Get', value: 'get', description: 'Get an alert' },
|
||||
{ name: 'Get All', value: 'getAll', description: 'Get all alerts' },
|
||||
{ name: 'Mark as Read', value: 'markAsRead', description: 'Mark the alert as read' },
|
||||
{ name: 'Mark as Unread', value: 'markAsUnread', description: 'Mark the alert as unread' },
|
||||
{ name: 'Merge', value: 'merge', description: 'Merge alert into an existing case' },
|
||||
{ name: 'Promote', value: 'promote', description: 'Promote an alert into a case' },
|
||||
{ name: 'Update', value: 'update', description: 'Update alert' },
|
||||
@@ -535,6 +537,26 @@ export class TheHive implements INodeType {
|
||||
);
|
||||
}
|
||||
|
||||
if (operation === 'markAsRead') {
|
||||
const alertId = this.getNodeParameter('id', i) as string;
|
||||
|
||||
responseData = await theHiveApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
`/alert/${alertId}/markAsRead`,
|
||||
);
|
||||
}
|
||||
|
||||
if (operation === 'markAsUnread') {
|
||||
const alertId = this.getNodeParameter('id', i) as string;
|
||||
|
||||
responseData = await theHiveApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
`/alert/${alertId}/markAsUnread`,
|
||||
);
|
||||
}
|
||||
|
||||
if (operation === 'merge') {
|
||||
const alertId = this.getNodeParameter('id', i) as string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user