UIT The arctic university of Norway > Giellatekno
 

REST End Points

REST API

REST points are called in file at $GTHOME/apps/risten2/frontend/assets/js/components/satni/satni.rest.js

Dictionaries

http://gtweb.uit.no:8080/exist/restxq/satni/dictionaries returns list of dictionaries and terminilogies in satni database. It also returns localized names for diciotnaries and terminologies in north sami, julev sami, south sami, swedish and norwegian. Below is the response given today:

[
  {
    "id": "smanob",
    "name": [
      {
        "xml:lang": "no",
        "#text": "Sørsamisk-norsk ordbok"
      },
      {
        "xml:lang": "se",
        "#text": "Máttasámi-dáru sátnegirji"
      },
      {
        "xml:lang": "sma",
        "#text": "Åarjelsaemien-daaaroen baakoegærja"
      },
      {
        "xml:lang": "smj",
        "#text": "Oarjjelsáme-dárro báhkogirjje"
      },
      {
        "xml:lang": "sv",
        "#text": "Sydsamisk-norsk ordbok"
      }
    ]
  },
  {
    "id": "nobsma",
    "name": [
      {
        "xml:lang": "no",
        "#text": "Norsk-sørsamisk ordbok"
      },
      {
        "xml:lang": "se",
        "#text": "Dáru-máttasámi sátnegirji"
      },
      {
        "xml:lang": "sma",
        "#text": "Daaroen-åarjelsaemien baakoegærja"
      },
      {
        "xml:lang": "smj",
        "#text": "Dárro-oarjjelsáme báhkogirjje"
      },
      {
        "xml:lang": "sv",
        "#text": "Norsk-sydsamisk ordbok"
      }
    ]
  },
  {
    "id": "nobsme",
    "name": [
      {
        "xml:lang": "no",
        "#text": "Norsk-nordsamisk ordbok"
      },
      {
        "xml:lang": "se",
        "#text": "Dáru-davvisámi sátnegirji"
      },
      {
        "xml:lang": "sma",
        "#text": "Daaroen-Noerhtesaemien baakoegærja"
      },
      {
        "xml:lang": "smj",
        "#text": "Dárro-nuorttasáme báhkogirjje"
      }
    ]
  },
  {
    "id": "smenob",
    "name": [
      {
        "xml:lang": "no",
        "#text": "Nordsamisk-norsk ordbok"
      },
      {
        "xml:lang": "se",
        "#text": "Davvisámi-dáru sátnegirji"
      },
      {
        "xml:lang": "sv",
        "#text": "Nordsamisk-norsk ordbok"
      },
      {
        "xml:lang": "sma",
        "#text": "Noerhtesaemien-daaroen baakoegærja"
      },
      {
        "xml:lang": "smj",
        "#text": "Nuorttasáme-dárro báhkogirjje"
      }
    ]
  },
  {
    "id": "mekanikk-1999",
    "name": [
      {
        "xml:lang": "no",
        "#text": "Mekanikktermer, 1999"
      },
      {
        "xml:lang": "sv",
        "#text": "Mekaniktermar, 1999"
      },
      {
        "xml:lang": "se",
        "#text": "Mekanihkartearpmat, 1999"
      },
      {
        "xml:lang": "smj",
        "#text": "Mekanihkaterma, 1999"
      },
      {
        "xml:lang": "sma",
        "#text": "Mekanihken teermh, 1999"
      },
      {
        "xml:lang": "en",
        "#text": "Mechanical terms, 1999"
      },
      {
        "xml:lang": "fi",
        "#text": "Mekaniikkatermit, 1999"
      }
    ]
  },
  {
    "id": "termwiki",
    "name": [
      {
        "xml:lang": "no",
        "#text": "Termwiki"
      },
      {
        "xml:lang": "se",
        "#text": "Tearbmawiki"
      },
      {
        "xml:lang": "sma",
        "#text": "Termwiki"
      },
      {
        "xml:lang": "smj",
        "#text": "Termwiki"
      }
    ]
  },
  {
    "id": "SD-terms",
    "name": [
      {
        "xml:lang": "en",
        "#text": "The Sámi Parliament's term collection"
      },
      {
        "xml:lang": "no",
        "#text": "Sametingets termsamling"
      },
      {
        "xml:lang": "se",
        "#text": "Sámedikki tearbmačoakkáldat"
      },
      {
        "xml:lang": "sma",
        "#text": "Saemiedigkien teermelæstoe"
      },
      {
        "xml:lang": "smj",
        "#text": "Sámedikke tærmmatjoakkáldahka"
      },
      {
        "xml:lang": "sv",
        "#text": "Sametingets termsamling"
      }
    ]
  },
  {
    "id": "JustermTana",
    "name": [
      {
        "xml:lang": "no",
        "#text": "Juridiske termer"
      },
      {
        "xml:lang": "se",
        "#text": "Láhkatearpmat"
      },
      {
        "xml:lang": "sma",
        "#text": "Juridihken teermh"
      },
      {
        "xml:lang": "smj",
        "#text": "Juridihkalasj terma"
      }
    ]
  }
]

Search

http: //gtweb.uit.no: 8080/exist/restxq/satni/search returns search result for queries that are three character long or longer. There are two query parameters for search:

  • query= Query string sent to the database, which compiles a regex "^<query>*"
  • dict= Optional parameter to specify which dictionary or terminiology to query. If no dictionary is specified, all dictionaries are queried.
[
  {
    "term": "munakoiso",
    "dict": "termwiki"
  },
  {
    "term": "munakoiso",
    "dict": "termwiki"
  },
  {
    "term": "munakreemi",
    "dict": "termwiki"
  },
  {
    "term": "munakuppi",
    "dict": "termwiki"
  },
  {
    "term": "munankeitin",
    "dict": "termwiki"
  },
  {
    "term": "munankeltuainen",
    "dict": "termwiki"
  },
  {
    "term": "munanleikkuri",
    "dict": "termwiki"
  },
  {
    "term": "munanvalkuainen",
    "dict": "termwiki"
  },
  {
    "term": "munasarja",
    "dict": "termwiki"
  },
  {
    "term": "munasjohdin",
    "dict": "termwiki"
  }
]
[
  {
    "term": "Cinda",
    "dict": "smenob"
  },
  {
    "term": "Cindy",
    "dict": "smenob"
  },
  {
    "term": "cinná",
    "dict": "smenob"
  }
]
{ { "term" : "Cinclus cinclus", "dict" : "termwiki" } }
{ { "term" : "Cinclus cinclus", "dict" : "SD-terms" } }
[
  {
    "term": "Helena",
    "dict": "smenob"
  },
  {
    "term": "Helene",
    "dict": "smenob"
  },
  {
    "term": "Helfrid",
    "dict": "smenob"
  }
  ...
]

Article search

http: //gtweb.uit.no: 8080/exist/restxq/satni/article/<article> returns article or articles.

[
  {
    "term": "munanleikkuri",
    "dict": "SD-terms",
    "tg": [
      {
        "xml:lang": "sme",
        "t": [
          "monnečuohpan",
          "mannečuohpan"
        ]
      },
      {
        "xml:lang": "nor",
        "t": "eggedeler"
      },
      {
        "xml:lang": "fin",
        "t": "munanleikkuri"
      },
      {
        "xml:lang": "swe",
        "t": "äggskärare"
      }
    ]
  },
  {
    "term": "munanleikkuri",
    "dict": "termwiki",
    "tg": [
      {
        "xml:lang": "fi",
        "t": {
          "pos": "N",
          "#text": "munanleikkuri"
        }
      },
      {
        "xml:lang": "sv",
        "t": {
          "pos": "N",
          "#text": "äggskärare"
        }
      }
    ]
  }
]
{ {
  "term": "kietâ",
  "dict": "termwiki",
  "tg": [
    {
      "xml:lang": "sma",
      "t": {
        "pos": "N",
        "#text": "gïete"
      }
    },
    {
      "xml:lang": "se",
      "t": {
        "pos": "N",
        "#text": "giehta"
      }
    },
    {
      "xml:lang": "smn",
      "t": {
        "pos": "N",
        "#text": "kietâ"
      }
    },
    {
      "xml:lang": "nb",
      "t": {
        "pos": "N",
        "#text": "hand"
      }
    },
    {
      "xml:lang": "fi",
      "t": "käsi"
    }
  ]
} }

Dictionary metadata

Fourth REST point returns metadata information about a dictionary or terminology. Difference is that this REST address returns an XML fragment.

<dictionary>
    <meta id="termwiki" name="Termwiki">
        <license>Uspesifisert</license>
        <copyright>Sametinget, Giellagáldu, UiT Norgga árktalaš universitehta</copyright>
        <description xml:lang="no">
            <p>Innholdet i Termwikien er basert på Sametingets termsamling. Sametingets
    termsamling ble overført til Termwikien høsten 2013, og det har blitt lagt
    inn noe ny terminologi etter det. Sátni.org vil regelmessig bli oppdatert
    med det nyeste innholdet på Termwikien.</p>
        </description>
        <langs>
            <lang>sma</lang>
            <lang>sme</lang>
            <lang>smj</lang>
            <lang>smn</lang>
            <lang>sms</lang>
            <lang>nor</lang>
            <lang>swe</lang>
            <lang>fin</lang>
            <lang>eng</lang>
            <lang>lat</lang>
        </langs>
    </meta>
</dictionary>