I’m trying to call the Action Apply endpoint from a webhook (or curl) and getting INVALID for some of my parameters. For example, when I pass the primary key of an object reference parameter just as a string:
I pass in: “createdBy”: “123456”
I get:
"createdBy": {
"result": "VALID",
"evaluatedConstraints": [
{
"type": "objectQueryResult"
}
],
"required": true
}
Here is the action in OMA.
So that works fine. Above is getting the Employee object and I assume searching by that primary key I provided. But for some other objects, I get invalid and I’m not sure why. Example:
I pass: “issueType”: “770d9c5e-f346-47cb-bb8b-4e07668361f2”
I get back:
"issueType": {
"result": "INVALID",
"evaluatedConstraints": [
{
"type": "objectQueryResult"
}
],
"required": true
}
I’m not sure how to solve this. I tried using the Function syntax, like:
"issueType": {
"typeId": "ikqkt5nk.eolas-issue-type",
"primaryKey": {
"issueTypeId": "770d9c5e-f346-47cb-bb8b-4e07668361f2"
}
}
But that didn’t work either.
My guess, is that since the constraints include a search around, Foundry can’t search by the primary key alone. Maybe this is a bug? Or there is some other syntax I can try?