Submit Sysaid ticket using Perl API

 
Author
Message
SysAid Mod
398
 
Great. Is it my idea??
What internal programm you are use? For which admins actions? Can you send all list of this actions?
Great...
С наилучшими пожеланиями, Федор
With best regards, Fedor
SysAid VP Customer Success
601
 
Basically, you could create an HTTP Request (with POST method) the xml file onto https://servername:port/agenapi (the xml must be encoded with UTF-.
The xml file should look like this:





* Category, subCategory, title, description and status are mandatory fields. You must specify them in every request.
* If you specify the ID, it would update and existing SR. For new service request, please don't specify the ID (remove the ID tag entirely from the XML).
* thirdLevelCategory, urgency, uniqueFlag and additionalFields are optional.
* The uniqueFlag is default false. If you set it to true the system tries to find if there's already a similar service request in the system (by several parameters). In case it finds it, it would update that service request. If not, it would create a new service request.

* The values you should for each field is specified below.
status: integer
urgency: integer
id: integer
status: integer
description: text, unlimited
title: text, 255 characters
category: text, 64 characters
sub category: text, 64 characters
third level category: text, 64 characters


* additionalFields needs to be entered in the following format:
FIELD-NAME####FIELD-VALUE!!!!FIELD-NAME####FIELD-VALUE!!!!FIELD-NAME####FIELD-VALUE
(four pound signs separate between the field name and the field value, four exclamation marks separate between the several additional field you wish to add).

The FIELD-NAME should be replaced with any of the following (expected data type and maximum size is specified in brackets):

submitUser (text, 64 characters)
cc (text, 255 characters)
ci (text, 64 characters)
fullName (text, 255 characters)
requestUser (text, 64 characters)
assignedTo (text, 64 characters)
assignedGroup (text, 64 characters)
updateUser (text, 64 characters)
notes (text, 4000 characters)
solution (text, 4000 characters)
resolution (text, 4000 characters)
dueDate (timestamp: YYYY-MM-DD HH:MM:SS)
followupPlannedDate (timestamp: YYYY-MM-DD HH:MM:SS)
followupActualDate (timestamp: YYYY-MM-DD HH:MM:SS)
knowledgeBase (integer)
location (integer)
priority (integer)
escalation (integer)
custList1 (integer)
custList2 (integer)
custInt1 (integer)
custInt2 (integer)
custDate1 (timestamp: YYYY-MM-DD HH:MM:SS)
custDate2 (timestamp: YYYY-MM-DD HH:MM:SS)
custText1 (text, 255 characters)
custText2 (text, 255 characters)
custNotes (text, 4000 characters)
followupText (text, 4000 characters)
followupUser (text, 64 characters)
Elite SysAider
181
 
Joseph thank you for that! My next question was actually going to be is there the possibility of updating an existing SR.

Feda,

The internal program is written in .Net and allows the helpdesk to find AD accounts, unlock / check status of password age, and reset passwords etc without having to go into Active Directory. This saves them lots of time with these calls, and now with the integrated API makes it even faster, as they don't have to submit a ticket; it is done automatically.

Things I would like to see from the API in the future:

Ability to submit a change / problem.

...More to come I am sure.
- Brian Martin

Unofficial SysAid Wiki - Most common issues and their solutions can be found here.
SysAid Mod
398
 
Friends, create SR without access to admin portal - great feature. We are can simplify actions of our colleagues, who everyday create and close more then 10 SR, with duration less then 5 minutes

I ask of my helpdesk tell me about this works, which they can do without open sysaid:
Printers:
Add Paper
Add Toner
Paper Jam
Low Toner
Cover Open
AD:
Change user pass


Who's more?

This message was edited 1 time. Last update was at Feb. 08, 2010 04:28 AM

С наилучшими пожеланиями, Федор
With best regards, Fedor
SysAid Mod
398
 
UP
С наилучшими пожеланиями, Федор
With best regards, Fedor
Elite SysAider
181
 
So I was testing the updating of a ticket, and got the following error. Any ideas?

2010-02-17 16:17:21,356 [HttpProcessor[443][0]] ERROR com.sysaid - Exception in AgentApi
org.xml.sax.SAXException: unable to find FieldDescriptor for 'id' in ClassDescriptor of submitSR

UPDATE:

Without the id tag and setting uniqueFlag to true it will update successfully.

This message was edited 1 time. Last update was at Feb. 17, 2010 04:27 PM

- Brian Martin

Unofficial SysAid Wiki - Most common issues and their solutions can be found here.
SysAid Customer Success Manager
1090
 
Thanks Brian Martin
Best Regards,
Itay
SysAid Mod
398
 
Hello.
I try use this API too. All work, but i want to understand: sysaid-agent-reg.pl - does control if agent with ID alredy exist?
С наилучшими пожеланиями, Федор
With best regards, Fedor
SysAid Mod
398
 
Once more.
I want attach file. Can i do it with this API?
С наилучшими пожеланиями, Федор
With best regards, Fedor
SysAid VP Customer Success
601
 
1. Agent ID is the asset ID of the asset you want to associate with the SR. If you don't want to set an associate asset, just use: none
2. Attachments cannot be submitted with the API.


Joseph.
Elite SysAider
181
 
When you update a ticket, it clears out any previous data and puts in what you submit. I would like to see this in the future, where it will append the data you are submitting.

In this way you can close tickets without clearing all information, as well as just submit notes etc.
- Brian Martin

Unofficial SysAid Wiki - Most common issues and their solutions can be found here.
SysAid Customer Success Manager
1090
 
Hi Brian,

You can open a Feature Request here
Best Regards,
Itay
SysAider
3
 
from the code i can see that what the pearl does is just take the values from command line argument and forward them in post request.

This is urgent i need to create utility to update/create ticket via API interface.
I tried followed code to create ticket.
but it just returns 7 in response.
what does it mean? where can i see error code/its response.
did i do anything wrong?
initially it was -1



Regards,
Amit
SysAider
3
 
Sorry my bad...
it created ticket just needed to assigned to me.

now i want to read existing ticket
any suggestions?
Urgent again!!!
SysAid Mod
398
 
Coleague, you want to read ticket by using API??
С наилучшими пожеланиями, Федор
With best regards, Fedor