All URIs are relative to https://ecotaxa.obs-vlfr.fr/api
Method | HTTP request | Description |
---|---|---|
collection_by_short_title | GET /collections/by_short_title | Collection By Short Title |
collection_by_title | GET /collections/by_title | Collection By Title |
create_collection | POST /collections/create | Create Collection |
darwin_core_format_export | POST /collections/export/darwin_core | Darwin Core Format Export |
erase_collection | DELETE /collections/{collection_id} | Erase Collection |
get_collection | GET /collections/{collection_id} | Get Collection |
get_collection_taxonomy_recast | GET /collections/{collection_id}/taxo_recast | Read Collection Taxo Recast |
search_collections | GET /collections/search | Search Collections |
update_collection | PUT /collections/{collection_id} | Update Collection |
update_collection_taxonomy_recast | PUT /collections/{collection_id}/taxo_recast | Update Collection Taxo Recast |
CollectionModel collection_by_short_title(q)
Collection By Short Title
Return the single collection with this short title. For published datasets.
import ecotaxa_py_client
from ecotaxa_py_client.models.collection_model import CollectionModel
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.CollectionsApi(api_client)
q = 'My coll' # str | Search by **exact** short title.
try:
# Collection By Short Title
api_response = api_instance.collection_by_short_title(q)
print("The response of CollectionsApi->collection_by_short_title:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->collection_by_short_title: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
q | str | Search by exact short title. |
No authorization required
- 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]
CollectionModel collection_by_title(q)
Collection By Title
Return the single collection with this title. For published datasets.
import ecotaxa_py_client
from ecotaxa_py_client.models.collection_model import CollectionModel
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.CollectionsApi(api_client)
q = 'My collection' # str | Search by **exact** title.
try:
# Collection By Title
api_response = api_instance.collection_by_title(q)
print("The response of CollectionsApi->collection_by_title:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->collection_by_title: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
q | str | Search by exact title. |
No authorization required
- 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]
int create_collection(create_collection_req)
Create Collection
Create a collection with at least one project inside. Returns the created collection Id. Note: 'manage' right is required on all underlying projects.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.create_collection_req import CreateCollectionReq
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.CollectionsApi(api_client)
create_collection_req = ecotaxa_py_client.CreateCollectionReq() # CreateCollectionReq |
try:
# Create Collection
api_response = api_instance.create_collection(create_collection_req)
print("The response of CollectionsApi->create_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->create_collection: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_collection_req | CreateCollectionReq |
int
- Content-Type: application/json
- 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]
ExportRsp darwin_core_format_export(darwin_core_export_req)
Darwin Core Format Export
Export the collection in Darwin Core format, e.g. for EMODnet portal, @see https://www.emodnet-ingestion.eu Produces a DwC-A (https://dwc.tdwg.org/) archive into a temporary directory, ready for download. Maybe useful, a reader in Python: https://python-dwca-reader.readthedocs.io/en/latest/index.html Note: Only manageable collections can be exported.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.darwin_core_export_req import DarwinCoreExportReq
from ecotaxa_py_client.models.export_rsp import ExportRsp
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.CollectionsApi(api_client)
darwin_core_export_req = ecotaxa_py_client.DarwinCoreExportReq() # DarwinCoreExportReq |
try:
# Darwin Core Format Export
api_response = api_instance.darwin_core_format_export(darwin_core_export_req)
print("The response of CollectionsApi->darwin_core_format_export:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->darwin_core_format_export: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
darwin_core_export_req | DarwinCoreExportReq |
- Content-Type: application/json
- 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]
int erase_collection(collection_id)
Erase Collection
Delete the collection, i.e. the precious fields, as the projects are just linked-at from the collection. Note: Only manageable collections can be deleted.
- 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.CollectionsApi(api_client)
collection_id = 1 # int | Internal, the unique numeric id of this collection.
try:
# Erase Collection
api_response = api_instance.erase_collection(collection_id)
print("The response of CollectionsApi->erase_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->erase_collection: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
collection_id | int | Internal, the unique numeric id of this collection. |
int
- 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]
CollectionModel get_collection(collection_id)
Get Collection
Returns information about the collection corresponding to the given id. Note: The collection is returned only if manageable.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.collection_model import CollectionModel
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.CollectionsApi(api_client)
collection_id = 1 # int | Internal, the unique numeric id of this collection.
try:
# Get Collection
api_response = api_instance.get_collection(collection_id)
print("The response of CollectionsApi->get_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->get_collection: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
collection_id | int | Internal, the unique numeric id of this collection. |
- 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 get_collection_taxonomy_recast(collection_id)
Read Collection Taxo Recast
Read the collection taxonomy recast. Returns NULL upon success. Note: The collection data is returned only if manageable.
- 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.CollectionsApi(api_client)
collection_id = 1 # int | Internal, the unique numeric id of this collection.
try:
# Read Collection Taxo Recast
api_response = api_instance.get_collection_taxonomy_recast(collection_id)
print("The response of CollectionsApi->get_collection_taxonomy_recast:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->get_collection_taxonomy_recast: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
collection_id | int | Internal, the unique numeric id of this collection. |
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[CollectionModel] search_collections(title)
Search Collections
Search for collections. Note: Only manageable collections are returned.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.collection_model import CollectionModel
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.CollectionsApi(api_client)
title = '%coll%' # str | Search by title, use % for searching with 'any char'.
try:
# Search Collections
api_response = api_instance.search_collections(title)
print("The response of CollectionsApi->search_collections:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->search_collections: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
title | str | Search by title, use % for searching with 'any 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]
object update_collection(collection_id, collection_model)
Update Collection
Update the collection. Note that some updates are silently failing when not compatible with the composing projects. Returns NULL upon success. Note: The collection is updated only if manageable.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.collection_model import CollectionModel
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.CollectionsApi(api_client)
collection_id = 1 # int | Internal, the unique numeric id of this collection.
collection_model = ecotaxa_py_client.CollectionModel() # CollectionModel |
try:
# Update Collection
api_response = api_instance.update_collection(collection_id, collection_model)
print("The response of CollectionsApi->update_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->update_collection: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
collection_id | int | Internal, the unique numeric id of this collection. | |
collection_model | CollectionModel |
object
- Content-Type: application/json
- 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 update_collection_taxonomy_recast(collection_id, taxonomy_recast)
Update Collection Taxo Recast
Create or Update the collection taxonomy recast. Returns NULL upon success. Note: The collection is updated only if manageable.
- OAuth Authentication (BearerOrCookieAuth):
import ecotaxa_py_client
from ecotaxa_py_client.models.taxonomy_recast import TaxonomyRecast
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.CollectionsApi(api_client)
collection_id = 1 # int | Internal, the unique numeric id of this collection.
taxonomy_recast = ecotaxa_py_client.TaxonomyRecast() # TaxonomyRecast |
try:
# Update Collection Taxo Recast
api_response = api_instance.update_collection_taxonomy_recast(collection_id, taxonomy_recast)
print("The response of CollectionsApi->update_collection_taxonomy_recast:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->update_collection_taxonomy_recast: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
collection_id | int | Internal, the unique numeric id of this collection. | |
taxonomy_recast | TaxonomyRecast |
object
- Content-Type: application/json
- 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]