Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer of https://github.com/inveniosoftware/docs-invenio-rdm/pull/612 #619

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/reference/rest_api_awards.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ Query and retrieve entries from the [**awards** vocabulary](../customize/vocabul
| Name | Type | Location | Description |
| -------- | ------ | -------- | ------------------------------------ |
| `q` | string | query | Search query used to filter results. |
| `sort` | string | query | Sort search results. Built-in options are `"bestmatch"`, `"title"`, `"newest"`, `"oldest"` (default: `"bestmatch"` or `"title"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `suggest` | string | query | "Search as you type" query. |
| `accept` | string | header | - `application/json` |

Sort options for awards are configured on the vocabulary service class. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter. Otherwise `"bestmatch"` is ignored and the default `"title"` sort is used.

**Query string syntax**

The query string syntax is based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax), and can include the following search fields:
Expand Down
6 changes: 4 additions & 2 deletions docs/reference/rest_api_communities.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,13 @@ Content-Type: application/json
| Name | Type | Location | Description |
|----------|---------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `q` | string | query | Search query used to filter results based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax). |
| `sort` | string | query | Sort search results (default: newest). |
| `sort` | string | query | Sort search results. Customizable. Built-in options are `"bestmatch"`, `"newest"`, `"oldest"`, `"updated-desc"`, `"updated-asc"`, `"version"` (default: `"bestmatch"` or `"newest"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `type` | string | query | Specify community type as one of organization, event, topic or project. |
| `accept` | string | header | - `application/json` (default)<br />- `application/vnd.inveniordm.v1+json` |

Sort options for communities can be configured using the `COMMUNITIES_SORT_OPTIONS` config variable as described in the [search customization](../customize/search.md) section. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter. Otherwise `"bestmatch"` is ignored and the default `"newest"` sort is used.

**Request**

Expand Down Expand Up @@ -393,12 +394,13 @@ Same as `GET /api/communities` but with the authenticated user's communities in
| Name | Type | Location | Description |
|----------|---------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `q` | string | query | Search query used to filter results based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax). |
| `sort` | string | query | Sort search results (default: newest). |
| `sort` | string | query | Sort search results. Customizable. Built-in options are `"bestmatch"`, `"newest"`, `"oldest"`, `"updated-desc"`, `"updated-asc"`, `"version"` (default: `"bestmatch"` or `"newest"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `type` | string | query | Specify community type as one of organization, event, topic or project. |
| `accept` | string | header | - `application/json` (default)<br />- `application/vnd.inveniordm.v1+json` |

Sort options for communities can be configured using the `COMMUNITIES_SORT_OPTIONS` config variable as described in the [search customization](../customize/search.md) section. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter. Otherwise `"bestmatch"` is ignored and the default `"newest"` sort is used.

**Request**

Expand Down
8 changes: 6 additions & 2 deletions docs/reference/rest_api_drafts_records.md
Original file line number Diff line number Diff line change
Expand Up @@ -1105,12 +1105,14 @@ Content-Type: application/json
| Name | Type | Location | Description |
| -------------- | ------- | -------- | ------------------------------------------------------------ |
| `q` | string | query | Search query used to filter results based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax). |
| `sort` | string | query | Sort search results. |
| `sort` | string | query | Sort search results. Customizable. Built-in options are `"bestmatch"`, `"newest"`, `"oldest"`, `"updated-desc"`, `"updated-asc"`, `"version"`, `"mostviewed"`, `"mostdownloaded"` (default: `"bestmatch"` or `"newest"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `allversions` &nbsp; | boolean | query | Specify if all versions should be included (default: `False`, displays just latest version). |
| `accept` | string | header | - `application/json` (default)<br />- `application/vnd.inveniordm.v1+json` |

Sort options for records can be configured using the `RDM_SORT_OPTIONS` config variable as described in the [search customization](../customize/search.md) section. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter. Otherwise `"bestmatch"` is ignored and the default `"newest"` sort is used. Queries sorted by `"mostviewed"` and `"mostdownloaded"` are in descending order.

**Request**

```http
Expand Down Expand Up @@ -1772,12 +1774,14 @@ Used for interacting with the records and drafts you can edit.
| Name | Type | Location | Description |
| -------- | ------- | -------- | ------------------------------------------------------------ |
| `q` | string | query | Search query used to filter results based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax). |
| `sort` | string | query | Sort search results. |
| `sort` | string | query | Sort search results. Customizable. Built-in options are `"bestmatch"`, `"newest"`, `"oldest"`, `"updated-desc"`, `"updated-asc"`, `"version"`, `"mostviewed"`, `"mostdownloaded"` (default: `"bestmatch"` or `"newest"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `allversions` &nbsp; | boolean | query | Specify if all versions should be included. |
| `accept` | string | header | - `application/json` (default)<br />- `application/vnd.inveniordm.v1+json` |

Sort options for records can be configured using the `RDM_SORT_OPTIONS` config variable as described in the [search customization](../customize/search.md) section. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter. Otherwise `"bestmatch"` is ignored and the default `"newest"` sort is used. Queries sorted by `"mostviewed"` and `"mostdownloaded"` are in descending order.

**Request**

```http
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/rest_api_funders.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ Query and retrieve entries from the [**funders** vocabulary](../customize/vocabu
| -------- | ------ | -------- | ------------------------------------ |
| `q` | string | query | Search query used to filter results. |
| `suggest` | string | query | "Search as you type" query. |
| `sort` | string | query | Sort search results. Built-in options are `"bestmatch"`, `"name"`, `"newest"`, `"oldest"` (default: `"bestmatch"` or `"name"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `accept` | string | header | - `application/json` |

Sort options for funders are configured on the vocabulary service class. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter. Otherwise `"bestmatch"` is ignored and the default `"name"` sort is used.

**Query string syntax**

The query string syntax is based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax), and can include the following search fields:
Expand Down
10 changes: 8 additions & 2 deletions docs/reference/rest_api_members.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ The following general restrictions apply to the member API:
| `id` | string | path | Community UUID identifier |
| `accept` | string | header | - `application/json` |
| `q` | string | query | Search query used to filter results. |
| `sort` | string | query | Sort search results. |
| `sort` | string | query | Sort search results. Customizable. Built-in options are `"bestmatch"`, `"name"`, `"newest"`, `"oldest"` (default: `"bestmatch"` or `"name"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `role` | string | query | Filter by role (one of ``reader``, ``curator``, ``manager``, ``owner``). |
| `visibility` | boolean | query | Filter by visibility (one of ``true``, ``false``) |

Sort options for community members can be configured using the `COMMUNITIES_MEMBERS_SORT_OPTIONS` config variable as described in the [search customization](../customize/search.md) section. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter, in which case it is the default sort type. If no query string is provided in the request, the default sort type is `"name"`. In this case a `"bestmatch"` value is ignored and the default `"name"` sort is used.

**Request**

```http
Expand Down Expand Up @@ -157,6 +159,8 @@ Content-Type: application/json
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |

Note that no sort options are available when searching public members. The results are sorted by `"name"` in ascending order.

**Request**

```http
Expand Down Expand Up @@ -205,13 +209,15 @@ Content-Type: application/json
| `id` | string | path | Community UUID identifier |
| `accept` | string | header | - `application/json` |
| `q` | string | query | Search query used to filter results. |
| `sort` | string | query | Sort search results. |
| `sort` | string | query | Sort search results. Customizable. Built-in options are `"bestmatch"`, `"name"`, `"newest"`, `"oldest"` (default: `"bestmatch"` or `"name"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `role` | string | query | Filter by role (one of ``reader``, ``curator``, ``manager``, ``owner``). |
| `status` | string | query | Filter by status (one of ``submitted``, ``accepted``, ``declined``, ``expired``, ``cancelled``) |
| `is_open` | boolean | query | Filter by open/closed (one of ``true``, ``false``) |

Sort options for community members can be configured using the `COMMUNITIES_INVITATIONS_SORT_OPTIONS` config variable as described in the [search customization](../customize/search.md) section. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter, in which case it is the default sort type. If no query string is provided in the request, the default sort type is `"name"`. In this case a `"bestmatch"` value is ignored and the default `"name"` sort is used.

**Request**

```http
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/rest_api_names.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ Query and retrieve entries from the [**names** vocabulary](../customize/vocabula
| Name | Type | Location | Description |
| -------- | ------ | -------- | ------------------------------------ |
| `q` | string | query | Search query used to filter results. |
| `sort` | string | query | Sort search results. Built-in options are `"bestmatch"`, `"name"`, `"newest"`, `"oldest"` (default: `"bestmatch"` or `"name"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `suggest` | string | query | "Search as you type" query. |
| `accept` | string | header | - `application/json` |

Sort options for names are configured on the vocabulary service class. Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter. Otherwise `"bestmatch"` is ignored and the default `"name"` sort is used.

**Query string syntax**

The query string syntax is based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax), and can include the following search fields:
Expand Down
5 changes: 4 additions & 1 deletion docs/reference/rest_api_requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,13 @@ Used for listing all requests you can interact with.
| Name | Type | Location | Description |
| -------------- | ------- | -------- | ------------------------------------------------------------ |
| `q` | string | query | Search query used to filter results based on [ElasticSearch's query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax). |
| `sort` | string | query | Sort search results. |
| `sort` | string | query | Sort search results. Built-in options are `"bestmatch"`, `"name"`, `"newest"`, `"oldest"` (default: `"bestmatch"` or `"newest"`). |
| `size` | integer | query | Specify number of items in the results page (default: 10). |
| `page` | integer | query | Specify the page of results. |
| `accept` | string | header | - `application/json` (default)<br />- `application/vnd.inveniordm.v1+json` |

Note that `"bestmatch"` is only available as a sort option on requests that provide a query string as a `q` parameter, in which case it is the default sort type. If no query string is provided in the request, the default sort type is `"newest"`. In this case a `"bestmatch"` value is ignored and the default `"newest"` sort is used.

**Request**

```http
Expand Down Expand Up @@ -188,6 +190,7 @@ Content-Type: application/json
],
"total": 2
},
"sortBy": "newest",
"links": {
"self": "{scheme+hostname}/api/requests?page=1&size=25&sort=newest"
}
Expand Down
Loading
Loading