All URIs are relative to https://ecotaxa.obs-vlfr.fr/api
Method | HTTP request | Description |
---|---|---|
add_taxon_in_central | PUT /taxon/central | Add Taxon In Central |
get_taxon_in_central | GET /taxon/central/{taxon_id} | Get Taxon In Central |
pull_taxa_update_from_central | GET /taxa/pull_from_central | Pull Taxa Update From Central |
push_taxa_stats_in_central | GET /taxa/stats/push_to_central | Push Taxa Stats In Central |
query_root_taxa | GET /taxa | Query Root Taxa |
query_taxa | GET /taxon/{taxon_id} | Query Taxa |
query_taxa_set | GET /taxon_set/query | Query Taxa Set |
query_taxa_usage | GET /taxon/{taxon_id}/usage | Query Taxa Usage |
reclassif_project_stats | GET /taxa/reclassification_history/{project_id} | Reclassif Project Stats |
reclassif_stats | GET /taxa/reclassification_stats | Reclassif Stats |
search_taxa | GET /taxon_set/search | Search Taxa |
taxa_tree_status | GET /taxa/status | Taxa Tree Status |
object add_taxon_in_central(name, parent_id, taxotype, creator_email, source_desc=source_desc, source_url=source_url)
Add Taxon In Central
Create a taxon on EcoTaxoServer. 🔒 Logged user must be manager (on any project) or application admin.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
name = 'Echinodermata' # str | The taxon/category verbatim name.
parent_id = 2367 # int | It's not possible to create a root taxon.
taxotype = 'P' # str | The taxon type, 'M' for Morpho or 'P' for Phylo.
creator_email = '[email protected]' # str | The email of the taxo creator.
source_desc = 'null' # str | The source description. (optional)
source_url = 'http://www.google.fr/' # str | The source url. (optional)
try:
# Add Taxon In Central
api_response = api_instance.add_taxon_in_central(name, parent_id, taxotype, creator_email, source_desc=source_desc, source_url=source_url)
print("The response of TaxonomyTreeApi->add_taxon_in_central:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->add_taxon_in_central: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The taxon/category verbatim name. | |
parent_id | int | It's not possible to create a root taxon. | |
taxotype | str | The taxon type, 'M' for Morpho or 'P' for Phylo. | |
creator_email | str | The email of the taxo creator. | |
source_desc | str | The source description. | [optional] |
source_url | str | The source url. | [optional] |
object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[TaxonCentral] get_taxon_in_central(taxon_id)
Get Taxon In Central
Return EcoTaxoServer full record for this taxon.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxon_central import TaxonCentral
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
taxon_id = 12876 # int | Internal, the unique numeric id of this taxon.
try:
# Get Taxon In Central
api_response = api_instance.get_taxon_in_central(taxon_id)
print("The response of TaxonomyTreeApi->get_taxon_in_central:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->get_taxon_in_central: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
taxon_id | int | Internal, the unique numeric id of this taxon. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object pull_taxa_update_from_central()
Pull Taxa Update From Central
Returns what changed in EcoTaxoServer managed tree and update local tree accordingly. i.e. : the number of inserts as nbr_inserts, updates as nbr_updates and errors as errors.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
try:
# Pull Taxa Update From Central
api_response = api_instance.pull_taxa_update_from_central()
print("The response of TaxonomyTreeApi->pull_taxa_update_from_central:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->pull_taxa_update_from_central: %s\n" % e)
This endpoint does not need any parameter.
object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object push_taxa_stats_in_central()
Push Taxa Stats In Central
Push present instance stats, into EcoTaxoServer.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
try:
# Push Taxa Stats In Central
api_response = api_instance.push_taxa_stats_in_central()
print("The response of TaxonomyTreeApi->push_taxa_stats_in_central:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->push_taxa_stats_in_central: %s\n" % e)
This endpoint does not need any parameter.
object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[TaxonModel] query_root_taxa()
Query Root Taxa
Return all taxa with no parent.
import ecotaxa_py_client
from ecotaxa_py_client.models.taxon_model import TaxonModel
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
try:
# Query Root Taxa
api_response = api_instance.query_root_taxa()
print("The response of TaxonomyTreeApi->query_root_taxa:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->query_root_taxa: %s\n" % e)
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaxonModel query_taxa(taxon_id)
Query Taxa
Returns information about the taxon corresponding to the given id, including its lineage.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxon_model import TaxonModel
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
taxon_id = 12876 # int | Internal, the unique numeric id of this taxon.
try:
# Query Taxa
api_response = api_instance.query_taxa(taxon_id)
print("The response of TaxonomyTreeApi->query_taxa:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->query_taxa: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
taxon_id | int | Internal, the unique numeric id of this taxon. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[TaxonModel] query_taxa_set(ids)
Query Taxa Set
Returns information about several taxa, including their lineage.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxon_model import TaxonModel
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
ids = '1:2:3' # str | The separator between numbers is arbitrary non-digit, e.g. ':', '|' or ','.
try:
# Query Taxa Set
api_response = api_instance.query_taxa_set(ids)
print("The response of TaxonomyTreeApi->query_taxa_set:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->query_taxa_set: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
ids | str | The separator between numbers is arbitrary non-digit, e.g. ':', ' | ' or ','. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[TaxonUsageModel] query_taxa_usage(taxon_id)
Query Taxa Usage
Where a given taxon is used. Only validated uses are returned.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxon_usage_model import TaxonUsageModel
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
taxon_id = 12876 # int | Internal, the unique numeric id of this taxon.
try:
# Query Taxa Usage
api_response = api_instance.query_taxa_usage(taxon_id)
print("The response of TaxonomyTreeApi->query_taxa_usage:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->query_taxa_usage: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
taxon_id | int | Internal, the unique numeric id of this taxon. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[object] reclassif_project_stats(project_id)
Reclassif Project Stats
Dig into reclassification logs and return the associations (source → target) for previous reclassifications.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
project_id = 1 # int | Internal, numeric id of the project.
try:
# Reclassif Project Stats
api_response = api_instance.reclassif_project_stats(project_id)
print("The response of TaxonomyTreeApi->reclassif_project_stats:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->reclassif_project_stats: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | int | Internal, numeric id of the project. |
List[object]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[TaxonModel] reclassif_stats(taxa_ids)
Reclassif Stats
Dig into reclassification logs and, for each input category id, determine the most chosen target category, excluding the advised one. By convention, if nothing relevant is found, the input category itself is returned. So one can expect that the returned list has the same size as the required one.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxon_model import TaxonModel
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
taxa_ids = '12876' # str | String containing the list of one or more taxa id separated by non-num char.
try:
# Reclassif Stats
api_response = api_instance.reclassif_stats(taxa_ids)
print("The response of TaxonomyTreeApi->reclassif_stats:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->reclassif_stats: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
taxa_ids | str | String containing the list of one or more taxa id separated by non-num char. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[TaxaSearchRsp] search_taxa(query, project_id=project_id)
Search Taxa
Search for taxa by name. Queries can be 'small', i.e. of length ﹤3 and even zero-length. 🔓 For a public, unauthenticated call : - zero-length and small queries always return nothing. - otherwise, a full search is done and results are returned in alphabetical order. 🔒 For an authenticated call : - zero-length queries: return the MRU list in full. - small queries: the MRU list is searched, so that taxa in the recent list are returned, if matching. - otherwise, a full search is done. Results are ordered so that taxa in the project list are in first, and are signalled as such in the response.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxa_search_rsp import TaxaSearchRsp
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
query = 'Ban' # str | Use this query for matching returned taxa names.
project_id = 1 # int | Internal, numeric id of the project. (optional)
try:
# Search Taxa
api_response = api_instance.search_taxa(query, project_id=project_id)
print("The response of TaxonomyTreeApi->search_taxa:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->search_taxa: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query | str | Use this query for matching returned taxa names. | |
project_id | int | Internal, numeric id of the project. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaxonomyTreeStatus taxa_tree_status()
Taxa Tree Status
Return the status of taxonomy tree w/r to freshness.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxonomy_tree_status import TaxonomyTreeStatus
from ecotaxa_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ecotaxa.obs-vlfr.fr/api
# See configuration.py for a list of all supported configuration parameters.
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.TaxonomyTreeApi(api_client)
try:
# Taxa Tree Status
api_response = api_instance.taxa_tree_status()
print("The response of TaxonomyTreeApi->taxa_tree_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TaxonomyTreeApi->taxa_tree_status: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]