Skip to content

Service: User Setting Creation and Update

Eliza Margaretha edited this page Feb 5, 2019 · 3 revisions

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

Creates or updates user settings describing user preferences for various default settings, for instance default foundries for specific layers such as lemma and part of speech. The setting elements are represented as pairs of keys and values (a map). The number of elements and the keys are not strictly defined, although some keys may be pre-defined, e.g. the default foundries as they are used in foundry rewrite. The entire user settings are stored as a JSON string allowing flexible attribute definitions and extensions of existing settings.

Available in: full version

Method: PUT

Service URL: {root}/{api-version}/~{username}/setting

Parameters

Path parameters

name required description type example
root yes the service root URI String http://localhost:8089/api
api-version yes the version of the API String v1.0
username yes the username must be the same as the authenticated username String

Header Parameters

Name Required Description Value
Authorization yes HTTP authentication with schemes: Api, Bearer user authentication token: Api token, OAuth2 access token (Bearer)
Content-Type yes content type of the input data application/json

Request body

User settings represented as a JSON object containing pairs of keys and values. The keys must only contains alphabets, numbers, hypens or underscores.

Examples

In the following example, multiple values are separated by empty space, see "metadata".

curl -v -X PUT
     -H 'Content-Type: application/json' 
     -H 'Authorization: Api eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MTM1MzI3O
       TAxMzQsInN1YiI6InVzZXJuYW1lIiwiaXNzIjoiaHR0cDpcL1wva29yYXAuaWRzLW1
       hbm5oZWltLmRlIn0.p4jHIGeVwTpYAPFiWAd0R8Zcazyg7e9_tUGxOyFGUlo' 
     -d '{"pos-foundry": "marmot", "resultPerPage" : "25", "metadata" : 
      "author title textSigle availability"}'
      http://localhost:8089/api/v1.0/~dory/setting

Response

  • On creating new settings

    HTTP/1.1 201 Created

  • On updating existing settings:

    HTTP/1.1 200 OK

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