Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
- Add documentation about API Keys
  • Loading branch information
sanchegm committed Dec 12, 2024
1 parent 4329c09 commit 3ea144f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export AFFILS_AWS_S3_ACL="placeholder"
# Django stuff
export DJANGO_SECRET_KEY="placeholder"

export API_KEY="placeholder"
export AFFILS_API_KEY="placeholder"
21 changes: 21 additions & 0 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,24 @@ oriented towards learning how rather than learning what.
variables as needed): `logger = logging.getLogger("watchtower")`
`logger.info(f"Affiliation Created:\\n\\n {Affiliation.full_name} (PK: {Affiliation.pk})")`
- The desired log line will appear in the selected logging handler.

## API Key Information

- We are utilizing
[Django REST Framework API Key](https://florimondmanca.github.io/djangorestframework-api-key/)
package to support the use of API keys.

### API KEY

- If you are in need of an API Key, please reach out to one of the website
administrators or your admin user to obtain an API Key.
- Upon creating an API key from the admin, the full API key is shown only once
in a success message banner. After creation, only the prefix of the API key is
shown in the admin site, mostly for identification purposes. If you lose the
full API key, you'll need to regenerate a new one.

### Authorization header

By default, clients must pass their API key via the Authorization header. It
must be formatted as follows: `Authorization: X-Api-Key <API_KEY>` where
\<API_KEY> refers to the full generated API key

0 comments on commit 3ea144f

Please sign in to comment.