- 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
62 lines
1.3 KiB
Plaintext
62 lines
1.3 KiB
Plaintext
meta {
|
|
name: Get Device Sidecar Config
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
get {
|
|
url: {{base_url}}/api/devices/{{device_id}}/sidecar
|
|
body: none
|
|
auth: inherit
|
|
}
|
|
|
|
headers {
|
|
Authorization: Bearer {{user_token}}
|
|
Content-Type: application/json
|
|
}
|
|
|
|
script:post-response {
|
|
function onResponse(res) {
|
|
if (res.getStatus() === 200) {
|
|
const body = res.getBody();
|
|
tests('Version is 1.0', body.version === "1.0");
|
|
tests('Has bookhoard config', body.bookhoard !== undefined);
|
|
tests('Has books array', body.books !== undefined);
|
|
tests('Has collections array', body.collections !== undefined);
|
|
}
|
|
}
|
|
onResponse(res);
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|
|
|
|
docs {
|
|
## Get Device Sidecar Config
|
|
|
|
Retrieves sidecar configuration for a specific device.
|
|
|
|
**Method:** GET
|
|
|
|
**Endpoint:** /api/devices/{device_id}/sidecar
|
|
|
|
**Authentication:** Bearer token
|
|
|
|
**Path Parameters:**
|
|
- `device_id` (string): Device UUID
|
|
|
|
**Response:**
|
|
- `version` (string): Sidecar version (e.g., "1.0")
|
|
- `bookhoard` (object): Bookhoard configuration
|
|
- `books` (array): Array of book configurations
|
|
- `collections` (array): Array of collection configurations
|
|
|
|
**Status Codes:**
|
|
- 200: Success
|
|
- 401: Unauthorized
|
|
- 404: Device not found
|
|
- 500: Internal server error
|
|
}
|