wpietrzakpl / GlpiTools

PowerShell Module to work with Glpi API
15 stars 8 forks source link

Range too large in Get-GlpiToolsTicket -All #18

Closed JackBauer78 closed 2 years ago

JackBauer78 commented 2 years ago

Hello,

When I launch Get-GlpiToolsTickets -All I have a 500 error because the 0-9999999999999 range in the command is too large. I tried with a range of 0-7000 and it worked so I assume the range was too large.

I can browse each ticket number the -TicketId parameter but it's way too long.

Did someone came accross this problem ?

Thanks in advance !

wpietrzakpl commented 2 years ago

I am trying to reproduce same issue on my test environment Got 1 Ticket added, and from my end command having no issues like Server code 500, successfully getting object

Check your PHP options, if you don't have there any limitations

JackBauer78 commented 2 years ago

After some research, I found that the memory_limit parameter in the php.ini file is too low for the request. Since there are too much tickets to retrieve and to work, this command might not me the good one.

Thanks for your help.

How can I make multiple rules like in the GLPI GUI with Search-GlpiToolsItems or else to get very specific tickets ? The search will be faster than retrieving every tickets and working on them after.

wpietrzakpl commented 2 years ago

visit my website: https://www.wpietrzak.pl/glpi/ThingsToKnowGlpiTools/ in there you can find a quick guidance what you can do with Search-glpitoolsitems

JackBauer78 commented 2 years ago

Yes, I read it. If I read the ps1 file correctly, the Search-GlpiToolsItems function can search with only one criteria and I wanted to search with multiple criterias. I browsed the GLPI rest api documentation and I think I found the way to do it. Maybe I'll try to do it with a new function I create.

Thank you for your help.

wpietrzakpl commented 2 years ago

it is like you are saying, maybe it is worth to implement this in a future release