I'm trying to use the API to create tickets. Using the PowerShell example
$uri = "https://itflow.hostname.com/api/v1/tickets/create.php"
$apiKey = "redacted"
# Data
$body = @"
{
"api_key" : "$apiKey",
"ticket_subject" : "Having issues with database",
"ticket_details" : "User X is having issues with the database",
"ticket_priority" : "Low",
"ticket_assigned_to" : "0",
"ticket_contact_id" : "2",
"client_id" : "2"
}
"@
Invoke-RestMethod -Method Post -Uri $uri -Body $body
and getting an error "The remote server returned an error: (500) Internal Server Error."
I looked at the apache logs and seeing this error
[Wed Dec 11 11:44:56.277986 2024] [php:error] [pid 804922:tid 804922] [client redacted:18587] PHP Fatal error: Uncaught mysqli_sql_exception: Incorrect integer value: 'Open' for column `itflow`.`tickets`.`ticket_status` at row 1 in /var/www/itflow.domain.com/api/v1/tickets/create.php:37\nStack trace:\n#0 /var/www/itflow.domain.com/api/v1/tickets/create.php(37): mysqli_query()\n#1 {main}\n thrown in /var/www/itflow.domain.com/api/v1/tickets/create.php on line 37
Seems to be an issue or bug in the API? Any help is appreciated. Thanks!
Current Database Version:
1.7.2
Current App Version:
8ab82d9edf104bd77cb7c2743117e0dcb425a9ba