Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abbe98/ksamsok-rest
REST API for K-samsök
https://github.com/abbe98/ksamsok-rest
k-samsok raa-collection soch
Last synced: 3 days ago
JSON representation
REST API for K-samsök
- Host: GitHub
- URL: https://github.com/abbe98/ksamsok-rest
- Owner: Abbe98
- License: mit
- Created: 2017-09-07T12:00:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T16:36:02.000Z (almost 6 years ago)
- Last Synced: 2024-12-12T20:46:21.367Z (10 days ago)
- Topics: k-samsok, raa-collection, soch
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# K-samsök REST
K-samsök REST is an JSON REST API built as a proxy for the K-samsök (Swedish Open Cultural Heritage) API.
## API Documentation
There is a public instance of this API at `https://tools.wmflabs.org/ksamsok-rest`. From version 1.1.0 K-Samsök REST instances provides a `X-Powered-By` header.
### Records
Retrieve a single record from K-Samsök. An ID is usually formated as `/dataset/id`. If you want the full record as JSON-LD or as XML RDF use one of the following Accept headers: `application/json+ld`, `application/rdf+xml`.
```
/records/
```Retrieve all relations for a given record.
```
/records//relations
```Search records by text.
```
/records?action=search&text=
```There is three optional parameters available for the search action. `start` and `hits` for pagination. `image` can be set to true to only include records with images.
Search by text limited to records with images while skiping the first five results and limit the number of responses to ten:
```
/records?action=search&text=&image=true&hits=10&start=5
```Search by bounding box:
```
/records?action=bbox&west=&south=&east=&north=
```Note that the API can handle both SWEREF 99 and WGS84. `start` and `hits` are available for bounding searches too.
Query K-samsök with CQL:
```
/records?action=cql&query=
```### Search Hints
Returns a list of five search hints for the given string. Commonly used for auto complete features.
```
/hints/
```## Setup
```bash
git clone https://github.com/Abbe98/ksamsok-rest.git
cd ksamsok-rest
pipenv install
pipenv run python3 src/app.py
```