ConvertTo-ITGlueQueryString
SYNOPSIS
Converts uri filter parameters into a query string
SYNTAX
__AllParameterSets
ConvertTo-ITGlueQueryString [[-UriFilter] <hashtable>]
ALIASES
This cmdlet has the following aliases,
- None
DESCRIPTION
The ConvertTo-ITGlueQueryString 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-ITGlueRequest
Conversion rules: - $null values are skipped - Arrays are sent as comma separated lists - Dates are converted to UTC and formatted as yyyy-MM-ddTHH:mm:ss.fffZ - Booleans are sent as lowercase true\false - Hashtables & objects are sent as compressed JSON - The square brackets of JSON:API keys such as filter[name] & page[size] are not encoded
EXAMPLES
EXAMPLE 1
ConvertTo-ITGlueQueryString -UriFilter @{ 'filter[id]' = 1,2,3; 'page[size]' = 10 }
Returns ‘filter[id]=1,2,3&page[size]=10’
EXAMPLE 2
ConvertTo-ITGlueQueryString -UriFilter @{ 'filter[archived]' = $false }
Returns ‘filter[archived]=false’
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
NOTES
N/A