Skip to content

deepopinion/studio-api-client-python

Repository files navigation

swagger-client

Studio API

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

  • API version: 1.6.2
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen For more information, please visit https://deepopinion.ai/support

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install the latest stable release directly from Github via

pip install git+https://github.com/deepopinion/studio-api-client-python.git@v1.6.2

(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 swagger_client 

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 swagger_client

Getting Started

Please follow the installation procedure and then run the following:

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

# Configure API key authorization: Bearer
configuration = swagger_client.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 = swagger_client.AnalysesApi(swagger_client.ApiClient(configuration))
analysis_id = 56 # int | ID of the analysis to delete

try:
    # Delete an analyses.
    api_instance.analyses_analysis_id_delete(analysis_id)
except ApiException as e:
    print("Exception when calling AnalysesApi->analyses_analysis_id_delete: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.deepopinion.ai

Class Method HTTP request Description
AnalysesApi analyses_analysis_id_delete DELETE /analyses/{analysis_id} Delete an analyses.
AnalysesApi analyses_analysis_id_documents_download_get GET /analyses/{analysis_id}/documents/download Download analysis's documents.
AnalysesApi analyses_analysis_id_documents_get GET /analyses/{analysis_id}/documents Fetches all documents of a given analysis
AnalysesApi analyses_analysis_id_get GET /analyses/{analysis_id} Get an Analysis
AnalysesApi analyses_analysis_id_put PUT /analyses/{analysis_id} Change analysis's name
AnalysesApi analyses_get GET /analyses Return a list of analyses.
AnalysesApi analyses_post POST /analyses Create a new analysis.
AnalysesApi analyses_upload_post POST /analyses/upload Upload a file for a new batch analysis.
AnalysesApi analyze_post POST /analyze Ad-hoc analysis of a list of documents.
ClassesApi projects_project_id_classes_class_id_delete DELETE /projects/{project_id}/classes/{class_id} Delete a class
ClassesApi projects_project_id_classes_class_id_get GET /projects/{project_id}/classes/{class_id} Get a class
ClassesApi projects_project_id_classes_class_id_put PUT /projects/{project_id}/classes/{class_id} Change class's data
ClassesApi projects_project_id_classes_download_get GET /projects/{project_id}/classes/download Download all project's classes
ClassesApi projects_project_id_classes_get GET /projects/{project_id}/classes Get all project's classes
ClassesApi projects_project_id_classes_post POST /projects/{project_id}/classes Add a new class to a project
ClassesApi projects_project_id_classes_upload_post POST /projects/{project_id}/classes/upload Upload a file containing classes definition.
ClassesApi projects_project_id_upload_classes_post POST /projects/{project_id}/upload-classes Add multiple classes to a project
CorrectionApi projects_project_id_corrections_correction_id_delete DELETE /projects/{project_id}/corrections/{correction_id} Delete a correction session.
CorrectionApi projects_project_id_corrections_correction_id_documents_document_id_segments_segment_id_statuses_post POST /projects/{project_id}/corrections/{correction_id}/documents/{document_id}/segments/{segment_id}/statuses Mark a segment as corrected.
CorrectionApi projects_project_id_corrections_correction_id_documents_document_id_segments_segment_id_tags_post POST /projects/{project_id}/corrections/{correction_id}/documents/{document_id}/segments/{segment_id}/tags Add a tag to a segment.
CorrectionApi projects_project_id_corrections_correction_id_documents_document_id_segments_segment_id_tags_tag_id_delete DELETE /projects/{project_id}/corrections/{correction_id}/documents/{document_id}/segments/{segment_id}/tags/{tag_id} Delete a tag.
CorrectionApi projects_project_id_corrections_correction_id_documents_document_id_segments_segment_id_tags_tag_id_put PUT /projects/{project_id}/corrections/{correction_id}/documents/{document_id}/segments/{segment_id}/tags/{tag_id} Change a tag.
CorrectionApi projects_project_id_corrections_correction_id_documents_document_id_segments_segment_id_tags_tag_id_statuses_post POST /projects/{project_id}/corrections/{correction_id}/documents/{document_id}/segments/{segment_id}/tags/{tag_id}/statuses Confirm a tag.
CorrectionApi projects_project_id_corrections_correction_id_documents_get GET /projects/{project_id}/corrections/{correction_id}/documents Get correction session's documents.
CorrectionApi projects_project_id_corrections_correction_id_get GET /projects/{project_id}/corrections/{correction_id} Return a correction session.
CorrectionApi projects_project_id_corrections_get GET /projects/{project_id}/corrections Return a list of correction sessions that belongs to a project.
CorrectionApi projects_project_id_corrections_post POST /projects/{project_id}/corrections Create a new correction session.
DocumentsApi projects_project_id_documents_document_id_delete DELETE /projects/{project_id}/documents/{document_id} Delete a document of a project.
DocumentsApi projects_project_id_documents_document_id_get GET /projects/{project_id}/documents/{document_id} Get a particular document of a project.
DocumentsApi projects_project_id_documents_document_id_put PUT /projects/{project_id}/documents/{document_id} Change a document.
DocumentsApi projects_project_id_documents_get GET /projects/{project_id}/documents Fetches all documents of a given project
DocumentsApi projects_project_id_documents_post POST /projects/{project_id}/documents Create a new document.
DocumentsApi projects_project_id_upload_documents_post POST /projects/{project_id}/upload-documents Upload new documents.
GroupsApi projects_project_id_groups_get GET /projects/{project_id}/groups List all document groups that belongs to a project
GroupsApi projects_project_id_groups_group_id_delete DELETE /projects/{project_id}/groups/{group_id} Delete a group of documents.
GroupsApi projects_project_id_groups_group_id_documents_document_id_get GET /projects/{project_id}/groups/{group_id}/documents/{document_id} Get a particular document of a group.
GroupsApi projects_project_id_groups_group_id_documents_get GET /projects/{project_id}/groups/{group_id}/documents Get documents of a group
GroupsApi projects_project_id_groups_group_id_download_get GET /projects/{project_id}/groups/{group_id}/download Download all the documents of a group
GroupsApi projects_project_id_groups_group_id_get GET /projects/{project_id}/groups/{group_id} Get a Document Group
GroupsApi projects_project_id_groups_group_id_put PUT /projects/{project_id}/groups/{group_id} Change a document group.
GroupsApi projects_project_id_groups_post POST /projects/{project_id}/groups Create a new document group.
GroupsApi projects_project_id_groups_upload_post POST /projects/{project_id}/groups/upload Upload a file to a project. A file contains one or more documents that can
LabelingApi projects_project_id_annotations_annotation_id_delete DELETE /projects/{project_id}/annotations/{annotation_id} Delete a labeling session.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_get GET /projects/{project_id}/annotations/{annotation_id}/documents/{document_id} Get a particular document of a labeling session.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_segments_segment_id_statuses_post POST /projects/{project_id}/annotations/{annotation_id}/documents/{document_id}/segments/{segment_id}/statuses Mark a segment as annotated.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_segments_segment_id_tags_get GET /projects/{project_id}/annotations/{annotation_id}/documents/{document_id}/segments/{segment_id}/tags Return a list of tags of a segment.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_segments_segment_id_tags_post POST /projects/{project_id}/annotations/{annotation_id}/documents/{document_id}/segments/{segment_id}/tags Add a tag to a segment.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_segments_segment_id_tags_tag_id_delete DELETE /projects/{project_id}/annotations/{annotation_id}/documents/{document_id}/segments/{segment_id}/tags/{tag_id} Delete a tag.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_segments_segment_id_tags_tag_id_get GET /projects/{project_id}/annotations/{annotation_id}/documents/{document_id}/segments/{segment_id}/tags/{tag_id} Get a tag.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_segments_segment_id_tags_tag_id_put PUT /projects/{project_id}/annotations/{annotation_id}/documents/{document_id}/segments/{segment_id}/tags/{tag_id} Change a tag.
LabelingApi projects_project_id_annotations_annotation_id_documents_document_id_statuses_post POST /projects/{project_id}/annotations/{annotation_id}/documents/{document_id}/statuses Mark a document as annotated.
LabelingApi projects_project_id_annotations_annotation_id_documents_get GET /projects/{project_id}/annotations/{annotation_id}/documents Get all documents of a labeling session
LabelingApi projects_project_id_annotations_annotation_id_download_get GET /projects/{project_id}/annotations/{annotation_id}/download Download a labeling session
LabelingApi projects_project_id_annotations_annotation_id_get GET /projects/{project_id}/annotations/{annotation_id} Return a labeling session.
LabelingApi projects_project_id_annotations_annotation_id_put PUT /projects/{project_id}/annotations/{annotation_id} Change a labeling session.
LabelingApi projects_project_id_annotations_download_get GET /projects/{project_id}/annotations/download Download all labeling sessions of a project.
LabelingApi projects_project_id_annotations_get GET /projects/{project_id}/annotations Return a list of labeling sessions that belongs to a project.
LabelingApi projects_project_id_annotations_post POST /projects/{project_id}/annotations Create a new labeling session.
LabelingApi projects_project_id_annotations_upload_post POST /projects/{project_id}/annotations/upload Upload a file for a new labeling session.
LabelsApi projects_project_id_labels_download_get GET /projects/{project_id}/labels/download Download all project's labels
LabelsApi projects_project_id_labels_get GET /projects/{project_id}/labels Get all project's labels
LabelsApi projects_project_id_labels_label_id_delete DELETE /projects/{project_id}/labels/{label_id} Delete a label. Labels from ABSA projects cannot be deleted.
LabelsApi projects_project_id_labels_label_id_get GET /projects/{project_id}/labels/{label_id} Get a particular label
LabelsApi projects_project_id_labels_label_id_put PUT /projects/{project_id}/labels/{label_id} Change label's data
LabelsApi projects_project_id_labels_post POST /projects/{project_id}/labels Add a new label to a project.
LabelsApi projects_project_id_labels_upload_post POST /projects/{project_id}/labels/upload Upload a file containing labels definition.
ModelsApi models_get GET /models Get models user is authorized to see.
ModelsApi models_model_download_get GET /models/{model}/download Download a model by name
ModelsApi models_model_id_analyses_get GET /models/{model_id}/analyses Fetches all analyses related to this model.
ModelsApi models_model_id_delete DELETE /models/{model_id} Delete a model.
ModelsApi models_model_id_download_get GET /models/{model_id}/download Download a model
ModelsApi models_model_id_get GET /models/{model_id} Get a model by its ID
ModelsApi models_model_id_permissions_get GET /models/{model_id}/permissions Get all model's permission.
ModelsApi models_model_id_put PUT /models/{model_id} Update a model.
ModelsApi models_model_id_star_post POST /models/{model_id}/star Favorite a model.
ModelsApi models_model_id_unstar_post POST /models/{model_id}/unstar Remove a model from favorites.
ModelsApi models_upload_post POST /models/upload Upload a model.
ModelsApi organizations_organization_models_get GET /organizations/{organization}/models Get models user is authorized to see.
ModelsApi organizations_organization_models_model_download_get GET /organizations/{organization}/models/{model}/download Download a model by organization name and model name
ModelsApi projects_project_id_models_get GET /projects/{project_id}/models Get models that belongs to a project
ModelsApi projects_project_id_models_model_id_delete DELETE /projects/{project_id}/models/{model_id} Delete a model that belongs to a project..
ModelsApi projects_project_id_models_model_id_download_get GET /projects/{project_id}/models/{model_id}/download Download a model that belongs to a project
ModelsApi projects_project_id_models_model_id_get GET /projects/{project_id}/models/{model_id} Get a specific model that belongs to a project
ModelsApi projects_project_id_models_model_id_put PUT /projects/{project_id}/models/{model_id} Update a model that belongs to a project.
ModelsApi projects_project_id_models_post POST /projects/{project_id}/models Train a new model.
MonitoringApi health_get GET /health Health Check
MonitoringApi info_get GET /info General Information about the Studio API.
NotificationsApi users_user_id_notifications_get GET /users/{user_id}/notifications Get all user's notification
NotificationsApi users_user_id_notifications_notification_id_get GET /users/{user_id}/notifications/{notification_id} Get a notification
NotificationsApi users_user_id_notifications_notification_id_put PUT /users/{user_id}/notifications/{notification_id} Change a notification
ProjectsApi projects_get GET /projects List all projects that the authorized user has access to.
ProjectsApi projects_post POST /projects Create a new project.
ProjectsApi projects_project_id_analyses_get GET /projects/{project_id}/analyses Get all projects' analyses.
ProjectsApi projects_project_id_clone_post POST /projects/{project_id}/clone Clone a project.
ProjectsApi projects_project_id_delete DELETE /projects/{project_id} Delete a project.
ProjectsApi projects_project_id_get GET /projects/{project_id} Get a project
ProjectsApi projects_project_id_permissions_get GET /projects/{project_id}/permissions Get all projects' permission.
ProjectsApi projects_project_id_put PUT /projects/{project_id} Change project data.
ProjectsApi projects_project_id_tags_get GET /projects/{project_id}/tags Get all tags of a project
ProjectsApi projects_project_id_tags_tag_id_delete DELETE /projects/{project_id}/tags/{tag_id} Delete a tag.
ProjectsApi projects_project_id_tags_tag_id_put PUT /projects/{project_id}/tags/{tag_id} Edit a tag
ProjectsApi projects_project_id_transfer_post POST /projects/{project_id}/transfer Transfer a project to a workspace.
TypesApi types_get GET /types List all available task types
UsersApi auth_login_post POST /auth/login Log in a user
UsersApi auth_logout_post POST /auth/logout Log out a user.
UsersApi auth_register_post POST /auth/register Create a new account.
UsersApi auth_status_get GET /auth/status User login status
UsersApi password_email_post POST /password/email Request a link to reset the password.
UsersApi password_reset_post POST /password/reset Reset a password.
UsersApi users_email_verify_post POST /users/email/verify Confirm an email
UsersApi users_email_verify_resend_post POST /users/email/verify/resend Resend verification email
UsersApi users_user_id_delete DELETE /users/{user_id} Delete user's account.
UsersApi users_user_id_get GET /users/{user_id} Get a user.
UsersApi users_user_id_keys_get GET /users/{user_id}/keys List all keys associated to a user
UsersApi users_user_id_keys_key_id_delete DELETE /users/{user_id}/keys/{key_id} Delete a key associated to a user
UsersApi users_user_id_keys_post POST /users/{user_id}/keys Add a product key to a user
UsersApi users_user_id_permissions_get GET /users/{user_id}/permissions Get user permissions.
UsersApi users_user_id_permissions_put PUT /users/{user_id}/permissions Change user permission.
UsersApi users_user_id_put PUT /users/{user_id} Change a user.
WorkspacesApi organizations_organization_id_default_post POST /organizations/{organization_id}/default Set a workspace as the default one.
WorkspacesApi organizations_organization_id_delete DELETE /organizations/{organization_id} Deactivates a workspace.
WorkspacesApi organizations_organization_id_get GET /organizations/{organization_id} Get a workspace.
WorkspacesApi organizations_organization_id_invitation_invitation_id_delete DELETE /organizations/{organization_id}/invitation/{invitation_id} Cancel an invitation.
WorkspacesApi organizations_organization_id_invitation_invitation_id_resend_post POST /organizations/{organization_id}/invitation/{invitation_id}/resend Resend an invitation.
WorkspacesApi organizations_organization_id_permissions_get GET /organizations/{organization_id}/permissions Get all users' permissions from a workspace
WorkspacesApi organizations_organization_id_permissions_permission_id_delete DELETE /organizations/{organization_id}/permissions/{permission_id} Remove a user from a workspace.
WorkspacesApi organizations_organization_id_permissions_permission_id_put PUT /organizations/{organization_id}/permissions/{permission_id} Change user's role.
WorkspacesApi organizations_organization_id_permissions_post POST /organizations/{organization_id}/permissions Add a new user to a workspace.
WorkspacesApi organizations_organization_id_put PUT /organizations/{organization_id} Change a workspace.
WorkspacesApi organizations_organization_id_users_get GET /organizations/{organization_id}/users Get all users of a workspace
WorkspacesApi organizations_organization_id_users_invite_post POST /organizations/{organization_id}/users/invite Invite users to a workspace.
WorkspacesApi organizations_organization_id_users_invites_get GET /organizations/{organization_id}/users/invites List all pending invitations.
WorkspacesApi organizations_post POST /organizations Create a new workspace.
WorkspacesApi organizations_users_invite_accept_post POST /organizations/users/invite/accept Accept an invitation.

Documentation For Models

Documentation For Authorization

Bearer

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

Author

support@deepopinion.ai