Overview
BadWord API is an API for managing Fess bad words (excluding inappropriate suggestion words). You can configure keywords that should not appear in the suggest feature.
Base URL
Endpoint List
| Method | Path | Description |
|---|---|---|
| GET | /settings | List bad words |
| GET | /setting/{id} | Get bad word |
| POST | /setting | Create bad word |
| PUT | /setting | Update bad word |
| DELETE | /setting/{id} | Delete bad word |
| PUT | /upload | Upload bad word CSV |
| GET | /download | Download bad word CSV |
List Bad Words
Request
Parameters
Response
Get Bad Word
Request
Response
Create Bad Word
Request
Request Body
Field Description
Response
Update Bad Word
Request
Request Body
Response
Delete Bad Word
Request
Response
Upload Bad Word CSV
Bulk-registers bad words from a CSV file. The file is sent as multipart/form-data. The import is executed asynchronously on the server side.
Request
Parameters
| Parameter | Required | Description |
|---|---|---|
badWordFile | Yes | Bad word CSV file to upload |
CSV Format
The first line is skipped as a header row (the column name is arbitrary;
BadWordis written on download).From the second line onward, write one bad word per line as the
suggestWord.Lines whose value is blank are ignored.
Prefix a word with
--to delete it (e.g.,--spamdeletesspam).Specifying an already-registered word is treated as an update (the updater and update time are reset).
Note
Because the import runs asynchronously on the server side, a status: 0 response indicates that the request was accepted, not that the import has completed.
Response
Download Bad Word CSV
Downloads the registered bad words as a CSV file (badword.csv). The response is an application/octet-stream stream. The CSV has a BadWord header row on the first line, followed by one registered bad word per line.
Request
Usage Examples
Exclude Spam Keyword
Upload CSV File
Download CSV File
Reference
Admin API Overview - Admin API Overview
Suggest API - Suggest Management API
ElevateWord API - Elevate Word API
Bad Word - Bad Word Management Guide