Page 1 of 1

URLs "http://<serveurWAPT> //api/v1/..."

Published: September 14, 2015 - 12:24 PM
by lduriez
Hello,

I just discovered that it's possible to retrieve certain information using URLs starting with "http://".

These URLs could be useful to me as I'm currently working on a fully web-based WAPT console (of course, I'll share it once it's up and running :D ).

Does anyone know the list of these URLs and how they work?

Thanks in advance.

Luc

Re: URLs "http://<serveurWAPT> //api/v1/..."

Published: September 16, 2015 - 5:38 PM
by Aguay
lduriez wrote:Hello,

I just discovered that it's possible to retrieve certain information using URLs in "http://"

These URLs could be useful to me as I'm currently working on a fully web-based WAPT console (of course, I'll share it once it's up and running :D ).

Does anyone know the list of these URLs and how they work?

Thanks in advance.

Luc

Good morning,

There are apparently several interesting URLs present in waptserver.py:

Code: Select all

@app.route('/lang/<language>')
@app.route('/')
@app.route('/info')
@app.route('/hosts')
@app.route('/json/host_list',methods=['GET'])
@app.route('/add_host',methods=['POST'])
@app.route('/update_host',methods=['POST'])
@app.route('/upload_package/<string:filename>',methods=['POST'])
@app.route('/upload_host',methods=['POST'])
@app.route('/upload_waptsetup',methods=['POST'])
@app.route('/deploy_wapt',methods=['POST'])
@app.route('/login',methods=['POST'])
@app.route('/delete_package/<string:filename>')
@app.route('/wapt/')
@app.route('/wapt/<string:input_package_name>')
@app.route('/wapt/icons/<string:iconfilename>')
@app.route('/wapt-host/<string:input_package_name>')
@app.route('/wapt-group/<string:input_package_name>')
@app.route('/ping')
@app.route('/api/v1/trigger_reachable_discovery')
@app.route('/api/v1/host_reachable_ip')
@app.route('/api/v1/trigger_upgrade')
@app.route('/api/v1/trigger_update')
@app.route('/api/v1/host_forget_packages')
@app.route('/api/v1/host_remove_packages')
@app.route('/api/v1/host_install_packages')
@app.route('/api/v1/host_tasks_status')
@app.route('/api/v1/groups')
@app.route('/api/v1/hosts',methods=['DELETE'])
@app.route('/api/v1/hosts_delete',methods=['GET'])
@app.route('/api/v1/hosts',methods=['GET'])
@app.route('/api/v1/host_data')
@app.route('/api/v1/hosts',methods=['POST'])
@app.route('/api/v1/host_cancel_task')
@app.route('/api/v1/usage_statistics')
I did a grep app.route ./waptserver/waptserver.py to get the list of these urls.

You need to look at the Python file to see exactly what's there :)