# Configuration

Search API v0.6.7 · 1 operation
Source: https://plasapi.com/search/v0.6.7/configuration/

What this provider supports for search, read once per customer and cached. It says which filters, facets and sortings are available when searching for works, which UI languages are supported, and how expressions are grouped into works, so the vendor can build its search screens to match.

## Get search configuration

`GET` `/configuration/search` · `GetSearchConfiguration`

### Example request

**cURL**

```bash
curl -X GET "$PLAS_BASE_URL/configuration/search?version=0.6.7" \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN"
```

**JavaScript**

```javascript
const response = await fetch(`${process.env.PLAS_BASE_URL}/configuration/search?version=0.6.7`, {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
});
const data = await response.json();
```

**Python**

```python
import os
import requests

response = requests.get(
    f"{os.environ['PLAS_BASE_URL']}/configuration/search",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
data = response.json()
```

The host and token are environment variables: `PLAS_BASE_URL` the provider’s base URL · `PLAS_TOKEN` an access token.

### Parameters

Shared across operations: `version`. [See the shared contract on the version page.](https://plasapi.com/search/v0.6.7/)

### Responses

#### `200` Success

`ConfigurationSearchResponseBody`

Example (Generated from the schema):

```json
{
  "expression": {
    "clustering": [
      [
        {
          "type": "mediaTypes"
        },
        {
          "type": "language"
        },
        {
          "codes": [
            "trl"
          ],
          "type": "creatorsAndContributors"
        },
        {
          "codes": [
            "nrt"
          ],
          "type": "creatorsAndContributors"
        }
      ]
    ]
  },
  "suggestions": {
    "available": [
      {
        "description": "Only suggest titles for children.",
        "type": "plas.audience.literal"
      }
    ],
    "disabled": false
  },
  "uiLanguages": {
    "default": "nob",
    "supported": [
      "nob"
    ]
  },
  "workSearch": {
    "facet": {
      "available": [
        {
          "description": "Group the results by media type.",
          "type": "plas.audience.literal"
        }
      ]
    },
    "filter": {
      "available": [
        {
          "description": "Only show works available at the chosen branch.",
          "type": "plas.audience.literal"
        }
      ]
    },
    "sorting": {
      "available": [
        {
          "description": "Newest publications first.",
          "type": "plas.relevance.asc"
        }
      ]
    }
  }
}
```

#### `400` The list of errors.

`Errors`

Shared response, defined once for the whole API. [See the shared contract on the version page.](https://plasapi.com/search/v0.6.7/)

Example (Generated from the schema):

```json
{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}
```

#### `401` Bearer token invalid, missing, or expired.

No response body.

Shared response, defined once for the whole API. [See the shared contract on the version page.](https://plasapi.com/search/v0.6.7/)
