Bruno API Collection - Role-Based Organization
Bruno API collection untuk MStore API V2 dengan struktur role-based mengikuti RBAC Multi-Level Architecture (L0-L4).🎯 Overview
Collection ini memudahkan testing API berdasarkan role yang spesifik. Setiap role memiliki folder terpisah dengan endpoints yang sesuai dengan permissions role tersebut.📁 Collection Structure
📊 Role Organization by Level
L0 - Micro/Solo (3 roles)
L1 - SME (6 roles)
L2 - Enterprise (24 roles)
- Management
- Finance
- Operations
- Marketing & CRM
- Support
- ADM-BIZ: Business configuration
- ADM-SYS: System infrastructure (7 endpoints)
L3 - Holding (9 roles)
L4 - Corporate/MNC (15 roles)
🚀 Quick Start
1. Open Bruno
2. Configure Environment
Create environment di Bruno dengan variables:3. Login & Get Token
- Navigate ke role folder yang sesuai (e.g.,
Role_L0_OWNER) - Run
001_AUTH_LOGIN.brudengan credentials valid - Copy JWT token dari response
- Set token ke environment variable
auth_token
4. Test Endpoints
Run endpoints lain sesuai dengan role permissions.📂 Folder Structure per Role
Setiap role folder berisi:File Format Example
Staging
Production
📋 Testing Workflow
1. Basic Flow (OWNER)
2. Transaction Flow (CASHIER)
3. Audit Flow (AUDITOR)
🎓 Best Practices
Environment Management
Environment Management
- Pisahkan environment untuk Dev, Staging, Production
- Jangan commit auth_token ke version control
- Rotate tokens secara berkala
- Gunakan environment presets untuk switching cepat
Request Organization
Request Organization
- Group requests by domain (Core, Finance, Inventory, dll)
- Beri naming yang konsisten (e.g.,
001_,002_) - Tambahkan docs lengkap di setiap request
- Tambahkan sample response
Testing Strategy
Testing Strategy
- Start dengan AUTH_LOGIN untuk setiap role
- Test positive cases dulu, baru negative cases
- Validate response schema
- Check RBAC permissions enforcement
- Test SoD (Segregation of Duties) rules
Team Collaboration
Team Collaboration
- Share collection via Git
- Document expected responses
- Add pre-request scripts untuk setup
- Add tests untuk automated validation
📚 Related Documentation
RBAC Multi-Level
RBAC Architecture (L0-L4)
Endpoint Registry
Complete endpoint definitions
API Styleguide
API design patterns
🔄 Next Steps
For Developers
- Complete Endpoint Population: Add endpoints untuk role-role yang belum terisi
- Add Test Scripts: Implementasi automated tests di Bruno
- Add Pre-request Scripts: Setup data sebelum request
- Document Edge Cases: Tambahkan scenario error handling
For QA
- Create Test Suites: Group endpoints by feature
- Add Assertions: Validate response structure & data
- Performance Testing: Test endpoint response time
- Security Testing: Validate RBAC enforcement
For Product
- Review Role Permissions: Pastikan role sesuai use case
- Test User Flows: Validate end-to-end scenarios
- Document Workflows: Update user guides
📞 Support
Jika ada pertanyaan atau butuh bantuan:- Documentation: Check
/80-guides/rbac-multilevel-architecture - Endpoint Registry:
/config/api/endpoints-registry-v2.yaml - RBAC Policy:
/config/rbac/policy.csv
Tags:
bruno, api-testing, rbac, role-based, collection, testing-tools