dict
REST API of the SYSNET managed dictionaries (code lists) system. Primarily designed for the CITES Registry.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import dict
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import dict
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import dict
from dict.rest import ApiException
from pprint import pprint
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example'
key = 'key_example'
active = True
try:
api_response = api_instance.activate_descriptor(dictionary, key, active)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->activate_descriptor: %s\n" % e)
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example'
body = dict.Descriptor()
try:
api_instance.add_descriptor(dictionary, body=body)
except ApiException as e:
print("Exception when calling AdminsApi->add_descriptor: %s\n" % e)
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example'
key = 'key_example'
try:
api_response = api_instance.delete_descriptor(dictionary, key)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->delete_descriptor: %s\n" % e)
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
try:
api_response = api_instance.export_all()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->export_all: %s\n" % e)
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example'
try:
api_response = api_instance.export_dictionary(dictionary)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->export_dictionary: %s\n" % e)
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
body = [dict.Descriptor()]
replace = True
try:
api_response = api_instance.import_descriptors(body=body, replace=replace)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->import_descriptors: %s\n" % e)
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example'
body = [dict.Descriptor()]
replace = True
try:
api_response = api_instance.import_dictionary(dictionary, body=body, replace=replace)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->import_dictionary: %s\n" % e)
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example'
key = 'key_example'
body = dict.Descriptor()
try:
api_response = api_instance.put_descriptor(dictionary, key, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->put_descriptor: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://virtserver.swaggerhub.com/SYSNET/dictionary/1.0.0
Documentation For Models
Documentation For Authorization
apiKey
- Type: API key
- API key parameter name: X-API-KEY
- Location: HTTP header
Author
info@sysnet.cz