ConvertTo-RocketCyberQueryString
SYNOPSIS
Converts uri filter parameters into a query string
SYNTAX
__AllParameterSets
ConvertTo-RocketCyberQueryString [[-UriFilter] <hashtable>]
ALIASES
This cmdlet has the following aliases,
- ConvertTo-RCQueryString
DESCRIPTION
The ConvertTo-RocketCyberQueryString cmdlet converts & formats a hashtable of parameters into a url encoded query string that is later appended to the resource uri of an API call
This is an internal helper function that is used by Invoke-RocketCyberRequest
Conversion rules: - $null values are skipped - Arrays are sent as repeated key\value pairs (accountId=1&accountId=2) which is the format the RocketCyber API uses for multiple values - Dates are converted to UTC and formatted as yyyy-MM-ddTHH:mm:ss.fffZ - Booleans & switches are sent as lowercase true\false
EXAMPLES
EXAMPLE 1
ConvertTo-RocketCyberQueryString -UriFilter @{ pageSize = 10; accountId = 1,2 }
Returns ‘accountId=1&accountId=2&pageSize=10’
EXAMPLE 2
ConvertTo-RocketCyberQueryString -UriFilter @{ details = $true }
Returns ‘details=true’
PARAMETERS
-UriFilter
Hashtable of query string parameters
Type: System.Collections.Hashtable
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: true
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.Collections.Hashtable
OUTPUTS
System.String
NOTES
N/A