langtech:swissdox:api
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| langtech:swissdox:api [2023/03/22 15:58] – created johannes.graen.uzh.ch | langtech:swissdox:api [2023/04/13 16:08] (current) – Klaus Rothenhäusler | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| The query is defined using a YAML format. Optional arguments are query name, comment, expiration date and a flag to specifiy whether the query should be run or not (for syntax checking). Below you find a simple example in Python for submitting a query using the API. | The query is defined using a YAML format. Optional arguments are query name, comment, expiration date and a flag to specifiy whether the query should be run or not (for syntax checking). Below you find a simple example in Python for submitting a query using the API. | ||
| - | <code python> | + | <code python |
| import requests | import requests | ||
| Line 31: | Line 31: | ||
| dates: | dates: | ||
| - from: 2022-12-01 | - from: 2022-12-01 | ||
| - | | + | |
| languages: | languages: | ||
| - de | - de | ||
| Line 84: | Line 84: | ||
| It is possible to check the status of all submitted queries, as well as status of a certain query with a specific id. The following example shows how to list all submitted queries with their respective statuses: | It is possible to check the status of all submitted queries, as well as status of a certain query with a specific id. The following example shows how to list all submitted queries with their respective statuses: | ||
| - | <code python> | + | <code python |
| import requests | import requests | ||
| Line 106: | Line 106: | ||
| When you were checking status of your query (like shown in the example above), you also got a download URL in a response, for those queries which are completed. By using this URL in an API request you are able to download your dataset: | When you were checking status of your query (like shown in the example above), you also got a download URL in a response, for those queries which are completed. By using this URL in an API request you are able to download your dataset: | ||
| - | <code python> | + | <code python |
| import requests | import requests | ||
langtech/swissdox/api.1679500708.txt.gz · Last modified: by johannes.graen.uzh.ch
