Files
bookhoard/bruno/sidecar/Get Device Sidecar Config.bru
T
john-okeefe 3117ce54ec refactor(bruno): migrate API tests to Bruno DSL format
- 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
2026-02-08 20:49:06 -05:00

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
}