cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

readEntityData() is not getting called in a custom GET API

PJ_9888086
2-Guest

readEntityData() is not getting called in a custom GET API

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? 

0 REPLIES 0
Announcements
Learn more about how we are using our browser poll here