php-library-glpi icon indicating copy to clipboard operation
php-library-glpi copied to clipboard

Get an itemtype with all sub-items

Open btry opened this issue 8 years ago • 6 comments

For example: get a computer or a ticket should allow to get linked items and return as answer an object for the main item, and sub objects for linked ones.

Getting sub items must be optional

btry avatar Aug 24 '17 08:08 btry

Hi, @DIOHz0r

The project board show this task is in progress. What is the PR or branch related to this work?

Thanks

ajsb85 avatar Nov 01 '17 22:11 ajsb85

@ajsb85 This fetaure hasn't been implemented.

DIOHz0r avatar Nov 01 '17 22:11 DIOHz0r

@DIOHz0r So, could you update all tasks of the project board?

ajsb85 avatar Nov 01 '17 22:11 ajsb85

Hi @ajsb85, I don't have the permission to update the project board. I'll do that when you give me the access.

DIOHz0r avatar Nov 12 '17 04:11 DIOHz0r

As a hint for current situation, for you can already use the getItem()with parameters, like with_softwares , with_tickets ... You only have top add them right after the ID in http-get-style. like: $response = $itemHandler->getItem('Computer', '2?with_softwares=true&expand_dropdowns=true'); https://github.com/glpi-project/glpi/blob/master/apirest.md#get-an-item

sebeka avatar Oct 19 '18 06:10 sebeka

Hi, @sebeka yes, it's possible, but it is not a right way. We should propose to parse as number the Item ID and send those params apart.

ajsb85 avatar Oct 19 '18 17:10 ajsb85