mirror of
https://github.com/AnimeThemes/animethemes-api-docs.git
synced 2026-11-13 09:39:52 +01:00
feat: specify endpoint authentication & provide basic syntax of requests (#18)
This commit is contained in:
1 parent
443de41eb5
commit
b8825eddfb
36 files changed
+162
No files matched your search
@@ -14,6 +14,10 @@ The anime index endpoint returns a listing of anime resources.
|
||||
GET /api/anime/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/anime/bakemonogatari` endpoint will return the Bakemonoga
|
||||
GET /api/anime/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The AnimeSynonym index endpoint returns a listing of AnimeSynonym resources.
|
||||
GET /api/animesynonym/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/animesynonym/1523` endpoint will return the AnimeSynonym
|
||||
GET /api/animesynonym/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The AnimeTheme index endpoint returns a listing of AnimeTheme resources.
|
||||
GET /api/animetheme/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/animetheme/3373` endpoint will return the AnimeTheme reso
|
||||
GET /api/animetheme/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The AnimeThemeEntry index endpoint returns a listing of AnimeThemeEntry resource
|
||||
GET /api/animethemeentry/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/animethemeentry/3822` endpoint will return the second ver
|
||||
GET /api/animethemeentry/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The year index endpoint returns a list of unique years from all anime resources.
|
||||
GET /api/animeyear/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/animeyear/2000` endpoint will return a listing of anime r
|
||||
GET /api/animeyear/{year}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The announcement index endpoint returns a listing of announcement resources.
|
||||
GET /api/announcement/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The announcement show endpoint returns an announcement resource.
|
||||
GET /api/announcement/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The artist index endpoint returns a listing of artist resources.
|
||||
GET /api/artist/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/artist/chiwa_saito` endpoint will return the artist resou
|
||||
GET /api/artist/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -10,6 +10,28 @@ The AnimeThemes API uses token-based authentication to grant the user access to
|
||||
|
||||
API tokens can be granted abilities that specify which actions can be performed.
|
||||
|
||||
## Token Authentication
|
||||
|
||||
The AnimeThemes API uses the [**Bearer authentication scheme**](https://www.rfc-editor.org/rfc/rfc6750.html) to validate requests for protected actions.
|
||||
|
||||
The `Bearer` token in the `Authorization` request header must correspond to a valid API token.
|
||||
|
||||
```sh
|
||||
curl -X POST "https://staging.animethemes.moe/api/{protected action}"
|
||||
-H "Accept: application/json"
|
||||
-H "Authorization: Bearer {token}"
|
||||
```
|
||||
|
||||
## Status Codes
|
||||
|
||||
The AnimeThemes API uses framework-default response status codes for authenticated requests.
|
||||
|
||||
| Code | Description | Examples |
|
||||
| :--: | :--------------------------------------------------- | :----------------: |
|
||||
| 200 | OK - request succeeded | DELETE, PATCH, PUT |
|
||||
| 201 | Created - new resource was created | POST |
|
||||
| 401 | Unauthorized - invalid or no authentication provided | All |
|
||||
|
||||
## Managing Tokens
|
||||
|
||||
API tokens are managed from the API Tokens Screen within the AnimeThemes application.
|
||||
|
||||
@@ -14,6 +14,10 @@ The balance index endpoint returns a listing of balance resources.
|
||||
GET /api/balance/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The balance show endpoint returns a balance resource.
|
||||
GET /api/balance/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The flags show endpoint returns the flags resource.
|
||||
GET /api/config/flags
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The wiki show endpoint returns the wiki resource.
|
||||
GET /api/config/wiki
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The image index endpoint returns a listing of image resources.
|
||||
GET /api/image/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, `/api/image/435` endpoint will return the large cover image for the
|
||||
GET /api/image/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The page index endpoint returns a listing of page resources.
|
||||
GET /api/page/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The page show endpoint returns a page resource.
|
||||
GET /api/page/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The resource index endpoint returns a listing of external resources.
|
||||
GET /api/resource/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/resource/1083` will return the MyAnimeList resource for t
|
||||
GET /api/resource/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The global search endpoint returns a listing of wiki resources that match a give
|
||||
GET /api/search/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The series index endpoint returns a listing of series resources.
|
||||
GET /api/series/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/series/monogatari` endpoint will return the series resour
|
||||
GET /api/series/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The song index endpoint returns a listing of song resources.
|
||||
GET /api/song/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/song/3373` endpoint will return the song resource for the
|
||||
GET /api/song/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The studio index endpoint returns a listing of studio resources.
|
||||
GET /api/studio/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, the `/api/studio/shaft` endpoint will return the studio resource fo
|
||||
GET /api/studio/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The transaction index endpoint returns a listing of transaction resources.
|
||||
GET /api/transaction/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The transaction show endpoint returns a transaction resource.
|
||||
GET /api/transaction/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -14,6 +14,10 @@ The video index endpoint returns a listing of video resources.
|
||||
GET /api/video/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
@@ -16,6 +16,10 @@ For example, `/api/video/Bakemonogatari-OP1.webm` endpoint will return the video
|
||||
GET /api/video/{basename}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
|
||||
Reference in new issue
Block a user