{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ca4cfc7a-99cd-4744-9f4c-31a41c72c9e9","name":"Tinkerbee Beehive APIs","description":"At Tinkerbee, we make smart products that seamlessly integrate hardware and software to provide solutions that #maximizeYourLife\nThis document provides an overview of the APIs exposed by the platform to extend and provide user interfaces required for customers.\n\nEvery API user will be provided a developer key (DEV_KEY) which must be kept in secure storage and must never be exposed on production systems. This is paired to a unique developer name (DEV_ID) as well. The following is the method for generating the authentication headers on the client side invoking each API.\nGet an hmac of the DEV_KEY\nGenerating the HMAC\ntimestamp = Get current timestamp in millis()\nhmac = hash_hmac('SHA256', timestamp, DEV_KEY , false) \nThe default encoding expected of the hmac is base64. In case the client sends hex encoded string, an additional header KEY_IS_HEX KEY-IS-HEX needs to be sent with any value (eg: 0). \nIn the absence of this header (default), the server expects a base64 encoded string.\nPass the hmac as SECRET_KEY SECRET-KEY HTTP header\nPass the timestamp used to generate hmac as KEY_TIMESTAMP KEY-TIMESTAMP  header\nPass the developer id (DEV_ID) as DEV_ID_HASH DEV-ID-HASH\n\tGenerating the ID hash DEV-ID-HASH = sha2(DEV_ID)\n\n\t//PHP sample code\n \n        //get current timestamp in millis\n\t$timestamp = strval(round(microtime(true) * 1000));\n\n\t//warning: do not store this in plain text, retrieve it from secure config file/ db\n\t$developer_key = 'abcd1234';\n\t$developer_id = 'test';\n\n\t//derive required creds\n\t$developer_id_hash = hash('sha256', $developer_id);\n\t$hmac_timestamp = base64_encode(hash_hmac('sha256', $timestamp, $developer_key, true));\n\n\t//set headers\n\theader(\"KEY-TIMESTAMP:$timestamp\");\n\theader(\"DEV-ID-HASH:$developer_id_hash\");\n\theader(\"SECRET-KEY:$hmac_timestamp\");\nThis ensures that the secret key is never passed in communication and that every API request is unique and avoids credential replay attacks.\nPlease write to anupam@tinkerbee.in for API credentials\n\n\n\nTypical use-case API call flow:\n\n- Create a Location (/location POST)\n Returns a unique location id\n- Create a User (/user POST)\n Returns a unique user id\n\nOnce user(s) have been created \n\n- Add a Device (/device POST)\n Returns a unique device id\n\nOnce device(s) have been created\n\n- Get events related to it (/event GET)\n Returns json with events received from a device\n","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"3618149","team":10367543,"collectionId":"ca4cfc7a-99cd-4744-9f4c-31a41c72c9e9","publishedId":"T1DiEzr1","public":true,"publicUrl":"https://documenter-api.postman.tech/view/3618149/T1DiEzr1","privateUrl":"https://go.postman.co/documentation/3618149-ca4cfc7a-99cd-4744-9f4c-31a41c72c9e9","customColor":{"top-bar":"F5EFE0","right-sidebar":"303030","highlight":"BD3854"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.6","publishDate":"2020-08-30T14:05:16.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"test","id":"88315356-e889-3a37-4321-08990fefe7ed","owner":"3618149","values":[{"enabled":true,"key":"url","value":"https://de1f2e47-a2b8-4230-a052-a768c65478a8.mock.pstmn.io","type":"text"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/2b7aacf6b7cb4730d7945565e80398c83bdc6031dc619ad90d69c0bcead601d1","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"test","value":"3618149-88315356-e889-3a37-4321-08990fefe7ed"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/T1DiEzr1"}