API Reference ============= The AskHandle API is organized around `REST`_. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. .. _REST: https://en.wikipedia.org/wiki/Representational_State_Transfer Authentication -------------- Authenticate your account when using the API by including your secret API key in the request. Your API key carry many privileges, so be sure to keep them secret! Do not share your secret API key in publicly accessible areas such GitHub, client-side code, and so forth. To use your API key, include it in the Authorization HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example: :: Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b The `curl`_ command line tool may be useful for testing token authenticated APIs. For example: .. _curl: https://curl.haxx.se/ :: curl -X GET https://dashboard.askhandle.com/api/v1/ \ -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b' Retrieving a Token (API key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When POST’ing to https://dashboard.askhandle.com/api/v1/auth/api-token with the following data (assuming this username / password exists): ``{"username": "test", "password": "test"}`` :: curl -X POST https://dashboard.askhandle.com/api/v1/auth/api-token \ -H 'Content-Type: application/json' \ -d '{"username": "test", "password": "test"}' you’ll receive something that looks like the following: :: {'token': '9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'} API Diagram ----------- .. image:: _static/chatbot_api.svg :width: 100% Resources --------- Room ^^^^ **The room object** ========== ============== Attributes ========================== label string uuid string, *UUID* name string rating integer, *1..5* is_bot_use boolean created_at datetime messages array ========== ============== **Available methods** * **list:** ``GET /api/v1/rooms/`` List all your rooms. * **create:** ``POST /api/v1/rooms/`` Create a new room. * **retrieve:** ``GET /api/v1/rooms/