-
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'
- Setting LDAP
- Setting initial super client
- Setting a custom environment
- Setting resources for CLARIN FCS
- Disabling query rewrites
- Named virtual corpora
- Importing Kustvakt to Eclipse
- Installing Lombok
- Setting annotation processors
- Setting a test environment
- HTTP Basic Authentication
- OAuth2 authorization scopes
- OAuth2 authorization request
- OAuth2 token request
- OAuth2 token revocation
- 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
- VC creation and update
- VC deletion
- VC list
- VC info
- VC KoralQuery
- VC statistics
- VC statistics with KoralQuery