• REST Services

    By Howard Greenberg 9 years ago

    Using the Rest Services control for XPages, is there a way to specify a field that the data will reside under? For example, in the data below, I have a field called data and under that is the JSON data.

    {"data": [{"state":"IL","lastname":"Gonzales","firstname":"Adam","city":"New York"},{"state":"IL","lastname":"Fleming","firstname":"Adella","city":"Buford"},{"state":"FL","lastname":"Ainsworth","firstname":"Adrian","city":"Oshkosh"},{"state":"FL","lastname":"Hall","firstname":"Adrienne","city":"Minneapolis"},

    Of course, I can do this with the customRestService but would like to do it with view data, etc…

    Another question… with the viewJSONService, how can I turn off all the system columns that start with @? I can specify 0 for the systemColumns but I still get the @entryid field. Is there a way to turn that off too?

    Maybe the two questions above can be an enhancement request if they can't be done with the current release?

    Howard

    • By Dave Delay 9 years ago

      The answer to the first question is No. The REST services control doesn't support that feature in the current release. Also, there is no way to eliminate @entryid from the JSON response.

      Sorry about that.

      – Dave

      • By Howard Greenberg 9 years ago

        thanks, submitted an enhancement request on github.

        Howard