Thanks for the suggestion. I’m still not having any luck, though. I’ll go into more detail on what I’ve tried. All the examples below use the following POST body:
[
{
"field": "Created",
"operator": ">=",
"value": "2019-10-01T00:00:00Z"
}
]
When I make the following API call:
POST /REST/2.0/transactions
I get:
{
"per_page": 20,
"page": 1,
"total": 2,
"count": 2,
"items": [
{
"type": "transaction",
"id": "741",
"_url": "https://rt.example.com/REST/2.0/transaction/741"
},
{
"type": "transaction",
"id": "742",
"_url": "https://rt.example.com/REST/2.0/transaction/742"
}
]
}
If I want to get the time taken for each transaction, I can add a fields=TimeTaken
parameter:
POST /REST/2.0/transactions?fields=TimeTaken
{
"per_page": 20,
"total": 2,
"page": 1,
"count": 2,
"items": [
{
"type": "transaction",
"id": "741",
"TimeTaken": "30",
"_url": "https://rt.example.com/REST/2.0/transaction/741"
},
{
"type": "transaction",
"_url": "https://rt.example.com/REST/2.0/transaction/742",
"TimeTaken": "0",
"id": "742"
}
]
}
Trying to add a custom field in the same way isn’t working, though. I’ve got a custom field called Mute
(ID 4), and none of the following work:
/REST/2.0/transactions?fields=TimeTaken,Mute
/REST/2.0/transactions?fields=TimeTaken,CF-Mute
/REST/2.0/transactions?fields=TimeTaken,CF-4
/REST/2.0/transactions?fields=TimeTaken,CustomFields&fields[CustomFields]=Mute
I just get a field in each response with the name of whatever I tried putting in fields
, containing an empty string. For example:
POST /REST/2.0/transactions?fields=TimeTaken,Mute
{
"total": 2,
"per_page": 20,
"count": 2,
"page": 1,
"items": [
{
"Mute": "",
"type": "transaction",
"TimeTaken": "30",
"_url": "https://rt.example.com/REST/2.0/transaction/741",
"id": "741"
},
{
"TimeTaken": "0",
"type": "transaction",
"Mute": "",
"_url": "https://rt.example.com/REST/2.0/transaction/742",
"id": "742"
}
]
}
Any suggestions about what might be wrong?