Get-RocketCyberIncident
SYNOPSIS
Gets incident information from the RocketCyber API
SYNTAX
Index (Default)
Get-RocketCyberIncident [[-ID] <int[]>] [[-Title] <string[]>] [[-AccountId] <long[]>]
[[-Description] <string[]>] [[-Remediation] <string>] [[-ResolvedAt] <string>]
[[-CreatedAt] <string>] [[-PublishedAt] <string>] [[-Status] <string[]>] [[-Page] <int>]
[[-PageSize] <int>] [[-Sort] <string[]>] [[-Order] <string>] [-Config] [-AllResults]
ALIASES
This cmdlet has the following aliases,
- Get-RCIncident
DESCRIPTION
The Get-RocketCyberIncident cmdlet gets incident information associated to all or a defined account ID
The Get-RocketCyberIncident cmdlet invokes the GET method of the /v3/incidents endpoint
EXAMPLES
EXAMPLE 1
Get-RocketCyberIncident
Gets the first 1000 incidents from all accounts accessible by the API key
EXAMPLE 2
Get-RocketCyberIncident -AccountId 12345 -ID 9876
Gets the defined incident ID from the defined AccountId
EXAMPLE 3
Get-RocketCyberIncident -Title nmap -ResolvedAt '2023-01-01|'
Gets the first 1000 incidents from all accounts accessible by the API key that were resolved after the defined start date with the defined word in the title
EXAMPLE 4
Get-RocketCyberIncident -Description audit -CreatedAt '|2023-03-01'
Gets the first 1000 incidents from all accounts accessible by the API key that were created before the defined end date with the defined word in the description
EXAMPLE 5
Get-RocketCyberIncident -Status resolved -Sort title:asc -AllResults
Gets every resolved incident from all accounts accessible by the API key and the data is returned by title in ascending order
PARAMETERS
-AccountId
The account ID associated to the incident
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: 2
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-AllResults
Returns all items from an endpoint by requesting every page of the results
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Config
Includes the config object in the response
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-CreatedAt
This returns incidents 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 Time | End Time |
Example: 2022-05-09|2022-05-10 2022-05-09| |2022-05-10
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 6
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Description
The description of the incident
Example: administrative
Multiple comma separated values can be inputted
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ID
The RocketCyber incident ID
Multiple comma separated values can be inputted
Type: System.Int32[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Order
The order of the sort when the Sort parameter does not define one
Allowed values: ‘asc’, ‘desc’
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 12
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Page
The target page of data
This is used with the PageSize parameter to determine how many and which items to return
Default value: 1
Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 9
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PageSize
The number of items to return from the data set
Default value: 1000
Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 10
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PublishedAt
This returns incidents published 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 Time | End Time |
Example: 2022-05-09|2022-05-10 2022-05-09| |2022-05-10
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 7
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Remediation
The remediation for the incident
Example: permission
As of 2023-03 this parameter does not appear to work
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ResolvedAt
This returns incidents resolved 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 Time | End Time |
Example: 2022-05-09|2022-05-10 2022-05-09| |2022-05-10
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 5
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Sort
The sort order for the items queried
Not all values can be sorted
Multiple comma separated values can be inputted
Example: accountId:asc title:desc
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 11
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Status
The type of incidents to request
Multiple comma separated values can be inputted
Allowed values: ‘open’, ‘resolved’, ‘suppressed’
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 8
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Title
The title of the incident
Example: Office
Multiple comma separated values can be inputted
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
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/incidents
As of 2023-03: Using wildcards in the query string does not work as the endpoint already searches via wildcard. If you use a wildcard ‘*’ it will not return any results
The remediation parameter does not appear to work