From dae183e17cc66d32598686ab622b3c8617480c24 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Thu, 3 Jan 2019 00:37:14 -0700 Subject: [PATCH] Update API docs and copyright year --- docs/Self-Hosting and Development/API Documentation.md | 8 ++++---- mkdocs.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Self-Hosting and Development/API Documentation.md b/docs/Self-Hosting and Development/API Documentation.md index 2b2cf3d..f7e01ff 100644 --- a/docs/Self-Hosting and Development/API Documentation.md +++ b/docs/Self-Hosting and Development/API Documentation.md @@ -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///?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 diff --git a/mkdocs.yml b/mkdocs.yml index 2ac3860..de7cf34 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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:
Creative Commons License
Copyright © 2017-2018 Netsyms Technologies. Some rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. +copyright:
Creative Commons License
Copyright © 2017-2019 Netsyms Technologies. Some rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.