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?
[Released] Behaviour of Asset Test History API with SiteID
Forum rules
- Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
- No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
- Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
- Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
- Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
- Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
- Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
- Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
-
ciderapple
- Posts: 5
- Joined: Tue Oct 25, 2022 4:14 pm
Re: Behaviour of Asset Test History API with SiteID
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
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
Sindre
API Developer | Simpro Software Group
API Developer | Simpro Software Group
DEVELOPER CENTER