Get-EasitGOItem
SYNOPSIS
Get data from Easit GO.
SYNTAX
OneObject (Default)
| Get-EasitGOItem -Url <String> -Apikey <String> -ImportViewIdentifier <String> [-SortColumn <SortColumn>]
[-Page <Int32>] [-PageSize <Int32>] [-ColumnFilter <ColumnFilter[]>] [-IdFilter <String>]
[-FreeTextFilter <String>] [-InvokeRestMethodParameters <Hashtable>] [-GetAllPages]
[-ConvertToJsonParameters <Hashtable>] [-WriteBody] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
|
SeparateObjects
| Get-EasitGOItem -Url <String> -Apikey <String> -ImportViewIdentifier <String> [-SortColumn <SortColumn>]
[-Page <Int32>] [-PageSize <Int32>] [-ColumnFilter <ColumnFilter[]>] [-IdFilter <String>]
[-FreeTextFilter <String>] [-InvokeRestMethodParameters <Hashtable>] [-GetAllPages] [-ReturnAsSeparateObjects]
[-ThrottleLimit <Int32>] [-FlatReturnObject] [-ConvertToJsonParameters <Hashtable>] [-WriteBody]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
DESCRIPTION
Sends a GET request to the Easit GO WebAPI and returns the result of the request.
EXAMPLES
EXAMPLE 1
| $getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
}
Get-EasitGOItem @getEasitGOItemParams
|
EXAMPLE 2
| $getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
Page = 2
}
Get-EasitGOItem @getEasitGOItemParams
|
EXAMPLE 3
| $getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
IdFilter = '4659:3'
}
Get-EasitGOItem @getEasitGOItemParams
|
EXAMPLE 4
| $columnFilters = @()
$columnFilters += New-ColumnFilter -ColumnName 'Status' -Comparator 'IN' -ColumnValue 'Open'
$getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
ColumnFilter = $columnFilters
PageSize = 500
}
Get-EasitGOItem @getEasitGOItemParams
|
EXAMPLE 5
| $columnFilters = @()
$columnFilters += New-ColumnFilter -ColumnName 'Status' -RawValue '81:1' -Comparator 'IN'
$columnFilters += New-ColumnFilter -ColumnName 'Priority' -Comparator 'IN' -ColumnValue 'High'
$getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
ColumnFilter = $columnFilters
}
Get-EasitGOItem @getEasitGOItemParams
|
EXAMPLE 6
1
2
3
4
5
6
7
8
9
10
11
12 | $columnFilters = @()
$columnFilters += New-ColumnFilter -ColumnName 'Status' -Comparator 'IN' -ColumnValue 'Open'
$columnFilters += New-ColumnFilter -ColumnName 'Priority' -Comparator 'IN' -ColumnValue 'High'
$sortColumn = New-SortColumn -Name 'Updated' -Order 'Descending'
$getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
ColumnFilter = $columnFilters
SortColumn = $sortColumn
}
Get-EasitGOItem @getEasitGOItemParams
|
EXAMPLE 7
1
2
3
4
5
6
7
8
9
10
11
12
13 | $getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
}
$easitObjects = Get-EasitGOItem @getEasitGOItemParams
foreach ($easitObject in $easitObjects.items.item.GetEnumerator()) {
Write-Host "Got object with database id $($easitObject.id)"
Write-Host "The object has the following properties and values"
foreach ($propertyObject in $easitObject.property.GetEnumerator()) {
Write-Host "$($propertyObject.name) = $($propertyObject.content) (RawValue: $($propertyObject.rawValue))"
}
}
|
EXAMPLE 8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | $getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
GetAllPages = $true
}
$pages = Get-EasitGOItem @getEasitGOItemParams
foreach ($page in $pages) {
foreach ($easitObject in $page.items.item.GetEnumerator()) {
Write-Host "Got object with database id $($easitObject.id)"
Write-Host "The object has the following properties and values"
foreach ($propertyObject in $easitObject.property.GetEnumerator()) {
Write-Host "$($propertyObject.name) = $($propertyObject.content) (RawValue: $($propertyObject.rawValue))"
}
}
}
|
EXAMPLE 9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | $getEasitGOItemParams = @{
Url = 'https://go.easit.com'
Apikey = 'myApikey'
ImportViewIdentifier = 'myImportViewIdentifier'
GetAllPages = $true
ReturnAsSeparateObjects = $true
}
$easitObjects = Get-EasitGOItem @getEasitGOItemParams
foreach ($easitObject in $easitObjects.GetEnumerator()) {
Write-Host "Got object with database id $($easitObject.id)"
Write-Host "The object has the following properties and values"
foreach ($propertyObject in $easitObject.property.GetEnumerator()) {
Write-Host "$($propertyObject.name) = $($propertyObject.content) (RawValue: $($propertyObject.rawValue))"
}
}
|
PARAMETERS
-Apikey
Apikey used for authenticating against Easit GO.
| Type: String
Parameter Sets: (All)
Aliases: api, key
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-ColumnFilter
Used to filter data.
| Type: ColumnFilter[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-ConvertToJsonParameters
Set of additional parameters for ConvertTo-Json.
Base parameters sent to ConvertTo-Json is 'Depth = 4', 'EscapeHandling = 'EscapeNonAscii'', 'WarningAction = 'SilentlyContinue''.
| Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-FlatReturnObject
Specifies if a new PSCustomObject should be created with each property from Easit GO as a property on the new PSCustomObject.
| Type: SwitchParameter
Parameter Sets: SeparateObjects
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
|
-FreeTextFilter
Used to search a view with a text string.
| Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-GetAllPages
Specifies if the function should try to get all pages from a view.
| Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
|
-IdFilter
Database id for item to get.
| Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-ImportViewIdentifier
View to get data from.
| Type: String
Parameter Sets: (All)
Aliases: view
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-InvokeRestMethodParameters
Set of additional parameters for Invoke-RestMethod.
Base parameters sent to Invoke-RestMethod is 'Uri','ContentType', 'Method', 'Body', 'Authentication' and 'Credential'.
| Type: Hashtable
Parameter Sets: (All)
Aliases: irmParams
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-Page
Specifies what page in the view to get data from.
| Type: Int32
Parameter Sets: (All)
Aliases: viewPageNumber
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
|
-PageSize
Specifies number of items each page returns.
| Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
|
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.
The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break.
| Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-ReturnAsSeparateObjects
Specifies if Get-EasitGOItem should return each item in the view as its own PSCustomObject.
| Type: SwitchParameter
Parameter Sets: SeparateObjects
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
|
-SortColumn
Used to sort data by a field / property and order (ascending / descending).
| Type: SortColumn
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-ThrottleLimit
Specifies the number of script blocks that run in parallel.
Input objects are blocked until the running script block count falls below the ThrottleLimit.
| Type: Int32
Parameter Sets: SeparateObjects
Aliases:
Required: False
Position: Named
Default value: 5
Accept pipeline input: False
Accept wildcard characters: False
|
-Url
URL to Easit GO.
| Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-WriteBody
If specified the function will try to write the request body to a file in the current directory.
| Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
|
-Confirm
Prompts you for confirmation before running the cmdlet.
| Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
| Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
None - You cannot pipe objects to this function
OUTPUTS
NOTES