Status: Open
Status: Answered
Status: Closed
Status: Duplicate

API - Return subset of results.

Posted Jan 08 by Franky Egan.

Im using the POST api/v2/search api for 16.2. I only want the ID values for each returned result;

"results": [
        "data": {
            "properties": {
                "id": 1897009,

and not the following entire resultset;

"results": [
        "data": {
            "properties": {
                "container": true,
                "container_size": 0,
                "create_date": "2016-09-15T16:37:07",
                "create_user_id": 40278,
                "description": "",
                "description_multilingual": {
                    "en_GB": ""
                "due_date": null,
                "external_create_date": null,
                "external_identity": "",
                "external_identity_type": "",
                "external_modify_date": null,
                "external_source": "",
                "favorite": false,
                "goals": "",
                "id": 1897009,

I've tried using fields?id etc but no dice. Perhaps that's not immplemented.

Anybody know how to achieve this?

2 Answers

BEST ANSWER: As chosen by the author.

this is an API call, so there is no way to change it from the API side, you would need to extend it on the server side in OScript to add a new API method to do what you require. If you want the same behaviour for ALL searches you may be able to patch that code instead of adding a new API method.

BEST ANSWER: As chosen by the author.

the latest REST API does support this, e.g. https://host/otcs/cs.exe/api/v2/nodes/332165/nodes?fields=properties{id,name,type,parent_id,container,container_size}

 You have subscribed and will receive email notifications of updates to this topic. To unsubscribe, uncheck the checkbox.


Related categories

Related tags

Your answer

To leave an answer, please sign in.