-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some improvements in the Biotz academy developer-api docs
- Loading branch information
Showing
3 changed files
with
58 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: Developer API | ||
description: Developer API reference | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Developer API | ||
|
||
You can interact with the Biotz platform using the Developer API. | ||
|
||
### API reference | ||
|
||
The API is documented in the [OpenAPI][] v3.0 format. You can browse the | ||
reference using [Biotz's Swagger][]. | ||
|
||
|
||
### Authentication | ||
|
||
The Biotz Developer API uses OpenID JWT id-tokens for | ||
authentication. | ||
|
||
#### Obtaining Developer API Credentials | ||
|
||
Developer API credentials are required for obtaining tokens. The | ||
credentials can be created in the "Developer API" section of the Biotz | ||
web application. | ||
|
||
:::warning | ||
|
||
Make sure to save the Developer API credentials in a safe place. | ||
|
||
::: | ||
|
||
#### Obtaining an identity token | ||
|
||
The token can be obtained using the [OpenAuth Password Grant flow][]: | ||
|
||
- **Token URL**: https://auth.biotz.io/realms/biotz-platform/protocol/openid-connect/token | ||
- **Request parameters**: | ||
- `grant_type`: `"password"` | ||
- `client_id`: `"biotz-platform-programmatic-users"` | ||
- `scope`: `"openid"` | ||
- `username`: Developer API credentials username. | ||
- `password`: Developer API credentials password. | ||
|
||
#### Using the obtained token | ||
|
||
The id token has to be sent in every API request using the [HTTP Authorization request header][]. | ||
|
||
``` http | ||
Authorization: Bearer <id-token> | ||
``` | ||
|
||
[OpenAuth Password Grant Flow]: https://www.oauth.com/oauth2-servers/access-tokens/password-grant/ | ||
[OpenAPI]: https://swagger.io/resources/open-api/ | ||
[Biotz's Swagger]: https://api.biotz.io/docs/ui/index.html#/ | ||
[HTTP Authorization request header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization |