Skip to content

Service: Metadata Retrieval

Eliza Margaretha edited this page Jan 11, 2024 · 4 revisions

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

Retrieves metadata of an article by using text sigle consisting of corpus Id, document Id and text Id separated by slash, e.g. WUD17/E97/83448. The response may include some legacy fields or properties.

Available in: lite and full version

Method: GET

Service URL: root/corpus/{textSigle}

Parameters

Header Parameter (Optional)

Name Required Authentication scheme Value
Authorization no HTTP authentication with scheme: Bearer OAuth2 access token

Path Parameters

Name Required Description Type Example
textSigle yes The identifier of an article consisting of corpus Id, document Id and text Id separated by slash String WUD17/E97/83448

Query Parameters

Name Required Description Type Example
fields no Metadata fields to retrieve. Multiple fields are separated by comma. All fields are retrieved by default. String textTypeArt, title

Examples

Request

http://localhost:8089/api/v1.0/corpus/WUD17/E97/83448

Request with cURL

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MT' 
     'http://localhost:8089/api/v1.0/corpus/WUD17/E97/83448'
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MT' 
     'http://localhost:8089/api/v1.0/corpus/WUD17/E97/83448?fields=textSigle,textTypeArt,title'

Output example:

{
  "messages": [
    [
      "Response format is temporary"
    ]
  ],
  "@context": "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
  "meta": {},
  "document": {
    "@type": "koral:document",
    "fields": [
      {
        "@type": "koral:field",
        "key": "textSigle",
        "type": "type:string",
        "value": "WUD17/E97/83448"
      },
      {
        "@type": "koral:field",
        "key": "textTypeArt",
        "type": "type:string",
        "value": "Benutzerdiskussion"
      },
      {
        "@type": "koral:field",
        "key": "title",
        "type": "type:text",
        "value": "Benutzer Diskussion:Escadrille 3S/Schmierblatt/Seewerk 03 Stand vor Verschiebung"
      }
    ]
  }
}
Clone this wiki locally