Page 1 of 1

[Released] Behaviour of Asset Test History API with SiteID

Posted: Mon Feb 20, 2023 2:51 pm
by ciderapple
Whilst testing the Asset Test History API with Postman I have encountered an anomoly with the 'SiteID'.
I have found the Site ID does not make any difference to this API call only the Asset ID.

I had generated a method to iterate all my Site ID's and their respective assets but by accident when hacking the URL whilst testing I discovered the site ID appears to be irrelevant in this method.

i.e. if I call using site 445 and asset 5 (the site for asset 5) I get the same result as when I change the site to 123.

( /api/v1.0/companies/{companyID}/sites/{siteID}/assets/{assetID}/testHistory/ )

I dont really think it's causing a proplem as Assets ID's are unique just curious about the reason for this. What it does mean is that site is actually irrelevant and a place holder interger would suffice or am I missing something?

Re: Behaviour of Asset Test History API with SiteID

Posted: Mon Feb 20, 2023 11:12 pm
by Sindre
Hi ciderapple,
Thank you for reporting this. We will look into creating a validation for this endpoint so it checks for the correct site it when loading the test history.

As you say it won't cause a problem as all asset id's are unique, and when loading the asset we are validation against the correct site id so we'll add it for the test history as well.

Regards