{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"214bc8b8-912f-917d-3b1a-67fd5e9bd92a","name":"unkani API","description":"<h1>Unkani Data Services</h1>\nUnkani a lightweight but feature-dense platform for startups in digital health.  The unkani API provides a RESTful interface for viewing and modifying all of the standard resources within the Unkani domain.\n\nhttps://www.unkani.com\n\n<h1>Authentication</h1>\n<p>All of the Unkani API endpoints require authentication.  Before utilizing the API, you must have an active and confirmed Unkani account, initialized via the web application.  Once your account is configured, and an API license is obtained, you and other members of your organization may authenticate with the API and begin using the Unkani Data Services.\n\nPlease note, traffic to the Unkani API must be routed over Securte HTTP.  All un-secure traffic will be either re-directed over HTTPS or will raise an error.</p>\n\n<h3>Tokens</h3>\n<p>Users can authenticate with the '/tokens' route via the HTTP Basic authentication scheme by passing the unkani email and password pair as a base-64 encoded string in the 'authorization' request header.\n\nSuccessful authentication with the '/tokens' route returns an HTTP Bearer token in the body of the response.\n\nHTTP Bearer toekn authentication is required for all other routes in the Unkani API.  Requests should include an 'authorization' header with the value of 'Bearer {token}'.\n\nTokens are comprised of cryptographically secure timed-JSON Web Tokens.  After a set period of time, the tokens expire and users must re-authenticate with the '/tokens' route before further requests can be made.\n</p>\n<table style=\"width:100%\">\n  <tr>\n    <th>header</th>\n    <th>value</th> \n    <th>description</th>\n  </tr>\n  <tr>\n    <td>authorization</td>\n    <td>Basic {base64 encoded email/pw}</td> \n    <td>HTTP basic authentication</td>\n  </tr>\n    <tr>\n    <td>authorization</td>\n    <td>Bearer {token}</td> \n    <td>HTTP Bearer token authentication</td>\n  </tr>\n</table>\n\n<h1>Errors</h1>\n<h3>Status Codes</h3>\n<p>HTTP status codes can be relied upon to interpret the result of the request.  The status codes employed by Unkani are listed below.</p>\n<table style=\"width:100%\">\n  <tr>\n    <th>code</th>\n    <th>type</th> \n    <th>notes</th>\n  </tr>\n  <tr>\n    <td>200</td>\n    <td>ok</td> \n    <td>successful request</td>\n  </tr>\n    <tr>\n    <td>201</td>\n    <td>created</td> \n    <td>a new resource was created</td>\n  </tr>\n  <tr>\n    <td>301</td>\n    <td>redirect</td> \n    <td>resource was moved permanently</td>\n  </tr>\n  <tr>\n    <td>400</td>\n    <td>bad request</td> \n    <td>the request was invalid or ill-formed</td>\n  </tr>\n  <tr>\n    <td>401</td>\n    <td>unauthorized</td> \n    <td>client was un-authenticated</td>\n  </tr>\n  <tr>\n    <td>403</td>\n    <td>forbidden</td> \n    <td>client has insufficient access</td>\n  </tr>\n  <tr>\n    <td>404</td>\n    <td>not found</td> \n    <td>resource could not be found</td>\n  </tr>\n  <tr>\n    <td>405</td>\n    <td>method not allowed</td> \n    <td>method not allowed for the resource</td>\n  </tr>\n  <tr>\n    <td>412</td>\n    <td>precondition failed</td> \n    <td>used for ETag cache</td>\n  </tr>\n  <tr>\n    <td>429</td>\n    <td>too many requests</td> \n    <td>rate limit is exceeded</td>\n  </tr>\n  <tr>\n    <td>500</td>\n    <td>internal server error</td> \n    <td>error within unkani service</td>\n  </tr>\n</table>\n<h3>Human-Readable Errors</h3>\n<p>Unkani's API provides a wide variety of human-readable error descriptions for all responses from the API.  All errors, and even some successful requests will contain error details within the body of the response.</p>\n\n<h5>The Error Array</h5>\n<p>Errors are returned as an array in the JSON body under the top-level key \"errors\".  The error array contains zero to many error dictionaries with information about any errors that occurred while processing the request or generating the response.  Each error dictionary has three key-value pairs:</p>\n<ul>\n<li><b>type</b>:  A generic description of the type of error that occured.</li>\n<li><b>level</b>: Either 'warning' or 'critical'.  Determines the severity of the error.  Does not take the place of or supersede the response status code.</li>\n<li><b>message</b>: Detailed information about the error in a human-readable format.</li>\n</ul>\n<pre><code class=\"language-javascript\">{\n  \"errors\": [\n    {\n      \"type\": \"not authorized\",\n      \"message\": \"The request is not authorized\",\n      \"level\": \"critical\"\n    }\n  ]\n}</code></pre>\n\n<h1>Rate Limiting</h1>\n<p>Rate limiting is enabled for all Unkani endpoints.  Each authenticated users (with standard licensing) may not exceed 5 requests per 15 seconds.  If the rate limit is exceeded, an error response with status code '429: Too Many Requests' is returned.</p>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1189270","collectionId":"214bc8b8-912f-917d-3b1a-67fd5e9bd92a","publishedId":"6tW6Rmd","public":true,"publicUrl":"https://documenter-api.postman.tech/view/1189270/6tW6Rmd","privateUrl":"https://go.postman.co/documentation/1189270-214bc8b8-912f-917d-3b1a-67fd5e9bd92a","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.11.4","publishDate":"2017-08-31T00:12:05.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Unkani Demo","id":"e7d055a1-cb54-c130-74b9-e399f3d87b43","owner":"1189270","values":[{"enabled":true,"key":"server","value":"https://unkani.com","type":"text"},{"enabled":true,"key":"userid","value":"<int:user_id>","type":"text"},{"enabled":true,"key":"email","value":"email@example.com","type":"text"},{"enabled":true,"key":"username","value":"username","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/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","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":"Unkani Demo","value":"1189270-e7d055a1-cb54-c130-74b9-e399f3d87b43"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/6tW6Rmd"}