docs: add authentication section for version 1

This commit is contained in:
Stevan Freeborn
2023-04-22 14:38:38 -05:00
parent 66e87b3c48
commit a8d160b340
4 changed files with 27 additions and 2 deletions
@@ -0,0 +1,7 @@
# Authentication {% #authentication %}
The Onpsring API uses API keys to authenticate requests. These keys are specific to a given Onspring instance. You can view and manage your API keys from within your instance.
An API key needs to be provided with every request. This is done by adding the `X-ApiKey` header to the request. The API key provided should be in an `Enabled` status and it should be assigned a role that has the proper permissions for the request made by the API key. The role assigned should also be in an `Active` status.
If the role assigned to the API key does not have sufficient permissions to perform the requested action or is in n `Inactive` status, an error will be returned. Onspring administrators may configure roles for API keys just as they would any other role in Onspring. However each API key can have only one assigned role.
@@ -0,0 +1,11 @@
# X-ApiKey Header
API Keys are specific to an instance. If you are using the API to access data from multiple instances, you will need to create an API key for each instance.
{% code heading="X-APIKEY" defaultLanguage="text" %}
```text
X-ApiKey: 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000
```
{% /code %}
+6 -1
View File
@@ -9,7 +9,12 @@ export const versionOne: DocsStructure = {
folder: 'introduction',
copy: 'copy.md',
example: 'example.md',
children: [],
},
{
title: 'Authentication',
folder: 'authentication',
copy: 'copy.md',
example: 'example.md',
},
],
};
+3 -1
View File
@@ -1,3 +1,5 @@
# Introduction {% #introduction %}
The Onspring API is organized around REST. It enables external programs to retrieve, save, and delete data within your Onspring instance. The Onspring API does not support bulk operation for some, but not all endpoints.
The Onspring API is organized around REST. It enables external programs to retrieve, save, and delete data within your Onspring instance. The Onspring API does not support bulk operations.
**Note:** There is a newer version of the Onspring API available [here](/). If you are using the Onspring API for the first time, we recommend using the newer version.