0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
API for interaction with dashing
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 5.8.1
>= 0

Runtime

>= 1.3.4
~> 1.7
 Project Readme

Dashing API

Test it locally

Install bundler if you don't already have it (gem install bundler), then run bundle install to pull in dependencies. Then you can:

Build a gem:

bundle exec rake build

Install:

bundle exec rake install

Run unit tests:

bundle exec rake test

Installation

Add this line to your application's Gemfile:

gem 'dashing_api'

And then execute:

bundle

Or install it yourself as:

gem install dashing_api

API endpoints

List the existing widgets:

curl http://$DASHING_HOST/widgets/

List the existing dashboards:

curl http://$DASHING_HOST/dashboards/

Check if a dashboard exists:

curl http://$DASHING_HOST/dashboards/:id

Get the current status of a tile:

curl -i -H "Accept: application/json" http://$DASHING_HOST/tiles/:id.json

Check if a job script exist for data-id:

curl -i http://$DASHING_HOST/jobs/:id

Check if a tile exists on a dashboard:

curl -i http://$DASHING_HOST/tiles/:dashboard/:hosts

Delete a dashboard:

curl -X DELETE -H "Content-type: application/json" -d '{"auth_token": "$DASHING_AUTH_TOKEN"}' http://$DASHING_HOST/dashboards/:dashboard

Rename a dashboard:

curl -i -H 'Accept: application/json' -X PUT -d '{"auth_token": "$DASHING_AUTH_TOKEN", "from": "", "to": ""}' http://$DASHING_HOST/dashboards/

Replace a tile on a dashboard:

curl -i -H 'Accept: application/json' -X PUT -d '{"auth_token": "$DASHING_AUTH_TOKEN", "dashboard": "", "from": "", "to": ""}' http://$DASHING_HOST/tiles/

Create a dashboard

curl -i -H 'Accept: application/json' -X POST -d '{"auth_token": "$DASHING_AUTH_TOKEN", "tiles": {"hosts": [" "," "], "titles": [" ", " "], "widgets": [" ", " "], "urls": [" ", " "]}}' http://$DASHING_HOST/dashboards/:dashboard

Delete a tile/ tiles from a dashboard:

curl -i -H 'Accept: application/json' -X DELETE -d '{"auth_token": "$DASHING_AUTH_TOKEN", "tiles": [" ", " "]}' http://$DASHING_HOST/tiles/:dashboard

Add a tile/tiles to a dashboard

curl -i -H 'Accept: application/json' -X PUT -d '{"auth_token": "$DASHING_AUTH_TOKEN", "tiles": {"hosts": [" "," "], "titles": [" ", " "], "widgets": [" ", " "], "urls": [" ", " "]}}' http://$DASHING_HOST/tiles/:dashboard

Ping hosts and add to/ remove tiles from a dashboard

curl -i -H 'Accept: application/json' -X PUT -d '{"auth_token": "$DASHING_AUTH_TOKEN", "tiles": {"hosts": [" "," "], "titles": [" ", " "], "widgets": [" ", " "], "urls": [" ", " "]}}' http://$DASHING_HOST/ping/:dashboard

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT License