- Remove obsolete scenarios/ folder and move requests to root media-items/ - Create new filters/ folder for field value autocomplete searches - Move Field Values Search requests from search/ to filters/ for clarity - Move Search Media Items from scenarios/ to search/ for consistency - Update sequence numbers across all media-items requests (2-13) - Remove redundant folder configuration files - Improve API collection organization for better discoverability
44 lines
835 B
YAML
44 lines
835 B
YAML
info:
|
|
name: Update Media Item
|
|
type: http
|
|
seq: 10
|
|
|
|
http:
|
|
method: PUT
|
|
url: "{{base_url}}/api/media-items/{{media_item_id}}"
|
|
headers:
|
|
- name: ""
|
|
value: application/json
|
|
body:
|
|
type: json
|
|
data: |-
|
|
{
|
|
"title": "Updated Book Title",
|
|
"author": "Updated Author",
|
|
"description": "Updated description"
|
|
}
|
|
auth: inherit
|
|
|
|
runtime:
|
|
scripts:
|
|
- type: tests
|
|
code: |-
|
|
test_update_media_item_success(status, headers, body) {
|
|
if (status !== 200) {
|
|
throw new Error("Expected status 200, got " + status);
|
|
|
|
settings:
|
|
encodeUrl: true
|
|
timeout: 0
|
|
followRedirects: true
|
|
maxRedirects: 5
|
|
|
|
docs: |-
|
|
## Update Media Item
|
|
|
|
Updates an existing media item's metadata.
|
|
|
|
**Method:** PUT
|
|
|
|
**Endpoint:** /api/media-items/{id
|