diff --git a/index.html b/index.html index 2b0a6a5..1846c11 100644 --- a/index.html +++ b/index.html @@ -32,6 +32,8 @@ document.addEventListener("DOMContentLoaded", function(){hljs.initHighlightingOn
  • monitor
  • +
  • screenboard +
  • serviceCheck
  • tag @@ -1024,6 +1026,197 @@ dogapi.monitor.unmuteAll(function(err, res){ +
    +
    +

    screenboard

    + +
    +

    create(title, description, graphs, options, callback)

    +
    +

    create a new screenboard

    +

    Parameters:

    +
    +
    title
    +

    the name of the screenboard

    +
    +
    description
    +

    description of the screenboard

    +
    +
    graphs
    +

    an array of objects which required the following keys

    + +
    +
    options
    +

    optional, a object which can contain any of the following keys

    +
      +
    • templateVariables: | +an array of objects with the following keys
        +
      • name: the name of the variable
      • +
      • prefix: optional, the tag prefix for this variable
      • +
      • default: optional, the default value for this tag
      • +
      +
    • +
    • width: the width of the screenboard in pixels
    • +
    • height: the height of the screenboard in pixels
    • +
    +
    +
    callback
    +

    function(err, res)

    +
    +
    +
    +
    +
    var dogapi = require("dogapi");
    +var options = {
    +  api_key: "api_key",
    +  app_key: "app_key"
    +};
    +dogapi.initialize(options);
    +var title = "my screenboard";
    +var description = "it is super awesome";
    +var graphs = [
    +  {
    +    type: "image",
    +    height: 20,
    +    width: 32,
    +    y: 7,
    +    x: 32,
    +    url: "https://path/to/image.jpg"
    +  }
    +];
    +var options = {
    +  templateVariables: [
    +    {
    +      name: "host1",
    +      prefix: "host",
    +      "default": "host:my-host"
    +    }
    +  ]
    +};
    +dogapi.screenboard.create(
    +  title, description, graphs, options,
    +  function(err, res){
    +    console.dir(res);
    +  }
    +);
    +
    +
    +
    +
    +

    remove(boardId, callback)

    +
    +

    delete an existing screenboard

    +

    Parameters:

    +
    +
    boardId
    +

    the id of the screenboard to delete

    +
    +
    callback
    +

    function(err, res)

    +
    +
    +
    +
    +
    var dogapi = require("dogapi");
    +var options = {
    +  api_key: "api_key",
    +  app_key: "app_key"
    +};
    +dogapi.initialize(options);
    +dogapi.screenboard.remove(1234, function(err, res){
    +  console.dir(res);
    +});
    +
    +
    +
    +
    +

    get(boardId, callback)

    +
    +

    get the info of a single existing screenboard

    +

    Parameters:

    +
    +
    boardId
    +

    the id of the screenboard to fetch

    +
    +
    callback
    +

    function(err, res)

    +
    +
    +
    +
    +
    var dogapi = require("dogapi");
    +var options = {
    +  api_key: "api_key",
    +  app_key: "app_key"
    +};
    +dogapi.initialize(options);
    +dogapi.screenboard.get(1234, function(err, res){
    +  console.dir(res);
    +});
    +
    +
    +
    +
    +

    getAll(callback)

    +
    +

    get all existing screenboards

    +

    Parameters:

    +
    +
    callback
    +

    function(err, res)

    +
    +
    +
    +
    +
    var dogapi = require("dogapi");
    +var options = {
    +  api_key: "api_key",
    +  app_key: "app_key"
    +};
    +dogapi.initialize(options);
    +dogapi.screenboard.getAll(function(err, res){
    +  console.dir(res);
    +});
    +
    +
    +
    +
    +

    share(boardId, callback)

    +
    +

    share an existing screenboard

    +

    Parameters:

    +
    +
    boardId
    +

    the id of the screenboard to share

    +
    +
    callback
    +

    function(err, res)

    +
    +
    +
    +
    +
    var dogapi = require("dogapi");
    +var options = {
    +  api_key: "api_key",
    +  app_key: "app_key"
    +};
    +dogapi.initialize(options);
    +dogapi.screenboard.share(1234, function(err, res){
    +  console.dir(res);
    +});
    +
    +
    +
    +

    serviceCheck

    @@ -1310,7 +1503,7 @@ var templateVariables = [ { name: "host1", prefix: "host", - default: "host:my-host" + "default": "host:my-host" } ]; dogapi.timeboard.create(