JSON API » tickets » tickets/create

Creates a new ticket.

Input parameters

Requires authentication and the administrator role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
subjectStringTicket subject.Yes
detailsStringTicket details.Yes
customerIntegerID of customer to create ticket for.NoCustomer of authentication user.
validationInteger1 to validate input then return, 0 for full action.No0
filenameXStringName of file X. X should start from 1. First file will have parameter named as filename1No
fileXStringbase64 encoded data for file number XNo

Responses

CodeDescription
200Success.
201Input passed validation. Only returned if validation=1.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.

Data returned

The ID of the created ticket.

Example: With required parameters

http://enswitch.example.com/api/json/tickets/create/?auth_username=user;auth_password=password;subject=Test+ticket;details=This+is+a+test+ticket

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123 } }

Change history

VersionChanges
4.2filenameX and fileX parameters added.
3.15Function added.