Question

Creating SelectQuery web service

I am trying to create a web service I will be able to use to do a Select from Creatio. I am using this syntax from the documentation:

http(s)://[Creatio application address]/[Configuration number]/dataservice/[Data fromat]/reply/SelectQuery

I get this error:

{"ResponseStatus":{"ErrorCode":"NotImplementedException","Message":"Could not find method named Get(SelectQuery) or Any(SelectQuery) on Service DataService"}}

 

I am not clear *where* I am supposed to be defining "SelectQuery". I tried creating a custom Module and Source object in the dev backend but that did not work. Where am I supposed to put this code so that it can be accessed by the web service?

{

    "RootSchemaName":"Contact",

    "OperationType":"0",

    "Columns":{

        "Items":{

            "Name":{

                "OrderDirection":"DESC",

                "OrderPosition":"ModifiedOn",

            }

        }

    },

    "AllColumns":true

}

Like 0

Like

5 comments

Heather,

Seems that you are using GET request in your webservice when calling 

http(s)://[Creatio application address]/[Configuration number]/dataservice/[Data format]/reply/SelectQuery

and that's why you receive "

Could not find method named Get(SelectQuery)" response message.

You need to use POST request instead in your webservice and it should return data correctly since indeed SelectQuery doesn't know what is GET method.

Best regards,

Oscar

Oscar Dylan,

Hi,

I get that error when I put the request into the URL bar in my browser. I'm not specifying GET or POST.

https://dev-pwt.creatio.com/0/dataservice/json/reply/SelectQuery

Heather,

Simple pasting of this request to URL bar of your browser won't return anything except of the error since URL bar uses GET method  http://prntscr.com/r0fwtp. Please create POST request to this service using Postman or other tool that allows generating web service call.

Best regards,

Oscar

Oscar Dylan,

Using Postman I get 

Could not get any response

There was an error connecting to https://dev-pwt.creatio.com/0/dataservice/json/reply/SelectQuery

Oscar Dylan,

There must be somewhere that I define my SelectQuery? Otherwise where do I put this code? 

{

    "RootSchemaName":"Contact",

    "OperationType":"0",

    "Columns":{

        "Items":{

            "Name":{

                "OrderDirection":"DESC",

                "OrderPosition":"ModifiedOn",

            }

        }

    },

    "AllColumns":true

}

Show all comments