Service Desk Practitioners Forum
cancel

web api - a little help

Highlighted
ALexandre Cruz
Frequent Contributor.

web api - a little help

My name is Alex, and I would like to know if you guys could help me? I 'm using webapi, and can do almost anything,
But I can't get all the information logs from a ticket, could you send me an example on how do to that?
I can't get the historylines, but looks like the information logs isn't there.
I really need help on this

Thanks in advance.
10 REPLIES
Vasily Kamenev
Acclaimed Contributor.

Re: web api - a little help

Hi
Examles exist on CD, I'm attached one of them with "History".

Vasily
ALexandre Cruz
Frequent Contributor.

Re: web api - a little help

Thank you very much for your answer, but I saw this example, and I tried, it shows the subject, date, but I can't see the information. Like is someone change the workgroup of a service desk, using this example I can see when, who and what he did in this case, dispatched the ticket to other workgroup. But if he wrote in the info field, like : "I'm dispatching this ticket because I want to." I just can't see that info. If I change the tabbed pane of the ticket to the information log, I can see everything anyone wrotes, I can see all the logs, but I want to do it, using webapi. I would like to know a way to get the all the info that is on the information log. Looking on the historylines object I could see that they have one method historyLines.getInformation() but everytime I tried to get info from this method I got null.

like:

for(int i=0...{
String info = historyLines[i].getInformation();
...}

every loop, the string info will be null.

I hope you could help me. It should be something that I'm missing, because I think looking at the ticket's log should be trivial. But I just can't find a way to do it.

thanks again

Vasily Kamenev
Acclaimed Contributor.

Re: web api - a little help

what is your sp?
Alexander Kriku
Honored Contributor.

Re: web api - a little help

hi

try to use another method:
historyLines[i].getSubject()
Alexander Kriku
Honored Contributor.

Re: web api - a little help

sorry, incorrect remark :(
ALexandre Cruz
Frequent Contributor.

Re: web api - a little help

The version that I'm using is openview service desk 4.5.

getSubject doesn't bring the information log. It brings the action, like in my example, it will bring workgroup changed. But the message the user typed on information can't get using getSubject.

Vasily Kamenev
Acclaimed Contributor.

Re: web api - a little help

I'm asking about you service pack, because web-api must be from used sp. Is it?

Vasily
ALexandre Cruz
Frequent Contributor.

Re: web api - a little help

yes it is...
Vasily Kamenev
Acclaimed Contributor.

Re: web api - a little help

Hi
I'm test reading "Information" from SC, is working, my sp 23.

Vasily
ALexandre Cruz
Frequent Contributor.

Re: web api - a little help

Thanks again man.


I put as attachment, the for part and the result, as you can see the information always is null, I know that sometimes it should be null, because if I change just the workgroup the info will be null, but all null is not right.

The results I pasted on the attachment as well, tell me what you think.

Thanks.