@infinilabs/ui-web-cli 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -0
- package/lib/bundle.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,3 +71,73 @@ Here’s the English translation of the table:
|
|
|
71
71
|
| sendRequestToES | Event handler for the execute button click | function | - | 1.0.0 |
|
|
72
72
|
|
|
73
73
|
|
|
74
|
+
## Add New API Endpoint Spec
|
|
75
|
+
|
|
76
|
+
- Navigate to the directory `src/components/vendor/console/server/lib/spec_definitions/json/overrides`.
|
|
77
|
+
- Add a new file, for example, `index_template.json`. The file content is explained as follows:
|
|
78
|
+
- `index_template.put`: Defines the API endpoint for the `PUT` method.
|
|
79
|
+
- `url_params`: Defines the query parameters for the API endpoint
|
|
80
|
+
- `methods`: Supported HTTP methods.
|
|
81
|
+
- `patterns`: URL patterns for the API.
|
|
82
|
+
- `data_autocomplete_rules`: Autocomplete rules for the request body.
|
|
83
|
+
- `documentation`: Link to the relevant documentation.
|
|
84
|
+
- `index_template.get`: Defines the API endpoint for the `GET` method.
|
|
85
|
+
- `index_template.delete`: Defines the API endpoint for the `DELETE` method.
|
|
86
|
+
|
|
87
|
+
Here is an example of `index_template.json`:
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"index_template.put": {
|
|
91
|
+
"url_params": {
|
|
92
|
+
},
|
|
93
|
+
"methods": [
|
|
94
|
+
"PUT"
|
|
95
|
+
],
|
|
96
|
+
"patterns": [
|
|
97
|
+
"_index_template/{name}"
|
|
98
|
+
],
|
|
99
|
+
"data_autocomplete_rules": {
|
|
100
|
+
"index_patterns": "",
|
|
101
|
+
"data_stream": {
|
|
102
|
+
"timestamp_field": {
|
|
103
|
+
"name": ""
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"priority": 200,
|
|
107
|
+
"template": {
|
|
108
|
+
"mappings": {
|
|
109
|
+
"__scope_link": "put_mapping"
|
|
110
|
+
},
|
|
111
|
+
"settings": {
|
|
112
|
+
"__scope_link": "put_settings"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"documentation": "https://docs.infinilabs.com/easysearch/main/docs/references/management/index-templates/"
|
|
117
|
+
},
|
|
118
|
+
"index_template.get": {
|
|
119
|
+
"url_params": {
|
|
120
|
+
},
|
|
121
|
+
"methods": [
|
|
122
|
+
"GET"
|
|
123
|
+
],
|
|
124
|
+
"patterns": [
|
|
125
|
+
"_index_template",
|
|
126
|
+
"_index_template/{name}"
|
|
127
|
+
],
|
|
128
|
+
"documentation": "https://docs.infinilabs.com/easysearch/main/docs/references/management/index-templates/"
|
|
129
|
+
},
|
|
130
|
+
"index_template.delete": {
|
|
131
|
+
"url_params": {
|
|
132
|
+
},
|
|
133
|
+
"methods": [
|
|
134
|
+
"DELETE"
|
|
135
|
+
],
|
|
136
|
+
"patterns": [
|
|
137
|
+
"_index_template/{name}"
|
|
138
|
+
],
|
|
139
|
+
"documentation": "https://docs.infinilabs.com/easysearch/main/docs/references/management/index-templates/"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
> `__scope_link` is used to reuse existing data autocomplete rules
|