Api documentation

Methods

Apiary - Get apiaries

Request fields

Field Value type Default value Description
token required string n/a Username used to login apiaryfu.com

Success Response

If success, this method will respond with list of apiaries.

Examples

Usage example:

$ curl "http://apiaryfu.com/api-apiary?token=37340ff1f4cefca7c765a2bd9175c7fc"

Response example:

{
	"error": false,
	"message": "Success",
	"apiaries": [
	  {
		"db_query_counter": 0,
		"error": null,
		"query": null,
		"id": "3",
		"name": "Home",
		"description": "",
		"business": "1",
		"latitude": "",
		"longitude": ""
	  },
	  {
		"db_query_counter": 0,
		"error": null,
		"query": null,
		"id": "4",
		"name": "My 2nd Apiary",
		"description": "",
		"business": "1",
		"latitude": "53.12692080850683",
		"longitude": "23.06002914905548"
	  },
	  {
		"db_query_counter": 0,
		"error": null,
		"query": null,
		"id": "5",
		"name": "My 3rd Apiary",
		"description": "",
		"business": "1",
		"latitude": null,
		"longitude": null
	  }
	]
}
	

Important

This method will accept POST as well as GET

Apiary - Get colonies

Request fields

Field Value type Default value Description
token required string n/a Username used to login apiaryfu.com
id required integer n/a Id of colony

Success Response

If success, this method will respond with list of colonies in apiary.

Examples

Usage example:

$ curl "http://apiaryfu.com/api-apiary/colonies?token=37340ff1f4cefca7c765a2bd9175c7fc&id=3"

Response example:

{
  "error": false,
  "message": "Success",
  "colonies": [
    {
      "id": "32",
      "apiary": "4",
      "description": "",
      "number_of_bees": "",
      "condition_of_bees": "",
      "level_of_agression": "",
      "name": "28",
      "beehive_type": "Dadant",
      "apiary_action_path": "-172800",
      "brood": "1",
      "deleted": "0",
      "beehive_weight": "0.00",
      "brood_frames": "0",
      "isnull": "0"
    },
    {
      "id": "44",
      "apiary": "4",
      "description": "",
      "number_of_bees": "",
      "condition_of_bees": "",
      "level_of_agression": "",
      "name": "17",
      "beehive_type": "Dadant",
      "apiary_action_path": null,
      "brood": "1",
      "deleted": "0",
      "beehive_weight": "0.00",
      "brood_frames": "3",
      "isnull": "1"
    }
  ]
}
	

Important

This method will accept POST as well as GET

Get colonies

Request fields

Field Value type Default value Description
token required string n/a Username used to login apiaryfu.com
apiary optional integer n/a Apiary id to limit colony collection, if not given will return all colonies.

Success Response

If success, this method will respond with list of new colonies.

Examples

Usage example:

$ curl "http://apiaryfu.com/api-user/login?token=48f8724a1f55ab486bd59bdbefd0bb4b&apiary=3"

Response example:

{
  "error":false,
  "message":"Success",
  "colonies":[
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"42",
      "apiary":"15",
      "description":"Od #3",
      "number_of_bees":"",
      "condition_of_bees":"",
      "level_of_agression":"",
      "name":"26",
      "beehive_type":"Dadant Korpusowy",
      "apiary_action_path":"1367485671",
      "brood":"0",
      "deleted":"0",
      "beehive_weight":"0.00",
      "brood_frames":"4",
      "isnull":"0"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"73",
      "apiary":"15",
      "description":"",
      "number_of_bees":"",
      "condition_of_bees":"",
      "level_of_agression":"",
      "name":"30",
      "beehive_type":"",
      "apiary_action_path":"1367485688",
      "brood":"0",
      "deleted":"0",
      "beehive_weight":"0.00",
      "brood_frames":"0",
      "isnull":"0"
    }
  ]
}

Important

This method will accept POST as well as GET

View one colony

Request fields

Field Value type Default value Description
token required string n/a Username used to login apiaryfu.com
id required string n/a Id of colony in apiaryfu.com

Success Response

If success, this method will respond with colony details.

Examples

Usage example:

$ curl "http://apiaryfu.com/api-colony/view?id=75&token=49d089b5252470b29dc1751c5f5d501e"

Response example:

{
  "error":false,
  "message":"Success",
  "colony":{
    "id":"16",
    "apiary":"20",
    "description":"",
    "number_of_bees":"",
    "condition_of_bees":"",
    "level_of_agression":"",
    "name":"2",
    "beehive_type":"Dadant lezak",
    "apiary_action_path":"1367485731",
    "brood":"0",
    "deleted":"0",
    "beehive_weight":"20.00",
    "brood_frames":"6"
  },
  "history":[
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"620",
      "action":"3",
      "colony":"16",
      "apiary":"20",
      "time":"1367485731",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Ochremowicze",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"566",
      "action":"3",
      "colony":"16",
      "apiary":"20",
      "time":"1344865348",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Ochremowicze",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"565",
      "action":"1",
      "colony":"16",
      "apiary":"20",
      "time":"1344865336",
      "value":"5.00",
      "user":"1",
      "apiary_name":"Ochremowicze",
      "colony_name":"2",
      "action_name":"Honey collection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"526",
      "action":"3",
      "colony":"16",
      "apiary":"20",
      "time":"1342556635",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Ochremowicze",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"507",
      "action":"15",
      "colony":"16",
      "apiary":"20",
      "time":"1341928178",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Ochremowicze",
      "colony_name":"2",
      "action_name":"W\u0119dr\u00f3wka na pasiek\u0119"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"456",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1340916397",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"427",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1340516504",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"401",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1339675963",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"357",
      "action":"1",
      "colony":"16",
      "apiary":"4",
      "time":"1339183191",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"Honey collection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"300",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1338031430",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"279",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1337865968",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"246",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1336858676",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"244",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1336858424",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"224",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1336507578",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"216",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1335903826",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"208",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1335829704",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"186",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1335046063",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"178",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1334514899",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"170",
      "action":"3",
      "colony":"16",
      "apiary":"4",
      "time":"1333551236",
      "value":"0.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"General Inspection"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"162",
      "action":"2",
      "colony":"16",
      "apiary":"4",
      "time":"1332162898",
      "value":"1.00",
      "user":"1",
      "apiary_name":"Krupniki",
      "colony_name":"2",
      "action_name":"Sugar feeding"
    }
  ],
  "notes":[
    {
      "id":"49",
      "object":"colony",
      "object_id":"16",
      "content":"Wyglada na to ze nie ma marki albo jest nieunasienniona bo nie widzialem swiezo zlozonych jaj.",
      "user":"1",
      "created":"1338031425",
      "updated_time":null,
      "todo":"0",
      "done":null,
      "done_user":null
    },
    {
      "id":"47",
      "object":"colony",
      "object_id":"16",
      "content":"Jest nastroj rojowy. Jak beda mateczniki to zrobic odklad z polowy.",
      "user":"1",
      "created":"1337889818",
      "updated_time":"1337889830",
      "todo":"1338163200",
      "done":"1338031398",
      "done_user":"1"
    },
    {
      "id":"21",
      "object":"colony",
      "object_id":"16",
      "content":"Pierwszy oblot 2012-03-12",
      "user":"1",
      "created":"1333105582",
      "updated_time":null,
      "todo":null,
      "done":null,
      "done_user":null
    }
  ]
}
		

Important

This method will accept POST as well as GET

Edit colony

Request fields

Field Value type Default value Description
token required string n/a Username used to login apiaryfu.com
id optional integer n/a Id of colony in apiaryfu.com. If provided existing colony will be edited. If not given, new colony will be created.
name optional string n/a Name of colony
apiary optional inetger n/a Apiary id
description optional string n/a
number_of_bees optional string n/a
condition_of_bees optional string n/a
level_of_agression optional string n/a
apiary_action_path optional integer n/a
brood optional string n/a
deleted optional ineteger n/a
beehive_weight optional string n/a
brood_frames optional string n/a

Success Response

If success, this method will respond with colony details.

Examples

Usage example:

$ curl "http://apiaryfu.com/api-colony/edit?token=49d089b5252470b29dc1751c5f5d501e&id=75"

Response example:

{
  "error":false,
  "message":"Colony saved"
}
		

Important

This method will accept POST as well as GET. Only provided fields will be amended.

Request fields

Field Value type Default value Description
token required string n/a Username used to login apiaryfu.com
search required string n/a Search string in colony names

Success Response

If success, this method will respond with list of colonies.

Examples

Usage example:

$ curl "http://apiaryfu.com/api-colony/search?token=2cf1b5a0c95aa22b2831b2e8748a9497&search=3&pretty=1"

Response example:

{
  "error":false,
  "message":"Success",
  "colonies":[
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"39",
      "apiary":"20",
      "description":"",
      "number_of_bees":"",
      "condition_of_bees":"",
      "level_of_agression":"",
      "name":"23",
      "beehive_type":"",
      "apiary_action_path":"1368619392",
      "brood":"0",
      "deleted":"0",
      "beehive_weight":null,
      "brood_frames":"0"
    },
    {
      "db_query_counter":0,
      "error":null,
      "query":null,
      "id":"73",
      "apiary":"15",
      "description":"",
      "number_of_bees":"",
      "condition_of_bees":"",
      "level_of_agression":"",
      "name":"30",
      "beehive_type":"",
      "apiary_action_path":"1367485688",
      "brood":"1",
      "deleted":"0",
      "beehive_weight":"0.00",
      "brood_frames":"0"
    }
  ],
  "count":2
}
		

Important

This method will accept POST as well as GET

User Login

Request fields

Field Value type Default value Description
username required string n/a Username used to login apiaryfu.com
password required string n/a Plain password used to login apiaryfu.com.

Success Response

If success, this method will respond with new auth token.

Examples

Usage example:

$ curl "http://apiaryfu.com/api-user/login?username=XYZ&password=abc&device_name=my_device"

Response example:

{ "error":false,"message":"Login success","auth_token":"856f87a2cc00870ac0827c5d54b3019b" }

Important

This method will accept POST as well as GET