Appearance
Stopwords API (REST)
Manage customer stopword files and read the shared lists available to your deployment. Send the authentication headers with every request.
Endpoints
| Method | Path | Result | Rights |
|---|---|---|---|
GET | /stopword | Customer list metadata | Read or Admin |
GET | /stopword/internal | Shared list metadata | Read or Admin |
GET | /stopword/internal/{id} | Shared UTF-8 text file | Read or Admin |
GET | /stopword/supported | Supported stopword languages | Read or Admin |
POST | /stopword/customer/{code} | Create or replace a customer list | Write or Admin |
PUT | /stopword/customer/{code} | Update an existing list without changing its format | Write or Admin |
GET | /stopword/customer/{id} | Customer UTF-8 text file | Write or Admin |
DELETE | /stopword/customer/{id} | Delete a list | Write or Admin |
Use the returned list ULID for id. For uploads, select an uppercase language code returned by /stopword/supported. The route accepts two or three uppercase letters.
Upload a file
Send non-empty UTF-8 text directly as the request body. The upload limit is 2 MiB. The simple List format contains one word per line:
text
the
and
withbash
curl --fail-with-body -X POST "$BLUECURVE_API_URL/stopword/customer/ENG" \
-H "x-api-key: $BLUECURVE_API_KEY" \
-H 'api-version: 1.0' \
-H 'Content-Type: text/plain' \
--data-binary @my_stopwords.txtSnowball lists are also supported. The service detects the format; there is no format query parameter. For PUT, preserve the existing format.
Responses
List endpoints return an array of metadata objects:
json
[
{
"nativeName": "English",
"englishName": "English",
"languageCode": "ENG",
"format": "List",
"id": "01J00000000000000000000000"
}
]The supported-language endpoint returns nativeName, englishName, and languageCode without the list's format or id. Download endpoints return text/plain, not a JSON string.
Upload success returns 200 with no response body. Update can return 202 when the file was updated but immediate change notification failed. Deletion returns 204. These responses do not contain a task identifier.
Errors
| Status | Meaning |
|---|---|
400 | Invalid file content or forbidden format change. |
401 / 403 | Missing credentials or insufficient rights. |
404 | The requested list or existing file was not found. |
413 | Upload exceeds 2 MiB. |
500 | Storage or processing failed. |
A content-validation error returns:
json
{ "message": "FILE_LENGTH_ILLEGAL" }Other message values are FILE_FORMAT_ILLEGAL and FILE_FORMAT_CHANGE_FORBIDEN (spelling is part of the current contract).
Next: Monitoring & Tasks API