Skip to content

Set up PowerShell

Here you will find what settings are needed to query the GraphQL API with Windows PowerShell (5.x) and PowerShell (7.x). Copy the examples below for the version of PowerShell and cmdlet you have installed or wish to use and update with the URL to your instance of Easit GO (urltoEasitGO) and your API key (myapikey).

PowerShell 7

1
2
3
4
5
6
7
    $settings = @{
        Url = 'https://urltoEasitGO/graphql/'
        Apikey = (ConvertTo-SecureString -String 'myapikey' -AsPlainText)
        AuthenticationScheme = Bearer
        ContentType = 'application/json'
        Method = 'POST'
    }
1
2
3
4
5
6
7
    $settings = @{
        Url = 'https://urltoEasitGO/graphql/'
        Apikey = (ConvertTo-SecureString -String 'myapikey' -AsPlainText)
        AuthenticationScheme = Bearer
        ContentType = 'application/json'
        Method = 'POST'
    }

Windows PowerShell (5.x)

1
2
3
4
5
6
7
8
    $settings = @{
        Uri = 'https://urltoEasitGO/graphql/'
        Headers = @{
            Authorization = 'Bearer myapikey'
        }
        ContentType = 'application/json'
        Method = 'POST'
    }
1
2
3
4
5
6
7
8
    $settings = @{
        Uri = 'https://urltoEasitGO/graphql/'
        Headers = @{
            Authorization = 'Bearer myapikey'
        }
        ContentType = 'application/json'
        Method = 'POST'
    }