Browse Source

CLDC-2608: add documentation for the app api (#2015)

pull/2018/head
Chirag-Bhatti 1 year ago committed by GitHub
parent
commit
84063f31ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/adr/index.md
  2. 15
      docs/app_api.md
  3. 2
      docs/documentation_website.md
  4. 2
      docs/form/index.md
  5. 2
      docs/setup.md

2
docs/adr/index.md

@ -1,6 +1,6 @@
--- ---
has_children: true has_children: true
nav_order: 9 nav_order: 10
--- ---
# Architecture decisions # Architecture decisions

15
docs/app_api.md

@ -0,0 +1,15 @@
---
nav_order: 8
---
# Using the App API
In order to use the app as an API, you will need to configure requests to the API as so:
* Configure your request with Basic Auth. Set the username to be the same as `API_USER` and password as the `API_KEY` (`API_USER` and `API_KEY` are environment variables that should be set for the application)
* Check the endpoint you are calling is an action that is `create`, `show` or `update`
* Check you are setting the following request headers:
* `Content-Type = application/json`
* `Action = application/json` N.B. If you use `*/*` instead, the request won't be recognised as an API request`
Currently only the logs controller is configured to accept and authenticate API requests, when the above API environment variables are set.

2
docs/documentation_website.md

@ -1,5 +1,5 @@
--- ---
nav_order: 10 nav_order: 11
--- ---
# This documentation website # This documentation website

2
docs/form/index.md

@ -1,6 +1,6 @@
--- ---
has_children: true has_children: true
nav_order: 8 nav_order: 9
--- ---
# Generating forms # Generating forms

2
docs/setup.md

@ -1,5 +1,5 @@
--- ---
nav_order: 2 nav_order: 3
--- ---
# Local development # Local development

Loading…
Cancel
Save