(Migrated) public API

(This message has been automatically imported from the retired mailing list)

Hello,

there is something I don’t get.
I’m trying to access Zato’s public API via plain HTTP with curl,
specifically I’m trying to get a list of all services I deployed on the
cluster (there’s currently one).
This can be achieved (if I got it correctly) with the internal service
zato.service.get-list
https://zato.io/docs/public-api/details/zato.service.get-list.html

the doc says:
JSON URL path: /zato/json/zato.service.get-list, and parameter
cluster_id:int

I try:

curl ‘http://localhost:11223/zato/json/zato.service.get-list?cluster_id=1

I got an error:

{
“zato_env”: {
“details”: “Traceback (most recent call last):\n File
”/home/altux/zato-2.0.3/code/zato-server/src/zato/server/connection/http_soap/channel.py",
line 176, in dispatch\n sec =
self.url_data.url_sec[channel_item[‘match_target’]]\nKeyError:
u’:::/zato/json/zato.service.get-list’\n",
“result”: “ZATO_ERROR”,
“cid”: “K062BNCVQB4N0SJJAVZX9QBQMAXS”
}
}

Do I have to create a connection for each public service I want to access?
I created a POST connection for this service, now I try:

curl ‘http://localhost:11223/get_services’ -d ‘{“cluster_id”: 1}’

I got:

{
“zato_env”: {
“details”: “”,
“result”: “ZATO_OK”,
“cid”: “K078XF46PDHVA7WTTCET3HK3ZNG5”
},
“zato_service_get_list_response”: []
}

Looks quite OK but it is empty, I checked in the ODB, the ID of my
(only) cluster is 1 and I have implemented one service which works.

Do i have to create a GET connection?
I got:

{
“zato_env”: {
“details”: “Traceback (most recent call last):\n File
”/home/altux/zato-2.0.3/code/zato-server/src/zato/server/connection/http_soap/channel.py",
line 198, in dispatch\n payload, worker_store, self.simple_io_config,
post_data)\n File
"/home/altux/zato-2.0.3/code/zato-server/src/zato/server/connection/http_soap/channel.py",
line 351, in handle\n params_priority=channel_item.params_pri)\n File
"/home/altux/zato-2.0.3/code/zato-server/src/zato/server/service/init.py",
line 423, in update_handle\n raise e\nAttributeError: name_filter\n",
“result”: “ZATO_ERROR”,
“cid”: “K078AP74603Z9CQM8CYTFXVX52XE”
}
}

I don’t know exactly where I did right and where I did wrong.

Thanks,
Andrea.