Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
340 changes: 316 additions & 24 deletions open-api.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion text/0028-indexing-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ This error occurs when the format sent in the payload is malformed. The payload
HTTP Code: `400 Bad Request`

```json
"message": ":syntaxErrorHelper. The :payloadType payload provided is malformed.",
"message": "The :payloadType payload provided is malformed. :syntaxErrorHelper.",
"code": "malformed_payload",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#malformed_payload"
Expand Down
2 changes: 1 addition & 1 deletion text/0029-indexing-ndjson.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ This error occurs when the format sent in the payload is malformed. The payload
HTTP Code: `400 Bad Request`

```json
"message": ":syntaxErrorHelper. The :payloadType payload provided is malformed.",
"message": "The :payloadType payload provided is malformed. :syntaxErrorHelper."
"code": "malformed_payload",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#malformed_payload"
Expand Down
241 changes: 215 additions & 26 deletions text/0034-telemetry-policies.md

Large diffs are not rendered by default.

482 changes: 393 additions & 89 deletions text/0060-tasks-api.md

Large diffs are not rendered by default.

212 changes: 204 additions & 8 deletions text/0061-error-format-and-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,19 @@ HTTP Code: `400 Bad Request`

- The `:value` is inferred when the message is generated.

#### Variant: Sending an invalid index uid format in `indexes` field.

```json
{
"message": "`uid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).",
"code": "invalid_api_key_indexes",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid_api_key_indexes"
}
```

- The `:uid` is inferred when the message is generated.

---

## invalid_api_key_expires_at
Expand Down Expand Up @@ -814,15 +827,30 @@ This error code is generic. It should not be used. Instead, a clear and precise

## index_not_found

`Synchronous`
`Asynchronous` / `Synchronous`

### Context

This error happens when a requested index can't be found.

### Error Definition

HTTP Code: `404 Not Found`
HTTP Code: `404 Not Found` when

#### Variant: Multiples indexUids can't be found

```json
{
"message": "Indexes `:indexUids` not found.",
"code": "index_not_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#index_not_found"
}
```

- The `:indexUids` is inferred when the message is generated, values are separated by `,`.

#### Variant: An index can't be found

```json
{
Expand All @@ -837,6 +865,45 @@ HTTP Code: `404 Not Found`

---

## duplicate_index_found

`Synchronous`

### Context

This error happens when the same indexUid is used twice in the `POST`- `swap-indexes` payload.

### Error Definition


#### Variant: A single indexUid is found twice in the payload

```json
{
"message": "Indexes must be declared only once during a swap. `:indexUid` was specified several times.",
"code": "duplicate_index_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#duplicate_index_found"
}
```

- The `:indexUid` is inferred when the message is generated.

#### Variant: Several indexUids are found twice in the payload

```json
{
"message": "Indexes must be declared only once during a swap. `:indexUids` were specified several times.",
"code": "duplicate_index_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#duplicate_index_found"
}
```

- The `:indexUids` is inferred when the message is generated, values are separated by `,`.

---

## document_not_found

`Synchronous`
Expand Down Expand Up @@ -912,7 +979,60 @@ HTTP Code: `404 Not Found`

---

## invalid_task_status
## invalid_task_uids_filter

`Synchronous`

### Context

This error occurs when the `uids` query parameter contains invalid values.

### Error Definition

HTTP Code: `400 Bad Request`

```json
{
"message": "Task uid `:uid` is invalid. It should only contains numeric characters separated by `,` character.",
"code": "invalid_task_uids_filter",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid_task_uids_filter"
}
```

- `:uid` is inferred when the message is generated.

---

## invalid_task_date_filter

`Synchronous`

### Context

This error occurs when a task date filter contains an invalid value.

### Error Definition

HTTP Code: `400 Bad Request`

```json
{
"message": "Task `:dateFilterName` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.",
"code": "invalid_task_date_filter",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid_task_date_filter"
}
```

- `:dateFilterName` is inferred when the message is generated.
- `:value` is inferred when the message is generated.

---

## invalid_task_statuses_filter

`Synchronous`

### Context

Expand All @@ -925,9 +1045,9 @@ HTTP Code: `400 Bad Request`
```json
{
"message": "Task status `:status` is invalid. Available task statuses are: `:taskStatuses`.",
"code": "invalid_task_status",
"code": "invalid_task_statuses_filter",
"type": "invalid_request",
"link":"https://docs.meilisearch.com/errors#invalid_task_status"
"link":"https://docs.meilisearch.com/errors#invalid_task_statuses_filter"
}
```

Expand All @@ -936,7 +1056,9 @@ HTTP Code: `400 Bad Request`

---

## invalid_task_type
## invalid_task_types_filter

`Synchronous`

### Context

Expand All @@ -949,9 +1071,9 @@ HTTP Code: `400 Bad Request`
```json
{
"message": "Task type `:type` is invalid. Available task types are: `:taskTypes`.",
"code": "invalid_task_type",
"code": "invalid_task_types_filter",
"type": "invalid_request",
"link":"https://docs.meilisearch.com/errors#invalid_task_type"
"link":"https://docs.meilisearch.com/errors#invalid_task_types_filter"
}
```

Expand All @@ -960,6 +1082,57 @@ HTTP Code: `400 Bad Request`

---

## invalid_task_canceled_by_filter

`Synchronous`

### Context

This error happens when the `canceledBy` query parameter contains an invalid value.

### Error Definition

HTTP Code: `400 Bad Request`

```json
{
"message": "Task canceledBy `:canceledBy` is invalid. It should only contains numeric characters separated by `,` character.",
"code": "invalid_task_canceled_by_filter",
"type": "invalid_request",
"link":"https://docs.meilisearch.com/errors#invalid_task_canceled_by_filter"
}
```

- `:canceledBy` is inferred when the message is generated.

---

## missing_task_filters

`Synchronous`

### Context

This error happens when no query parameters are given when a task cancelation or a task deletion request is sent.

### Error Definition

HTTP Code: `400 Bad Request`

```json
{
"message": "Query parameters to filter the tasks to `:operation` are missing. Available query parameters are: `queryParametersNames`",
"code": "missing_task_filters",
"type": "invalid_request",
"link":"https://docs.meilisearch.com/errors#missing_task_filters"
}
```

- `:operation` is inferred when the message is generated.
- `:queryParameterNames` is inferred when the message is generated.

---

## api_key_not_found

`Synchronous`
Expand Down Expand Up @@ -1350,6 +1523,29 @@ HTTP Code: `403 Forbidden`

---

## missing_master_key

`Synchronous`

### Context

For some specific protected routes (i.e. `/keys`) the master key must be defined before accessing it. This error indicates to the user that he must first define a master key when launching Meilisearch.

### Error Definition

HTTP Code: `401 Forbidden`

```json
{
"message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.",
"code": "missing_master_key",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_master_key"
}
```

---

## 2. Technical details
N/A

Expand Down
10 changes: 9 additions & 1 deletion text/0085-api-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Gives the total number of API keys that can be browsed.

###### 3.2.4.2.3. Errors

- 🔴 Accessing this route while a master key is not set for the instance returns a [missing_master_key](0061-error-format-and-definitions.md#missing_master_key) error.
- 🔴 Accessing this route without the `Authorization` header returns a [missing_authorization_header](0061-error-format-and-definitions.md#missing_authorization_header) error.
- 🔴 Accessing this route without the master key returns an [invalid_api_key](0061-error-format-and-definitions.md#invalid_api_key) error.

Expand Down Expand Up @@ -279,6 +280,7 @@ See [API Key Resource Representation](#3241-api-key-resource-representation) sec

###### 3.2.4.3.3. Errors

- 🔴 Accessing this route while a master key is not set for the instance returns a [missing_master_key](0061-error-format-and-definitions.md#missing_master_key) error.
- 🔴 Accessing this route without the `Authorization` header returns a [missing_authorization_header](0061-error-format-and-definitions.md#missing_authorization_header) error.
- 🔴 Accessing this route without the master key or an API key missing the `keys.get` permission returns an [invalid_api_key](0061-error-format-and-definitions.md#invalid_api_key) error.

Expand Down Expand Up @@ -311,7 +313,10 @@ Create an API key.
| indexes.get | Provides access to `GET` `/indexes` and `/indexes/:authorizedIndexes`. **⚠️Non-authorized `indexes` are omitted from the response on `/indexes`**. |
| indexes.update | Provides access to `PUT` `/indexes/:authorizedIndexes`. |
| indexes.delete | Provides access to `DELETE` `/indexes/:authorizedIndexes`. |
| indexes.swap | Provides access to `POST` `/swap-indexes`. See [Swap Indexes API](0191-swap-indexes-api.md) specification. |
| tasks.get | Provides access to `GET` `/tasks`. **⚠️Non-authorized `indexes` are omitted from the response on `/tasks`**. Also add access to `GET` `/indexes/:authorizedIndexes/tasks` routes. |
| tasks.cancel | Provides access to `POST` `/tasks/cancel`. route. |
| tasks.delete | Provides access to `DELETE` `/tasks` route. |
| settings.get | Provides access to `GET` `/indexes/:authorizedIndexes/settings` and `/indexes/:authorizedIndexes/settings/*` routes. |
| settings.update | Provides access to `POST / DELETE` `/indexes/:authorizedIndexes/settings` and `/indexes/:authorizedIndexes/settings/*` routes. |
| stats.get | Provides access to `GET` `/stats/`. **⚠️Non-authorized `indexes` are omitted from the response on `/stats`**. Also add access to `GET` `/indexes/:authorizedIndexes/stats`. |
Expand All @@ -330,6 +335,7 @@ See [API Key Resource Representation](#3241-api-key-resource-representation) sec

###### 3.2.4.4.3. Errors

- 🔴 Accessing this route while a master key is not set for the instance returns a [missing_master_key](0061-error-format-and-definitions.md#missing_master_key) error.
- 🔴 Accessing this route without the `Authorization` header returns a [missing_authorization_header](0061-error-format-and-definitions.md#missing_authorization_header) error.
- 🔴 Accessing this route without the master key or an API key missing the `keys.create` permission returns an [invalid_api_key](0061-error-format-and-definitions.md#invalid_api_key) error.
- 🔴 Omitting Content-Type header returns a [missing_content_type](0061-error-format-and-definitions.md#missing_content_type) error.
Expand Down Expand Up @@ -368,6 +374,7 @@ See [API Key Resource Representation](#3241-api-key-resource-representation) sec

###### 3.2.4.5.3. Errors

- 🔴 Accessing this route while a master key is not set for the instance returns a [missing_master_key](0061-error-format-and-definitions.md#missing_master_key) error.
- 🔴 Accessing this route without the `Authorization` header returns a [missing_authorization_header](0061-error-format-and-definitions.md#missing_authorization_header) error.
- 🔴 Accessing this route without the master key or an API key missing the `keys.update` permission returns an [invalid_api_key](0061-error-format-and-definitions.md#invalid_api_key) error.
- 🔴 Attempting to access an API key that does not exist returns a [api_key_not_found](0061-error-format-and-definitions.md#api_key_not_found) error.
Expand Down Expand Up @@ -395,6 +402,7 @@ Returns a `204 No-Content` HTTP code when the request is successful.

###### 3.2.4.6.3. Errors

- 🔴 Accessing this route while a master key is not set for the instance returns a [missing_master_key](0061-error-format-and-definitions.md#missing_master_key) error.
- 🔴 Accessing this route without the `Authorization` header returns a [missing_authorization_header](0061-error-format-and-definitions.md#missing_authorization_header) error.
- 🔴 Accessing this route without the master key or an API key missing the `keys.delete` permission returns an [invalid_api_key](0061-error-format-and-definitions.md#invalid_api_key) error.
- 🔴 Attempting to access an API key that does not exist returns a [`api_key_not_found`](0061-error-format-and-definitions.md#api_key_not_found) error.
Expand Down Expand Up @@ -457,4 +465,4 @@ The maximum size of the API key storage layer is `100GB`.
- A restriction on the maximum offset/limit.
- Add search parameters restrictions for an API Key.
- Add rfc2822 format expression for `expiredAt` field. e.g. `Wed, 18 Feb 2022 23:16:09 GMT`
- Add an alias that can only be associated to one API Key to retrieve it easily on client side. e.g. `GET /keys/:uid_or_alias`
- Add an alias that can only be associated to one API Key to retrieve it easily on client side. e.g. `GET /keys/:uid_or_alias`
11 changes: 6 additions & 5 deletions text/0105-dumps-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ The following table describes which version of the dump correspond to which vers
| Dump version | Meilisearch version | Highest compatibility dump version |
|--------------|--------------------------------------|------------------------------------|
| `v1` | `v0.20.0` and below | `v3` |
| `v2` | `v0.21.0` and `v0.21.1` | `v5` |
| `v3` | From `v0.22.0` to `v0.24.0` included | `v5` |
| `v4` | From `v0.25.0` to `v0.27.2` included | `v5` |
| `v5` | `v0.28.0` and later | - |
| `v2` | `v0.21.0` and `v0.21.1` | `v6` |
| `v3` | From `v0.22.0` to `v0.24.0` included | `v6` |
| `v4` | From `v0.25.0` to `v0.27.2` included | `v6` |
| `v5` | From `v0.28.0` to `v0.29.1` included | `v6` |
| `v6` | `v0.30.0` and later | `v6` |

What does "Highest compatibility dump version" means?

Expand All @@ -121,4 +122,4 @@ Dump creation tasks have priority over other task types. If a `dumpCreation` tas

## 5. Future Possibilities

- Give information about the import of a dump within the tasks.
- Give information about the import of a dump within the tasks.
Loading