User Tools

Site Tools


api_general

API - General Information

About

We provide a simple API. You can get basic information about your servers, alerts etc.

The API is entirely HTTP-based. Methods to retrieve data from API require a GET request. Methods that change, or destroy data require a POST.

Authenticating is implemented with API key. You can find your API key on this page: https://www.bijk.com/account/api. This key must be included in every request URL.

You will get requested data in JSON format.

List Of Servers

Here you can see example of GET request that get information about all your servers. (Replace “your_api_key” with your API key)

www.bijk.com/publicapi/servers/key/your_api_key

You recieve these parameters about every server:

  • sid - server ID
  • hostname - server label
  • IP - IP address of server
  • location - location of server
  • description - short description about server

Add server

Note: This feature is available only in partner plans. You can add new servers with POST request on this url

www.bijk.com/publicapi/addServer/key/${your_api_key}/hostname/${hostname}/distribution/${distribution}/ip/${IP}/client_hash/${client_hash}

POST request must contains these parameters:

  • hostname - server label
  • distribution - linux distribution installed on server (debian, gentoo, centOS, etc..)
  • ip - IP address of server
  • client_hash - client hash of your server. (You can find hash in file /etc/bijk/client_hash)

Example: Suppose you have an CentOS server with hostname myhost.example.com and ip 8.9.10.11, generated client hash is XYZ and your API key is api123. The POST request URL will look like this:

http://www.bijk.com/publicapi/addServer/key/api123/hostname/myhost.example.com/distribution/centos/ip/8.9.10.11/client_hash/XYZ

Add user

Note: This feature is available only in partner plans. You can add new user (subaccount) with POST request on this url

www.bijk.com/publicapi/addUser/key/${your_api_key}/email/${email}/name/${name}/role/${role}/group/${group}

You will get id of created user. User receive email with login information.

POST request must contains these parameters:

  • email - user email
  • name - user name and surname
  • role - role can be 'admin' or 'user'. User can only show graphs, admin can add/edit/delete servers.
  • group - group can be 'all' or 'select'. all - user can show all servers, select - you can specify which servers can user show. This can be done with parameter sids and value is server ids separated by a underscore.
  • sids - (optional) id of servers that user can show separated with underscore

Example: Suppose you want to add subaccount admin@yourcompany.com, name George Willis, role is admin and user can access to servers with ids 546 and 548 - group is Select and sids is 546_548.your API key is api123. The POST request URL will look like this:

http://www.bijk.com/publicapi/addUser/key/api123/email/admin@yourcompany.com/name/George Willis/role/admin/group/select/sids/546_548
api_general.txt · Last modified: 2011/06/21 11:06 by woky