You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This URL retrieve all enclosures instead of those inside the rack with id 15.
I check the sql logs and there is no clause with id 15 :
SELECT DISTINCT `glpi_enclosures`.`id`, `glpi_enclosures`.*
FROM `glpi_enclosures`
WHERE 1=1 AND `glpi_enclosures`.`is_deleted` = 0 AND ( ( `glpi_enclosures`.`entities_id` IN ('23','51','24','25') OR (`glpi_enclosures`.`is_recursive`='1' AND `glpi_enclosures`.`entities_id` IN (0, 60, 38)) ) )
ORDER BY `id` ASC
LIMIT 0, 30
Test with dcrooms to compare SQL : /dcroom/1/rack/
SELECT DISTINCT `glpi_racks`.`id`, `glpi_racks`.*
FROM `glpi_racks`
WHERE 1=1 AND `glpi_racks`.`is_deleted` = 0 AND `glpi_racks`.`dcrooms_id` = 1 AND ( ( `glpi_racks`.`entities_id` IN ('23','51','24','25') OR (`glpi_racks`.`is_recursive`='1' AND `glpi_racks`.`entities_id` IN (0, 60, 38)) ) )
ORDER BY `id` ASC
LIMIT 0, 30
In this SQL query, there is a clause to limit racks inside the dcroom with id 1 : dcrooms_id` = 1
Regards
Relevant log output
No response
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Racks have a field for the DC room they are in, so the URL you used works.
Enclosures aren't directly related to racks in the same way. Instead, there is an Item_Rack item that represents the link between a rack and an item, such as an enclosure, that exists inside the rack.
/apirest.php/Rack/15/Item_Rack should give you all of the items in the rack.
Code of Conduct
Is there an existing issue for this?
Version
10.0.15
Bug description
Hello,
I am trying to export enclosures inside a rack with API
https://URLGLPI/apirest.php/rack/15/Enclosure
This URL retrieve all enclosures instead of those inside the rack with id 15.
I check the sql logs and there is no clause with id 15 :
Test with dcrooms to compare SQL : /dcroom/1/rack/
https://URLGLPI/apirest.php/dcroom/1/rack/
In this SQL query, there is a clause to limit racks inside the dcroom with id 1 : dcrooms_id` = 1
Regards
Relevant log output
No response
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: