Modifies a file in a specified index version.
Operation description
Method
PUT
URI
/openapi/ha3/instances/{instanceId}/indexes/{indexName}/versions/{versionName}/file?fileName=/root/test.txt
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
searchengine:ModifyFile |
*Instance
|
None | None |
Request syntax
PUT /openapi/ha3/instances/{instanceId}/indexes/{indexName}/versions/{versionName}/file HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
ha-cn-pl32rf0**** |
| indexName |
string |
Yes |
The index name. |
test_api |
| versionName |
string |
Yes |
The version name. |
ha-cn-pl32rf0****_online_config_v1 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| fileName |
string |
Yes |
The full path of the file. |
/schemas/generation_schema.json |
| body |
object |
No |
The request body. |
{\"desc\":\"new version\"} |
| content |
string |
No |
The file content. |
{\"partition\":1} |
| partition |
integer |
No |
The number of shards. |
1 |
Sample requests
PUT /openapi/ha3/instances/ose-test1/indexes/index1/versions/version1?fileName=/root/test.txt
{
"partition": 1,
"content": ""
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| requestId |
string |
The request ID. |
89B968E6-1E41-58DF-BB25-5F98ECC759CE |
| result |
object |
The index information. |
{} |
Examples
Success response
JSON format
{
"requestId": "89B968E6-1E41-58DF-BB25-5F98ECC759CE",
"result": {}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.