functions/Get-Projects.ps1

<#
.SYNOPSIS
  
Retrieves the priveleged projects from the server.
  
.DESCRIPTION
Retrieves the priveleged projects from the server and returns the result as projectname:ProjectID pairs.
  
.EXAMPLE
  
Number of Projects found: 2
project1:1
project2:2
  
#>


Function Get-Projects
{
    [cmdletbinding()]
    param()
    
    $uri = $CDXSERVER + "/api/projects"

    $ProjectsList = Invoke-RestMethod -Uri $uri -Method Get -Headers $headers -ContentType "application/json" 
    
    return $ProjectsList
}