Search — daemonports API
Full-text search and suggestions, answered by mddb.
Search the ports of every system
POST /v1/fts
mddb's full-text search over the ports collection, as the search
page asks it. Limited to 2 requests a second per address, bursts of 60.
Authorization: none
Request body
Required.
Content type application/json: SearchRequest
{
"algorithm": "bm25f",
"collection": "ports",
"facetBy": [
"system"
],
"filterMeta": {
"system": [
"openbsd"
]
},
"limit": 10,
"query": "nginx"
}
Responses
| Status | Description | Body |
|---|---|---|
200 |
Ranked ports, with counts per facet when asked. | SearchResponse (application/json) |
429 |
Too many requests. |
Suggest port names as they are typed
GET /v1/autocomplete
Authorization: none
Parameters
| Name | In | Type | Description |
|---|---|---|---|
collection (required) |
query | string |
One of "ports". |
q (required) |
query | string |
At least 2 characters. |
field |
query | string |
Default "meta.name". |
topN |
query | integer |
Default 8. Minimum 1. Maximum 50. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
Suggested terms, most documents first. | AutocompleteResponse (application/json) |
429 |
Too many requests. |