REST 2.0 and objectcustomfieldvalue endpoint does not work

Hi RT community,

I am running RT 4.4.4 with the RT-Extension-REST2-1.09. Everything is working well, but I am getting a 404 Not found error. I need this to dereference the oldreference/newreference in a transaction. The transaction search returns the _url but it cannot be found. Is this a known issue? Any ideas would be appreciated.

Regards,
Ken

Can you share which request you are performing?

Hi,

I am looking for a value change in a user customfield. So I do a search
in transactions using a JSON search:

[
{ field => ‘ObjectType’,
value => ‘RT::User’
},
{ field => ‘Field’,
value => ‘1522’
},
{ field => ‘Created’,
operator => ‘>=’,
value => ‘2020-06-25’
},
{ field => ‘OldReference’,
operator => ‘>=’,
value => ‘0’
},
]

Here is the results for that query:

{
“count” : 4,
“page” : 1,
“per_page” : 20,
“total” : 4,
“pages” : 1,
“items” : [
{
“id” : “28162094”,
“type” : “transaction”,
“_url” : “Login
},
{
“id” : “28162097”,
“type” : “transaction”,
“_url” : “Login
},
{
“id” : “28162129”,
“type” : “transaction”,
“_url” : “Login
},
{
“id” : “28162145”,
“type” : “transaction”,
“_url” : “Login
}
]
}

Then where I look at one of the transactions:

/transaction/28162097

{
“NewReference” : {
“id” : “19310217”,
“type” : “objectcustomfieldvalue”,
“_url” :
Login
},
“OldReference” : {
“id” : “19209741”,
“type” : “objectcustomfieldvalue”,
“_url” :
Login
},
“_hyperlinks” : [
{
“ref” : “self”,
“id” : “28162097”,
“type” : “transaction”,
“_url” : “Login
}
],
“TimeTaken” : “0”,
“Creator” : {
“id” : “RT_System”,
“type” : “user”,
“_url” : “Login
},
“Type” : “CustomField”,
“Field” : {
“id” : “1522”,
“type” : “customfield”,
“_url” : “Login
},
“ReferenceType” : “RT::ObjectCustomFieldValue”,
“Created” : “2020-06-25T08:58:09Z”,
“Object” : {
“id” : “abadaba”,
“type” : “user”,
“_url” : “Login
},
“id” : 28162097
}

Good so far, but when I lookup the objectcustomfieldvalue:

objectcustomfieldvalue/19310217

I get a 404 Not found error.

Regards,
Ken

Seems it could be a bug

Well, I just looked at the code and it looks like the objectcustomfieldvalues endpoint only handles images and not the other types, unless I am misreading it.

Regards,
Ken