Update API docs and copyright year

master
Skylar Ittner 5 years ago
parent 83691ebb40
commit dae183e17c

@ -1,12 +1,12 @@
# API Documentation
The AccountHub API is extremely simple to use. Requests can be sent via GET or POST, and responses are sent in JSON. POST requests are strongly recommended over GET for security reasons (i.e. GET request data, including API keys and plaintext passwords, is saved in server logs and browser history with little to no protection). You should only use GET requests for debugging purposes or if (for some awful reason) it is not possible to use POST for your use case.
The NotePost API is extremely simple to use. Requests can be sent via GET or POST, and responses are sent in JSON.
## Request Structure
The API is typically located at `http(s)://accounthub-url/api.php`.
API URLs are typically of the form `http(s)://accounthub-url/api/<action>/<api key>/?args`.
All requests to the API must include a `key` argument containing a valid API key. They must also include an `action`. The `action` specifies the type of request. Other arguments may or may not be needed, depending on the `action` specified. See the table below for valid actions and parameters.
The `api key` must match a key in the database table `apikeys`. The `action` specifies the type of request. Other arguments may or may not be needed, depending on the `action` specified. See the table below for valid actions and parameters.
## Response Structure
@ -14,7 +14,7 @@ Responses to well-formed requests will have a `status` field containing the stri
If `status` is `ERROR`, there will also be a field named `msg` containing a human-readable localized error message suitable for display to the user.
If `status` is `OK`, there may or may not be additional fields sent, depending on the `action`.
If the request is not well-formed (missing required arguments, invalid API key, or invalid `action`), the API will send a 4xx HTTP code and a JSON string, such as `"400 Bad Request"`, `"403 Unauthorized"`, or `"404 Not Found: the requested action is not available."`.
If the request is not well-formed (missing required arguments, invalid credentials, or invalid action), the API will send a 4xx HTTP code and some plain text, such as `"400 Bad Request"`, `"403 Unauthorized"`, or `"404 Action not defined"`.
## Actions

@ -10,7 +10,7 @@ theme:
primary: 'orange'
accent: 'orange'
extra_javascript:
- 'https://static.netsyms.net/fontawesome/5.3.1/js/all.min.js'
- 'https://static.netsyms.net/fontawesome/5/js/all.min.js'
- 'https://docs.netsyms.com/track.js'
extra_css:
- 'https://docs.netsyms.com/font.css'
@ -18,4 +18,4 @@ extra_css:
site_author: Netsyms Technologies
repo_name: 'Business/AccountHub'
repo_url: 'https://source.netsyms.com/Business/AccountHub'
copyright: <br /><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://docs.netsyms.com/cc-by-sa88x31.png" /></a><br />Copyright &copy; 2017-2018 Netsyms Technologies. Some rights reserved.<br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
copyright: <br /><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://docs.netsyms.com/cc-by-sa88x31.png" /></a><br />Copyright &copy; 2017-2019 Netsyms Technologies. Some rights reserved.<br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.

Loading…
Cancel
Save