I am trying to create a mock api (Oracle fusion) by using stub data. But struggling with one of the endpoints. API request from the app -> /hcmRestApi/resources/11.13.18.05/workers?fields=PersonNumber%3Bnames%3AFirstName%2CLastName%3Bemails%3AEmailType%2CEmailAddress%2CPrimaryFlag%3BworkRelationships.assignments%3ADepartmentName%2CPrimaryAssignmentFlag%2CAssignmentStatusType&limit=50&offset=0&onlyData=false&q=UPPER%28names.LocalDisplayName%29+LIKE+UPPER%28%27%25victoria%25%27%29+AND+workRelationships.assignments.AssignmentStatusType+%3D+%27ACTIVE%27+AND+emails.EmailType+%3D+%27W1%27&totalResults=true
The request that i have written for the stub is as below but it won't match. Its down to q query parameter and i have tried few different ways but none has worked. Any suggestions how to match it please?
{
"name": "Get business contact",
"request": {
"method": "GET",
"urlPath": "/hcmRestApi/resources/11.13.18.05/workers",
"queryParameters": {
"fields": {
"equalTo": "PersonNumber;names:FirstName,LastName;emails:EmailType,EmailAddress,PrimaryFlag;workRelationships.assignments:DepartmentName,PrimaryAssignmentFlag,AssignmentStatusType"
},
"limit": {
"equalTo": "50"
},
"offset": {
"equalTo": "0"
},
"onlyData": {
"equalTo": "false"
},
"q": {
"matches": ".*UPPER\\(names.LocalDisplayName\\) LIKE UPPER\\('\\*victoria bailey\\*'\\). AND workRelationships.assignments.AssignmentStatusType = 'ACTIVE' AND emails.EmailType = 'W1'"
},
"totalResults": {
"equalTo": "true"
}
}
}
Response block is
"response": {
"headers": {
"Content-Type": "application/json",
"REST-Framework-Version": "4"
},
"jsonBody": {
"count": 1,
"hasMore": false,
"limit": 25,
"links": [],
"offset": 0,
"items": [
{
"FullName": "Victoria Bailey",
"PersonId": 300000096289977,
"PersonNumber": "92000278",
"DateOfBirth": null,
"addresses": {
"items": [],
"count": 0,
"hasMore": false,
"limit": 50,
"offset": 0
},
"emails": {
"items": [
{
"EmailType": "W1",
"EmailAddress": "[email protected]",
"PrimaryFlag": true
}
],
"count": 1,
"hasMore": false,
"limit": 50,
"offset": 0
},
"names": {
"items": [
{
"LocalDisplayName": "Victoria",
"FirstName": "Victoria",
"LastName": "Bailey",
"KnownAs": null,
"LegislationCode": "GB",
"Title": null
}
],
"count": 1,
"hasMore": false,
"limit": 50,
"offset": 0
},
"workRelationships": {
"items": [
{
"assignments": {
"items": [
{
"DepartmentName": "Granada",
"AssignmentStatusType": "ACTIVE"
}
],
"count": 1,
"hasMore": false,
"limit": 50,
"offset": 0
}
}
],
"count": 1,
"hasMore": false,
"limit": 50,
"offset": 0
}
}
]
}
}
},