Files
2026-08-30 20:44:00 +02:00
..
2026-08-30 20:44:00 +02:00
2026-08-30 20:44:00 +02:00
2026-08-30 20:44:00 +02:00
2026-08-30 20:44:00 +02:00
2026-08-30 20:44:00 +02:00
2026-08-30 20:44:00 +02:00
2026-08-30 20:44:00 +02:00

elabapi-python

This document describes all available endpoints and methods for eLabFTW's API version 2.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Package version: 5.6.1
  • 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/elabftw/elabapi-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/elabftw/elabapi-python.git)

Then import the package:

import elabapi_python 

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 elabapi_python

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import elabapi_python
from elabapi_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: token
configuration = elabapi_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = elabapi_python.ApiKeysApi(elabapi_python.ApiClient(configuration))
id = 56 # int | ID of the API key

try:
    # Delete an API key.
    api_instance.delete_apikey(id)
except ApiException as e:
    print("Exception when calling ApiKeysApi->delete_apikey: %s\n" % e)

# Configure API key authorization: token
configuration = elabapi_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = elabapi_python.ApiKeysApi(elabapi_python.ApiClient(configuration))

try:
    # Read API keys
    api_response = api_instance.get_apikeys()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApiKeysApi->get_apikeys: %s\n" % e)

# Configure API key authorization: token
configuration = elabapi_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = elabapi_python.ApiKeysApi(elabapi_python.ApiClient(configuration))
body = elabapi_python.ApikeysBody() # ApikeysBody |  (optional)

try:
    # Create an API key
    api_instance.post_apikeys(body=body)
except ApiException as e:
    print("Exception when calling ApiKeysApi->post_apikeys: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://elab.local:3148/api/v2

Class Method HTTP request Description
ApiKeysApi delete_apikey DELETE /apikeys/{id} Delete an API key.
ApiKeysApi get_apikeys GET /apikeys Read API keys
ApiKeysApi post_apikeys POST /apikeys Create an API key
BrandingApi get_instance_branding GET /instance/branding/{id} Read a branding asset as a binary file.
BrandingApi post_instance_branding POST /instance/branding/{id} Update a branding asset.
CommentsApi delete_entity_comment DELETE /{entity_type}/{id}/comments/{subid} Delete an entity comment.
CommentsApi patch_entity_comment PATCH /{entity_type}/{id}/comments/{subid} Modify an entity comment.
CommentsApi post_entity_comments POST /{entity_type}/{id}/comments Create a comment.
CommentsApi read_entity_comment GET /{entity_type}/{id}/comments/{subid} Read a comment of that entity.
CommentsApi read_entity_comments GET /{entity_type}/{id}/comments Read all comments of that entity.
CompoundsApi delete_compound DELETE /compounds/{id} Soft-delete a compound
CompoundsApi get_compound GET /compounds/{id} Get a single compound
CompoundsApi get_compounds GET /compounds Read compounds
CompoundsApi post_compounds POST /compounds Create or import a compound
ConfigApi delete_config DELETE /config Reset the config to default values
ConfigApi get_config GET /config Read the config
ConfigApi patch_config PATCH /config Modify the config
ContainersApi delete_container DELETE /{entity_type}/{id}/containers/{subid} Delete a container.
ContainersApi patch_container PATCH /{entity_type}/{id}/containers/{subid} Modify a container.
ContainersApi post_container POST /{entity_type}/{id}/containers/{subid} Create a container for this entity.
ContainersApi read_container GET /{entity_type}/{id}/containers/{subid} Read a container.
ContainersApi read_containers GET /{entity_type}/{id}/containers Read all containers for this entity.
CustomFieldsKeysApi custom_fields_keys GET /extra_fields_keys Read custom fields keys.
DSpaceApi dspace_create POST /dspace Create a new DSpace workspace item.
DSpaceApi dspace_read GET /dspace Read DSpace information.
DSpaceApi dspace_submit PATCH /dspace Submit an eLabFTW entry to DSpace.
EventsApi delete_event DELETE /event/{id} Delete a booking slot.
EventsApi patch_event PATCH /event/{id} Modify a booking slot.
EventsApi post_events POST /events/{id} Create an event for the item specified as id.
EventsApi read_event GET /event/{id} Read a booking slot.
EventsApi read_events GET /events Read all events in the team.
ExperimentsApi delete_experiment DELETE /experiments/{id} Delete an experiment.
ExperimentsApi get_experiment GET /experiments/{id} Read an experiment
ExperimentsApi patch_experiment PATCH /experiments/{id} Modify an experiment
ExperimentsApi post_experiment POST /experiments Create an experiment
ExperimentsApi post_experiment_by_id POST /experiments/{id} Duplicate an experiment with its ID
ExperimentsApi read_experiments GET /experiments Read all experiments that are accessible
ExperimentsCategoriesApi delete_expcat DELETE /teams/{id}/experiments_categories/{subid} Delete a category.
ExperimentsCategoriesApi patch_expcat PATCH /teams/{id}/experiments_categories/{subid} Modify a category.
ExperimentsCategoriesApi post_team_one_expcat POST /teams/{id}/experiments_categories Create a new category for experiments.
ExperimentsCategoriesApi read_team_experiments_categories GET /teams/{id}/experiments_categories Read experiments categories of a team.
ExperimentsCategoriesApi read_team_one_expcat GET /teams/{id}/experiments_categories/{subid} Read a category.
ExperimentsStatusApi delete_expstatus DELETE /teams/{id}/experiments_status/{subid} Delete a status.
ExperimentsStatusApi patch_expstatus PATCH /teams/{id}/experiments_status/{subid} Modify a status.
ExperimentsStatusApi post_team_one_expstatus POST /teams/{id}/experiments_status Create a new experiments status.
ExperimentsStatusApi read_team_experiments_status GET /teams/{id}/experiments_status Read experiments status of a team.
ExperimentsStatusApi read_team_one_expstatus GET /teams/{id}/experiments_status/{subid} Read a status.
ExperimentsTemplatesApi delete_experiment_template DELETE /experiments_templates/{id} Delete an experiment template.
ExperimentsTemplatesApi get_experiment_template GET /experiments_templates/{id} Read an experiment template
ExperimentsTemplatesApi patch_experiment_template PATCH /experiments_templates/{id} Modify an experiment template
ExperimentsTemplatesApi post_experiment_template POST /experiments_templates Create an experiment template
ExperimentsTemplatesApi post_experiment_template_by_id POST /experiments_templates/{id} Duplicate an experiment template with its ID
ExperimentsTemplatesApi read_experiments_templates GET /experiments_templates Read all experiments_templates that are accessible
ExportsApi delete_export DELETE /exports/{id} Remove an export request and its associated file
ExportsApi post_export POST /exports Register an export request
ExportsApi read_export GET /exports/{id} Get export
ExportsApi readall_exports GET /exports List exports
FavoriteTagsApi delete_favtag DELETE /favtags/{id} Unfavorite a tag.
FavoriteTagsApi post_favtags POST /favtags Add a tag as favorite.
FavoriteTagsApi read_favtags GET /favtags Read all favorite tags for the user.
IdpsApi delete_idp DELETE /idps/{id} Delete an idp.
IdpsApi delete_idp_cert DELETE /idps/{id}/certs/{cert_id} Delete an idp cert.
IdpsApi delete_idp_endpoint DELETE /idps/{id}/endpoints/{endpoint_id} Delete an idp endpoint.
IdpsApi patch_idp PATCH /idps/{id} Actions on an idp.
IdpsApi post_idp POST /idps Create an idp.
IdpsApi post_idp_cert POST /idps/{id}/certs Add a cert to this IdP.
IdpsApi post_idp_endpoint POST /idps/{id}/endpoints Add an endpoint to this IdP.
IdpsApi read_idp GET /idps/{id} Read an idp.
IdpsApi read_idp_cert GET /idps/{id}/certs/{cert_id} Read a cert for an IdP.
IdpsApi read_idp_certs GET /idps/{id}/certs Read all certs for an IdP.
IdpsApi read_idp_endpoint GET /idps/{id}/endpoints/{endpoint_id} Read an endpoint for an IdP.
IdpsApi read_idp_endpoints GET /idps/{id}/endpoints Read all endpoints for an IdP.
IdpsApi read_idps GET /idps Read all IDPs.
IdpsSourcesApi delete_idps_source DELETE /idps_sources/{id} Delete an idp source.
IdpsSourcesApi patch_idps_source PATCH /idps_sources/{id} Patch an idp source.
IdpsSourcesApi post_idp_source POST /idps_sources Create an idp source.
IdpsSourcesApi read_idps_source GET /idps_sources/{id} Read an IdPs source
IdpsSourcesApi read_idps_sources GET /idps_sources Read all IDPs sources
ImportApi post_import POST /import Send a file to import
ImportApi read_import GET /import Get information about this endpoint
InfoApi get_info GET /info Get information about the instance.
InstanceApi post_instance POST /instance Run an instance level action.
ItemsApi delete_item DELETE /items/{id} Delete an item.
ItemsApi get_item GET /items/{id} Read an item
ItemsApi patch_item PATCH /items/{id} Modify an item
ItemsApi post_item POST /items Create an item
ItemsApi post_item_by_id POST /items/{id} Duplicate an item with its ID
ItemsApi read_items GET /items Read all items that are accessible
ItemsTypesResourcesTemplatesApi delete_items_type DELETE /items_types/{id} Delete a resource template.
ItemsTypesResourcesTemplatesApi get_items_type GET /items_types/{id} Read a resource template
ItemsTypesResourcesTemplatesApi patch_items_type PATCH /items_types/{id} Modify a resource template
ItemsTypesResourcesTemplatesApi post_items_types POST /items_types Create a resource template
ItemsTypesResourcesTemplatesApi post_items_types_by_id POST /items_types/{id} Duplicate a resource template with its ID
ItemsTypesResourcesTemplatesApi read_items_types GET /items_types Read all resources templates that are accessible
LinksToCompoundsApi delete_entity_compounds_link DELETE /{entity_type}/{id}/compounds_links/{subid} Delete a compound link.
LinksToCompoundsApi post_entity_compounds_links POST /{entity_type}/{id}/compounds_links/{subid} Link an entity to a compound.
LinksToCompoundsApi read_entity_compounds_links GET /{entity_type}/{id}/compounds_links Read all compounds links of that entity.
LinksToExperimentsApi delete_entity_experiments_link DELETE /{entity_type}/{id}/experiments_links/{subid} Delete an experiment link.
LinksToExperimentsApi post_entity_experiments_links POST /{entity_type}/{id}/experiments_links/{subid} Create or import a link.
LinksToExperimentsApi read_entity_experiments_links GET /{entity_type}/{id}/experiments_links Read all experiments links of that entity.
LinksToItemsApi delete_entitiy_items_link DELETE /{entity_type}/{id}/items_links/{subid} Delete an item link.
LinksToItemsApi post_entity_items_links POST /{entity_type}/{id}/items_links/{subid} Create or import a link.
LinksToItemsApi read_entity_items_links GET /{entity_type}/{id}/items_links Read all items links of that entity.
NotificationsApi delete_notifications DELETE /users/{id}/notifications Delete all notifications of the user.
NotificationsApi patch_notification PATCH /users/{id}/notifications/{subid} Update the acknowledgment status of a notification.
NotificationsApi read_notification GET /users/{id}/notifications/{subid} Read a notification.
NotificationsApi read_notifications GET /users/{id}/notifications Read notifications of a user.
ReportsApi get_reports GET /reports Get usage reports
ResourcesCategoriesApi delete_rescat DELETE /teams/{id}/resources_categories/{subid} Delete a category.
ResourcesCategoriesApi patch_rescat PATCH /teams/{id}/resources_categories/{subid} Modify a category.
ResourcesCategoriesApi post_team_one_rescat POST /teams/{id}/resources_categories Create a new category for resources.
ResourcesCategoriesApi read_team_one_rescat GET /teams/{id}/resources_categories/{subid} Read a category.
ResourcesCategoriesApi read_team_resources_categories GET /teams/{id}/resources_categories Read resources categories of a team.
ResourcesStatusApi delete_resstatus DELETE /teams/{id}/items_status/{subid} Delete a status.
ResourcesStatusApi patch_resstatus PATCH /teams/{id}/items_status/{subid} Modify a status.
ResourcesStatusApi post_team_one_resstat POST /teams/{id}/items_status Create a new status for resources.
ResourcesStatusApi read_team_items_status GET /teams/{id}/items_status Read resources status of a team.
ResourcesStatusApi read_team_one_resstatus GET /teams/{id}/items_status/{subid} Read a status.
RevisionsApi patch_entity_revision PATCH /{entity_type}/{id}/revisions/{subid} Restore a revision.
RevisionsApi read_entity_revision GET /{entity_type}/{id}/revisions/{subid} Read a revision of that entity.
RevisionsApi read_entity_revisions GET /{entity_type}/{id}/revisions Read all revisions of that entity.
StepsApi delete_step DELETE /{entity_type}/{id}/steps/{subid} Delete a step.
StepsApi patch_step PATCH /{entity_type}/{id}/steps/{subid} Actions on a step.
StepsApi post_step POST /{entity_type}/{id}/steps Create a step.
StepsApi read_steps GET /{entity_type}/{id}/steps Read all steps of that entity.
StorageUnitsApi delete_storage_unit DELETE /storage_units/{id} Delete a storage unit.
StorageUnitsApi patch_storage_unit PATCH /storage_units/{id} Modify a storage unit.
StorageUnitsApi post_storage_unit POST /storage_units Create a new storage unit.
StorageUnitsApi read_storage_unit GET /storage_units/{id} Read a storage unit.
StorageUnitsApi read_storage_units GET /storage_units Read all containers, or the storage unit hierarchy when `?hierarchy=true`.
TagsApi delete_tag DELETE /{entity_type}/{id}/tags Delete all tags.
TagsApi patch_tag PATCH /{entity_type}/{id}/tags/{subid} Actions on a tag (like removing it from the entity).
TagsApi post_tag POST /{entity_type}/{id}/tags Create a tag.
TagsApi read_tag GET /{entity_type}/{id}/tags/{subid} Read a tag.
TagsApi read_tags GET /{entity_type}/{id}/tags Read all tags of that entity.
TeamTagsApi delete_team_tag DELETE /teams/{id}/tags/{subid} Delete a tag.
TeamTagsApi patch_team_tag PATCH /teams/{id}/tags/{subid} Actions on a tag.
TeamTagsApi post_team_tag POST /teams/{id}/tags Create a tag in the team.
TeamTagsApi read_team_tag GET /teams/{id}/tags/{subid} Read a tag.
TeamTagsApi read_team_tags GET /teams/{id}/tags Read all tags for the team.
TeamgroupsApi delete_teamgroup DELETE /teams/{id}/teamgroups/{subid} Delete a teamgroup.
TeamgroupsApi patch_teamgroup PATCH /teams/{id}/teamgroups/{subid} Modify a teamgroup.
TeamgroupsApi post_teamgroups POST /teams/{id}/teamgroups Create a new teamgroup.
TeamgroupsApi read_team_teamgroups GET /teams/{id}/teamgroups Read teamgroups of a team.
TeamgroupsApi read_teamgroup GET /teams/{id}/teamgroups/{subid} Read a teamgroup.
TeamsApi patch_team PATCH /teams/{id} Actions on a team.
TeamsApi post_teams POST /teams Create a new team.
TeamsApi read_team GET /teams/{id} Read a team. Requires Admin permissions.
TeamsApi read_teams GET /teams Read all teams. Requires Sysadmin permissions.
TodolistApi delete_todoitem DELETE /todolist/{id} Delete a todoitem.
TodolistApi patch_todoitem PATCH /todolist/{id} Actions on a todoitem.
TodolistApi post_todolist POST /todolist Create a todo item
TodolistApi read_todoitem GET /todolist/{id} Read a todo entry.
TodolistApi read_todolist GET /todolist Read all todoitems.
UnfinishedStepsApi read_unfinished_steps GET /unfinished_steps Read all unfinished steps.
UploadsApi delete_upload DELETE /{entity_type}/{id}/uploads/{subid} Delete an upload.
UploadsApi patch_upload PATCH /{entity_type}/{id}/uploads/{subid} Modify attributes such as "real_name", "comment" or "state" of an upload.
UploadsApi post_upload POST /{entity_type}/{id}/uploads Create an upload.
UploadsApi post_upload_replace POST /{entity_type}/{id}/uploads/{subid} Replace an existing uploaded file. The existing file will be archived and the new one will be added.
UploadsApi read_upload GET /{entity_type}/{id}/uploads/{subid} Read an upload.
UploadsApi read_uploads GET /{entity_type}/{id}/uploads Read attached files of that entity.
UserUploadsApi read_user_uploads GET /users/{id}/uploads Read attached files from a user
UsersApi patch_user PATCH /users/{id} Modify a user.
UsersApi post_user POST /users Create a new user.
UsersApi read_user GET /users/{id} Read information of a user.
UsersApi read_users GET /users Read users from instance.

Documentation For Models

Documentation For Authorization

token

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author