Config Exclusions
By default, every .toml request file inside a folder inherits the headers, params, and variables declared in that folder's collection config (.config.toml / _collection.toml). The exclude_files key lets you opt specific request files out of that inheritance — useful when a particular request needs a completely clean slate or uses a different authentication flow.
The exclude_files Key
Add an exclude_files array to the top level of any collection config file:
# api/api.config.toml
# These two files will NOT inherit the headers or variables below:
exclude_files = ["public_health.toml", "metrics.toml"]
[headers]
Authorization = "Bearer {{access_token}}"
Content-Type = "application/json"
[variables]
api_env = "production"
In TOML, top-level keys like exclude_files must be placed before any table sections (like [headers] or [variables]). If placed at the bottom, it will be incorrectly parsed as a property of the preceding table.
Any request file whose filename (not full path) appears in exclude_files is silently skipped during config inheritance. It still runs normally — it just receives no headers, params, or variables from that particular config level.
Pattern Matching
exclude_files supports three matching modes:
| Pattern | Matches | Example |
|---|---|---|
| Exact filename | Files whose name exactly equals the pattern | "auth.toml" |
Prefix glob (prefix*) | Files whose name starts with the given prefix | "dev_*" → dev_health.toml, dev_debug.toml |
Suffix glob (*suffix) | Files whose name ends with the given suffix | "*_public.toml" → health_public.toml |
Only single-segment globs are supported (* prefix or suffix). Multi-segment globs like **/*.toml are not matched.
UI — Folder Config Tab
In the Rumour GUI, open a folder's settings panel and navigate to the Config → Exclusions tab. Use the input to add file name patterns one at a time — press Enter or click Add. Each pattern is shown as a dismissible tag.
Clicking Save Config persists the list to _collection.toml under the exclude_files key.
How It Works
When a request file is being loaded, Rumour walks up the directory tree and finds all applicable collection config files. For each config file found, it checks whether the request's file name matches any entry in exclude_files. If it matches, that config layer is skipped entirely — its headers, params, and variables are not merged into the request's inherited settings.
The exclusion is per-config-file. A config at a grandparent level can exclude a file independently of a config at the parent level.
workspace/
├── api.config.toml # exclude_files = ["metrics.toml"]
└── auth/
├── auth.config.toml # exclude_files = [] (no exclusions here)
└── metrics.toml # Skips api.config.toml but inherits auth.config.toml
Example
Let's set up a test workspace to see exclusions in action against our mock server's /headers echo endpoint.
First, initialize a workspace (skip this step if you already created it in a previous tutorial) and scaffold a new api collection using the CLI:
# Skip the init step if you already created the workspace in the previous tutorial
rumour init config_examples
cd config_examples
# Scaffold the new collection
rumour new api -y
This generates the directory structure. Update the generated files to match the layout below:
File Layout
config_examples/
├── workspace.env.toml
└── api/
├── api.config.toml
└── requests/
├── get_users.toml # inherits everything
└── public_headers.toml # excluded — gets no shared headers/vars
workspace.env.toml
base_url = "http://localhost:4000/api/v2"
api/api.config.toml
# public_headers.toml does not need auth headers
exclude_files = ["public_headers.toml"]
[headers]
Authorization = "Bearer {{access_token}}"
X-App-Version = "3.0"
[variables]
access_token = "secret_token_123"
api/requests/get_users.toml (inherits normally)
name = "list_users"
[request]
method = "GET"
url = "{{base_url}}/headers"
[assert]
status = 200
[assert.json."authorization"]
equal = "Bearer secret_token_123"
[assert.json."x-app-version"]
equal = "3.0"
When run, get_users.toml receives Authorization and X-App-Version from api.config.toml.
api/requests/public_headers.toml (excluded)
name = "public_headers"
[request]
method = "GET"
url = "{{base_url}}/headers"
[assert]
status = 200
[assert.json."authorization"]
exists = false
[assert.json."x-app-version"]
exists = false
public_headers.toml sends no Authorization or X-App-Version headers — it is excluded from api.config.toml's inheritance chain. It still runs and is still part of the workflow; only the config injection is skipped.
Run
$ rumour run ./api/requests/ -v
Output
$ rumour run ./api/requests/ -v
GET http://localhost:4000/api/v2/headers
Header: Authorization: Bearer secret_token_123
Header: X-App-Version: 3.0
URL: http://localhost:4000/api/v2/headers
✓ SUCCESS: ./api/requests/get_users.toml (3ms)
GET http://localhost:4000/api/v2/headers
URL: http://localhost:4000/api/v2/headers
✓ SUCCESS: ./api/requests/public_headers.toml (2ms)
╭──────────────────────────────────────────────────────────────────────────╮
│ RUMOUR EXECUTION REPORT │
├──────────────────────────────────────────────────────────────────────────┤
│ Total Requests: 2 │
│ Successful: 2 │
│ Failed: 0 │
│ Skipped: 0 │
│ Success Rate: 100.0% │
│ Total Time: 15ms │
╰──────────────────────────────────────────────────────────────────────────╯
✓ Successful Requests:
- ./api/requests/get_users.toml [200] [9ms]
- ./api/requests/public_headers.toml [200] [6ms]
Actionable Recommendations:
→ Run with --json to export this report for your CI/CD pipeline.
Common Use Cases
| Scenario | Exclusion Pattern |
|---|---|
| Health-check / ping endpoints that don't need auth | "health.toml", "*_ping.toml" |
| Public-facing endpoints with a different auth scheme | "*_public.toml" |
| Development/debug requests that override all headers locally | "dev_*" |
| Unauthenticated OAuth token-fetch request | "get_token.toml" |
Comparison: exclude_files vs. skip
| Feature | Purpose |
|---|---|
exclude_files | Prevents config inheritance but the request still runs |
skip = true (in request file) | Prevents the request from running during directory or suite execution (if run directly as a single file, it will still execute) |
Use exclude_files when you want a request to run with its own standalone headers/variables. Use skip when you want to temporarily disable a request during test suite runs.