I have a scoped API key for a company (e.g. 152) that allows me to query all assets for that company.
How can I retrieve all relations for that asset (e.g. 867) that belongs to that company?
My API key does not have permission to retrieve these relations - receiving a 401 unauthorized {"error":"Permissions scoped to company"}
echo "== Confirm asset 867 belongs to the allowed company (152) =="
curl -s "https://mycompany.huducloud.com/api/v1/companies/152/assets?page=1&pagesize=1000" -H "x-api-key: $HuduApiKey" | grep -o '"id":867,"companyid":[0-9]*'
echo
echo "== Now query /relations filtered to that exact asset, same scoped key =="
curl -s -i "https://mycompany.huducloud.com/api/v1/relations?fromabletype=Asset&fromableid=867" -H "x-api-key: $Hudu__ApiKey" | head -20