|
1
|
/** |
|
2
|
* @oas [get] /admin/search-indexes |
|
3
|
* operationId: GetSearchIndexes |
|
4
|
* summary: List Search Indexes |
|
5
|
* description: Retrieve the list of search indexes registered in your application, including each index's provider, lifecycle status, and the fields it stores. If the Search Module isn't installed in |
|
6
|
* your application, `enabled` is `false` and `search_indexes` is an empty array. |
|
7
|
* externalDocs: |
|
8
|
* description: Learn about the Search Module |
|
9
|
* url: https://docs.medusajs.com/resources/infrastructure-modules/search |
|
10
|
* x-authenticated: true |
|
11
|
* security: |
|
12
|
* - api_token: [] |
|
13
|
* - cookie_auth: [] |
|
14
|
* - jwt_token: [] |
|
15
|
* x-codeSamples: |
|
16
|
* - lang: JavaScript |
|
17
|
* label: JS SDK |
|
18
|
* source: |- |
|
19
|
* import Medusa from "@medusajs/js-sdk" |
|
20
|
* |
|
21
|
* export const sdk = new Medusa({ |
|
22
|
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/", |
|
23
|
* debug: import.meta.env.DEV, |
|
24
|
* auth: { |
|
25
|
* type: "session", |
|
26
|
* }, |
|
27
|
* }) |
|
28
|
* |
|
29
|
* sdk.admin.search.listIndexes() |
|
30
|
* .then(({ search_indexes, enabled }) => { |
|
31
|
* console.log(search_indexes, enabled) |
|
32
|
* }) |
|
33
|
* - lang: Shell |
|
34
|
* label: cURL |
|
35
|
* source: |- |
|
36
|
* curl '{backend_url}/admin/search-indexes' \ |
|
37
|
* -H 'Authorization: Bearer {access_token}' |
|
38
|
* tags: |
|
39
|
* - Search Indexes |
|
40
|
* responses: |
|
41
|
* "200": |
|
42
|
* description: OK |
|
43
|
* content: |
|
44
|
* application/json: |
|
45
|
* schema: |
|
46
|
* $ref: "#/components/schemas/AdminSearchIndexListResponse" |
|
47
|
* "400": |
|
48
|
* $ref: "#/components/responses/400_error" |
|
49
|
* "401": |
|
50
|
* $ref: "#/components/responses/unauthorized" |
|
51
|
* "404": |
|
52
|
* $ref: "#/components/responses/not_found_error" |
|
53
|
* "409": |
|
54
|
* $ref: "#/components/responses/invalid_state_error" |
|
55
|
* "422": |
|
56
|
* $ref: "#/components/responses/invalid_request_error" |
|
57
|
* "500": |
|
58
|
* $ref: "#/components/responses/500_error" |
|
59
|
* |
|
60
|
*/ |
|
61
|
|