python-rtkit icon indicating copy to clipboard operation
python-rtkit copied to clipboard

How can I see the tickets Assigned to my Group?

Open prophaner opened this issue 9 years ago • 6 comments

In the GUI, I have a way to see 'Tickets Assigned to my groups', then they all have in common the 'AdminCc (group)' header. How can I make this search using the API, if is possible?

prophaner avatar Apr 15 '15 17:04 prophaner

Hi @prophaner , the url to call is something like: /REST/1.0/search/ticket?query=AdminCc="YOURGROUP"

So with the library will be:

try:
    response = resource.get(path='search/ticket?query=AdminCc="YOURGROUP"')
    logger.info(response.parsed)
except RTResourceError as e:
    logger.error(e.response.status_int)
    logger.error(e.response.status)
    logger.error(e.response.parsed)

You if need more info about queries: http://requesttracker.wikia.com/wiki/REST

z4r avatar Apr 17 '15 17:04 z4r

Thanks for your reply. I was actually trying it that way, no success.

On Fri, Apr 17, 2015 at 1:45 PM, Andrea de Marco [email protected] wrote:

Hi @prophaner https://github.com/prophaner , the url to call is something like: /REST/1.0/search/ticket?query=AdminCc="YOURGROUP"

So with the library will be:

try: response = resource.get(path='search/ticket?query=AdminCc="YOURGROUP"') logger.info(response.parsed)except RTResourceError as e: logger.error(e.response.status_int) logger.error(e.response.status) logger.error(e.response.parsed)

You if need more info about queries: http://requesttracker.wikia.com/wiki/REST

— Reply to this email directly or view it on GitHub https://github.com/z4r/python-rtkit/issues/43#issuecomment-94036654.

Regards, Luis M. Ramos Aguilar

prophaner avatar Apr 17 '15 18:04 prophaner

Andrea, I just forked your code, maybe I can contribute.

On Fri, Apr 17, 2015 at 2:13 PM, Luis Ramos [email protected] wrote:

Thanks for your reply. I was actually trying it that way, no success.

On Fri, Apr 17, 2015 at 1:45 PM, Andrea de Marco <[email protected]

wrote:

Hi @prophaner https://github.com/prophaner , the url to call is something like: /REST/1.0/search/ticket?query=AdminCc="YOURGROUP"

So with the library will be:

try: response = resource.get(path='search/ticket?query=AdminCc="YOURGROUP"') logger.info(response.parsed)except RTResourceError as e: logger.error(e.response.status_int) logger.error(e.response.status) logger.error(e.response.parsed)

You if need more info about queries: http://requesttracker.wikia.com/wiki/REST

— Reply to this email directly or view it on GitHub https://github.com/z4r/python-rtkit/issues/43#issuecomment-94036654.

Regards, Luis M. Ramos Aguilar

Regards, Luis M. Ramos Aguilar

prophaner avatar Apr 18 '15 03:04 prophaner

you are welcome ;) I succest you to start from a working url in the browser ;)

z4r avatar Apr 18 '15 08:04 z4r

Andrea, I commited a fix to a few PEP items. I also suggest to replace the name of some arguments as they start with Capital and they should be all lowercase. Like 'Queue'.

On Sat, Apr 18, 2015 at 4:08 AM, Andrea de Marco [email protected] wrote:

you are welcome ;)

— Reply to this email directly or view it on GitHub https://github.com/z4r/python-rtkit/issues/43#issuecomment-94142610.

Regards, Luis M. Ramos Aguilar

prophaner avatar Apr 19 '15 05:04 prophaner

Make your Pull Request so I can see these suggestions ;)

z4r avatar Apr 19 '15 09:04 z4r