public/serviceEndpoint/Get-PSTSServiceEndpoint.ps1

function Get-PSTSServiceEndPoint
{
    param(
         [string] $project
    )

    process {

        $content = `
        _PSTSAPI `
            -project $project `
            -resource "serviceendpoint/endpoints" `
            -method "GET" `
            -apiversion "api-version=5.1-preview.1"

        return [ServiceEndpoint[]]$content.value
    }
}