Skip to content

Commit

Permalink
Add docs for media file download API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcen committed Jun 8, 2024
1 parent 36ca81c commit 3acc6af
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions source/includes/_items.md
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,38 @@ Status | Meaning | Description
500 | Internal Server Error | There was an error when attempting to read the cover file.


## Get a Library Item's Media File

```shell
curl "https://abs.example.com/api/items/li_8gch9ve09orgn4fdz8/file/12345667/download" \
-H "Authorization: Bearer exJhbGciOiJI6IkpXVCJ9.eyJ1c2Vyi5NDEyODc4fQ.ZraBFohS4Tg39NszY" \
--output media_file.m4b
```

> The above command writes an audio file.
This endpoint retrieves a library item's specific file.

### HTTP Request

`GET http://abs.example.com/api/items/<ID>/file/<ino>/download`

### URL Parameters

Parameter | Description
--------- | -----------
ID | The ID of the library item.
ino | The ino number of the library item's file (as per [Get a Library Item](#get-a-library-item) output).

### Response

Status | Meaning | Description
------ | ------- | -----------
200 | OK | Success
404 | Not Found | Either no library item exists with the given ID, or the item does not have a cover.
500 | Internal Server Error | There was an error when attempting to read the cover file.


## Upload a Library Item Cover

> Upload a cover image:
Expand Down

0 comments on commit 3acc6af

Please sign in to comment.