functions/Get-BBRESTConfig.ps1

function Get-BBRESTConfig {
    <#
        .SYNOPSIS
        Get the default Blackboard REST API configurations for your Learn Environment.
        .DESCRIPTION
        Get the default Blackboard REST API configurations for your Learn Environment.
        .EXAMPLE
        Get-BBRESTConfig -verbose
    #>


    [CmdletBinding()]
    Param()
    Try{
      Write-Verbose "$($PSScriptRoot | Split-Path -Parent)\config.json"
        Write-Verbose -Message "Gettting content of config.json and returning as a PSCustomObject"
        $config = Get-Content -Path "$($PSScriptRoot | Split-Path -Parent)\config.json" -ErrorAction "Stop" | ConvertFrom-Json
        return $config
    }
        catch {
          throw "Can't find the JSON configuration file. Use Set-BBRESTConfig to create one."
        }
  }