comparison docs/api/api.rst @ 4189:9793473d74be kallithea-2.2.5-rebrand

Rename helper tools (and fix inconsistent naming)
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:04:39 -0400
parents 05cabd91f7c3
children e73a69cb98dc
comparison
equal deleted inserted replaced
4188:6c0215b29750 4189:9793473d74be
77 77
78 API CLIENT 78 API CLIENT
79 ++++++++++ 79 ++++++++++
80 80
81 From version 1.4 RhodeCode adds a script that allows to easily 81 From version 1.4 RhodeCode adds a script that allows to easily
82 communicate with API. After installing RhodeCode a `rhodecode-api` script 82 communicate with API. After installing RhodeCode a `kallithea-api` script
83 will be available. 83 will be available.
84 84
85 To get started quickly simply run:: 85 To get started quickly simply run::
86 86
87 rhodecode-api _create_config --apikey=<youapikey> --apihost=<your.kallithea.server> 87 kallithea-api _create_config --apikey=<youapikey> --apihost=<your.kallithea.server>
88 88
89 This will create a file named .config in the directory you executed it storing 89 This will create a file named .config in the directory you executed it storing
90 json config file with credentials. You can skip this step and always provide 90 json config file with credentials. You can skip this step and always provide
91 both of the arguments to be able to communicate with server 91 both of the arguments to be able to communicate with server
92 92
93 93
94 after that simply run any api command for example get_repo:: 94 after that simply run any api command for example get_repo::
95 95
96 rhodecode-api get_repo 96 kallithea-api get_repo
97 97
98 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000 98 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
99 rhodecode said: 99 rhodecode said:
100 {'error': 'Missing non optional `repoid` arg in JSON DATA', 100 {'error': 'Missing non optional `repoid` arg in JSON DATA',
101 'id': 75, 101 'id': 75,
103 103
104 Ups looks like we forgot to add an argument 104 Ups looks like we forgot to add an argument
105 105
106 Let's try again now giving the repoid as parameters:: 106 Let's try again now giving the repoid as parameters::
107 107
108 rhodecode-api get_repo repoid:rhodecode 108 kallithea-api get_repo repoid:rhodecode
109 109
110 calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "rhodecode"}, "method": "get_repo"} to http://127.0.0.1:5000 110 calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "rhodecode"}, "method": "get_repo"} to http://127.0.0.1:5000
111 rhodecode said: 111 rhodecode said:
112 {'error': None, 112 {'error': None,
113 'id': 39, 113 'id': 39,