At least as of Hudu V2.24, the Hudu API returns a companies object at the root GET /companies/{id} call. This is not illustrated in the API docs.
This results in an inconsistent response from Get-HuduCompanies depending if you're calling by ID, name, or for all companies. A small change on Line 57 of Get-HuduCompanies.ps1 would resolve this inconsistency for both cases:
Current
$Company = Invoke-HuduRequest -Method get -Resource "/api/v1/companies/$Id"
return $Company
Cmdlet: Get-HuduCompanies
Issue
At least as of Hudu V2.24, the Hudu API returns a
companies
object at the rootGET /companies/{id}
call. This is not illustrated in the API docs.This results in an inconsistent response from
Get-HuduCompanies
depending if you're calling by ID, name, or for all companies. A small change on Line 57 ofGet-HuduCompanies.ps1
would resolve this inconsistency for both cases:Current
Potential Fix