Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:manualy:api [2022/12/22 13:40] – [Use] michalkren | en:manualy:api [2022/12/29 19:11] (current) – [API] michalkren | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== API ====== | ====== API ====== | ||
- | It is possible to query selected | + | Selected |
===== Getting your personal access token ===== | ===== Getting your personal access token ===== | ||
Line 18: | Line 18: | ||
<WRAP tip important 60%> | <WRAP tip important 60%> | ||
- | Every application has an API tailored to its needs. | + | Individual API usage manuals: |
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
</ | </ | ||
+ | |||
+ | The APIs can be queried at the following URLs: | ||
+ | * KonText: '' | ||
+ | * Treq: '' | ||
<WRAP round important 60%> | <WRAP round important 60%> | ||
Line 31: | Line 35: | ||
===== Usage examples ===== | ===== Usage examples ===== | ||
- | ==== curl ==== | + | ==== 1) curl and Treq API ==== |
- | + | ||
- | Querying Treq | + | |
<code bash> | <code bash> | ||
Line 44: | Line 46: | ||
</ | </ | ||
- | ==== Python | + | ==== 2) Python |
- | + | ||
- | Querying KonText | + | |
<code python> | <code python> | ||
Line 103: | Line 103: | ||
" | " | ||
} | } | ||
- | r = s.post(' | + | r = s.post(' |
response_json = r.json() | response_json = r.json() | ||
print(response_json) | print(response_json) | ||
Line 109: | Line 109: | ||
# Displaying a concordance | # Displaying a concordance | ||
conc_persistence_op_id = response_json[' | conc_persistence_op_id = response_json[' | ||
- | r = s.get(' | + | r = s.get(' |
print(r.json()) | print(r.json()) | ||