# Work

Provider API v0.6.5 · 2 operations
Source: https://plas.redia.dk/en/provider/v0.6.5/work/

No description in the specification.

## Get Works

`GET` `/work` · `GetWorks`

### Parameters

- `work_ids` (In `query`, `array of string`, required) — A list of work IDs, work IDs should be url encoded and separated by a comma.

That means that, if you have e.g. three work IDs "work-123", "work-456,abcd" and "789101112", they should be sent as: "work_ids=work-123,work-456%2Cabcd,789101112".


Shared across operations: `ui_language`, `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Responses

- `200` [`GetWorksResponseBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#GetWorksResponseBody) — Success

Error responses: 400 · 401 · 404 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

## Search Works

`GET` `/work/search` · `SearchWorks`

Search the metadata and returns with a list of works. 

It’s expected that the fields that are arrays in the search result are sorted that same way in /work and /publication.

Filters:

- plas.audience.literal (work)
- plas.audience.ageRange (work) 
- plas.audience.ageGroup (work)
- plas.mediaTypes (publication)
- plas.language (work and publication)
- plas.subjects (work)
- plas.genres (work)
- plas.forms (work)
- plas.agent (work)

Facets:  
All facets should also exist (with the same name) as an filter.

- plas.audience.literal
- plas.audience.ageRange
- plas.audience.ageGroup
- plas.mediaTypes
- plas.language
- plas.subjects
- plas.genres
- plas.forms
- plas.agent

Sorting:

- plas.relevance.asc
- plas.relevance.desc (default)
- plas.titles.asc
- plas.titles.desc
- plas.publicationDate.asc
- plas.publicationDate.desc


### Parameters

- `query` (In `query`, `string`, optional) — The search query.
- `page` (In `query`, `integer`, optional) — Page number (default 1).
- `size` (In `query`, `integer`, optional) — Page size (default 10).
It's important to be aware that, the page size here is only a preferred page size, the result set can be both small and greater, depending on the implementation from the LMS provider.
This is important to consider in any product design.

- `facet` (In `query`, [`array of SearchFacetType`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#SearchFacetType), optional) — Return these facets.
- `facet_terms_size` (In `query`, `integer`, optional) — Return this number of facet terms for each requested facet (default 10).
- `sort` (In `query`, [`SearchSortingType`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#SearchSortingType), optional) — Sorting
- `filter` (In `query`, `object`, optional) — The individual filter values are OR'ed together, and the filter are then AND'ed together. The hole statement will be AND'ed with the given query.

Eg. filter[plas.mediaTypes]=book,cd&filter[plas.subjects]=dance will be made into plas.mediaTypes=(book OR cd) AND plas.subjects=dance

The possible keys in this map are the filters defined in the `/configuration(/search)` endpoint (field: (search->)workSearch->filter->available) and are the list of strings of the `SearchFilterType` type.


Shared across operations: `ui_language`, `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Responses

- `200` [`SearchWorksResponseBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#SearchWorksResponseBody) — Success

Error responses: 400 · 401 · 404 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)
