opinkerfi / adagios

Adagios - Web Based Nagios Configuration
GNU Affero General Public License v3.0
330 stars 75 forks source link

REST api should have curl examples #281

Closed tomas-edwardsson closed 10 years ago

tomas-edwardsson commented 10 years ago

screenshot from 2014-02-26 12 56 33

https://twitter.com/supersheep/statuses/438626933438701568

andytinycat commented 10 years ago

Oh man, this is me. I feel bad now. I'll try to get some examples using curl together.

palli commented 10 years ago

commit ec87e15 may help a little with this. If browsing /adagios/rest and clicking on a method it will generate curl and javascript code that can be used as a template.

Screenshot here of opening up /adagios/rest/okconfig/json/addhost : http://imgur.com/4q6PW3z

tomas-edwardsson commented 10 years ago

@palli looks nice, wondering if skipping the param=None would be sufficient for a working curl example. Also adding -u USER:PASSWORD for ease of use?

@andytinycat I actually just loved the idea, so thanks are in order :+1: