2. Application Control

2.1. Control the Status

Returns json data about the status of all configured application instances.

  • URL

    /api-bin/status.cgi

  • Method

    GET

  • URL Params

    None

  • Data Params

    None

  • Success Response

    • Code: 200
    • Content: { “result” : “OK”, “name” : “<box name>” , “apps” : <instances data> }
  • Error Response

    • Code: 200
    • Content: { “result” : “KO”, “error” : “<description>” }
  • Sample Call (JQuery)

$.ajax({
  url: "/api-bin/status.cgi",
  dataType: "json",
  type : "GET",
  success : function(response) {
    console.log(response);
  }
});

2.2. Start and Stop

Turns an application instance On or Off.

  • URL

    /api-bin/appctl.cgi

  • Method

    POST

  • URL Params

    None

  • Data Params

    Required

    • prog=[string]

      The application name.

    • interf=[string]

      The interface name that identifies the application instance.

    • action={start, stop}

      ‘start’ to turn the instance On, ‘stop’ to turn the instance Off.

  • Success Response

    • Code: 200
    • Content: { “result” : “OK” }
  • Error Response

    • Code: 200
    • Content: { “result” : “KO”, “error” : “<description>” }
  • Sample Call (JQuery)

$.ajax({
  url: "/api-bin/appctl.cgi",
  dataType: "json",
  type : "POST",
  data: {
    prog: "nprobe",
    interf: "eth1",
    action: "start"
  },
  success : function(response) {
    console.log(response);
  }
});