Skip to content

Service: Load and Cache System VC (System Admin)

Eliza Margaretha edited this page Mar 14, 2023 · 1 revision

** WARNING: This service is experimental and may change without any notice.

Allows system admins to check virtual corpora definitions (KoralQuery in jsonld.gz) located at the named-vc folder as defined in the kustvakt configuration file. New vc will be loaded, stored and cached as system VC. Existing vc will be updated, if there have been new changes.

This service requires admin authentication either by using the 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: full version

Method: POST

Service URL: root/admin/vc/load-cache

Parameters

Header Parameter

Name Required Authentication scheme Value
Authorization yes Bearer OAuth2 access token
Content-Type yes content type of the input data application/x-www-form-urlencoded

Examples

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/admin/vc/load-cache'

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/admin/vc/load-cache'

Request with cURL

curl -v -H 'Content-Type: application/x-www-form-urlencoded' \
     -H 'Authorization: Bearer f70p9lBCIufy_9LYEef2jQzJLlBMpc1egkv4dCBxcD3A' 
     -X POST \
     'http://localhost:8089/api/v1.0/admin/vc/load-cache'

Advanced Setting

Developer Setting

Search services

Metadata services

Authentication and Authorization services

Client services

Super client services

Plugin services

User services

User group services

Virtual corpus services

Virtual corpus access services

Administrative services

Description services

Clone this wiki locally