Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
I am writing a rest service to get users based on a filter. Along with filter I need to fetch the users based on some conditions, and hence need to write a custom hook.
Following is my JSON:
ContextCreations.json
{
"name": "ContextCreation",
"collectionName": "ContextCreations",
"type": "wcType",
"wcType": "wt.org.WTUser",
"description": "get Users",
"operations": "READ",
"attributes": [
{
"name": "Name",
"internalName": "name",
"type": "String"
},
{
"name": "FullName",
"internalName": "fullName",
"type":"String"
},
{
"name":"Email",
"internalName":"eMail",
"type":"String"
}
],
"actions": [],
"navigations": []
}
Following is the .js file (ContextCreations.js)
function readEntityData(processorData){
var customAPI= Java.type('ext.api.CustomAPI');
customAPI.test();
}
We have configured custom domain and its working fine as other POST APIs are working fine. I am calling the above code with http GET and the readEntityData() never gets called. I've a sysout in the customAPI.test() and it doesn't appear in the MS logs. If I call .test() method any other existing post API then I do see the sysout.
Shouldn't readEntityData() gets called automatically? Do I need to call it explicitly in my GET call?