Page 3 of 3

Re: How to connect

PostPosted: 23 Sep 2015, 13:27
by blacksqd
Sorry,

python gestionId.py

Re: How to connect

PostPosted: 23 Sep 2015, 13:30
by Sebastian Philipp
Are you able to get the space ids by executing

Code: Select all
./TeamDriveApi.py '127.0.0.1:45454' --user <your user name> --pass <your pass> getSpaceIds


?

Re: How to connect

PostPosted: 23 Sep 2015, 13:35
by blacksqd
TeamDriveApi.py: error: no such option: --user

Re: How to connect

PostPosted: 23 Sep 2015, 13:55
by Sebastian Philipp
Please download the latest TeamDriveApi from here: http://docs.teamdrive.net/Agent/4.1/html/TeamDrive_Http_Api.html#requirements

Re: How to connect

PostPosted: 23 Sep 2015, 14:30
by blacksqd
Here is the answer :

bash: ./TeamDriveApi.py: Permission non accordée

Re: How to connect

PostPosted: 23 Sep 2015, 14:56
by Sebastian Philipp
I'm sorry, the correct command line is

Code: Select all
python TeamDriveApi.py '127.0.0.1:45454' --user <your user name> --pass <your pass> getSpaceIds

Re: How to connect

PostPosted: 23 Sep 2015, 14:59
by blacksqd
I also got an error

Traceback (most recent call last):
File "TeamDriveApi.py", line 1363, in <module>
main()
File "TeamDriveApi.py", line 1359, in main
result = (getattr(TeamDriveApi, command)(api, *params))
File "TeamDriveApi.py", line 322, in getSpaceIds
return self._call("getSpaceIds")
File "TeamDriveApi.py", line 285, in _call
self._h.request(method, call, body = paramString if method != "GET" else None, headers=headers)
File "/usr/lib/python2.7/httplib.py", line 973, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 791, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 772, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
socket.error: [Errno 111] Connection refused

Re: How to connect

PostPosted: 23 Sep 2015, 15:31
by Sebastian Philipp
It seems that you are unable to connect to TeamDrive from your script. Please ask your administrator, if he can help you to connect to TeamDrive.

In the log files, I can see that TeamDrive logs requests from The API. Maybe you already connected to TeamDrive (maybe in your browser) or TeamDrive is not running while you are trying to connect to it. I don't have enough information to help you further in the forum here.

If you have a professional licence, I may be able to help you, if you open a support ticket.

Best Regards,

Sebastian Philipp