Bruno API test updates: - Update test assertions: X-Bookmann-* → X-Bookhoard-* - Update variable names and references in test scripts - Update documentation and comments in API tests This is part 4 of the project rename to Bookhoard.
135 lines
3.4 KiB
Plaintext
135 lines
3.4 KiB
Plaintext
meta {
|
|
name: "Bookhoard Device Management API"
|
|
type: "collection"
|
|
environment: {
|
|
development: {
|
|
base_url: "http://localhost:8765/api"
|
|
},
|
|
production: {
|
|
base_url: "https://your-domain.com/api"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Register Device
|
|
@name("Register Device")
|
|
POST {{environment.base_url}}/devices/register
|
|
Content-Type: application/json
|
|
{
|
|
"device_name": "My Kobo Clara",
|
|
"device_type": "kobo",
|
|
"device_identifier": "N1234567890123"
|
|
}
|
|
|
|
@name("Register KOReader Device")
|
|
POST {{environment.base_url}}/devices/register
|
|
Content-Type: application/json
|
|
{
|
|
"device_name": "My Kindle Paperwhite",
|
|
"device_type": "koreader",
|
|
"device_identifier": "G090GP123456789"
|
|
}
|
|
|
|
@name("Register Web Device")
|
|
POST {{environment.base_url}}/devices/register
|
|
Content-Type: application/json
|
|
{
|
|
"device_name": "Chrome Browser",
|
|
"device_type": "web",
|
|
"device_identifier": "web-client-abc123"
|
|
}
|
|
|
|
# Check Registration Status
|
|
@name("Check Pending Registration")
|
|
POST {{environment.base_url}}/devices/register/status
|
|
Content-Type: application/json
|
|
{
|
|
"registration_id": "registration-uuid-here"
|
|
}
|
|
|
|
@name("Check Approved Registration")
|
|
POST {{environment.base_url}}/devices/register/status
|
|
Content-Type: application/json
|
|
{
|
|
"registration_id": "registration-uuid-here"
|
|
}
|
|
|
|
# List Devices (requires authentication)
|
|
@name("List User Devices")
|
|
GET {{environment.base_url}}/devices
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
@name("Get Device Details")
|
|
GET {{environment.base_url}}/devices/{{device_id}}
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
# Update Device Settings
|
|
@name("Update Device Settings")
|
|
PUT {{environment.base_url}}/devices/{{device_id}}
|
|
Authorization: Bearer {{jwt_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"device_name": "Updated Device Name",
|
|
"sync_enabled": true,
|
|
"auto_sync": true,
|
|
"sync_frequency_minutes": 10
|
|
}
|
|
|
|
@name("Disable Device Sync")
|
|
PUT {{environment.base_url}}/devices/{{device_id}}
|
|
Authorization: Bearer {{jwt_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"device_name": "My Kobo Clara",
|
|
"sync_enabled": false,
|
|
"auto_sync": false,
|
|
"sync_frequency_minutes": 30
|
|
}
|
|
|
|
@name("Update Sync Frequency")
|
|
PUT {{environment.base_url}}/devices/{{device_id}}
|
|
Authorization: Bearer {{jwt_token}}
|
|
Content-Type: application/json
|
|
{
|
|
"device_name": "My Kobo Clara",
|
|
"sync_enabled": true,
|
|
"auto_sync": true,
|
|
"sync_frequency_minutes": 15
|
|
}
|
|
|
|
# Delete/Revoke Device
|
|
@name("Delete Device")
|
|
DELETE {{environment.base_url}}/devices/{{device_id}}
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
# Get Pending Registrations
|
|
@name("Get Pending Registrations")
|
|
GET {{environment.base_url}}/devices/pending
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
# Approve Device Registration
|
|
@name("Approve Device Registration")
|
|
GET {{environment.base_url}}/devices/approve/{{registration_id}}
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
@name("Approve Registration - KOReader")
|
|
GET {{environment.base_url}}/devices/approve/reg-uuid-123
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
@name("Approve Registration - Kobo")
|
|
GET {{environment.base_url}}/devices/approve/reg-uuid-456
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
# Reject Device Registration
|
|
@name("Reject Device Registration")
|
|
POST {{environment.base_url}}/devices/reject/{{registration_id}}
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
@name("Reject Registration - KOReader")
|
|
POST {{environment.base_url}}/devices/reject/reg-uuid-123
|
|
Authorization: Bearer {{jwt_token}}
|
|
|
|
@name("Reject Registration - Kobo")
|
|
POST {{environment.base_url}}/devices/reject/reg-uuid-456
|
|
Authorization: Bearer {{jwt_token}}
|