Skip to content

Get-EasitGOItem

SYNOPSIS

Get data from Easit GO.

SYNTAX

OneObject (Default)

1
2
3
4
5
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

1
2
3
4
5
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

1
2
3
4
5
6
$getEasitGOItemParams = @{
    Url = 'https://go.easit.com'
    Apikey = 'myApikey'
    ImportViewIdentifier = 'myImportViewIdentifier'
}
Get-EasitGOItem @getEasitGOItemParams

EXAMPLE 2

1
2
3
4
5
6
7
$getEasitGOItemParams = @{
    Url = 'https://go.easit.com'
    Apikey = 'myApikey'
    ImportViewIdentifier = 'myImportViewIdentifier'
    Page = 2
}
Get-EasitGOItem @getEasitGOItemParams

EXAMPLE 3

1
2
3
4
5
6
7
$getEasitGOItemParams = @{
    Url = 'https://go.easit.com'
    Apikey = 'myApikey'
    ImportViewIdentifier = 'myImportViewIdentifier'
    IdFilter = '4659:3'
}
Get-EasitGOItem @getEasitGOItemParams

EXAMPLE 4

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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''.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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'.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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).

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

1
2
3
4
5
6
7
8
9
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.

INPUTS

None - You cannot pipe objects to this function

OUTPUTS

PSCustomObject

NOTES