Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed May 29, 2019
1 parent 069e1b2 commit 7f353cf
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 189 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ Semaphore tracks the master branch and deploys succesful builds to a public [doc

## Architecture

The [front-end](/front) is a typescript react application that uses [reactiveserach](https://github.com/appbaseio/reactivesearch) for elasticsearch and [link-redux] for linked data (RDF) rendering.
The [front-end](/front) is a typescript react application that uses [reactiveserach](https://github.com/appbaseio/reactivesearch) for elasticsearch and [link-redux](https://github.com/fletcher91/link-redux) for linked data (RDF) rendering.

The [server](/server) is a node express application that serves as both a static file server and a proxy that forward elasticsearch queries to the elastic endpoint of open raadsinformatie.

## Using the ORI API

Check out the `example_requests.http` file for API usage.

## Credits

- [VNG Realisatie](https://vngrealisatie.nl) for funding.
Expand Down
188 changes: 0 additions & 188 deletions elastic.http

This file was deleted.

142 changes: 142 additions & 0 deletions example_requests.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
### ORI API Get Resource as N-Quads

GET https://id.openraadsinformatie.nl/44477 HTTP/1.1
content-type: application/n-quads

### ORI API Get Resource as Turtle

GET https://id.openraadsinformatie.nl/44477 HTTP/1.1
content-type: text/turtle

### Elastic simple request

POST https://api.openraadsinformatie.nl/v1/elastic/ori_*/_search? HTTP/1.1
content-type: application/json

{
"query": {
"simple_query_string": {
"fields": ["text", "title", "description", "name"],
"default_operator": "or",
"query": "zoek"
}
},
"size": 10,
"_source": {
"includes": [
"*"
],
"excludes": []
},
"from": 0,
"sort": [
{
"_score": {
"order": "desc"
}
}
]
}

### ES - Filter Municipality using terms

GET http://ori.argu.co/api/ori_*/_search? HTTP/1.1
content-type: application/json

{
"query": {
"bool": {
"must": [
[
{
"simple_query_string": {
"fields": [
"text",
"title",
"description",
"name"
],
"default_operator": "or",
"query": "zoeken"
}
}
],
{
"terms": {
"_index": [
"ori_alkmaar_20190507105200"
]
}
}
]
}
},
"size": 10
}

### ES - single Municipality using index with wildcard in URL

GET http://ori.argu.co/api/ori_alkmaar_*/_search? HTTP/1.1
content-type: application/json

{
"query": {
"simple_query_string": {
"fields": ["text", "title", "description", "name"],
"default_operator": "or",
"query": "zoek"
}
},
"size": 10
}

### ES - filter by date

POST https://api.openraadsinformatie.nl/v1/elastic/ori_*/_search? HTTP/1.1
content-type: application/json

{
"query": {
"bool": {
"must": [
[
{
"simple_query_string": {
"fields": [
"text",
"title",
"description",
"name"
],
"default_operator": "or",
"query": "zoek"
}
}
],
{
"range": {
"date_modified": {
"gte": "2019-01-01",
"lte": "2019-05-24"
}
}
}
]
}
},
"size": 10,
"_source": {
"includes": [
"*"
],
"excludes": []
},
"from": 0,
"sort": [
{
"_score": {
"order": "desc"
}
}
]
}

0 comments on commit 7f353cf

Please sign in to comment.