... | ... | @@ -15,7 +15,10 @@ multiple taxonomy terms. |
|
|
```
|
|
|
|
|
|
Each entity comes with a set of fields. The list of available fields for each entity can be found in the corresponding subpackages (see subdirectories). All entities have a common field UUID which uniquely identifies an entity instance.
|
|
|
Endpoints
|
|
|
|
|
|
# Endpoints
|
|
|
|
|
|
This documentation follows json only, it is possible to change to other formats including xml by altering the extension.
|
|
|
|
|
|
The rest API provides endpoints for each of those entities:
|
|
|
|
... | ... | @@ -71,6 +74,45 @@ Apart from facets and filters, the search API supports the following other param |
|
|
* limit: return at most n results, see Limit() below.
|
|
|
* sort: sorts the results by the specified field in the given order (asc or desc), see Sort() below.
|
|
|
|
|
|
# Result format
|
|
|
|
|
|
```
|
|
|
https://radar.squat.net/api/1.2/search/events.json?fields=title&limit=2
|
|
|
```
|
|
|
|
|
|
Will return a `result` a `count` and a `facets` list.
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"result": {
|
|
|
"351420": {"title": "Migrant Sc\u00e8ne, Festival de la Cimade du 15 novembre au 08 d\u00e9cembre"},
|
|
|
"351506": {"title": "Begehbarer tik-Adventskalender"}
|
|
|
},
|
|
|
"count": 7049,
|
|
|
"facets": {
|
|
|
"field_offline:field_address:postal_code": [{"filter": "13001", "count": 583, "formatted": "13001",....
|
|
|
}],
|
|
|
"city": [{"filter": "Marseille", "count": 906, "formatted": "Marseille"....
|
|
|
}],
|
|
|
"country": [{"filter": "FR", "count": 2238, "formatted": "FR"....
|
|
|
}],
|
|
|
"date": [{"filter": "1576778400", "count": 27, "formatted": "1576778400"...9437600"....
|
|
|
}],
|
|
|
"callout": [{"filter": "national-callout", "count": 2, "formatted": "1391"
|
|
|
}],
|
|
|
"price": [{"filter": "free-121", "count": 957, "formatted": "free"....
|
|
|
}],
|
|
|
"tag": [{"filter": "sans-papiers", "count": 946, "formatted": "sans papiers"....
|
|
|
}],
|
|
|
"group": [{"filter": "1599", "count": 747, "formatted": "Stressfaktor"...
|
|
|
}],
|
|
|
"category": [{"filter": "book-shop-info-shop-library", "count": 2234, "formatted": "book
|
|
|
shop/info shop/library"...
|
|
|
}]
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
# Field references
|
|
|
|
|
|
When searching for an entity, the result may contain a field which is a reference to another entity. Normally, one would have to do another API call to fetch this referenced entity. The radar api, however, allows us to specify fields which should be resolved automatically.
|
... | ... | |