Get-RocketCyberReport

SYNOPSIS

Gets a report export from the RocketCyber API

SYNTAX

Index (Default)

Get-RocketCyberReport [-UserId] <long> [-FileType] <string> [-ItemType] <string>
 [[-AccountId] <long[]>] [[-AppId] <int>] [[-ID] <string[]>] [[-Title] <string>]
 [[-Description] <string>] [[-Remediation] <string>] [[-CreatedAt] <string>] [[-Dates] <string>]
 [[-RuleName] <string>] [[-IPAddress] <string>] [[-DeviceId] <string>] [[-EventId] <long>]
 [[-CreatorId] <long>] [[-SourceKey] <string>]

ALIASES

This cmdlet has the following aliases,

  • Get-RCReport

DESCRIPTION

The Get-RocketCyberReport cmdlet gets a CSV or JSON report export of incidents, agents, firewalls, events, or suppression rules from the RocketCyber API

The report is created for a RocketCyber user, so the user ID is required

The RocketCyber API documentation sends a source-key header (console report key) with this request, use the SourceKey parameter when your RocketCyber account requires it

The Get-RocketCyberReport cmdlet invokes the GET method of the /v3/reportApi endpoint

EXAMPLES

EXAMPLE 1

Get-RocketCyberReport -UserId 12345 -FileType json -ItemType suppressionRules

Gets a JSON report of the suppression rules of all accounts accessible by the API key

EXAMPLE 2

Get-RocketCyberReport -UserId 12345 -FileType csv -ItemType events -AccountId 2 -AppId 5 -Dates '2022-04-12|2022-05-11'

Gets a CSV report of the AppId 5 events of account 2 in the defined date range

EXAMPLE 3

Get-RocketCyberReport -UserId 12345 -FileType csv -ItemType incidents -Title '*Office*' | Set-Content -Path .\Incidents.csv

Saves a CSV report of the incidents with Office in the title

PARAMETERS

-AccountId

The account ID to pull data for

If not provided, data will be pulled for all accounts accessible by the API key

Multiple comma separated values can be inputted

Type: System.Int64[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-AppId

The app ID, used with the events item type

Use the Get-RocketCyberApp cmdlet to get app IDs

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 4
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-CreatedAt

This returns items created between the start and end date

Both the start and end dates are optional, but at least one is required to use this parameter

Start Date End Date

Example: 2022-05-09|2022-05-10 2022-05-09| |2022-05-10

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 9
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-CreatorId

Filters the report by the ID of the user that created the item

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 15
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Dates

The date range for event detections, used with the events item type

Both the start and end dates are optional, but at least one is required to use this parameter

Start Date End Date

Example: 2022-04-12|2022-05-11

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 10
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Description

Filters the report by description, used with the incidents item type

Example: administrative

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 7
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-DeviceId

Filters the report by device ID

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 13
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-EventId

Filters the report by event ID, used with the events item type

Example: 4625

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 14
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-FileType

The file type of the report

Allowed values: ‘csv’, ‘json’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ID

Filters the report by item ID

Multiple comma separated values can be inputted

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 5
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-IPAddress

Filters the report by IP address

Example: 64*

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 12
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ItemType

The type of items to include in the report

Allowed values: ‘incidents’, ‘agents’, ‘firewalls’, ‘events’, ‘suppressionRules’

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Remediation

Filters the report by remediation, used with the incidents item type

Example: *permission

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 8
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-RuleName

Filters the report by rule name, used with the suppressionRules item type

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 11
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-SourceKey

The console report key that is sent as the source-key header

The RocketCyber API documentation sends this header with this request, the request is rejected (401) by some accounts without it

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 16
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Title

Filters the report by title, used with the incidents item type

Example: Office

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 6
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-UserId

The ID of the RocketCyber user the report is created for

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Int64[]

OUTPUTS

NOTES

Endpoint : GET /v3/reportApi