JSON API » tickets » tickets/create
Creates a new ticket.
Input parameters
Requires authentication and the administrator role privilege.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| subject | String | Ticket subject. | Yes | |
| details | String | Ticket details. | Yes | |
| customer | Integer | ID of customer to create ticket for. | No | Customer of authentication user. |
| validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
| filenameX | String | Name of file X. X should start from 1. First file will have parameter named as filename1 | No | |
| fileX | String | base64 encoded data for file number X | No |
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 201 | Input passed validation. Only returned if validation=1. |
| 400 | Invalid input parameters specified. Check the key and message fields for more details. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 403 | Your 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
| Version | Changes |
|---|---|
| 4.2 | filenameX and fileX parameters added. |
| 3.15 | Function added. |
