Bruno collection for FOLIO/Eureka operational and migration requests — Keycloak, consortia, MGR, reindex, users/roles, MARC migrations, and related modules.
- Bruno desktop app (v1.x+)
- Network access to the target FOLIO/Kong/Keycloak environment
- Valid tenant/client/user credentials for that environment
- Clone this repo and open the folder in Bruno (Open Collection).
- Create a new environment: Environments → Create Environment (e.g.
dev,int,perf).- Never commit an environment file with real credentials —
environments/is git-ignored.
- Never commit an environment file with real credentials —
- Select your environment from the top-right dropdown.
- Run auth requests in order:
auth/get-keycloak-tenant-token— setsokapi-tokenauth/get-keycloak-master-realm-admin-token— setsmaster-realm-token(Keycloak admin endpoints only)auth/user-login-token— setsfolio-user-token(cookie/login-with-expiry flows only)
- Run the target request(s) from the relevant folder.
| Variable | Description |
|---|---|
folio |
Environment prefix used in hostnames (e.g. dev, int) |
domain |
Base domain for Kong and Keycloak (e.g. example.org) |
realm |
Tenant realm name — also used as x-okapi-tenant |
tenant_client |
Keycloak client ID for client_credentials token flow |
tenant_client_secret |
Secret for tenant_client |
admin_client_secret |
Secret for the backend admin Keycloak client |
keycloak_username |
Keycloak admin/service account username |
keycloak_password |
Keycloak admin/service account password |
tenant_username |
FOLIO user login (for login-with-expiry flow) |
tenant_password |
FOLIO user password |
baseUrl |
Base URL used by imported module requests (e.g. https://kong-dev.example.org) |
baseUrlis only required when using requests generated byimport-module-api.sh. Built-in collection requests usefolio+domaininstead.
| Variable | Set by |
|---|---|
okapi-token |
auth/get-keycloak-tenant-token |
master-realm-token |
auth/get-keycloak-master-realm-admin-token |
folio-user-token |
auth/user-login-token |
| Folder | Purpose |
|---|---|
auth/ |
Token acquisition and login flows |
mgr/ |
Application registration, discovery, entitlements, tenant management |
consortia/ |
Consortia tenant and affiliation operations |
users-roles/ |
Users, roles, capabilities, role migrations |
reindex/ |
Reindex and inventory/instance workflows |
mark-migrations/ |
MARC remap/save/retry/error-report flows |
Keycloak/ |
Keycloak realm, client, and user admin requests |
mod-entities-links/ |
Authority/instance link management |
mod-source-record-storage/ |
SRS MARC record access |
mod-inventory-storage/ |
Inventory instance operations |
inventory-storage migration/ |
Inventory storage migration jobs |
mod-reading-room/ |
Reading room access and templates |
mod-record-specification/ |
Record specification endpoints |
mod-template-engine/ |
Template management |
bulk operations/ |
Bulk user operations |
mapping-rules/ |
MARC-bib mapping rule inspection |
timers/ |
Timer-based job triggers |
Module reinstall/ |
Module reinstall flows |
- All requests expect
x-okapi-tokenandx-okapi-tenantto already be set. Run the relevantauth/request first. - Requests with path parameters (e.g.
:consortia_id,:applicationId) require you to fill in the value in the Params tab before running. - Query parameters prefixed with
~in the.brusource are disabled — enable them in Bruno's Params tab if needed.
- Credentials go in Bruno environment variables only — never hardcode them in request files.
environments/is excluded by.gitignore. Do not force-add environment files.- Tokens are short-lived; re-run auth requests if you get 401 responses.
- Before adding new requests, replace any environment-specific IDs (UUIDs, tenant names) with
{{variable}}references or clearly marked# REPLACE MEcomments.
import-module-api.sh downloads OpenAPI specs from folio-org GitHub repositories and imports them as Bruno requests.
Requirements: curl, unzip, bru (npm i -g @usebruno/cli), npx (bundled with Node.js)
@redocly/cli is fetched automatically via npx on first run. No GitHub token needed.
# Single module
./import-module-api.sh mod-scheduler
# Multiple modules at once
./import-module-api.sh mod-scheduler mod-search mod-users-keycloak
# Different branch
./import-module-api.sh -b main mod-scheduler
# Custom output directory
./import-module-api.sh -o ./imported mod-scheduler
# Keep imported folder in git (default is to add it to .gitignore)
./import-module-api.sh -g mod-schedulerWhat the script does for each module:
- Downloads the full repository as a ZIP archive (one request, no API rate limits, no auth required).
- Extracts the
src/main/resources/swagger.api/directory from the ZIP. - Bundles the spec into a single file via
@redocly/cliif it uses external$reffiles — single-file specs skip this step. - Imports the spec with
bru import openapi. - Creates a
folder.bruwith an auto-auth pre-request script (auth/get-keycloak-tenant-token). - Injects
x-okapi-token: {{okapi-token}}andx-okapi-tenant: {{realm}}headers into every generated request, replacing any empty values left by the spec. - Adds the module folder to
.gitignoreto keep generated files out of version history (pass-gto keep them tracked).
Modules without a swagger.api/ directory (e.g. RAML-based modules) are skipped automatically.
Imported module requests use
{{baseUrl}}for their URLs. SetbaseUrlin your Bruno environment (e.g.https://kong-dev.example.org) before running them. Seeenvironments/example.brufor reference.
- Select the correct environment in Bruno.
- Run the appropriate
auth/request to obtain a token. - Execute read-only GET requests first to verify connectivity and IDs.
- Execute write/update/delete requests only after confirming the target tenant and resource IDs.
- Re-authenticate if you receive 401 errors (tokens expire).