Skip to content

Service: Virtual Corpus List (System Admin)

Eliza Margaretha edited this page Jul 12, 2018 · 15 revisions

Lists virtual corpora by creator and type. This service is limited for system admins. If type is not specified, retrieves virtual corpora of all types. If createdBy is not specified, retrieves virtual corpora of all users.

Available in: full version

Method: GET

Service URL: root/vc/list/system-admin

Parameters

Header Parameter

Name Required Authentication scheme Value
Authorization yes HTTP authentication with schemes: Bearer, Api user authentication token

Query Parameters

Name Required Description Type Value
createdBy no virtual corpus creator String a username
type no virtual corpus type VirtualCorpusType SYSTEM, PROJECT, PRIVATE, PUBLISHED

Examples

Request with cURL

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTM1MzI3O
       TAxMzQsInN1YiI6InVzZXJuYW1lIiwiaXNzIjoiaHR0cDpcL1wva29yYXAuaWRzLW1
       hbm5oZWltLmRlIn0.p4jHIGeVwTpYAPFiWAd0R8Zcazyg7e9_tUGxOyFGUlo' 
     'http://localhost:8089/api/vc/list/system-admin?createdBy=dory&type=PROJECT'

Request with Basic authentication (for testing only)

Retrieve user-groups of pearl with status HIDDEN

curl -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' 
     'http://localhost:8089/api/vc/list/system-admin?createdBy=dory&type=PROJECT'

Output example:

[{
    "id": 2,
    "name": "group VC",
    "type": "project",
    "status": "experimental",
    "description": "test vc",
    "requiredAccess": "PUB",
    "createdBy": "dory",
    "numberOfDoc": 4,
    "koralQuery": "{\"collection\": { \"@type\": \"koral:docGroup\", \"operands\": 
    [ { \"@type\": \"koral:doc\", \"key\": \"corpusSigle\", \"match\": \"match:eq\", 
    \"value\": \"GOE\" }, { \"@type\": \"koral:doc\", \"key\": \"creationDate\", 
    \"match\": \"match:leq\", \"type\": \"type:date\", \"value\": \"1810\" } ], 
    \"operation\": \"operation:and\" }}"
}]
Clone this wiki locally