docs: add Carousel dashboard implementation plan
This commit is contained in:
@@ -1,85 +0,0 @@
|
||||
meta {
|
||||
name: Bulk Delete Media Items
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{base_url}}/api/media-items/bulk-delete
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"media_item_ids": [
|
||||
"{{bookId1}}",
|
||||
"{{bookId2}}",
|
||||
"{{bookId3}}"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
function onResponse(res) {
|
||||
if (res.getStatus() === 200) {
|
||||
tests['Bulk delete successful'] = true;
|
||||
const body = res.getBody();
|
||||
tests['Has results array'] = Array.isArray(body.results);
|
||||
tests['Has total count'] = body.total !== undefined;
|
||||
tests['Has deleted count'] = body.deleted !== undefined;
|
||||
tests['Has failed count'] = body.failed !== undefined;
|
||||
} else {
|
||||
tests['Bulk delete failed'] = false;
|
||||
}
|
||||
}
|
||||
onResponse(res);
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Bulk Delete Media Items
|
||||
|
||||
Deletes multiple media items in a single request.
|
||||
|
||||
**Method:** POST
|
||||
|
||||
**Endpoint:** /api/media-items/bulk-delete
|
||||
|
||||
**Authentication:** Required (Bearer token)
|
||||
|
||||
**Request Body:**
|
||||
- `media_item_ids` (array of strings): Array of media item UUIDs to delete
|
||||
|
||||
**Response:**
|
||||
- `results` (array): Results for each deletion attempt
|
||||
- `total` (number): Total number of media items processed
|
||||
- `deleted` (number): Number of successfully deleted media items
|
||||
- `failed` (number): Number of failed deletions
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success (with partial results if some failed)
|
||||
- 400: Invalid request data
|
||||
- 401: Unauthorized
|
||||
- 403: Forbidden
|
||||
- 500: Internal server error
|
||||
|
||||
**Example:**
|
||||
```json
|
||||
{
|
||||
"media_item_ids": [
|
||||
"uuid-1",
|
||||
"uuid-2",
|
||||
"uuid-3"
|
||||
]
|
||||
}
|
||||
```
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
meta {
|
||||
name: Bulk Update Media Items
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{base_url}}/api/media-items/bulk-update
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"media_item_updates": [
|
||||
{
|
||||
"media_item_id": "{{bookId1}}",
|
||||
"updates": {
|
||||
"title": "Updated Title",
|
||||
"genre": "Science Fiction",
|
||||
"tags": ["science fiction", "non-fiction", "ACME CORP."]
|
||||
}
|
||||
},
|
||||
{
|
||||
"media_item_id": "{{bookId2}}",
|
||||
"updates": {
|
||||
"author": "Updated Author",
|
||||
"contributors": ["O'Reilly Media", "Penguin Random House"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
function onResponse(res) {
|
||||
if (res.getStatus() === 200) {
|
||||
tests['Bulk update successful'] = true;
|
||||
const body = res.getBody();
|
||||
tests['Has results array'] = Array.isArray(body.results);
|
||||
tests['Has total count'] = body.total !== undefined;
|
||||
tests['Has updated count'] = body.updated !== undefined;
|
||||
} else {
|
||||
tests['Bulk update failed'] = false;
|
||||
}
|
||||
}
|
||||
onResponse(res);
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Bulk Update Media Items
|
||||
|
||||
Updates multiple media items in a single request with different fields for each item.
|
||||
|
||||
**Method:** POST
|
||||
|
||||
**Endpoint:** /api/media-items/bulk-update
|
||||
|
||||
**Authentication:** Required (Bearer token)
|
||||
|
||||
**Request Body:**
|
||||
- `media_item_updates` (array): Array of update objects
|
||||
- `media_item_id` (string): Media item UUID to update
|
||||
- `updates` (object): Fields to update (can include title, author, genre, tags, contributors, etc.)
|
||||
|
||||
**Response:**
|
||||
- `results` (array): Results for each update attempt
|
||||
- `total` (number): Total number of media items processed
|
||||
- `updated` (number): Number of successfully updated media items
|
||||
- `failed` (number): Number of failed updates
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success (with partial results if some failed)
|
||||
- 400: Invalid request data
|
||||
- 401: Unauthorized
|
||||
- 403: Forbidden
|
||||
- 500: Internal server error
|
||||
|
||||
**Example:**
|
||||
```json
|
||||
{
|
||||
"media_item_updates": [
|
||||
{
|
||||
"media_item_id": "uuid-1",
|
||||
"updates": {
|
||||
"title": "New Title",
|
||||
"genre": "Fiction",
|
||||
"tags": ["fiction", "adventure"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"media_item_id": "uuid-2",
|
||||
"updates": {
|
||||
"author": "Jane Doe",
|
||||
"contributors": ["Publisher Inc."]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Note:** Each media item can have different fields updated. Only the specified fields are modified for each item.
|
||||
}
|
||||
Reference in New Issue
Block a user