API Documentation

All the data used by this site is stored behind an API accessed over HTTP, sending/recieving blobs of JSON encoded data.

JSON was chosen because pretty much any language can interact with it.

Contents

Requests

Requests are all sent to http://api.manageips.net/<API Version>/<Method Name>. The current API version is 1.0, so requests should be sent to: http://api.manageips.net/1.0/method

Requests include 4 variables:

reqid
This is an id number for the request, used to allow client-side tracking of requests. All responses from the API will include the exact same reqid as was given, the API doesn't care about this.

appkey
All applications that access the API are required to have an application key. This is to allow misbehaving applications to be denied access to the system if required. Any user can request an Application key after logging in.

userdata
The initial version of the API doesn't track state, so all requests require authentication data to be passed. The format of this is: <Organisation Identifier>/<Username>:<Password Hash>
The password hash is a sha1 of <lowercaseusername>-<password> (note the hyphen in the middle). All passwords are then further hashed by the API before being checked against the authentication databse.

data
This is an array of key/value pairs as required by the API method being called.

An example request could be:
{
  "reqid":"504926d4ddb77",
  "appkey":"01234567-89AB-CDEF-0123-456789ABCDEF",
  "userdata":"someorg\/someuser:8f452ad7325194e0b09ce383a74d88d8d86b7b39",
  "data":{
    "sort":"true"
  }
}
			
This would be sent as the POST data (or, if you can't send raw post data, you can urlencode it and POST it as data=json_encoded_string key/value.

If this was sent to the "groups/get" method, it would return something like:
{
  "reqid":"504926d4ddb77",
  "respid":"504929f9504d7",
  "method":"groups/get",
  "response":{
    "131":{
      "id":"131",
      "description":"Group 1",
      "userid":"1",
      "modifiedat":"1346972079",
      "user":"admin",
      "email":"someuser@example.org",
      "realname":"Shane Mc Cormack",
      "parent":null,
      "subnetcount":"0",
      "childcount":"1",
      "children":{
        "133":{
          "id":"133",
          "description":"Sub-Group 1 - 1",
          "userid":"1",
          "modifiedat":"1346972102",
          "user":"admin",
          "email":"someuser@example.org",
          "realname":"Shane Mc Cormack",
          "parent":"131",
          "subnetcount":"0",
          "childcount":"0",
          "children":[

          ]
        }
      }
    },
    "132":{
      "id":"132",
      "description":"Group 2",
      "userid":"1",
      "modifiedat":"1346972084",
      "user":"admin",
      "email":"someuser@example.org",
      "realname":"Shane Mc Cormack",
      "parent":null,
      "subnetcount":"0",
      "childcount":"3",
      "children":{
        "135":{
          "id":"135",
          "description":"Sub Group 2 - 1",
          "userid":"1",
          "modifiedat":"1346972125",
          "user":"admin",
          "email":"someuser@example.org",
          "realname":"Shane Mc Cormack",
          "parent":"132",
          "subnetcount":"0",
          "childcount":"0",
          "children":[

          ]
        },
        "136":{
          "id":"136",
          "description":"Sub Group 2 - 2",
          "userid":"1",
          "modifiedat":"1346972130",
          "user":"admin",
          "email":"someuser@example.org",
          "realname":"Shane Mc Cormack",
          "parent":"132",
          "subnetcount":"0",
          "childcount":"1",
          "children":{
            "138":{
              "id":"138",
              "description":"Sub Group 2 - 2 - 1",
              "userid":"1",
              "modifiedat":"1346972146",
              "user":"admin",
              "email":"someuser@example.org",
              "realname":"Shane Mc Cormack",
              "parent":"136",
              "subnetcount":"0",
              "childcount":"0",
              "children":[

              ]
            }
          }
        },
        "137":{
          "id":"137",
          "description":"Sub Group 2 - 3",
          "userid":"1",
          "modifiedat":"1346972139",
          "user":"admin",
          "email":"someuser@example.org",
          "realname":"Shane Mc Cormack",
          "parent":"132",
          "subnetcount":"0",
          "childcount":"0",
          "children":[

          ]
        }
      }
    },
    "134":{
      "id":"134",
      "description":"Group 3",
      "userid":"1",
      "modifiedat":"1346972115",
      "user":"admin",
      "email":"someuser@example.org",
      "realname":"Shane Mc Cormack",
      "parent":null,
      "subnetcount":"0",
      "childcount":"0",
      "children":[

      ]
    }
  }
}
			
This describes a simple group layout of:
  • Group 1
    • Sub-Group 1 - 1
  • Group 2
    • Sub Group 2 - 1
    • Sub Group 2 - 2
      • Sub Group 2 - 2 - 1
    • Sub Group 2 - 3
  • Group 3

If there was an error with your input, you would get an error element rather than response

Available Methods

Below is a list of available methods in the API. Futher documentation (such as available parameters) will follow in due course. For now, feel free to just send requests towards each method, they will report errors about missing parameters.
In general all users can use "get" methods, but you need to have "standard" level or "admin" level access in an organisation to be able to add/edit/delete.

Groups

These methods are used to deal with groups.
  • groups/add
  • groups/delete
  • groups/edit
  • groups/get

Organisation and Users

These methods are used to manage the organisation. You need to be an organisation admin to be able to access them.
  • org/delete
  • org/edit
  • org/info
  • org/logs
  • org/users/add
  • org/users/edit
  • org/users/get

Searching

These methods will allow you to search.
  • search/ip
  • search/find

Subnets

These methods allow you to interact with subnets.
  • subnets/add
  • subnets/delete
  • subnets/massdelete
  • subnets/edit
  • subnets/get
  • subnets/join
  • subnets/split
  • subnets/fields/add
  • subnets/fields/delete
  • subnets/fields/edit
  • subnets/fields/get

IP Address

These methods are used to deal with individual ip addresses
  • ipaddress/add
  • ipaddress/delete
  • ipaddress/edit
  • ipaddress/get
  • ipaddress/massdelete

General

These methods are mainly related to your user account.
  • ping
  • userdata
  • version

API Interaction Code

Soon there wil be some example code here that can be used to interact with the API.