Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/assets/search/autocomplete

Requires JWT.

Autocompletion helper for search for assets.

This is meant to autocomplete values for the filters, specifically name, ext, and path.

Request

POST /api/p/<project gid>/assets/search/autocomplete
Authorization: Bearer <JWT>

{
    "field": "path",
    "fieldq": "/pro",
    "language": "nl"
}

field is the field we're looking to complete ("name", "ext", or "path")
fieldq is the start of the value
language is the language to search in

optional

completions.size only return this many completions (default 10, min 1, max 50).

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "completions": [
            "/products",
            "/promo"
        ]
    },
    "data": {}
}

result

completions completions for the field

data

No data.

Error responses

400 Bad request - missing parameters or wrong type or value
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
1002 Search error - internal search engine error