|
1
|
get: |
|
2
|
operationId: GetSearch |
|
3
|
summary: Search Admin |
|
4
|
description: >- |
|
5
|
Search entities that have a search index and are defined as search entities |
|
6
|
in the Medusa Admin. |
|
7
|
externalDocs: |
|
8
|
description: Medusa Admin Search |
|
9
|
url: >- |
|
10
|
https://docs.medusajs.com/resources/infrastructure-modules/search/admin-search |
|
11
|
x-authenticated: true |
|
12
|
parameters: |
|
13
|
- name: q |
|
14
|
in: query |
|
15
|
description: A query to run full-text search against the search index. |
|
16
|
required: false |
|
17
|
schema: |
|
18
|
type: string |
|
19
|
title: q |
|
20
|
description: A query to run full-text search against the search index. |
|
21
|
- name: entity |
|
22
|
in: query |
|
23
|
description: The entities to run the search against. |
|
24
|
required: false |
|
25
|
schema: |
|
26
|
type: array |
|
27
|
description: The entities to run the search against. |
|
28
|
items: |
|
29
|
type: string |
|
30
|
title: entity |
|
31
|
description: The name of the entity. |
|
32
|
- name: limit |
|
33
|
in: query |
|
34
|
description: Limit the number of items returned in the list. |
|
35
|
required: false |
|
36
|
schema: |
|
37
|
type: number |
|
38
|
title: limit |
|
39
|
description: Limit the number of items returned in the list. |
|
40
|
externalDocs: |
|
41
|
url: '#pagination' |
|
42
|
- name: offset |
|
43
|
in: query |
|
44
|
description: The number of items to skip when retrieving a list. |
|
45
|
required: false |
|
46
|
schema: |
|
47
|
type: number |
|
48
|
title: offset |
|
49
|
description: The number of items to skip when retrieving a list. |
|
50
|
externalDocs: |
|
51
|
url: '#pagination' |
|
52
|
security: |
|
53
|
- api_token: [] |
|
54
|
- cookie_auth: [] |
|
55
|
- jwt_token: [] |
|
56
|
x-codeSamples: |
|
57
|
- lang: JavaScript |
|
58
|
label: JS SDK |
|
59
|
source: |
|
60
|
$ref: ../code_samples/JavaScript/admin_search/get.js |
|
61
|
- lang: Shell |
|
62
|
label: cURL |
|
63
|
source: |
|
64
|
$ref: ../code_samples/Shell/admin_search/get.sh |
|
65
|
tags: |
|
66
|
- Search |
|
67
|
responses: |
|
68
|
'200': |
|
69
|
description: OK |
|
70
|
content: |
|
71
|
application/json: |
|
72
|
schema: |
|
73
|
type: object |
|
74
|
description: The search results for the requested entities. |
|
75
|
required: |
|
76
|
- results |
|
77
|
properties: |
|
78
|
results: |
|
79
|
type: array |
|
80
|
description: >- |
|
81
|
The search results for each entity, in the order the entities |
|
82
|
were requested. |
|
83
|
items: |
|
84
|
type: object |
|
85
|
description: The search result for a specific entity. |
|
86
|
required: |
|
87
|
- entity |
|
88
|
- data |
|
89
|
- count |
|
90
|
- offset |
|
91
|
- limit |
|
92
|
properties: |
|
93
|
entity: |
|
94
|
type: string |
|
95
|
title: entity |
|
96
|
description: The name of the entity the search result belongs to. |
|
97
|
data: |
|
98
|
type: array |
|
99
|
description: The documents the index holds, in relevance order. |
|
100
|
items: |
|
101
|
type: object |
|
102
|
description: The document returned by the search index. |
|
103
|
count: |
|
104
|
type: number |
|
105
|
title: count |
|
106
|
description: >- |
|
107
|
An estimate of the total number of documents matching |
|
108
|
the search query. |
|
109
|
offset: |
|
110
|
type: number |
|
111
|
title: offset |
|
112
|
description: >- |
|
113
|
The number of documents to skip before returning |
|
114
|
results. |
|
115
|
limit: |
|
116
|
type: number |
|
117
|
title: limit |
|
118
|
description: >- |
|
119
|
The maximum number of documents to return in the result |
|
120
|
set. |
|
121
|
'400': |
|
122
|
$ref: ../components/responses/400_error.yaml |
|
123
|
'401': |
|
124
|
$ref: ../components/responses/unauthorized.yaml |
|
125
|
'404': |
|
126
|
$ref: ../components/responses/not_found_error.yaml |
|
127
|
'409': |
|
128
|
$ref: ../components/responses/invalid_state_error.yaml |
|
129
|
'422': |
|
130
|
$ref: ../components/responses/invalid_request_error.yaml |
|
131
|
'500': |
|
132
|
$ref: ../components/responses/500_error.yaml |