-
Notifications
You must be signed in to change notification settings - Fork 3
Service: Virtual Corpus List
Eliza Margaretha Illig edited this page Oct 25, 2024
·
24 revisions
Lists all virtual corpora (VC) available to the authenticated user including PRIVATE VC created by the user, SYSTEM VC defined by system-admins, and PROJECT VC available to user-groups, wherein the user is a member of. The list can be filtered to show only SYSTEM VC or VC owned by the user.
This web-service requires OAuth2 access token with scope: vc_info
.
Available in: full version
Method: GET
Service URL: root/vc
Header Parameter
Name | Required | Authentication scheme | Value |
---|---|---|---|
Authorization | yes | HTTP authentication with scheme: Bearer | OAuth2 access token with scope: vc_info
|
Query Parameter
Name | Required | Description | Value |
---|---|---|---|
filter-by | no | Filters the virtual corpus available to the authenticated user. system only shows corpora created by system. own only shows corpora created by the authenticated user. empty (default) shows all corpora available to the authenticated user. |
emtpy (default) system own |
HTTP Status Code | Description |
---|---|
200 OK | successful request |
400 Bad Request | when fieldName is null |
401 Unauthorized | when the operation is not permitted, e.g. user is not a system-admin. |
415 Unsupported Media Type | when content-type is not specified or incorrect |
Request: Listing all available virtual corpora for the authenticated user (dory)
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTM1MzI3O' http://localhost:8089/api/v1.0/vc
Response example
[ { "id": 1, "name": "dory-vc", "type": "private", "status": "experimental", "description": "test vc", "requiredAccess": "FREE", "createdBy": "dory" }, { "id": 2, "name": "group-vc", "type": "project", "status": "experimental", "description": "test vc", "requiredAccess": "PUB", "createdBy": "dory" }, { "id": 3, "name": "system-vc", "type": "system", "status": "experimental", "description": "test vc", "requiredAccess": "ALL", "createdBy": "system" } ]
Request: Filtering list to show owned virtual corpora only
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTM1MzI3O' http://localhost:8089/api/v1.0/vc?filter-by=own
Response example
[ { "id": 1, "name": "dory-vc", "type": "private", "status": "experimental", "description": "test vc", "requiredAccess": "FREE", "createdBy": "dory" }, { "id": 2, "name": "group-vc", "type": "project", "status": "experimental", "description": "test vc", "requiredAccess": "PUB", "createdBy": "dory" } ]
Request: Filtering list to show system virtual corpora only
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTM1MzI3O' http://localhost:8089/api/v1.0/vc?filter-by=system
Respone example
[ { "id": 3, "name": "system-vc", "type": "system", "status": "experimental", "description": "test vc", "requiredAccess": "ALL", "createdBy": "system" } ]
- Importing Kustvakt to Eclipse
- Installing Lombok
- Setting annotation processors
- Setting 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