API parameters 0.4¶
Format |
string, multiple |
---|---|
Description |
CIDOC CRM class code (e.g. E21) |
Values |
E5, E7, E8, E9, E12, E18, E20, E21, E22, E31, E32, E33, E41, E53, E54, E55, E65, E74 |
Format |
string |
---|---|
Description |
Results will be sorted by the given column |
Values |
ID
classCode
name
description
created
modified
systemClass
beginFrom
beginTo
endFrom
endTo
|
Format |
boolean |
---|---|
Description |
Returns the total count of results as integer |
Values |
True/False |
Format |
boolean |
---|---|
Description |
Triggers file download of the requested data in a file |
Values |
True/False |
Format |
integer, multiple |
---|---|
Description |
Specific entity ID |
Values |
e.g. 89 |
Format |
string |
---|---|
Description |
Results will be downloaded in the given format |
Values |
csv
csvNetwork
|
Format |
integer |
---|---|
Description |
ID of a file. This parameter can be used multiple times to query more IDs. |
Values |
e.g. 89 |
Format |
integer |
---|---|
Description |
List of results starting with given ID |
Values |
e.g. 89 |
Format |
string |
---|---|
Description |
Select a preferred output format |
Values |
lp
loud
geojson
geojson-v2
pretty-xml
n3
turtle
nt
xml (subunits endpoint can only handle xml)
|
Format |
string |
---|---|
Description |
Select a preferred geometry |
Values |
gisAll
gisPointAll
gisPointSupers
gisPointSubs
gisPointSibling
gisLineAll
gisPolygonAll
|
Format |
integer |
---|---|
Description |
Specific entity ID in OpenAtlas instance |
Values |
e.g. 89 |
Format |
string |
---|---|
Description |
Select the size category for the displayed image (can be modified in production.py) |
Values |
table
thumbnail
|
Format |
string |
---|---|
Description |
Select an output language |
Values |
en
de
|
Format |
integer |
---|---|
Description |
JSON list of results start with entity after given ID |
Values |
e.g. 90 |
Format |
integer |
---|---|
Description |
Number of last database entries to be returned.
Only numbers between 1 and 100 are valid.
|
Values |
1 - 100 |
Format |
integer |
---|---|
Description |
Number of entities returned per page |
Values |
0 corresponds to “no limit set”
Default is set to 20 entities
|
Format |
|
---|---|
Description |
No parameters are required |
Values |
Format |
integer |
---|---|
Description |
Jump to chosen page |
Values |
e.g. 2 |
Format |
string, multiple |
---|---|
Description |
Select which relations are shown |
Values |
E.g. P53 |
Format |
string, multiple |
---|---|
Description |
Search request with complex AND/OR logic |
Values |
The search parameter provides a tool to filter and search the request with logical operators.
- Example
The search parameter takes a JSON as value. A key has to be a filterable category followed by a list/array. This list need to have again JSON values as items. There can be multiple search parameters. E.g:
{domain}/api/{api version}/{endpoint}?search={
"typeID": [{"operator": "equal", "values": [123456]}],
"typeName": [{"operator": "like", "values": ["Chain", "Bracelet", "Amule"], "logicalOperator": "and"}]
}& search = {
"typeName": [{"operator": "equal", "values": ["Gold"]}],
"beginFrom": [{"operator": "lesserThan", "values": ["0850-05-12"],"logicalOperator": "and"}]}
Every JSON in a search parameter field is logical connected with AND. E.g:
?search={A:[{X}, {Y}], B: [M]} => Entities containing A(X and Y) and B(M)
To build an search start with following parameter:
?search={}
Now a categories after which the results are search, has to be selected:
?search={"typeName"}
After the categories are selected, next make a list with possible multiple JSONs (JSONs are connected with OR)
?search={"typeName": [{},{}]}
Next a list of values has to be provided:
?search={"typeName": [{"values": ["Gold", "Silver"]}]}
Then an operators has to be selected, how the values should be treated:
?search={"typeName": [{"operator": "equal", "values": ["Gold", "Silver"]}]}
At last a logical operator can be assigned, if the values will be treated with OR or AND:
?search={"typeName": [{"operator": "equal", "values": ["Gold", "Silver"], "logicalOperator": "and"}]}
Filterable categories¶
|
|
|
|
|
Values¶
Values has to be a list of items. The items can be either a string, an integer or a tuple (see Note). Strings need to be marked with “” or ‘’, while integers doesn’t allow this.
Note: the category valueTypeID can search for values of a type ID. But it takes one or more two valued Tuple as list entry: (x,y). x is the type id and y is the searched value. This can be an int or a float, e.g:
{"operator":"lesserThan","values":[(3142,543.3)],"logicalOperator":"and"}
Compare operators¶
|
|
The compare operators work like the mathematical operators. equal x=y, notEqual x!=y, greaterThan x>y , greaterThanEqual x>=y, lesserThan x<y, lesserThanEqual x<=y. The like operator searches for occurrence of the string, so a match can also occur in the middle of a word.
Logical operators¶
Not mandatory, OR is the default value. Logical operators handles, if the values are treated as OR or AND.
and, or
Format |
string, multiple |
---|---|
Description |
Select a key to be shown. If using “not”, no other keys will be displayed. |
Values |
description
depictions
geometry
links
names
none
relations
types
when
|
Format |
string |
---|---|
Description |
Results will be sorted asc/desc (default column is name) |
Values |
asc
desc
|
Format |
string, multiple |
---|---|
Description |
Needs to be one of the OpenAtlas system classes |
Values |
all
administrative_unit
type
acquisition
activity
actor_actor_relation
actor_function
appellation
artifact
bibliography
edition
external_reference
feature
file
group
human_remains
involvement
move
object_location
person
place
production
reference_system
source
source_translation
stratigraphic_unit
|
Format |
integer, multiple |
---|---|
Description |
Output will be filtered by chosen type ID.
Only entities with this type ID will be displayed.
The relation is in logical OR.
|
Values |
e.g. 90 |
Format |
string, multiple |
---|---|
Description |
Needs to be one of the OpenAtlas menu items |
Values |
actor
all
artifact
event
file
object
place
reference
source
source_translation
type
|