mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-06 02:18:26 +02:00
Allow creating archived bookmark through REST API (#268)
* Add POST archived API endpoint * Update API docs * Expose is_archived in existing POST endpoint * Add test to verify bookmark not archived by default * Fix JSON payload in API docs Co-authored-by: Sascha Ißbrücker <sascha.issbruecker@googlemail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ The following resources are available:
|
||||
GET /api/bookmarks/
|
||||
```
|
||||
|
||||
List bookmarks.
|
||||
List bookmarks.
|
||||
|
||||
Parameters:
|
||||
|
||||
@@ -65,7 +65,7 @@ Example response:
|
||||
GET /api/bookmarks/archived/
|
||||
```
|
||||
|
||||
List archived bookmarks.
|
||||
List archived bookmarks.
|
||||
|
||||
Parameters and response are the same as for the regular list endpoint.
|
||||
|
||||
@@ -83,7 +83,8 @@ Retrieves a single bookmark by ID.
|
||||
POST /api/bookmarks/
|
||||
```
|
||||
|
||||
Creates a new bookmark. Tags are simply assigned using their names.
|
||||
Creates a new bookmark. Tags are simply assigned using their names. Including
|
||||
`is_archived: true` saves a bookmark directly to the archive.
|
||||
|
||||
Example payload:
|
||||
|
||||
@@ -92,6 +93,7 @@ Example payload:
|
||||
"url": "https://example.com",
|
||||
"title": "Example title",
|
||||
"description": "Example description",
|
||||
"is_archived": false,
|
||||
"tag_names": [
|
||||
"tag1",
|
||||
"tag2"
|
||||
@@ -201,4 +203,3 @@ Example payload:
|
||||
"name": "example"
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user