-
Notifications
You must be signed in to change notification settings - Fork 3
Service: Closing Index Reader
When a KorAP index is updated, the changes would not be taken into account until the index reader is reloaded (closed and re-opened). This service closes the index reader, and it will be automatically opened when the index is used next time. This service should be used only by system-admins. If the request is successful, HTTP Status 200 is returned.
This service requires admin authentication either by using Authorization header or including an admin token in the request body. At server starts-up, Kustvakt automatically generates an adminToken file at the root project folder, if it has not existed already.
Available in: lite and full version
Method: POST
Service URL: root/index/close
Header Parameters
Name | Required | Description | Value |
---|---|---|---|
Content-Type | yes | content type of the input data | application/x-www-form-urlencoded |
Authorization | yes, if adminToken is not included in the request | HTTP authentication with scheme: Bearer | OAuth2 access token |
Request body URL-encoded form parameters
Name | Required | Description | Type |
---|---|---|---|
token | yes | The adminToken automatically generated by Kustvakt server in the root folder | String |
Request with admin token
Run the command on the root folder containing an adminToken file:
curl -v -H 'Content-Type: application/x-www-form-urlencoded' \ -d @adminToken \ http://localhost:8089/api/v1.0/index/close
or describe an adminToken explicitly in the command:
curl -v -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'token=Rn8zb30nkqVlHd_Wxt2DpE' \ http://localhost:8089/api/v1.0/index/close
Request with authorization header
curl -v -H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Bearer f70p9lBCIufy_9LYEef2jQzJLlBMpc1egkv4dCBxcD3A' \
-X POST \
'http://localhost:8089/api/v1.0/index/close'
- OAuth2 client registration
- OAuth2 client info
- OAuth2 client deregistration
- OAuth2 client secret reset
- Plugin registration
- Plugin list (Marketplace)
- Plugin installation
- Plugin uninstallation
- Installed plugin list
- User group creation
- User group deletion
- User group list
- Member invitation
- Member deletion
- Approval of member invitation
- Rejection of member invitation
- Member role management
- Virtual corpus creation and update
- Virtual corpus deletion
- Virtual corpus list
- Virtual corpus retrieval
- Virtual corpus statistics
- Virtual corpus statistics with KoralQuery