Reputation: 117
I'm trying to get avaiable Custom Fields for a specific queue via Request Tracker API
when I create a new ticket. For example when I set Queue = 'X'
then I'd like to receive a Custom Fields
key with valuesA
, B
, C
that are available for that queue.
When I point my browser at domain/REST/1.0/ticket/new
I receive the following response:
id: ticket/new
Queue: General
Requestor: xyz
Subject:
Cc:
AdminCc:
Owner:
Status: new
Priority:
InitialPriority:
FinalPriority:
TimeEstimated: 0
Starts: 2018-12-17 15:40:43
Due:
Attachment:
Text:
As you can see i don't have any custom fields within the response as the queue points to General
instead of X
.
Can i modify the URL somehow to change Queue: General
into Queue: X
and receive all custom fields
available for this queue?
Upvotes: 0
Views: 1130
Reputation: 299
You have to specify the content
variable of your new ticket request. For example:
1) Create a file rt.file
with content:
id: ticket/new
Queue: support
Requestor: requestor@email
Priority: 4
CF-TicketCategory: Incident
Subject: Test REST
Text: Multi line
test with
special chars: žščřě
2) Post it with curl command: url --data-urlencode [email protected] --user username:password --url https://rtmachine.example.com/rest/REST/1.0/ticket/new
See RT-Wiki for details.
Upvotes: 0