- Convert all existing .bru files from JSON to Bruno DSL format - Remove obsolete files (conflicts/api.bru, kobo/Kobo Initialization.bru) - Update auth configuration to use 'inherit' instead of explicit bearer tokens - Add comprehensive documentation to all test files - Improve test scripts with proper assertions and error handling
58 lines
1.1 KiB
Plaintext
58 lines
1.1 KiB
Plaintext
meta {
|
|
name: Get System Configuration
|
|
type: http
|
|
seq: 3
|
|
}
|
|
|
|
get {
|
|
url: {{base_url}}/api/system/config
|
|
body: none
|
|
auth: inherit
|
|
}
|
|
|
|
headers {
|
|
Authorization: Bearer {{admin_token}}
|
|
Content-Type: application/json
|
|
}
|
|
|
|
script:post-response {
|
|
function onResponse(res) {
|
|
if (res.getStatus() === 200) {
|
|
const body = res.getBody();
|
|
tests('Has base_url', body.base_url !== undefined);
|
|
tests('Has opds_base_url', body.opds_base_url !== undefined);
|
|
tests('Has api_base_url', body.api_base_url !== undefined);
|
|
}
|
|
}
|
|
onResponse(res);
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|
|
|
|
docs {
|
|
## Get System Configuration
|
|
|
|
Retrieves system-wide configuration settings.
|
|
|
|
**Method:** GET
|
|
|
|
**Endpoint:** /api/system/config
|
|
|
|
**Authentication:** Bearer token (admin only)
|
|
|
|
**Response:**
|
|
- `base_url` (string): Base URL
|
|
- `opds_base_url` (string): OPDS endpoint URL
|
|
- `api_base_url` (string): API endpoint URL
|
|
- Additional configuration fields
|
|
|
|
**Status Codes:**
|
|
- 200: Success
|
|
- 401: Unauthorized
|
|
- 403: Forbidden (admin only)
|
|
- 500: Internal server error
|
|
}
|