From 28da9f0f1541f3de6af4a35e6ff9b3bce2d0a7bb Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 19:10:36 +0000 Subject: [PATCH 1/4] SDK regeneration --- .mock/definition/__package__.yml | 5784 +-- .mock/definition/actions.yml | 124 +- .mock/definition/activityLog.yml | 10 +- .mock/definition/annotationHistory.yml | 40 +- .mock/definition/annotationReviews.yml | 66 +- .mock/definition/annotations.yml | 472 +- .mock/definition/billing.yml | 280 +- .mock/definition/blueprints.yml | 20 +- .mock/definition/comments.yml | 154 +- .mock/definition/dashboard.yml | 72 +- .mock/definition/dataExplorer.yml | 20 +- .mock/definition/dataManager.yml | 20 +- .mock/definition/datasetStorageAzure.yml | 398 +- .mock/definition/datasetStorageGcs.yml | 372 +- .mock/definition/datasetStorageS3.yml | 460 +- .mock/definition/datasets.yml | 594 +- .mock/definition/exportStorage/azure.yml | 294 +- .mock/definition/exportStorage/gcs.yml | 278 +- .mock/definition/exportStorage/local.yml | 234 +- .mock/definition/exportStorage/redis.yml | 314 +- .mock/definition/exportStorage/s3.yml | 354 +- .mock/definition/exportStorage/s3S.yml | 312 +- .mock/definition/files.yml | 8 +- .mock/definition/importStorage/azure.yml | 388 +- .mock/definition/importStorage/gcs.yml | 380 +- .mock/definition/importStorage/local.yml | 224 +- .mock/definition/importStorage/redis.yml | 344 +- .mock/definition/importStorage/s3.yml | 488 +- .mock/definition/importStorage/s3S.yml | 348 +- .mock/definition/jwtSettings.yml | 16 +- .mock/definition/labels.yml | 100 +- .mock/definition/ml.yml | 212 +- .mock/definition/modelProviderConnection.yml | 32 +- .mock/definition/modelProviders.yml | 190 +- .mock/definition/organizations.yml | 158 +- .mock/definition/organizations/members.yml | 64 +- .mock/definition/pauses.yml | 18 +- .mock/definition/predictions.yml | 254 +- .mock/definition/projectRoles.yml | 60 +- .mock/definition/projectTemplates.yml | 264 +- .mock/definition/projects.yml | 944 +- .mock/definition/projects/exports.yml | 140 +- .mock/definition/projects/labels.yml | 24 +- .mock/definition/projects/pauses.yml | 74 +- .mock/definition/projects/stats.yml | 68 +- .mock/definition/prompts.yml | 392 +- .mock/definition/prompts/runs.yml | 46 +- .mock/definition/prompts/versions.yml | 170 +- .mock/definition/sessionPolicy.yml | 4 +- .mock/definition/sso.yml | 40 +- .mock/definition/storageAzureSpi.yml | 586 +- .mock/definition/storageGcsWif.yml | 564 +- .mock/definition/tasks.yml | 500 +- .mock/definition/tokens.yml | 6 +- .mock/definition/users.yml | 352 +- .mock/definition/versions.yml | 16 +- .mock/definition/views.yml | 166 +- .mock/definition/webhooks.yml | 420 +- .mock/definition/workspaces.yml | 350 +- .mock/definition/workspaces/members.yml | 32 +- .mock/openapi/openapi.yaml | 33911 ++++++++-------- poetry.lock | 166 +- reference.md | 4020 +- src/label_studio_sdk/actions/client.py | 26 +- .../types/actions_list_response_item.py | 6 +- .../actions_list_response_item_dialog.py | 4 +- src/label_studio_sdk/annotations/client.py | 882 +- src/label_studio_sdk/comments/client.py | 352 +- .../export_storage/azure/client.py | 548 +- .../export_storage/gcs/client.py | 526 +- .../export_storage/local/client.py | 412 +- .../export_storage/redis/client.py | 574 +- .../export_storage/s3/client.py | 694 +- .../export_storage/s3s/client.py | 1356 +- .../import_storage/azure/client.py | 714 +- .../import_storage/gcs/client.py | 714 +- .../import_storage/local/client.py | 412 +- .../import_storage/redis/client.py | 618 +- .../import_storage/s3/client.py | 904 +- .../import_storage/s3s/client.py | 1470 +- src/label_studio_sdk/jwt_settings/client.py | 20 +- src/label_studio_sdk/ml/client.py | 236 +- .../types/ml_list_model_versions_response.py | 2 +- .../model_providers/client.py | 362 +- .../organizations/members/client.py | 16 +- src/label_studio_sdk/predictions/client.py | 120 +- src/label_studio_sdk/projects/client.py | 850 +- .../projects/exports/client.py | 110 +- .../exports/types/exports_convert_response.py | 2 +- .../stats/types/stats_iaa_response.py | 10 +- .../types/projects_import_tasks_response.py | 24 +- src/label_studio_sdk/prompts/client.py | 422 +- src/label_studio_sdk/prompts/runs/client.py | 66 +- .../prompts/versions/client.py | 144 +- src/label_studio_sdk/tasks/client.py | 348 +- .../types/all_roles_project_list.py | 182 +- src/label_studio_sdk/types/annotation.py | 70 +- .../types/annotation_request.py | 54 +- .../types/azure_blob_export_storage.py | 58 +- .../types/azure_blob_import_storage.py | 66 +- .../types/batch_failed_predictions.py | 2 +- src/label_studio_sdk/types/billing_checks.py | 28 +- src/label_studio_sdk/types/billing_flags.py | 32 +- src/label_studio_sdk/types/blueprint_list.py | 15 +- src/label_studio_sdk/types/child_filter.py | 21 +- src/label_studio_sdk/types/comment.py | 30 +- src/label_studio_sdk/types/comment_request.py | 15 +- .../comment_serializer_with_expanded_user.py | 35 +- .../types/converted_format.py | 2 +- .../types/converted_format_request.py | 2 +- src/label_studio_sdk/types/export.py | 16 +- src/label_studio_sdk/types/file_upload.py | 2 +- src/label_studio_sdk/types/filter.py | 19 +- src/label_studio_sdk/types/filter_group.py | 7 +- .../types/gcs_export_storage.py | 46 +- .../types/gcs_import_storage.py | 54 +- .../types/import_api_request.py | 52 +- .../types/inference_run_cost_estimate.py | 20 +- .../types/local_files_export_storage.py | 46 +- .../types/local_files_import_storage.py | 52 +- .../types/lse_annotation_filter_options.py | 20 +- .../lse_annotation_filter_options_request.py | 20 +- .../types/lse_export_create.py | 24 +- src/label_studio_sdk/types/lse_fields.py | 28 +- .../types/lse_organization.py | 34 +- .../types/lse_organization_member_list.py | 2 +- .../types/lse_project_create.py | 144 +- .../types/lse_project_update.py | 178 +- .../types/lse_s3export_storage.py | 92 +- .../types/lse_s3export_storage_request.py | 86 +- .../types/lse_s3import_storage.py | 106 +- .../types/lse_s3import_storage_request.py | 98 +- src/label_studio_sdk/types/lse_task.py | 98 +- .../types/lse_task_drafts_item.py | 2 +- .../types/lse_task_filter_options.py | 28 +- .../types/lse_task_filter_options_request.py | 28 +- .../types/lse_task_predictions_item.py | 10 +- .../lse_task_serializer_for_annotators.py | 24 +- ...k_serializer_for_annotators_drafts_item.py | 2 +- ...ializer_for_annotators_predictions_item.py | 10 +- .../lse_task_serializer_for_reviewers.py | 98 +- ...sk_serializer_for_reviewers_drafts_item.py | 2 +- ...rializer_for_reviewers_predictions_item.py | 10 +- src/label_studio_sdk/types/lse_user.py | 26 +- src/label_studio_sdk/types/lse_user_api.py | 22 +- .../lse_user_organization_member_list.py | 26 +- .../types/lseapi_token_create.py | 2 +- .../types/lseapi_token_list.py | 2 +- src/label_studio_sdk/types/lsejwt_settings.py | 10 +- src/label_studio_sdk/types/ml_backend.py | 55 +- src/label_studio_sdk/types/model_interface.py | 24 +- .../types/model_interface_request.py | 15 +- .../types/model_interface_serializer_get.py | 26 +- .../types/model_provider_connection.py | 68 +- .../model_provider_connection_request.py | 29 +- src/label_studio_sdk/types/model_run.py | 24 +- .../types/organization_billing.py | 2 +- src/label_studio_sdk/types/organization_id.py | 4 +- .../types/organization_invite.py | 2 +- .../types/organization_member.py | 17 +- .../types/organization_membership.py | 3 +- src/label_studio_sdk/types/pause.py | 46 +- src/label_studio_sdk/types/prediction.py | 42 +- .../types/prediction_request.py | 32 +- src/label_studio_sdk/types/project.py | 144 +- src/label_studio_sdk/types/project_import.py | 42 +- .../types/redis_export_storage.py | 68 +- .../types/redis_import_storage.py | 74 +- .../types/refined_prompt_response.py | 22 +- src/label_studio_sdk/types/review_settings.py | 59 +- .../types/review_settings_request.py | 59 +- .../types/s3export_storage.py | 90 +- .../types/s3import_storage.py | 88 +- .../types/selected_items_request.py | 2 +- .../types/serialization_options.py | 20 +- .../types/serialization_options_request.py | 20 +- .../types/third_party_model_version.py | 22 +- .../third_party_model_version_request.py | 13 +- src/label_studio_sdk/types/user_simple.py | 6 +- .../types/user_simple_request.py | 2 +- .../types/version_response.py | 39 +- src/label_studio_sdk/types/view.py | 16 +- src/label_studio_sdk/types/webhook.py | 32 +- .../types/webhook_serializer_for_update.py | 32 +- src/label_studio_sdk/types/workspace.py | 21 +- src/label_studio_sdk/users/client.py | 320 +- src/label_studio_sdk/views/client.py | 328 +- src/label_studio_sdk/webhooks/client.py | 366 +- .../webhooks/types/webhooks_info_response.py | 64 +- ...bhooks_info_response_annotation_created.py | 2 +- ...bhooks_info_response_annotation_updated.py | 2 +- ...hooks_info_response_annotations_created.py | 2 +- ...hooks_info_response_annotations_deleted.py | 2 +- ...bhooks_info_response_label_link_created.py | 2 +- ...bhooks_info_response_label_link_deleted.py | 2 +- ...bhooks_info_response_label_link_updated.py | 2 +- .../webhooks_info_response_project_created.py | 2 +- .../webhooks_info_response_project_deleted.py | 2 +- .../webhooks_info_response_project_updated.py | 2 +- .../webhooks_info_response_review_created.py | 2 +- .../webhooks_info_response_review_updated.py | 2 +- .../webhooks_info_response_reviews_deleted.py | 2 +- .../webhooks_info_response_tasks_created.py | 2 +- .../webhooks_info_response_tasks_deleted.py | 2 +- src/label_studio_sdk/workspaces/client.py | 80 +- tests/export_storage/test_azure.py | 306 +- tests/export_storage/test_gcs.py | 266 +- tests/export_storage/test_local.py | 246 +- tests/export_storage/test_redis.py | 326 +- tests/export_storage/test_s3.py | 326 +- tests/export_storage/test_s3s.py | 390 +- tests/import_storage/test_azure.py | 306 +- tests/import_storage/test_gcs.py | 266 +- tests/import_storage/test_local.py | 226 +- tests/import_storage/test_redis.py | 306 +- tests/import_storage/test_s3.py | 366 +- tests/import_storage/test_s3s.py | 430 +- tests/organizations/test_members.py | 120 +- tests/projects/test_exports.py | 138 +- tests/projects/test_pauses.py | 120 +- tests/projects/test_stats.py | 8 +- tests/prompts/test_runs.py | 64 +- tests/prompts/test_versions.py | 256 +- tests/test_actions.py | 32 +- tests/test_annotations.py | 356 +- tests/test_billing.py | 128 +- tests/test_comments.py | 128 +- tests/test_files.py | 8 +- tests/test_jwt_settings.py | 8 +- tests/test_ml.py | 180 +- tests/test_model_providers.py | 260 +- tests/test_organizations.py | 46 +- tests/test_predictions.py | 248 +- tests/test_projects.py | 542 +- tests/test_prompts.py | 494 +- tests/test_tasks.py | 588 +- tests/test_tokens.py | 8 +- tests/test_users.py | 420 +- tests/test_versions.py | 24 +- tests/test_views.py | 148 +- tests/test_workspaces.py | 80 +- tests/workspaces/test_members.py | 48 +- 242 files changed, 41050 insertions(+), 41923 deletions(-) diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 92646c18f..6ca7007b1 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -99,9 +99,10 @@ types: openapi: openapi/openapi.yaml ActivityLog: properties: - id: integer - user_id: - type: integer + datetime: datetime + duration: + type: optional + docs: Duration of response generation in ms validation: min: -2147483648 max: 2147483647 @@ -109,38 +110,43 @@ types: type: string validation: maxLength: 256 - user_agent: - type: optional - validation: - maxLength: 1024 + extra_data: optional http_referer: type: optional validation: maxLength: 1024 - request_url: - type: string + id: integer + ip_address: optional + organization_id: + type: optional + docs: Organization id validation: - maxLength: 256 + min: -2147483648 + max: 2147483647 + project_id: + type: optional + docs: Project id if request has it + validation: + min: -2147483648 + max: 2147483647 request_method: type: string validation: maxLength: 10 + request_url: + type: string + validation: + maxLength: 256 response_code: type: string validation: maxLength: 3 - datetime: datetime - ip_address: optional - extra_data: optional - duration: - type: optional - docs: Duration of response generation in ms + user_agent: + type: optional validation: - min: -2147483648 - max: 2147483647 - project_id: - type: optional - docs: Project id if request has it + maxLength: 1024 + user_id: + type: integer validation: min: -2147483648 max: 2147483647 @@ -150,20 +156,14 @@ types: validation: min: -2147483648 max: 2147483647 - organization_id: - type: optional - docs: Organization id - validation: - min: -2147483648 - max: 2147483647 source: openapi: openapi/openapi.yaml ActivityLogResponse: docs: Serializer for ActivityLogAPI response. properties: data: list - recordsTotal: integer recordsFiltered: integer + recordsTotal: integer source: openapi: openapi/openapi.yaml AllRolesProjectListSampling: @@ -187,78 +187,83 @@ types: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - control_weights: optional - start_training_on_annotation_update: - type: boolean - docs: Start model training after any annotations are submitted or updated - id: integer - ground_truth_number: - type: integer - docs: Honeypot annotation number in project - config_has_control_tags: - type: boolean - docs: Flag to detect is project ready for labeling + allow_stream: string + annotation_limit_count: + type: optional + validation: + min: 1 annotation_limit_percent: type: optional validation: pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_score: + type: optional + default: '95.00' + validation: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_tasks: + type: optional + default: 10 + validation: + min: 0 + assignment_settings: AssignmentSettings + blueprints: list + color: + type: optional + validation: + maxLength: 16 + comment_classification_config: optional + config_has_control_tags: + type: boolean + docs: Flag to detect is project ready for labeling + config_suitable_for_bulk_annotation: + type: boolean + docs: Flag to detect is project ready for bulk annotation + control_weights: optional + created_at: datetime + created_by: + type: optional + docs: Project owner + custom_script: optional + custom_task_lock_ttl: + type: optional + docs: TTL in seconds for task reservations, on new and existing tasks + validation: + min: 1 + max: 86400 + data_types: unknown + description: + type: optional + docs: Project description + description_short: string duplication_done: type: optional default: false - finished_task_number: integer - members: string - total_annotations_number: string - members_count: integer + duplication_status: optional enable_empty_annotation: type: optional docs: Allow annotators to submit empty annotations - config_suitable_for_bulk_annotation: - type: boolean - docs: Flag to detect is project ready for bulk annotation - task_number: - type: integer - docs: Total task number in project - workspace_title: string - total_predictions_number: integer - is_published: - type: optional - docs: Whether or not the project is published to annotators - is_draft: + evaluate_predictions_automatically: type: optional - docs: Whether or not the project is in the middle of being created - description: - type: optional - docs: Project description - rejected: string - custom_script: optional - workspace: string - show_ground_truth_first: optional + docs: Retrieve and display predictions when loading a task expert_instruction: type: optional docs: Labeling instructions in HTML format - allow_stream: string - reviewer_queue_total: string - created_at: datetime - annotator_evaluation_minimum_tasks: - type: optional - default: 10 - validation: - min: 0 - review_total_tasks: string - min_annotations_to_start_training: - type: optional - docs: >- - Minimum number of completed tasks after which model training is - started - validation: - min: -2147483648 - max: 2147483647 + finished_task_number: integer + ground_truth_number: + type: integer + docs: Honeypot annotation number in project + has_blueprints: string + id: integer + is_draft: + type: optional + docs: Whether or not the project is in the middle of being created + is_published: + type: optional + docs: Whether or not the project is published to annotators label_config: type: optional docs: Label config in XML format. See more about it in documentation - created_by: - type: optional - docs: Project owner maximum_annotations: type: optional docs: >- @@ -268,88 +273,83 @@ types: validation: min: -2147483648 max: 2147483647 - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - annotator_evaluation_minimum_score: - type: optional - default: '95.00' + members: string + members_count: integer + min_annotations_to_start_training: + type: optional + docs: >- + Minimum number of completed tasks after which model training is + started validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + min: -2147483648 + max: 2147483647 model_version: type: optional docs: Machine learning model version - useful_annotation_number: string - has_blueprints: string + num_tasks_with_annotations: string + organization: optional + overlap_cohort_percentage: + type: optional + validation: + min: -2147483648 + max: 2147483647 + parsed_label_config: unknown pause_on_failed_annotator_evaluation: type: optional default: false - show_instruction: - type: optional - docs: Show instructions to the annotator before they start - queue_left: string - custom_task_lock_ttl: - type: optional - docs: TTL in seconds for task reservations, on new and existing tasks - validation: - min: 1 - max: 86400 pinned_at: type: optional docs: Pinned date and time + prompts: string + queue_done: string + queue_left: string + queue_total: string ready: string - description_short: string - show_overlap_first: optional + rejected: string + require_comment_on_skip: + type: optional + default: false reveal_preannotations_interactively: type: optional docs: Reveal pre-annotations interactively - comment_classification_config: optional - show_skip_button: + review_settings: ReviewSettings + review_total_tasks: string + reviewed_number: string + reviewer_queue_total: string + sampling: optional + show_annotation_history: type: optional - docs: Show a skip button in interface and allow annotators to skip the task - data_types: unknown - organization: optional + docs: Show annotation history to annotator show_collab_predictions: type: optional docs: If set, the annotator can view model predictions - reviewed_number: string - prompts: string - overlap_cohort_percentage: - type: optional - validation: - min: -2147483648 - max: 2147483647 - duplication_status: optional + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: Show a skip button in interface and allow annotators to skip the task + skip_queue: optional skipped_annotations_number: string - blueprints: list - sampling: optional - color: - type: optional - validation: - maxLength: 16 - title: + start_training_on_annotation_update: + type: boolean + docs: Start model training after any annotations are submitted or updated + task_number: + type: integer + docs: Total task number in project + title: type: optional docs: Project name. Must be between 3 and 50 characters long. validation: minLength: 3 maxLength: 50 - skip_queue: optional - review_settings: ReviewSettings - num_tasks_with_annotations: string - assignment_settings: AssignmentSettings - require_comment_on_skip: - type: optional - default: false - annotation_limit_count: - type: optional - validation: - min: 1 - queue_done: string - show_annotation_history: - type: optional - docs: Show annotation history to annotator - queue_total: string - parsed_label_config: unknown + total_annotations_number: string + total_predictions_number: integer + useful_annotation_number: string + workspace: string + workspace_title: string source: openapi: openapi/openapi.yaml AnnotatedEnum: @@ -385,37 +385,28 @@ types: inline: true Annotation: properties: - id: integer - result: - type: optional>> - docs: List of annotation results for the task - created_username: - type: string - docs: Username string - default: '' + bulk_created: + type: optional + docs: Annotation was created in bulk mode + completed_by: optional created_ago: type: string docs: Time delta from creation time default: '' - completed_by: optional - was_cancelled: - type: optional - docs: User skipped the task - ground_truth: - type: optional - docs: This annotation is a Ground Truth (ground_truth) created_at: type: datetime docs: Creation time - updated_at: - type: datetime - docs: Last updated time + created_username: + type: string + docs: Username string + default: '' draft_created_at: type: optional docs: Draft creation time - lead_time: - type: optional - docs: How much time it took to annotate the task + ground_truth: + type: optional + docs: This annotation is a Ground Truth (ground_truth) + id: integer import_id: type: optional docs: >- @@ -436,27 +427,36 @@ types: * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review - bulk_created: - type: optional - docs: Annotation was created in bulk mode - task: - type: optional - docs: Corresponding task for this annotation - project: + last_created_by: type: optional - docs: Project ID for this annotation - updated_by: + docs: User who created the last annotation history item + lead_time: + type: optional + docs: How much time it took to annotate the task + parent_annotation: type: optional - docs: Last user who updated this annotation + docs: Points to the parent annotation from which this annotation was created parent_prediction: type: optional docs: Points to the prediction from which this annotation was created - parent_annotation: + project: type: optional - docs: Points to the parent annotation from which this annotation was created - last_created_by: + docs: Project ID for this annotation + result: + type: optional>> + docs: List of annotation results for the task + task: type: optional - docs: User who created the last annotation history item + docs: Corresponding task for this annotation + updated_at: + type: datetime + docs: Last updated time + updated_by: + type: optional + docs: Last user who updated this annotation + was_cancelled: + type: optional + docs: User skipped the task source: openapi: openapi/openapi.yaml AnnotationHistoryAction: @@ -474,23 +474,24 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer - comment: optional - organization_id: + action: optional + annotation_id: type: optional - docs: Organization for this annotation history + docs: Corresponding annotation for this historical annotation validation: min: -2147483648 max: 2147483647 - project_id: + comment: optional + comment_id: type: optional - docs: Project for this annotation history + docs: Comment id sent with result validation: min: -2147483648 max: 2147483647 - annotation_id: + created_at: datetime + created_by: type: optional - docs: Corresponding annotation for this historical annotation + docs: Created by user id validation: min: -2147483648 max: 2147483647 @@ -500,38 +501,37 @@ types: validation: min: -2147483648 max: 2147483647 - review_id: + id: integer + lead_time: + type: optional + docs: How much time it took to annotate the task + organization_id: type: optional - docs: AnnotationReview ID, using with review field + docs: Organization for this annotation history validation: min: -2147483648 max: 2147483647 - task_id: + project_id: type: optional - docs: Task id + docs: Project for this annotation history validation: min: -2147483648 max: 2147483647 result: optional - lead_time: - type: optional - docs: How much time it took to annotate the task - action: optional + review_id: + type: optional + docs: AnnotationReview ID, using with review field + validation: + min: -2147483648 + max: 2147483647 started_at: type: optional docs: >- The time that a user started working on this revision of the annotation - created_at: datetime - created_by: - type: optional - docs: Created by user id - validation: - min: -2147483648 - max: 2147483647 - comment_id: + task_id: type: optional - docs: Comment id sent with result + docs: Task id validation: min: -2147483648 max: 2147483647 @@ -560,26 +560,16 @@ types: inline: true AnnotationRequest: properties: - result: - type: optional>> - docs: List of annotation results for the task - completed_by: optional - unique_id: - type: optional - validation: - minLength: 1 - was_cancelled: - type: optional - docs: User skipped the task - ground_truth: + bulk_created: type: optional - docs: This annotation is a Ground Truth (ground_truth) + docs: Annotation was created in bulk mode + completed_by: optional draft_created_at: type: optional docs: Draft creation time - lead_time: - type: optional - docs: How much time it took to annotate the task + ground_truth: + type: optional + docs: This annotation is a Ground Truth (ground_truth) import_id: type: optional docs: >- @@ -600,27 +590,37 @@ types: * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review - bulk_created: - type: optional - docs: Annotation was created in bulk mode - task: - type: optional - docs: Corresponding task for this annotation - project: + last_created_by: type: optional - docs: Project ID for this annotation - updated_by: + docs: User who created the last annotation history item + lead_time: + type: optional + docs: How much time it took to annotate the task + parent_annotation: type: optional - docs: Last user who updated this annotation + docs: Points to the parent annotation from which this annotation was created parent_prediction: type: optional docs: Points to the prediction from which this annotation was created - parent_annotation: + project: type: optional - docs: Points to the parent annotation from which this annotation was created - last_created_by: + docs: Project ID for this annotation + result: + type: optional>> + docs: List of annotation results for the task + task: type: optional - docs: User who created the last annotation history item + docs: Corresponding task for this annotation + unique_id: + type: optional + validation: + minLength: 1 + updated_by: + type: optional + docs: Last user who updated this annotation + was_cancelled: + type: optional + docs: User skipped the task source: openapi: openapi/openapi.yaml AnnotationReview: @@ -630,28 +630,28 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer - created_by: - type: integer - docs: User who made this review - created_at: - type: datetime - docs: Creation time accepted: type: optional docs: Accepted or rejected (if false) flag - result: optional annotation: type: integer docs: Corresponding annotation + created_at: + type: datetime + docs: Creation time + created_by: + type: integer + docs: User who made this review fixed_annotation_history: type: optional docs: Fixed annotation history item by the reviewer + id: integer + last_annotation_history: optional previous_annotation_history: type: optional docs: Previous annotation history item by the annotator - last_annotation_history: optional remove_from_queue: optional + result: optional started_at: optional source: openapi: openapi/openapi.yaml @@ -665,16 +665,16 @@ types: accepted: type: optional docs: Accepted or rejected (if false) flag - result: optional annotation: type: integer docs: Corresponding annotation - last_annotation_history: optional comment: type: optional validation: minLength: 1 + last_annotation_history: optional remove_from_queue: optional + result: optional started_at: optional source: openapi: openapi/openapi.yaml @@ -768,33 +768,27 @@ types: openapi: openapi/openapi.yaml AzureBlobExportStorage: properties: - id: integer - type: - type: string - default: azure - synchronizable: - type: optional - default: true - container: - type: optional - docs: Azure blob container - prefix: - type: optional - docs: Azure blob prefix name - regex_filter: + account_key: type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Azure Blob account key account_name: type: optional docs: Azure Blob account name - account_key: + can_delete_objects: + type: optional + docs: Deletion from storage enabled + container: type: optional - docs: Azure Blob account key - last_sync: - type: optional + docs: Azure blob container + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description + id: integer + last_sync: + type: optional docs: Last sync finished time last_sync_count: type: optional @@ -807,60 +801,54 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - can_delete_objects: - type: optional - docs: Deletion from storage enabled + docs: Azure blob prefix name project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - AzureBlobImportStorage: - properties: - id: integer - type: - type: string - default: azure + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional synchronizable: type: optional default: true - presign: - type: optional - default: true - container: - type: optional - docs: Azure blob container - prefix: + title: type: optional - docs: Azure blob prefix name - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: azure use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + AzureBlobImportStorage: + properties: + account_key: + type: optional + docs: Azure Blob account key account_name: type: optional docs: Azure Blob account name - account_key: + container: type: optional - docs: Azure Blob account key + docs: Azure blob container + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description + id: integer last_sync: type: optional docs: Last sync finished time @@ -875,22 +863,13 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time + docs: Azure blob prefix name + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -900,38 +879,55 @@ types: project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - AzureDatasetStorage: - properties: - id: integer - type: - type: string - default: azure + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional synchronizable: type: optional default: true - presign: - type: optional - default: true - container: - type: optional - docs: Azure blob container - prefix: + title: type: optional - docs: Azure blob prefix name - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: azure use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + AzureDatasetStorage: + properties: + account_key: + type: optional + docs: Azure Blob account key account_name: type: optional docs: Azure Blob account name - account_key: + container: + type: optional + docs: Azure blob container + created_at: + type: datetime + docs: Creation time + dataset: + type: integer + docs: A unique integer value identifying this dataset. + description: + type: optional + docs: Cloud storage description + glob_pattern: + type: optional + docs: Glob pattern for syncing from bucket + id: integer + job_id: type: optional - docs: Azure Blob account key last_sync: type: optional docs: Last sync finished time @@ -946,67 +942,65 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time + docs: Azure blob prefix name + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) validation: min: 0 max: 32767 - glob_pattern: + regex_filter: type: optional - docs: Glob pattern for syncing from bucket + docs: Cloud storage regex for filtering objects + status: optional synced: type: optional docs: Flag if dataset has been previously synced or not - job_id: - type: optional - dataset: - type: integer - docs: A unique integer value identifying this dataset. - source: - openapi: openapi/openapi.yaml - AzureDatasetStorageRequest: - properties: synchronizable: type: optional default: true - presign: - type: optional - default: true - container: - type: optional - docs: Azure blob container - prefix: + title: type: optional - docs: Azure blob prefix name - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: azure use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + AzureDatasetStorageRequest: + properties: + account_key: + type: optional + docs: Azure Blob account key account_name: type: optional docs: Azure Blob account name - account_key: + container: type: optional - docs: Azure Blob account key + docs: Azure blob container + dataset: + type: integer + docs: A unique integer value identifying this dataset. + description: + type: optional + docs: Cloud storage description + glob_pattern: + type: optional + docs: Glob pattern for syncing from bucket last_sync: type: optional docs: Last sync finished time @@ -1021,72 +1015,66 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: Azure blob prefix name + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) validation: min: 0 max: 32767 - glob_pattern: + regex_filter: type: optional - docs: Glob pattern for syncing from bucket + docs: Cloud storage regex for filtering objects + status: optional synced: type: optional docs: Flag if dataset has been previously synced or not - dataset: - type: integer - docs: A unique integer value identifying this dataset. - source: - openapi: openapi/openapi.yaml - AzureServicePrincipalExportStorage: - properties: - id: integer - type: - type: string - default: azure_spi synchronizable: type: optional default: true - prefix: + title: type: optional - docs: Azure blob prefix name - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + AzureServicePrincipalExportStorage: + properties: account_name: type: optional docs: Azure Blob account name - container: - type: optional - docs: Azure blob container - tenant_id: - type: optional - docs: Azure Tenant ID + can_delete_objects: + type: optional + docs: Deletion from storage enabled client_id: type: optional docs: Azure Blob Service Principal Client ID client_secret: type: optional docs: Azure Blob Service Principal Client Secret - user_delegation_key: + container: type: optional - docs: User Delegation Key (Backend) + docs: Azure blob container + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description + id: integer last_sync: type: optional docs: Last sync finished time @@ -1101,62 +1089,62 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - can_delete_objects: - type: optional - docs: Deletion from storage enabled + docs: Azure blob prefix name project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - AzureServicePrincipalExportStorageRequest: - properties: + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional synchronizable: type: optional default: true - prefix: + tenant_id: type: optional - docs: Azure blob prefix name - regex_filter: + docs: Azure Tenant ID + title: type: optional - docs: Cloud storage regex for filtering objects + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + type: + type: string + default: azure_spi use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + user_delegation_key: + type: optional + docs: User Delegation Key (Backend) + source: + openapi: openapi/openapi.yaml + AzureServicePrincipalExportStorageRequest: + properties: account_name: type: optional docs: Azure Blob account name - container: - type: optional - docs: Azure blob container - tenant_id: - type: optional - docs: Azure Tenant ID + can_delete_objects: + type: optional + docs: Deletion from storage enabled client_id: type: optional docs: Azure Blob Service Principal Client ID client_secret: type: optional docs: Azure Blob Service Principal Client Secret - user_delegation_key: + container: type: optional - docs: User Delegation Key (Backend) + docs: Azure blob container + description: + type: optional + docs: Cloud storage description last_sync: type: optional docs: Last sync finished time @@ -1171,66 +1159,60 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - can_delete_objects: - type: optional - docs: Deletion from storage enabled + docs: Azure blob prefix name project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - AzureServicePrincipalImportStorage: - properties: - id: integer - type: - type: string - default: azure_spi + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional synchronizable: type: optional default: true - presign: - type: optional - default: true - prefix: + tenant_id: type: optional - docs: Azure blob prefix name - regex_filter: + docs: Azure Tenant ID + title: type: optional - docs: Cloud storage regex for filtering objects + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + user_delegation_key: + type: optional + docs: User Delegation Key (Backend) + source: + openapi: openapi/openapi.yaml + AzureServicePrincipalImportStorage: + properties: account_name: type: optional docs: Azure Blob account name - container: - type: optional - docs: Azure blob container - tenant_id: - type: optional - docs: Azure Tenant ID client_id: type: optional docs: Azure Blob Service Principal Client ID client_secret: type: optional docs: Azure Blob Service Principal Client Secret - user_delegation_key: + container: type: optional - docs: User Delegation Key (Backend) + docs: Azure blob container + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description + id: integer last_sync: type: optional docs: Last sync finished time @@ -1245,22 +1227,13 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time + docs: Azure blob prefix name + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -1270,43 +1243,52 @@ types: project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - AzureServicePrincipalImportStorageRequest: - properties: + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional synchronizable: type: optional default: true - presign: - type: optional - default: true - prefix: + tenant_id: type: optional - docs: Azure blob prefix name - regex_filter: + docs: Azure Tenant ID + title: type: optional - docs: Cloud storage regex for filtering objects + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + type: + type: string + default: azure_spi use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + user_delegation_key: + type: optional + docs: User Delegation Key (Backend) + source: + openapi: openapi/openapi.yaml + AzureServicePrincipalImportStorageRequest: + properties: account_name: type: optional docs: Azure Blob account name - container: - type: optional - docs: Azure blob container - tenant_id: - type: optional - docs: Azure Tenant ID client_id: type: optional docs: Azure Blob Service Principal Client ID client_secret: type: optional docs: Azure Blob Service Principal Client Secret - user_delegation_key: + container: type: optional - docs: User Delegation Key (Backend) + docs: Azure blob container + description: + type: optional + docs: Cloud storage description last_sync: type: optional docs: Last sync finished time @@ -1321,19 +1303,13 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: Azure blob prefix name + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -1343,15 +1319,39 @@ types: project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - BatchFailedPredictions: - properties: + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true + tenant_id: + type: optional + docs: Azure Tenant ID + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs + user_delegation_key: + type: optional + docs: User Delegation Key (Backend) + source: + openapi: openapi/openapi.yaml + BatchFailedPredictions: + properties: + failed_predictions: list job_id: type: string validation: maxLength: 255 - failed_predictions: list source: openapi: openapi/openapi.yaml BatchPredictions: @@ -1365,63 +1365,63 @@ types: openapi: openapi/openapi.yaml BillingChecks: properties: - users: CountLimit - projects: CountLimit - results: CountLimit - trial_days: integer - organization_is_active: boolean - license_issued: + export_storages: CountLimit + import_storages: CountLimit + is_license_expired: boolean + is_license_warning: boolean + is_prompts_expire: boolean + is_prompts_warning: boolean + license_expires: type: optional validation: format: date - license_warning: + license_issued: type: optional validation: format: date - is_license_warning: boolean - license_expires: + license_warning: type: optional validation: format: date - is_license_expired: boolean + organization_is_active: boolean + projects: CountLimit + prompts_api_keys_enabled: boolean prompts_enabled: boolean + prompts_expire: optional prompts_status: PromptsStatusEnum prompts_warning: optional - is_prompts_warning: boolean - prompts_expire: optional - is_prompts_expire: boolean - prompts_api_keys_enabled: boolean - import_storages: CountLimit - export_storages: CountLimit + results: CountLimit + trial_days: integer + users: CountLimit source: openapi: openapi/openapi.yaml BillingFlags: properties: activated_at: optional - cloud_instance: boolean allow_activity_log: boolean - allow_invite_project_experts: boolean - allow_sso: boolean - white_label_id: optional + allow_ai: boolean + allow_ask_ai: boolean allow_data_credentials: boolean + allow_invite_people: boolean + allow_invite_project_experts: boolean allow_organization_webhooks: boolean + allow_sso: boolean + allow_storage_proxy: boolean + automax_enabled: boolean + automax_token_exists: boolean + cloud_instance: boolean disable_members_page: boolean - secure_mode: boolean - manual_workspace_management: boolean - manual_role_management: boolean - hide_storage_settings_for_manager: boolean disable_project_imports: boolean - automax_token_exists: boolean - automax_enabled: boolean - storage_persistence: boolean - allow_ai: boolean early_adopter: boolean - allow_ask_ai: boolean - allow_invite_people: boolean - allow_storage_proxy: boolean - embed_enabled: boolean embed_domains: optional>> + embed_enabled: boolean embed_settings: optional> + hide_storage_settings_for_manager: boolean + manual_role_management: boolean + manual_workspace_management: boolean + secure_mode: boolean + storage_persistence: boolean + white_label_id: optional source: openapi: openapi/openapi.yaml BillingInfoResponse: @@ -1433,28 +1433,32 @@ types: BlankEnum: literal<""> Blueprint: properties: + created_at: datetime + created_by: optional + description: + type: optional + docs: Project description id: integer + label_config: + type: optional + docs: Labeling configuration in XML format + project: integer share_id: string short_url: string - project: integer - created_by: optional title: type: optional docs: Blueprint name. Must be between 3 and 50 characters long. validation: maxLength: 50 - description: - type: optional - docs: Project description - label_config: - type: optional - docs: Labeling configuration in XML format - created_at: datetime updated_at: datetime source: openapi: openapi/openapi.yaml BlueprintList: properties: + created_at: datetime + description: + type: optional + docs: Project description id: integer share_id: string short_url: string @@ -1463,10 +1467,6 @@ types: docs: Blueprint name. Must be between 3 and 50 characters long. validation: maxLength: 50 - description: - type: optional - docs: Project description - created_at: datetime source: openapi: openapi/openapi.yaml BudgetResetPeriodEnum: @@ -1480,6 +1480,11 @@ types: openapi: openapi/openapi.yaml ChildFilter: properties: + column: + type: string + docs: Field name + validation: + maxLength: 1024 id: integer index: type: optional @@ -1487,141 +1492,136 @@ types: validation: min: -2147483648 max: 2147483647 - column: - type: string - docs: Field name - validation: - maxLength: 1024 - type: - type: string - docs: Field type - validation: - maxLength: 1024 operator: type: string docs: Filter operator validation: maxLength: 1024 - value: optional parent: type: optional docs: >- Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + type: + type: string + docs: Field type + validation: + maxLength: 1024 + value: optional source: openapi: openapi/openapi.yaml ChildFilterRequest: properties: - index: - type: optional - docs: Display order among root filters only - validation: - min: -2147483648 - max: 2147483647 column: type: string docs: Field name validation: minLength: 1 maxLength: 1024 - type: - type: string - docs: Field type + index: + type: optional + docs: Display order among root filters only validation: - minLength: 1 - maxLength: 1024 + min: -2147483648 + max: 2147483647 operator: type: string docs: Filter operator validation: minLength: 1 maxLength: 1024 - value: optional parent: type: optional docs: >- Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + type: + type: string + docs: Field type + validation: + minLength: 1 + maxLength: 1024 + value: optional source: openapi: openapi/openapi.yaml Comment: properties: - id: integer - region_ref: optional + annotation: optional classifications: optional - text: - type: optional - docs: Reviewer or annotator comment created_at: type: datetime docs: Creation time - updated_at: - type: datetime - docs: Last updated time + created_by: + type: integer + docs: User who made this comment + draft: optional + id: integer is_resolved: type: optional docs: True if the comment is resolved + project: optional + region_ref: optional resolved_at: type: optional docs: Resolving time - project: optional task: optional - draft: optional - annotation: optional - created_by: - type: integer - docs: User who made this comment + text: + type: optional + docs: Reviewer or annotator comment + updated_at: + type: datetime + docs: Last updated time source: openapi: openapi/openapi.yaml CommentRequest: properties: - region_ref: optional + annotation: optional classifications: optional - text: - type: optional - docs: Reviewer or annotator comment + draft: optional is_resolved: type: optional docs: True if the comment is resolved - draft: optional - annotation: optional + region_ref: optional + text: + type: optional + docs: Reviewer or annotator comment source: openapi: openapi/openapi.yaml CommentSerializerWithExpandedUser: properties: - id: integer - created_by: LseUser - region_ref: optional + annotation: optional classifications: optional - text: - type: optional - docs: Reviewer or annotator comment created_at: type: datetime docs: Creation time - updated_at: - type: datetime - docs: Last updated time + created_by: LseUser + draft: optional + id: integer is_resolved: type: optional docs: True if the comment is resolved + project: optional + region_ref: optional resolved_at: type: optional docs: Resolving time - project: optional task: optional - draft: optional - annotation: optional + text: + type: optional + docs: Reviewer or annotator comment + updated_at: + type: datetime + docs: Last updated time source: openapi: openapi/openapi.yaml ConvertedFormat: properties: - id: integer - status: optional export_type: type: string validation: maxLength: 64 + id: integer + status: optional traceback: type: optional docs: Traceback report in case of errors @@ -1629,12 +1629,12 @@ types: openapi: openapi/openapi.yaml ConvertedFormatRequest: properties: - status: optional export_type: type: string validation: minLength: 1 maxLength: 64 + status: optional traceback: type: optional docs: Traceback report in case of errors @@ -1659,36 +1659,36 @@ types: openapi: openapi/openapi.yaml Dataset: properties: - id: integer - created_by: - type: optional - docs: User who created Dataset + columns: optional created_at: type: datetime docs: Creation time - updated_at: - type: datetime - docs: Last updated time + created_by: + type: optional + docs: User who created Dataset + description: + type: optional + docs: Dataset description + id: integer + organization: optional title: type: string docs: Dataset title validation: maxLength: 1000 - description: - type: optional - docs: Dataset description - columns: optional total_entities: type: optional validation: min: -2147483648 max: 2147483647 + updated_at: + type: datetime + docs: Last updated time vector_db_dataset_name: type: optional docs: Dataset name for weaviate schema validation: maxLength: 37 - organization: optional source: openapi: openapi/openapi.yaml DatasetMember: @@ -1698,19 +1698,20 @@ types: openapi: openapi/openapi.yaml DatasetRequest: properties: + columns: optional created_by: type: optional docs: User who created Dataset + description: + type: optional + docs: Dataset description + organization: optional title: type: string docs: Dataset title validation: minLength: 1 maxLength: 1000 - description: - type: optional - docs: Dataset description - columns: optional total_entities: type: optional validation: @@ -1722,15 +1723,16 @@ types: validation: minLength: 1 maxLength: 37 - organization: optional source: openapi: openapi/openapi.yaml DatasetView: properties: - id: integer - filter_group: optional data: optional - ordering: optional + dataset: + type: integer + docs: Dataset ID + filter_group: optional + id: integer order: type: optional docs: >- @@ -1739,20 +1741,20 @@ types: validation: min: -2147483648 max: 2147483647 + ordering: optional selected_items: optional user: type: optional docs: User who made this view - dataset: - type: integer - docs: Dataset ID source: openapi: openapi/openapi.yaml DatasetViewRequest: properties: - filter_group: optional data: optional - ordering: optional + dataset: + type: integer + docs: Dataset ID + filter_group: optional order: type: optional docs: >- @@ -1761,13 +1763,11 @@ types: validation: min: -2147483648 max: 2147483647 + ordering: optional selected_items: optional user: type: optional docs: User who made this view - dataset: - type: integer - docs: Dataset ID source: openapi: openapi/openapi.yaml DefaultRoleCustomScriptsEditableBy: @@ -1785,27 +1785,20 @@ types: inline: true DefaultRole: properties: - organization: - type: integer - docs: A unique integer value identifying this organization. - default_role: - type: optional + annotator_reviewer_firewall_enabled_at: + type: optional + docs: >- + Set to current time to restrict data sharing between annotators and + reviewers in the label stream, review stream, and notifications (which + will be disabled). In these settings, information about annotator and + reviewer identity is suppressed in the UI. + custom_scripts_editable_by: + type: optional docs: |- - Default membership role for invited users + Set the minimum user role that can edit custom scripts in the UI. - * `OW` - Owner * `AD` - Administrator * `MA` - Manager - * `RE` - Reviewer - * `AN` - Annotator - * `DI` - Deactivated - * `NO` - Not Activated - external_id: - type: optional - docs: External ID to uniquely identify this organization - embed_domains: optional - embed_settings: optional - extra_data_on_activity_logs: optional custom_scripts_enabled_at: type: optional docs: >- @@ -1814,32 +1807,39 @@ types: any other organizations; otherwise an error will be raised. If this occurs, contact the LEAP team for assistance with enabling custom scripts. - custom_scripts_editable_by: - type: optional + default_role: + type: optional docs: |- - Set the minimum user role that can edit custom scripts in the UI. + Default membership role for invited users + * `OW` - Owner * `AD` - Administrator * `MA` - Manager - annotator_reviewer_firewall_enabled_at: + * `RE` - Reviewer + * `AN` - Annotator + * `DI` - Deactivated + * `NO` - Not Activated + email_notification_settings: optional + embed_domains: optional + embed_settings: optional + external_id: + type: optional + docs: External ID to uniquely identify this organization + extra_data_on_activity_logs: optional + label_stream_navigation_disabled_at: type: optional docs: >- - Set to current time to restrict data sharing between annotators and - reviewers in the label stream, review stream, and notifications (which - will be disabled). In these settings, information about annotator and - reviewer identity is suppressed in the UI. + Set to current time to disable the label stream navigation for this + organization. This will prevent users from going back in the label + stream to view previous labels. + organization: + type: integer + docs: A unique integer value identifying this organization. read_only_quick_view_enabled_at: type: optional docs: >- Set to current time to prevent creating or editing annotations in quick view. - label_stream_navigation_disabled_at: - type: optional - docs: >- - Set to current time to disable the label stream navigation for this - organization. This will prevent users from going back in the label - stream to view previous labels. - email_notification_settings: optional source: openapi: openapi/openapi.yaml DefaultRoleEnum: @@ -1872,121 +1872,121 @@ types: openapi: openapi/openapi.yaml Export: properties: - title: - type: optional - validation: - maxLength: 2048 - id: integer - created_by: optional + converted_formats: optional> + counters: optional created_at: type: datetime docs: Creation time + created_by: optional finished_at: type: optional docs: Complete or fail time - status: optional + id: integer md5: type: optional validation: maxLength: 128 - counters: optional - converted_formats: optional> + status: optional + title: + type: optional + validation: + maxLength: 2048 source: openapi: openapi/openapi.yaml FileUpload: properties: - id: integer file: string + id: integer source: openapi: openapi/openapi.yaml Filter: properties: - id: integer child_filter: optional - index: - type: optional - docs: Display order among root filters only - validation: - min: -2147483648 - max: 2147483647 column: type: string docs: Field name validation: maxLength: 1024 - type: - type: string - docs: Field type + id: integer + index: + type: optional + docs: Display order among root filters only validation: - maxLength: 1024 + min: -2147483648 + max: 2147483647 operator: type: string docs: Filter operator validation: maxLength: 1024 - value: optional parent: type: optional docs: >- Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + type: + type: string + docs: Field type + validation: + maxLength: 1024 + value: optional source: openapi: openapi/openapi.yaml FilterGroup: properties: - id: integer - filters: list conjunction: type: string docs: Type of conjunction validation: maxLength: 1024 + filters: list + id: integer source: openapi: openapi/openapi.yaml FilterGroupRequest: properties: - filters: list conjunction: type: string docs: Type of conjunction validation: minLength: 1 maxLength: 1024 + filters: list source: openapi: openapi/openapi.yaml FilterRequest: properties: child_filter: optional - index: - type: optional - docs: Display order among root filters only - validation: - min: -2147483648 - max: 2147483647 column: type: string docs: Field name validation: minLength: 1 maxLength: 1024 - type: - type: string - docs: Field type + index: + type: optional + docs: Display order among root filters only validation: - minLength: 1 - maxLength: 1024 + min: -2147483648 + max: 2147483647 operator: type: string docs: Filter operator validation: minLength: 1 maxLength: 1024 - value: optional parent: type: optional docs: >- Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + type: + type: string + docs: Field type + validation: + minLength: 1 + maxLength: 1024 + value: optional source: openapi: openapi/openapi.yaml FinishedEnum: @@ -2001,34 +2001,30 @@ types: openapi: openapi/openapi.yaml GcsDatasetStorage: properties: - id: integer - type: - type: string - default: gcs - synchronizable: - type: optional - default: true - presign: - type: optional - default: true bucket: type: optional docs: GCS bucket name - prefix: + created_at: + type: datetime + docs: Creation time + dataset: + type: integer + docs: A unique integer value identifying this dataset. + description: type: optional - docs: GCS bucket prefix - regex_filter: + docs: Cloud storage description + glob_pattern: type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Glob pattern for syncing from bucket google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file google_project_id: type: optional docs: Google project ID + id: integer + job_id: + type: optional last_sync: type: optional docs: Last sync finished time @@ -2043,61 +2039,59 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time + docs: GCS bucket prefix + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) validation: min: 0 max: 32767 - glob_pattern: + regex_filter: type: optional - docs: Glob pattern for syncing from bucket + docs: Cloud storage regex for filtering objects + status: optional synced: type: optional docs: Flag if dataset has been previously synced or not - job_id: - type: optional - dataset: - type: integer - docs: A unique integer value identifying this dataset. - source: - openapi: openapi/openapi.yaml - GcsDatasetStorageRequest: - properties: synchronizable: type: optional default: true - presign: - type: optional - default: true - bucket: - type: optional - docs: GCS bucket name - prefix: + title: type: optional - docs: GCS bucket prefix - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: gcs use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + GcsDatasetStorageRequest: + properties: + bucket: + type: optional + docs: GCS bucket name + dataset: + type: integer + docs: A unique integer value identifying this dataset. + description: + type: optional + docs: Cloud storage description + glob_pattern: + type: optional + docs: Glob pattern for syncing from bucket google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -2118,63 +2112,63 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: GCS bucket prefix + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) validation: min: 0 max: 32767 - glob_pattern: + regex_filter: type: optional - docs: Glob pattern for syncing from bucket + docs: Cloud storage regex for filtering objects + status: optional synced: type: optional docs: Flag if dataset has been previously synced or not - dataset: - type: integer - docs: A unique integer value identifying this dataset. - source: - openapi: openapi/openapi.yaml - GcsExportStorage: - properties: - id: integer - type: - type: string - default: gcs synchronizable: type: optional default: true - bucket: - type: optional - docs: GCS bucket name - prefix: + title: type: optional - docs: GCS bucket prefix - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + GcsExportStorage: + properties: + bucket: + type: optional + docs: GCS bucket name + can_delete_objects: + type: optional + docs: Deletion from storage enabled + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file google_project_id: type: optional docs: Google project ID + id: integer last_sync: type: optional docs: Last sync finished time @@ -2189,60 +2183,54 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional + prefix: + type: optional + docs: GCS bucket prefix + project: + type: integer + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - can_delete_objects: + docs: Traceback report for the last failed sync + type: + type: string + default: gcs + use_blob_urls: type: optional - docs: Deletion from storage enabled - project: - type: integer - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml GcsImportStorage: properties: - id: integer - type: - type: string - default: gcs - synchronizable: - type: optional - default: true - presign: - type: optional - default: true bucket: type: optional docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - regex_filter: + created_at: + type: datetime + docs: Creation time + description: type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file google_project_id: type: optional docs: Google project ID + id: integer last_sync: type: optional docs: Last sync finished time @@ -2257,22 +2245,13 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time + docs: GCS bucket prefix + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -2282,29 +2261,43 @@ types: project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - GcswifExportStorage: - properties: - id: integer - type: - type: string - default: gcswif + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional synchronizable: type: optional default: true - bucket: - type: optional - docs: GCS bucket name - prefix: + title: type: optional - docs: GCS bucket prefix - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: gcs use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + GcswifExportStorage: + properties: + bucket: + type: optional + docs: GCS bucket name + can_delete_objects: + type: optional + docs: Deletion from storage enabled + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -2314,15 +2307,16 @@ types: google_project_number: type: optional docs: Google project number + google_service_account_email: + type: optional + docs: Google service account email google_wif_pool_id: type: optional docs: Google WIF pool ID google_wif_provider_id: type: optional docs: Google WIF provider ID - google_service_account_email: - type: optional - docs: Google service account email + id: integer last_sync: type: optional docs: Last sync finished time @@ -2337,47 +2331,47 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional + prefix: + type: optional + docs: GCS bucket prefix + project: + type: integer + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - can_delete_objects: + docs: Traceback report for the last failed sync + type: + type: string + default: gcswif + use_blob_urls: type: optional - docs: Deletion from storage enabled - project: - type: integer - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml GcswifExportStorageRequest: properties: - synchronizable: - type: optional - default: true bucket: type: optional docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - regex_filter: - type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: + can_delete_objects: type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Deletion from storage enabled + description: + type: optional + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -2387,15 +2381,15 @@ types: google_project_number: type: optional docs: Google project number + google_service_account_email: + type: optional + docs: Google service account email google_wif_pool_id: type: optional docs: Google WIF pool ID google_wif_provider_id: type: optional docs: Google WIF provider ID - google_service_account_email: - type: optional - docs: Google service account email last_sync: type: optional docs: Last sync finished time @@ -2410,51 +2404,44 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional + prefix: + type: optional + docs: GCS bucket prefix + project: + type: integer + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description - can_delete_objects: + docs: Traceback report for the last failed sync + use_blob_urls: type: optional - docs: Deletion from storage enabled - project: - type: integer - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml GcswifImportStorage: properties: - id: integer - type: - type: string - default: gcswif - synchronizable: - type: optional - default: true - presign: - type: optional - default: true bucket: type: optional docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - regex_filter: + created_at: + type: datetime + docs: Creation time + description: type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -2464,15 +2451,16 @@ types: google_project_number: type: optional docs: Google project number + google_service_account_email: + type: optional + docs: Google service account email google_wif_pool_id: type: optional docs: Google WIF pool ID google_wif_provider_id: type: optional docs: Google WIF provider ID - google_service_account_email: - type: optional - docs: Google service account email + id: integer last_sync: type: optional docs: Last sync finished time @@ -2487,22 +2475,13 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time + docs: GCS bucket prefix + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -2512,28 +2491,37 @@ types: project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - GcswifImportStorageRequest: - properties: + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional synchronizable: type: optional default: true - presign: - type: optional - default: true - bucket: - type: optional - docs: GCS bucket name - prefix: + title: type: optional - docs: GCS bucket prefix - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: gcswif use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + GcswifImportStorageRequest: + properties: + bucket: + type: optional + docs: GCS bucket name + description: + type: optional + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -2543,15 +2531,15 @@ types: google_project_number: type: optional docs: Google project number + google_service_account_email: + type: optional + docs: Google service account email google_wif_pool_id: type: optional docs: Google WIF pool ID google_wif_provider_id: type: optional docs: Google WIF provider ID - google_service_account_email: - type: optional - docs: Google service account email last_sync: type: optional docs: Last sync finished time @@ -2566,19 +2554,13 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: GCS bucket prefix + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -2588,6 +2570,24 @@ types: project: type: integer docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml Hotkeys: @@ -2599,8 +2599,31 @@ types: docs: Tasks serializer for Import API (TaskBulkCreateAPI) properties: annotations: optional> - predictions: optional> + cancelled_annotations: + type: optional + docs: Number of total cancelled annotations for the current task + validation: + min: -2147483648 + max: 2147483647 + comment_authors: + type: optional> + docs: Users who wrote comments + comment_count: + type: optional + docs: Number of comments in the task including all annotations + validation: + min: -2147483648 + max: 2147483647 data: unknown + file_upload: + type: optional + docs: Uploaded file used as data source for this task + inner_id: + type: optional + docs: Internal task ID in the project, starts with 1 + last_comment_updated_at: + type: optional + docs: When the last comment was updated meta: optional overlap: type: optional @@ -2608,9 +2631,7 @@ types: validation: min: -2147483648 max: 2147483647 - inner_id: - type: optional - docs: Internal task ID in the project, starts with 1 + predictions: optional> total_annotations: type: optional docs: >- @@ -2619,94 +2640,73 @@ types: validation: min: -2147483648 max: 2147483647 - cancelled_annotations: - type: optional - docs: Number of total cancelled annotations for the current task - validation: - min: -2147483648 - max: 2147483647 total_predictions: type: optional docs: Number of total predictions for the current task validation: min: -2147483648 max: 2147483647 - comment_count: - type: optional - docs: Number of comments in the task including all annotations - validation: - min: -2147483648 - max: 2147483647 unresolved_comment_count: type: optional docs: Number of unresolved comments in the task including all annotations validation: min: -2147483648 max: 2147483647 - last_comment_updated_at: - type: optional - docs: When the last comment was updated updated_by: type: optional docs: Last annotator or reviewer who updated this task - file_upload: - type: optional - docs: Uploaded file used as data source for this task - comment_authors: - type: optional> - docs: Users who wrote comments source: openapi: openapi/openapi.yaml InferenceRunCostEstimate: properties: - prompt_cost_usd: - type: optional - docs: Cost of the prompt (in USD) completion_cost_usd: type: optional docs: Cost of the completion (in USD) - total_cost_usd: + error_message: type: optional - docs: Total cost of the inference (in USD) + docs: Error message details + error_type: + type: optional + docs: Type of error (e.g. "Timeout", "Rate Limit", etc) is_error: type: optional docs: Whether an error occurred or not - error_type: + prompt_cost_usd: type: optional - docs: Type of error (e.g. "Timeout", "Rate Limit", etc) - error_message: + docs: Cost of the prompt (in USD) + total_cost_usd: type: optional - docs: Error message details + docs: Total cost of the inference (in USD) source: openapi: openapi/openapi.yaml LseapiTokenCreate: properties: - token: string created_at: string expires_at: string + token: string source: openapi: openapi/openapi.yaml LseapiTokenList: properties: - token: string created_at: string expires_at: string + token: string source: openapi: openapi/openapi.yaml LsejwtSettings: properties: - api_tokens_enabled: - type: optional - docs: Enable JWT API token authentication for this organization - legacy_api_tokens_enabled: - type: optional - docs: Enable legacy API token authentication for this organization api_token_ttl_days: type: optional docs: Number of days before JWT API tokens expire validation: min: -2147483648 max: 2147483647 + api_tokens_enabled: + type: optional + docs: Enable JWT API token authentication for this organization + legacy_api_tokens_enabled: + type: optional + docs: Enable legacy API token authentication for this organization source: openapi: openapi/openapi.yaml LseKeyIndicatorValue: @@ -2732,90 +2732,90 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer - links: list + approved: + type: optional + docs: Status of label + approved_by: + type: optional + docs: User who approved this label created_at: type: datetime docs: Time of label creation - updated_at: - type: datetime - docs: Time of label modification - value: unknown + created_by: + type: integer + docs: User who made this label + description: + type: optional + docs: Label description + id: integer + links: list + organization: integer + projects: list title: type: string docs: Label title validation: maxLength: 2048 - description: - type: optional - docs: Label description + updated_at: + type: datetime + docs: Time of label modification + value: unknown + source: + openapi: openapi/openapi.yaml + LabelCreate: + properties: approved: type: optional docs: Status of label - created_by: - type: integer - docs: User who made this label approved_by: type: optional docs: User who approved this label - organization: integer - projects: list - source: - openapi: openapi/openapi.yaml - LabelCreate: - properties: - id: integer - created_by: integer - organization: integer - project: integer - from_name: string created_at: type: datetime docs: Time of label creation - updated_at: - type: datetime - docs: Time of label modification - value: unknown + created_by: integer + description: + type: optional + docs: Label description + from_name: string + id: integer + organization: integer + project: integer + projects: list title: type: string docs: Label title validation: maxLength: 2048 - description: - type: optional - docs: Label description + updated_at: + type: datetime + docs: Time of label modification + value: unknown + source: + openapi: openapi/openapi.yaml + LabelCreateRequest: + properties: approved: type: optional docs: Status of label approved_by: type: optional docs: User who approved this label - projects: list - source: - openapi: openapi/openapi.yaml - LabelCreateRequest: - properties: - project: integer + description: + type: optional + docs: Label description from_name: type: string validation: minLength: 1 - value: unknown + project: integer title: type: string docs: Label title validation: minLength: 1 maxLength: 2048 - description: - type: optional - docs: Label description - approved: - type: optional - docs: Status of label - approved_by: - type: optional - docs: User who approved this label + value: unknown source: openapi: openapi/openapi.yaml LabelLink: @@ -2825,15 +2825,15 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer annotations_count: integer from_name: type: string docs: Tag name validation: maxLength: 2048 - project: integer + id: integer label: integer + project: integer source: openapi: openapi/openapi.yaml LabelStreamTaskDistributionEnum: @@ -2874,22 +2874,16 @@ types: openapi: openapi/openapi.yaml LocalFilesExportStorage: properties: - id: integer - type: - type: string - default: localfiles - synchronizable: + can_delete_objects: type: optional - default: true - path: - type: optional - docs: Local path - regex_filter: + docs: Deletion from storage enabled + created_at: + type: datetime + docs: Creation time + description: type: optional - docs: Regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Cloud storage description + id: integer last_sync: type: optional docs: Last sync finished time @@ -2904,48 +2898,45 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + path: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - can_delete_objects: - type: optional - docs: Deletion from storage enabled + docs: Local path project: type: integer docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - LocalFilesImportStorage: - properties: - id: integer - type: - type: string - default: localfiles + regex_filter: + type: optional + docs: Regex for filtering objects + status: optional synchronizable: type: optional default: true - path: + title: type: optional - docs: Local path - regex_filter: + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: localfiles use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + LocalFilesImportStorage: + properties: + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description + id: integer last_sync: type: optional docs: Last sync finished time @@ -2960,25 +2951,34 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional + path: + type: optional + docs: Local path + project: + type: integer + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Regex for filtering objects + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - project: - type: integer - docs: A unique integer value identifying this project. + docs: Traceback report for the last failed sync + type: + type: string + default: localfiles + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml LseAnnotationFilterOptionsReviewed: @@ -3002,16 +3002,9 @@ types: inline: true LseAnnotationFilterOptions: properties: - usual: - type: optional - docs: Include not skipped and not ground truth annotations - default: true ground_truth: type: optional docs: Include ground truth annotations - skipped: - type: optional - docs: Include skipped annotations reviewed: type: optional docs: >- @@ -3025,6 +3018,13 @@ types: * `exclude` - exclude * `None` - None + skipped: + type: optional + docs: Include skipped annotations + usual: + type: optional + docs: Include not skipped and not ground truth annotations + default: true source: openapi: openapi/openapi.yaml LseAnnotationFilterOptionsRequestReviewed: @@ -3048,16 +3048,9 @@ types: inline: true LseAnnotationFilterOptionsRequest: properties: - usual: - type: optional - docs: Include not skipped and not ground truth annotations - default: true ground_truth: type: optional docs: Include ground truth annotations - skipped: - type: optional - docs: Include skipped annotations reviewed: type: optional docs: >- @@ -3071,43 +3064,41 @@ types: * `exclude` - exclude * `None` - None + skipped: + type: optional + docs: Include skipped annotations + usual: + type: optional + docs: Include not skipped and not ground truth annotations + default: true source: openapi: openapi/openapi.yaml LseExportCreate: properties: - title: - type: optional - validation: - maxLength: 2048 - id: integer - created_by: optional + annotation_filter_options: optional + converted_formats: optional> + counters: optional created_at: type: datetime docs: Creation time + created_by: optional finished_at: type: optional docs: Complete or fail time - status: optional + id: integer md5: type: optional validation: maxLength: 128 - counters: optional - converted_formats: optional> - task_filter_options: optional - annotation_filter_options: optional serialization_options: optional + status: optional + task_filter_options: optional + title: + type: optional + validation: + maxLength: 2048 source: openapi: openapi/openapi.yaml - LseFieldsTrialRole: - discriminated: false - union: - - TrialRoleEnum - - BlankEnum - - NullEnum - source: - openapi: openapi/openapi.yaml - inline: true LseFieldsOnboardingState: discriminated: false docs: |- @@ -3126,29 +3117,22 @@ types: source: openapi: openapi/openapi.yaml inline: true - LseFields: - properties: - invite_expired: string + LseFieldsTrialRole: + discriminated: false + union: + - TrialRoleEnum + - BlankEnum + - NullEnum + source: + openapi: openapi/openapi.yaml + inline: true + LseFields: + properties: + email_notification_settings: string + invite_activated: optional + invite_expired: string invite_expired_at: string invited_at: optional - invite_activated: optional - trial_company: - type: optional - validation: - maxLength: 1000 - trial_role: optional - trial_models_in_production: - type: optional - validation: - maxLength: 1000 - trial_experience_labeling: - type: optional - validation: - maxLength: 1000 - trial_license_enterprise: optional - social_auth_finished: - type: optional - docs: Is user finished social authentication invited_by: optional onboarding_state: type: optional @@ -3161,18 +3145,25 @@ types: * `first_tutorial` - First Tutorial * `in_app_guidance` - In App Guidance * `complete` - Complete - email_notification_settings: string - source: - openapi: openapi/openapi.yaml - LseFieldsRequestTrialRole: - discriminated: false - union: - - TrialRoleEnum - - BlankEnum - - NullEnum + social_auth_finished: + type: optional + docs: Is user finished social authentication + trial_company: + type: optional + validation: + maxLength: 1000 + trial_experience_labeling: + type: optional + validation: + maxLength: 1000 + trial_license_enterprise: optional + trial_models_in_production: + type: optional + validation: + maxLength: 1000 + trial_role: optional source: openapi: openapi/openapi.yaml - inline: true LseFieldsRequestOnboardingState: discriminated: false docs: |- @@ -3191,27 +3182,19 @@ types: source: openapi: openapi/openapi.yaml inline: true + LseFieldsRequestTrialRole: + discriminated: false + union: + - TrialRoleEnum + - BlankEnum + - NullEnum + source: + openapi: openapi/openapi.yaml + inline: true LseFieldsRequest: properties: - invited_at: optional invite_activated: optional - trial_company: - type: optional - validation: - maxLength: 1000 - trial_role: optional - trial_models_in_production: - type: optional - validation: - maxLength: 1000 - trial_experience_labeling: - type: optional - validation: - maxLength: 1000 - trial_license_enterprise: optional - social_auth_finished: - type: optional - docs: Is user finished social authentication + invited_at: optional invited_by: optional onboarding_state: type: optional @@ -3224,6 +3207,23 @@ types: * `first_tutorial` - First Tutorial * `in_app_guidance` - In App Guidance * `complete` - Complete + social_auth_finished: + type: optional + docs: Is user finished social authentication + trial_company: + type: optional + validation: + maxLength: 1000 + trial_experience_labeling: + type: optional + validation: + maxLength: 1000 + trial_license_enterprise: optional + trial_models_in_production: + type: optional + validation: + maxLength: 1000 + trial_role: optional source: openapi: openapi/openapi.yaml LseOrganizationCustomScriptsEditableBy: @@ -3241,12 +3241,16 @@ types: inline: true LseOrganization: properties: - id: integer - external_id: - type: optional - docs: External ID to uniquely identify this organization - title: string - token: string + billing: OrganizationBilling + created_at: datetime + custom_scripts_editable_by: + type: optional + docs: |- + Set the minimum user role that can edit custom scripts in the UI. + + * `AD` - Administrator + * `MA` - Manager + custom_scripts_enabled: string default_role: type: optional docs: |- @@ -3259,19 +3263,15 @@ types: * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated - created_at: datetime - billing: OrganizationBilling + email_notification_settings: string embed_domains: optional embed_settings: optional - custom_scripts_enabled: string - custom_scripts_editable_by: - type: optional - docs: |- - Set the minimum user role that can edit custom scripts in the UI. - - * `AD` - Administrator - * `MA` - Manager - email_notification_settings: string + external_id: + type: optional + docs: External ID to uniquely identify this organization + id: integer + title: string + token: string source: openapi: openapi/openapi.yaml LseOrganizationMemberList: @@ -3285,8 +3285,8 @@ types: organization: type: integer docs: Organization ID - user: LseUserOrganizationMemberList role: string + user: LseUserOrganizationMemberList source: openapi: openapi/openapi.yaml LseProjectSampling: @@ -3310,39 +3310,81 @@ types: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: integer - title: + annotation_limit_count: + type: optional + validation: + min: 1 + annotation_limit_percent: type: optional - docs: Project name. Must be between 3 and 50 characters long. validation: - minLength: 3 - maxLength: 50 - description: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_score: type: optional - docs: Project description - label_config: + default: '95.00' + validation: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_tasks: + type: optional + default: 10 + validation: + min: 0 + assignment_settings: AssignmentSettings + color: type: optional - docs: Label config in XML format. See more about it in documentation - expert_instruction: + validation: + maxLength: 16 + comment_classification_config: optional + config_has_control_tags: + type: boolean + docs: Flag to detect is project ready for labeling + config_suitable_for_bulk_annotation: + type: boolean + docs: Flag to detect is project ready for bulk annotation + control_weights: optional + created_at: datetime + created_by: + type: optional + docs: Project owner + custom_script: optional + custom_task_lock_ttl: + type: optional + docs: TTL in seconds for task reservations, on new and existing tasks + validation: + min: 1 + max: 86400 + data_types: unknown + description: type: optional - docs: Labeling instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the annotator before they start - show_skip_button: + docs: Project description + duplication_done: type: optional - docs: Show a skip button in interface and allow annotators to skip the task + default: false + duplication_status: optional enable_empty_annotation: type: optional docs: Allow annotators to submit empty annotations - show_annotation_history: + evaluate_predictions_automatically: type: optional - docs: Show annotation history to annotator - organization: optional - color: + docs: Retrieve and display predictions when loading a task + expert_instruction: type: optional - validation: - maxLength: 16 + docs: Labeling instructions in HTML format + finished_task_number: + type: integer + docs: Finished tasks + ground_truth_number: + type: integer + docs: Honeypot annotation number in project + id: integer + is_draft: + type: optional + docs: Whether or not the project is in the middle of being created + is_published: + type: optional + docs: Whether or not the project is published to annotators + label_config: + type: optional + docs: Label config in XML format. See more about it in documentation maximum_annotations: type: optional docs: >- @@ -3352,19 +3394,8 @@ types: validation: min: -2147483648 max: 2147483647 - is_published: - type: optional - docs: Whether or not the project is published to annotators - model_version: - type: optional - docs: Machine learning model version - is_draft: - type: optional - docs: Whether or not the project is in the middle of being created - created_by: - type: optional - docs: Project owner - created_at: datetime + members: string + members_count: integer min_annotations_to_start_training: type: optional docs: >- @@ -3373,127 +3404,96 @@ types: validation: min: -2147483648 max: 2147483647 - start_training_on_annotation_update: - type: boolean - docs: Start model training after any annotations are submitted or updated - show_collab_predictions: - type: optional - docs: If set, the annotator can view model predictions + model_version: + type: optional + docs: Machine learning model version num_tasks_with_annotations: type: integer docs: Tasks with annotations count - task_number: - type: integer - docs: Total task number in project - useful_annotation_number: - type: integer - docs: >- - Useful annotation number in project not including - skipped_annotations_number and ground_truth_number. Total annotations - = annotation_number + skipped_annotations_number + ground_truth_number - ground_truth_number: - type: integer - docs: Honeypot annotation number in project - skipped_annotations_number: - type: integer - docs: Skipped by collaborators annotation number in project - total_annotations_number: - type: integer - docs: >- - Total annotations number in project including - skipped_annotations_number and ground_truth_number. - total_predictions_number: - type: integer - docs: >- - Total predictions number in project including - skipped_annotations_number, ground_truth_number, and - useful_annotation_number. - sampling: optional - show_ground_truth_first: optional - show_overlap_first: optional + organization: optional overlap_cohort_percentage: type: optional validation: min: -2147483648 max: 2147483647 - task_data_login: - type: optional - docs: 'Task data credentials: login' - validation: - maxLength: 256 - task_data_password: - type: optional - docs: 'Task data credentials: password' - validation: - maxLength: 256 - control_weights: optional parsed_label_config: unknown - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean - docs: Flag to detect is project ready for labeling - skip_queue: optional - reveal_preannotations_interactively: + pause_on_failed_annotator_evaluation: type: optional - docs: Reveal pre-annotations interactively + default: false pinned_at: type: optional docs: Pinned date and time - finished_task_number: - type: integer - docs: Finished tasks - queue_total: string + prompts: string queue_done: string - config_suitable_for_bulk_annotation: - type: boolean - docs: Flag to detect is project ready for bulk annotation - workspace: string - review_settings: ReviewSettings - assignment_settings: AssignmentSettings - members: string - custom_script: optional - comment_classification_config: optional - duplication_done: - type: optional - default: false - duplication_status: optional + queue_left: string + queue_total: string require_comment_on_skip: type: optional default: false - data_types: unknown + reveal_preannotations_interactively: + type: optional + docs: Reveal pre-annotations interactively + review_settings: ReviewSettings reviewer_queue_total: string - queue_left: string - members_count: integer - custom_task_lock_ttl: - type: optional - docs: TTL in seconds for task reservations, on new and existing tasks - validation: - min: 1 - max: 86400 - prompts: string - annotation_limit_count: - type: optional - validation: - min: 1 - annotation_limit_percent: + sampling: optional + show_annotation_history: + type: optional + docs: Show annotation history to annotator + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: Show a skip button in interface and allow annotators to skip the task + skip_queue: optional + skipped_annotations_number: + type: integer + docs: Skipped by collaborators annotation number in project + start_training_on_annotation_update: + type: boolean + docs: Start model training after any annotations are submitted or updated + task_data_login: type: optional + docs: 'Task data credentials: login' validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - pause_on_failed_annotator_evaluation: - type: optional - default: false - annotator_evaluation_minimum_score: + maxLength: 256 + task_data_password: type: optional - default: '95.00' + docs: 'Task data credentials: password' validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - annotator_evaluation_minimum_tasks: - type: optional - default: 10 + maxLength: 256 + task_number: + type: integer + docs: Total task number in project + title: + type: optional + docs: Project name. Must be between 3 and 50 characters long. validation: - min: 0 + minLength: 3 + maxLength: 50 + total_annotations_number: + type: integer + docs: >- + Total annotations number in project including + skipped_annotations_number and ground_truth_number. + total_predictions_number: + type: integer + docs: >- + Total predictions number in project including + skipped_annotations_number, ground_truth_number, and + useful_annotation_number. + useful_annotation_number: + type: integer + docs: >- + Useful annotation number in project not including + skipped_annotations_number and ground_truth_number. Total annotations + = annotation_number + skipped_annotations_number + ground_truth_number + workspace: string workspace_title: string source: openapi: openapi/openapi.yaml @@ -3502,25 +3502,25 @@ types: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: integer - task_number: - type: integer - docs: Total task number in project finished_task_number: integer - total_predictions_number: integer - total_annotations_number: string - num_tasks_with_annotations: string - useful_annotation_number: string ground_truth_number: type: integer docs: Honeypot annotation number in project - skipped_annotations_number: string - rejected: string - queue_total: string + id: integer + num_tasks_with_annotations: string queue_done: string queue_left: string - reviewed_number: string + queue_total: string + rejected: string review_total_tasks: string + reviewed_number: string + skipped_annotations_number: string + task_number: + type: integer + docs: Total task number in project + total_annotations_number: string + total_predictions_number: integer + useful_annotation_number: string source: openapi: openapi/openapi.yaml LseProjectCreateSampling: @@ -3544,39 +3544,49 @@ types: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: integer - title: + color: type: optional - docs: Project name. Must be between 3 and 50 characters long. validation: - minLength: 3 - maxLength: 50 + maxLength: 16 + config_has_control_tags: + type: boolean + docs: Flag to detect is project ready for labeling + config_suitable_for_bulk_annotation: + type: boolean + docs: Flag to detect is project ready for bulk annotation + control_weights: optional + created_at: datetime + created_by: + type: optional + docs: Project owner description: type: optional docs: Project description - label_config: - type: optional - docs: Label config in XML format. See more about it in documentation + enable_empty_annotation: + type: optional + docs: Allow annotators to submit empty annotations + evaluate_predictions_automatically: + type: optional + docs: Retrieve and display predictions when loading a task expert_instruction: type: optional docs: Labeling instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the annotator before they start - show_skip_button: - type: optional - docs: Show a skip button in interface and allow annotators to skip the task - enable_empty_annotation: + finished_task_number: + type: integer + docs: Finished tasks + ground_truth_number: + type: integer + docs: Honeypot annotation number in project + id: integer + is_draft: type: optional - docs: Allow annotators to submit empty annotations - show_annotation_history: + docs: Whether or not the project is in the middle of being created + is_published: type: optional - docs: Show annotation history to annotator - organization: optional - color: + docs: Whether or not the project is published to annotators + label_config: type: optional - validation: - maxLength: 16 + docs: Label config in XML format. See more about it in documentation maximum_annotations: type: optional docs: >- @@ -3586,19 +3596,6 @@ types: validation: min: -2147483648 max: 2147483647 - is_published: - type: optional - docs: Whether or not the project is published to annotators - model_version: - type: optional - docs: Machine learning model version - is_draft: - type: optional - docs: Whether or not the project is in the middle of being created - created_by: - type: optional - docs: Project owner - created_at: datetime min_annotations_to_start_training: type: optional docs: >- @@ -3607,49 +3604,49 @@ types: validation: min: -2147483648 max: 2147483647 - start_training_on_annotation_update: - type: boolean - docs: Start model training after any annotations are submitted or updated - show_collab_predictions: - type: optional - docs: If set, the annotator can view model predictions + model_version: + type: optional + docs: Machine learning model version num_tasks_with_annotations: type: integer docs: Tasks with annotations count - task_number: - type: integer - docs: Total task number in project - useful_annotation_number: - type: integer - docs: >- - Useful annotation number in project not including - skipped_annotations_number and ground_truth_number. Total annotations - = annotation_number + skipped_annotations_number + ground_truth_number - ground_truth_number: - type: integer - docs: Honeypot annotation number in project - skipped_annotations_number: - type: integer - docs: Skipped by collaborators annotation number in project - total_annotations_number: - type: integer - docs: >- - Total annotations number in project including - skipped_annotations_number and ground_truth_number. - total_predictions_number: - type: integer - docs: >- - Total predictions number in project including - skipped_annotations_number, ground_truth_number, and - useful_annotation_number. - sampling: optional - show_ground_truth_first: optional - show_overlap_first: optional + organization: optional overlap_cohort_percentage: type: optional validation: min: -2147483648 max: 2147483647 + parsed_label_config: unknown + pinned_at: + type: optional + docs: Pinned date and time + queue_done: integer + queue_total: integer + reveal_preannotations_interactively: + type: optional + docs: Reveal pre-annotations interactively + sampling: optional + show_annotation_history: + type: optional + docs: Show annotation history to annotator + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: Show a skip button in interface and allow annotators to skip the task + skip_queue: optional + skipped_annotations_number: + type: integer + docs: Skipped by collaborators annotation number in project + start_training_on_annotation_update: + type: boolean + docs: Start model training after any annotations are submitted or updated task_data_login: type: optional docs: 'Task data credentials: login' @@ -3660,29 +3657,32 @@ types: docs: 'Task data credentials: password' validation: maxLength: 256 - control_weights: optional - parsed_label_config: unknown - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean - docs: Flag to detect is project ready for labeling - skip_queue: optional - reveal_preannotations_interactively: - type: optional - docs: Reveal pre-annotations interactively - pinned_at: - type: optional - docs: Pinned date and time - finished_task_number: + task_number: type: integer - docs: Finished tasks - queue_total: integer - queue_done: integer - config_suitable_for_bulk_annotation: - type: boolean - docs: Flag to detect is project ready for bulk annotation + docs: Total task number in project + title: + type: optional + docs: Project name. Must be between 3 and 50 characters long. + validation: + minLength: 3 + maxLength: 50 + total_annotations_number: + type: integer + docs: >- + Total annotations number in project including + skipped_annotations_number and ground_truth_number. + total_predictions_number: + type: integer + docs: >- + Total predictions number in project including + skipped_annotations_number, ground_truth_number, and + useful_annotation_number. + useful_annotation_number: + type: integer + docs: >- + Useful annotation number in project not including + skipped_annotations_number and ground_truth_number. Total annotations + = annotation_number + skipped_annotations_number + ground_truth_number workspace: optional source: openapi: openapi/openapi.yaml @@ -3707,39 +3707,76 @@ types: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: integer - title: + annotation_limit_count: + type: optional + validation: + min: 1 + annotation_limit_percent: type: optional - docs: Project name. Must be between 3 and 50 characters long. validation: - minLength: 3 - maxLength: 50 + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_score: + type: optional + default: '95.00' + validation: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_tasks: + type: optional + default: 10 + validation: + min: 0 + assignment_settings: AssignmentSettings + color: + type: optional + validation: + maxLength: 16 + comment_classification_config: optional + config_has_control_tags: + type: boolean + docs: Flag to detect is project ready for labeling + config_suitable_for_bulk_annotation: + type: boolean + docs: Flag to detect is project ready for bulk annotation + control_weights: optional + created_at: datetime + created_by: + type: optional + docs: Project owner + custom_script: optional + custom_task_lock_ttl: + type: optional + docs: TTL in seconds for task reservations, on new and existing tasks + validation: + min: 1 + max: 86400 description: type: optional docs: Project description - label_config: - type: optional - docs: Label config in XML format. See more about it in documentation + enable_empty_annotation: + type: optional + docs: Allow annotators to submit empty annotations + evaluate_predictions_automatically: + type: optional + docs: Retrieve and display predictions when loading a task expert_instruction: type: optional docs: Labeling instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the annotator before they start - show_skip_button: - type: optional - docs: Show a skip button in interface and allow annotators to skip the task - enable_empty_annotation: + finished_task_number: + type: integer + docs: Finished tasks + ground_truth_number: + type: integer + docs: Honeypot annotation number in project + id: integer + is_draft: type: optional - docs: Allow annotators to submit empty annotations - show_annotation_history: + docs: Whether or not the project is in the middle of being created + is_published: type: optional - docs: Show annotation history to annotator - organization: optional - color: + docs: Whether or not the project is published to annotators + label_config: type: optional - validation: - maxLength: 16 + docs: Label config in XML format. See more about it in documentation maximum_annotations: type: optional docs: >- @@ -3749,19 +3786,6 @@ types: validation: min: -2147483648 max: 2147483647 - is_published: - type: optional - docs: Whether or not the project is published to annotators - model_version: - type: optional - docs: Machine learning model version - is_draft: - type: optional - docs: Whether or not the project is in the middle of being created - created_by: - type: optional - docs: Project owner - created_at: datetime min_annotations_to_start_training: type: optional docs: >- @@ -3770,130 +3794,127 @@ types: validation: min: -2147483648 max: 2147483647 - start_training_on_annotation_update: - type: boolean - docs: Start model training after any annotations are submitted or updated - show_collab_predictions: - type: optional - docs: If set, the annotator can view model predictions + model_version: + type: optional + docs: Machine learning model version num_tasks_with_annotations: type: integer docs: Tasks with annotations count - task_number: - type: integer - docs: Total task number in project - useful_annotation_number: - type: integer - docs: >- - Useful annotation number in project not including - skipped_annotations_number and ground_truth_number. Total annotations - = annotation_number + skipped_annotations_number + ground_truth_number - ground_truth_number: - type: integer - docs: Honeypot annotation number in project - skipped_annotations_number: - type: integer - docs: Skipped by collaborators annotation number in project - total_annotations_number: - type: integer - docs: >- - Total annotations number in project including - skipped_annotations_number and ground_truth_number. - total_predictions_number: - type: integer - docs: >- - Total predictions number in project including - skipped_annotations_number, ground_truth_number, and - useful_annotation_number. - sampling: optional - show_ground_truth_first: optional - show_overlap_first: optional + organization: optional overlap_cohort_percentage: type: optional validation: min: -2147483648 max: 2147483647 - task_data_login: - type: optional - docs: 'Task data credentials: login' - validation: - maxLength: 256 - task_data_password: - type: optional - docs: 'Task data credentials: password' - validation: - maxLength: 256 - control_weights: optional parsed_label_config: unknown - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean - docs: Flag to detect is project ready for labeling - skip_queue: optional - reveal_preannotations_interactively: + pause_on_failed_annotator_evaluation: type: optional - docs: Reveal pre-annotations interactively + default: false pinned_at: type: optional docs: Pinned date and time - finished_task_number: - type: integer - docs: Finished tasks - queue_total: integer + prompts: string queue_done: integer - config_suitable_for_bulk_annotation: - type: boolean - docs: Flag to detect is project ready for bulk annotation - workspace: integer - review_settings: ReviewSettings - assignment_settings: AssignmentSettings - custom_script: optional - comment_classification_config: optional + queue_total: integer require_comment_on_skip: type: optional default: false - custom_task_lock_ttl: - type: optional - docs: TTL in seconds for task reservations, on new and existing tasks - validation: - min: 1 - max: 86400 - prompts: string - annotation_limit_count: - type: optional - validation: - min: 1 - annotation_limit_percent: + reveal_preannotations_interactively: + type: optional + docs: Reveal pre-annotations interactively + review_settings: ReviewSettings + sampling: optional + show_annotation_history: + type: optional + docs: Show annotation history to annotator + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: Show a skip button in interface and allow annotators to skip the task + skip_queue: optional + skipped_annotations_number: + type: integer + docs: Skipped by collaborators annotation number in project + start_training_on_annotation_update: + type: boolean + docs: Start model training after any annotations are submitted or updated + task_data_login: type: optional + docs: 'Task data credentials: login' validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - pause_on_failed_annotator_evaluation: - type: optional - default: false - annotator_evaluation_minimum_score: + maxLength: 256 + task_data_password: type: optional - default: '95.00' + docs: 'Task data credentials: password' validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - annotator_evaluation_minimum_tasks: - type: optional - default: 10 + maxLength: 256 + task_number: + type: integer + docs: Total task number in project + title: + type: optional + docs: Project name. Must be between 3 and 50 characters long. validation: - min: 0 + minLength: 3 + maxLength: 50 + total_annotations_number: + type: integer + docs: >- + Total annotations number in project including + skipped_annotations_number and ground_truth_number. + total_predictions_number: + type: integer + docs: >- + Total predictions number in project including + skipped_annotations_number, ground_truth_number, and + useful_annotation_number. + useful_annotation_number: + type: integer + docs: >- + Useful annotation number in project not including + skipped_annotations_number and ground_truth_number. Total annotations + = annotation_number + skipped_annotations_number + ground_truth_number + workspace: integer workspace_title: string source: openapi: openapi/openapi.yaml LseS3ExportStorage: properties: - id: integer - type: - type: string - default: s3s - synchronizable: + aws_access_key_id: + type: optional + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + can_delete_objects: type: optional - default: true + docs: Deletion from storage enabled + created_at: + type: datetime + docs: Creation time + description: + type: optional + docs: Cloud storage description + external_id: + type: optional + docs: AWS ExternalId + id: integer last_sync: type: optional docs: Last sync finished time @@ -3908,37 +3929,48 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync + legacy_auth: optional meta: optional + prefix: + type: optional + docs: S3 bucket prefix + project: + type: integer + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + region_name: + type: optional + docs: AWS Region + role_arn: + type: string + docs: AWS RoleArn + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: - type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - can_delete_objects: - type: optional - docs: Deletion from storage enabled - bucket: - type: optional - docs: S3 bucket name - prefix: - type: optional - docs: S3 bucket prefix - regex_filter: + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync + type: + type: string + default: s3s use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + LseS3ExportStorageRequest: + properties: aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -3951,29 +3983,18 @@ types: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID - region_name: + bucket: type: optional - docs: AWS Region - s3_endpoint: + docs: S3 bucket name + can_delete_objects: + type: optional + docs: Deletion from storage enabled + description: type: optional - docs: S3 Endpoint + docs: Cloud storage description external_id: type: optional docs: AWS ExternalId - role_arn: - type: string - docs: AWS RoleArn - legacy_auth: optional - project: - type: integer - docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - LseS3ExportStorageRequest: - properties: - synchronizable: - type: optional - default: true last_sync: type: optional docs: Last sync finished time @@ -3988,34 +4009,47 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync + legacy_auth: optional meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - can_delete_objects: - type: optional - docs: Deletion from storage enabled - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + project: + type: integer + docs: A unique integer value identifying this project. regex_filter: type: optional docs: Cloud storage regex for filtering objects + region_name: + type: optional + docs: AWS Region + role_arn: + type: string + docs: AWS RoleArn + validation: + minLength: 1 + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + LseS3ImportStorage: + properties: aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -4028,38 +4062,19 @@ types: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID - region_name: + bucket: type: optional - docs: AWS Region - s3_endpoint: + docs: S3 bucket name + created_at: + type: datetime + docs: Creation time + description: type: optional - docs: S3 Endpoint + docs: Cloud storage description external_id: type: optional docs: AWS ExternalId - role_arn: - type: string - docs: AWS RoleArn - validation: - minLength: 1 - legacy_auth: optional - project: - type: integer - docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - LseS3ImportStorage: - properties: id: integer - type: - type: string - default: s3s - synchronizable: - type: optional - default: true - presign: - type: optional - default: true last_sync: type: optional docs: Last sync finished time @@ -4074,34 +4089,60 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync + legacy_auth: optional meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + presign: + type: optional + default: true + presign_ttl: + type: optional + docs: Presigned URLs TTL (in minutes) + validation: + min: 0 + max: 32767 + project: + type: integer + docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects + region_name: + type: optional + docs: AWS Region + role_arn: + type: string + docs: AWS RoleArn + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + type: + type: string + default: s3s use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + LseS3ImportStorageRequest: + properties: aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -4114,41 +4155,15 @@ types: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID - region_name: + bucket: type: optional - docs: AWS Region - s3_endpoint: + docs: S3 bucket name + description: type: optional - docs: S3 Endpoint + docs: Cloud storage description external_id: type: optional docs: AWS ExternalId - role_arn: - type: string - docs: AWS RoleArn - legacy_auth: optional - presign_ttl: - type: optional - docs: Presigned URLs TTL (in minutes) - validation: - min: 0 - max: 32767 - recursive_scan: - type: optional - docs: Perform recursive scan over the bucket content - project: - type: integer - docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - LseS3ImportStorageRequest: - properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true last_sync: type: optional docs: Last sync finished time @@ -4163,101 +4178,86 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync + legacy_auth: optional meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + presign: + type: optional + default: true + presign_ttl: + type: optional + docs: Presigned URLs TTL (in minutes) + validation: + min: 0 + max: 32767 + project: + type: integer + docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: optional - docs: AWS SSE KMS Key ID region_name: type: optional docs: AWS Region - s3_endpoint: - type: optional - docs: S3 Endpoint - external_id: - type: optional - docs: AWS ExternalId role_arn: type: string docs: AWS RoleArn validation: minLength: 1 - legacy_auth: optional - presign_ttl: - type: optional - docs: Presigned URLs TTL (in minutes) + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title validation: - min: 0 - max: 32767 - recursive_scan: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: type: optional - docs: Perform recursive scan over the bucket content - project: - type: integer - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml - LseTaskPredictionsItem: + LseTaskDraftsItem: properties: - result: - type: optional>> - score: - type: optional - model_version: - type: optional - model: - type: optional> - model_run: - type: optional> - task: - type: optional - project: - type: optional created_at: type: optional + result: + type: optional>> updated_at: type: optional source: openapi: openapi/openapi.yaml inline: true - LseTaskDraftsItem: + LseTaskPredictionsItem: properties: - result: - type: optional>> created_at: type: optional + model: + type: optional> + model_run: + type: optional> + model_version: + type: optional + project: + type: optional + result: + type: optional>> + score: + type: optional + task: + type: optional updated_at: type: optional source: @@ -4266,94 +4266,95 @@ types: LseTask: docs: Task Serializer with project scheme configs validation properties: - id: integer agreement: string - predictions: - docs: Predictions for this task - type: list annotations: string - drafts: - docs: Drafts for this task - type: list + annotations_ids: string + annotations_results: string annotators: docs: Annotators IDs who annotated this task type: list - inner_id: optional - cancelled_annotations: optional - total_annotations: optional - total_predictions: optional - completed_at: optional - annotations_results: string - predictions_results: string - predictions_score: optional - file_upload: string - storage_filename: string - annotations_ids: string - predictions_model_versions: string - avg_lead_time: optional - draft_exists: optional - updated_by: - docs: User IDs who updated this task - type: list> - reviewers: list> - comments: string - comment_authors: list> - reviewed: optional - reviews_accepted: optional - reviews_rejected: optional - ground_truth: optional annotators_count: type: integer docs: >- The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. - reviewers_count: integer + avg_lead_time: optional + cancelled_annotations: optional + comment_authors: list> comment_authors_count: integer - data: unknown - meta: optional + comment_count: + type: optional + docs: Number of comments in the task including all annotations + validation: + min: -2147483648 + max: 2147483647 + comments: string + completed_at: optional created_at: type: datetime docs: Time a task was created - updated_at: - type: datetime - docs: Last time a task was updated + data: unknown + draft_exists: optional + drafts: + docs: Drafts for this task + type: list + file_upload: string + ground_truth: optional + id: integer + inner_id: optional is_labeled: type: optional docs: >- True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + last_comment_updated_at: + type: optional + docs: When the last comment was updated + meta: optional overlap: type: optional docs: Number of distinct annotators that processed the current task validation: min: -2147483648 max: 2147483647 - comment_count: + predictions: + docs: Predictions for this task + type: list + predictions_model_versions: string + predictions_results: string + predictions_score: optional + project: type: optional - docs: Number of comments in the task including all annotations - validation: - min: -2147483648 - max: 2147483647 + docs: Project ID for this task + reviewed: optional + reviewers: list> + reviewers_count: integer + reviews_accepted: optional + reviews_rejected: optional + storage_filename: string + total_annotations: optional + total_predictions: optional unresolved_comment_count: type: optional docs: Number of unresolved comments in the task including all annotations validation: min: -2147483648 max: 2147483647 - last_comment_updated_at: - type: optional - docs: When the last comment was updated - project: - type: optional - docs: Project ID for this task + updated_at: + type: datetime + docs: Last time a task was updated + updated_by: + docs: User IDs who updated this task + type: list> source: openapi: openapi/openapi.yaml - LseTaskFilterOptionsSkipped: + LseTaskFilterOptionsAnnotated: discriminated: false docs: >- - `only` - include all tasks with skipped annotations
`exclude` - exclude - all tasks with skipped annotations + `only` - include all tasks with at least one not skipped + annotation
`exclude` - exclude all tasks with at least one not skipped + annotation * `only` - only @@ -4362,7 +4363,7 @@ types: * `None` - None union: - - SkippedEnum + - AnnotatedEnum - NullEnum source: openapi: openapi/openapi.yaml @@ -4385,12 +4386,11 @@ types: source: openapi: openapi/openapi.yaml inline: true - LseTaskFilterOptionsAnnotated: + LseTaskFilterOptionsReviewed: discriminated: false docs: >- - `only` - include all tasks with at least one not skipped - annotation
`exclude` - exclude all tasks with at least one not skipped - annotation + `only` - include all reviewed tasks
`exclude` - exclude all reviewed + tasks * `only` - only @@ -4399,16 +4399,16 @@ types: * `None` - None union: - - AnnotatedEnum + - ReviewedEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true - LseTaskFilterOptionsReviewed: + LseTaskFilterOptionsSkipped: discriminated: false docs: >- - `only` - include all reviewed tasks
`exclude` - exclude all reviewed - tasks + `only` - include all tasks with skipped annotations
`exclude` - exclude + all tasks with skipped annotations * `only` - only @@ -4417,21 +4417,19 @@ types: * `None` - None union: - - ReviewedEnum + - SkippedEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true LseTaskFilterOptions: properties: - view: - type: optional - docs: Apply filters from the view ID (a tab from the Data Manager) - skipped: - type: optional + annotated: + type: optional docs: >- - `only` - include all tasks with skipped annotations
`exclude` - - exclude all tasks with skipped annotations + `only` - include all tasks with at least one not skipped + annotation
`exclude` - exclude all tasks with at least one not + skipped annotation * `only` - only @@ -4451,12 +4449,14 @@ types: * `exclude` - exclude * `None` - None - annotated: - type: optional + only_with_annotations: + type: optional + default: false + reviewed: + type: optional docs: >- - `only` - include all tasks with at least one not skipped - annotation
`exclude` - exclude all tasks with at least one not - skipped annotation + `only` - include all reviewed tasks
`exclude` - exclude all + reviewed tasks * `only` - only @@ -4464,14 +4464,11 @@ types: * `exclude` - exclude * `None` - None - only_with_annotations: - type: optional - default: false - reviewed: - type: optional + skipped: + type: optional docs: >- - `only` - include all reviewed tasks
`exclude` - exclude all - reviewed tasks + `only` - include all tasks with skipped annotations
`exclude` - + exclude all tasks with skipped annotations * `only` - only @@ -4479,13 +4476,17 @@ types: * `exclude` - exclude * `None` - None + view: + type: optional + docs: Apply filters from the view ID (a tab from the Data Manager) source: openapi: openapi/openapi.yaml - LseTaskFilterOptionsRequestSkipped: + LseTaskFilterOptionsRequestAnnotated: discriminated: false docs: >- - `only` - include all tasks with skipped annotations
`exclude` - exclude - all tasks with skipped annotations + `only` - include all tasks with at least one not skipped + annotation
`exclude` - exclude all tasks with at least one not skipped + annotation * `only` - only @@ -4494,7 +4495,7 @@ types: * `None` - None union: - - SkippedEnum + - AnnotatedEnum - NullEnum source: openapi: openapi/openapi.yaml @@ -4517,12 +4518,11 @@ types: source: openapi: openapi/openapi.yaml inline: true - LseTaskFilterOptionsRequestAnnotated: + LseTaskFilterOptionsRequestReviewed: discriminated: false docs: >- - `only` - include all tasks with at least one not skipped - annotation
`exclude` - exclude all tasks with at least one not skipped - annotation + `only` - include all reviewed tasks
`exclude` - exclude all reviewed + tasks * `only` - only @@ -4531,16 +4531,16 @@ types: * `None` - None union: - - AnnotatedEnum + - ReviewedEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true - LseTaskFilterOptionsRequestReviewed: + LseTaskFilterOptionsRequestSkipped: discriminated: false docs: >- - `only` - include all reviewed tasks
`exclude` - exclude all reviewed - tasks + `only` - include all tasks with skipped annotations
`exclude` - exclude + all tasks with skipped annotations * `only` - only @@ -4549,21 +4549,19 @@ types: * `None` - None union: - - ReviewedEnum + - SkippedEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true LseTaskFilterOptionsRequest: properties: - view: - type: optional - docs: Apply filters from the view ID (a tab from the Data Manager) - skipped: - type: optional + annotated: + type: optional docs: >- - `only` - include all tasks with skipped annotations
`exclude` - - exclude all tasks with skipped annotations + `only` - include all tasks with at least one not skipped + annotation
`exclude` - exclude all tasks with at least one not + skipped annotation * `only` - only @@ -4583,12 +4581,14 @@ types: * `exclude` - exclude * `None` - None - annotated: - type: optional + only_with_annotations: + type: optional + default: false + reviewed: + type: optional docs: >- - `only` - include all tasks with at least one not skipped - annotation
`exclude` - exclude all tasks with at least one not - skipped annotation + `only` - include all reviewed tasks
`exclude` - exclude all + reviewed tasks * `only` - only @@ -4596,14 +4596,11 @@ types: * `exclude` - exclude * `None` - None - only_with_annotations: - type: optional - default: false - reviewed: - type: optional + skipped: + type: optional docs: >- - `only` - include all reviewed tasks
`exclude` - exclude all - reviewed tasks + `only` - include all tasks with skipped annotations
`exclude` - + exclude all tasks with skipped annotations * `only` - only @@ -4611,14 +4608,17 @@ types: * `exclude` - exclude * `None` - None + view: + type: optional + docs: Apply filters from the view ID (a tab from the Data Manager) source: openapi: openapi/openapi.yaml LseTaskSerializerForAnnotatorsDraftsItem: properties: - result: - type: optional>> created_at: type: optional + result: + type: optional>> updated_at: type: optional source: @@ -4626,22 +4626,22 @@ types: inline: true LseTaskSerializerForAnnotatorsPredictionsItem: properties: - result: - type: optional>> - score: - type: optional - model_version: - type: optional + created_at: + type: optional model: type: optional> model_run: type: optional> - task: - type: optional + model_version: + type: optional project: type: optional - created_at: - type: optional + result: + type: optional>> + score: + type: optional + task: + type: optional updated_at: type: optional source: @@ -4650,60 +4650,60 @@ types: LseTaskSerializerForAnnotators: docs: Task Serializer with project scheme configs validation properties: - id: integer - data: unknown + annotations: string + annotations_results: string + cancelled_annotations: optional + comment_count: string + comments: string created_at: type: datetime docs: Time a task was created - annotations: string + data: unknown + draft_exists: optional drafts: docs: Drafts for this task type: list - total_annotations: optional - cancelled_annotations: optional - annotations_results: string + id: integer predictions: docs: Predictions for this task type: list - total_predictions: optional - predictions_score: optional predictions_results: string - comments: string - comment_count: string - unresolved_comment_count: string + predictions_score: optional reviews_rejected: optional - draft_exists: optional + total_annotations: optional + total_predictions: optional + unresolved_comment_count: string source: openapi: openapi/openapi.yaml - LseTaskSerializerForReviewersPredictionsItem: + LseTaskSerializerForReviewersDraftsItem: properties: - result: - type: optional>> - score: - type: optional - model_version: - type: optional - model: - type: optional> - model_run: - type: optional> - task: - type: optional - project: - type: optional created_at: type: optional + result: + type: optional>> updated_at: type: optional source: openapi: openapi/openapi.yaml inline: true - LseTaskSerializerForReviewersDraftsItem: + LseTaskSerializerForReviewersPredictionsItem: properties: - result: - type: optional>> created_at: type: optional + model: + type: optional> + model_run: + type: optional> + model_version: + type: optional + project: + type: optional + result: + type: optional>> + score: + type: optional + task: + type: optional updated_at: type: optional source: @@ -4712,133 +4712,133 @@ types: LseTaskSerializerForReviewers: docs: Task Serializer with project scheme configs validation properties: - id: integer agreement: string - predictions: - docs: Predictions for this task - type: list annotations: string - drafts: - docs: Drafts for this task - type: list + annotations_ids: string + annotations_results: string annotators: docs: Annotators IDs who annotated this task type: list - inner_id: optional - cancelled_annotations: optional - total_annotations: optional - total_predictions: optional - completed_at: optional - annotations_results: string - predictions_results: string - predictions_score: optional - file_upload: string - storage_filename: string - annotations_ids: string - predictions_model_versions: string - avg_lead_time: optional - draft_exists: optional - updated_by: - docs: User IDs who updated this task - type: list> - reviewers: list> - comments: string - comment_authors: list> - reviewed: optional - reviews_accepted: optional - reviews_rejected: optional - ground_truth: optional annotators_count: type: integer docs: >- The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. - reviewers_count: integer + avg_lead_time: optional + cancelled_annotations: optional + comment_authors: list> comment_authors_count: integer - data: unknown - meta: optional + comment_count: + type: optional + docs: Number of comments in the task including all annotations + validation: + min: -2147483648 + max: 2147483647 + comments: string + completed_at: optional created_at: type: datetime docs: Time a task was created - updated_at: - type: datetime - docs: Last time a task was updated + data: unknown + draft_exists: optional + drafts: + docs: Drafts for this task + type: list + file_upload: string + ground_truth: optional + id: integer + inner_id: optional is_labeled: type: optional docs: >- True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + last_comment_updated_at: + type: optional + docs: When the last comment was updated + meta: optional overlap: type: optional docs: Number of distinct annotators that processed the current task validation: min: -2147483648 max: 2147483647 - comment_count: + predictions: + docs: Predictions for this task + type: list + predictions_model_versions: string + predictions_results: string + predictions_score: optional + project: type: optional - docs: Number of comments in the task including all annotations - validation: - min: -2147483648 - max: 2147483647 + docs: Project ID for this task + reviewed: optional + reviewers: list> + reviewers_count: integer + reviews_accepted: optional + reviews_rejected: optional + storage_filename: string + total_annotations: optional + total_predictions: optional unresolved_comment_count: type: optional docs: Number of unresolved comments in the task including all annotations validation: min: -2147483648 max: 2147483647 - last_comment_updated_at: - type: optional - docs: When the last comment was updated - project: - type: optional - docs: Project ID for this task + updated_at: + type: datetime + docs: Last time a task was updated + updated_by: + docs: User IDs who updated this task + type: list> source: openapi: openapi/openapi.yaml LseUser: docs: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to - control which fields are displayed, and whether to replace simple - values with complex, nested serializations - properties: - id: integer - first_name: - type: optional - validation: - maxLength: 256 - last_name: - type: optional - validation: - maxLength: 256 - username: - type: string - validation: - maxLength: 256 + control which fields are displayed, and whether to replace simple + values with complex, nested serializations + properties: + active_organization: optional + active_organization_meta: string + allow_newsletters: + type: optional + docs: Allow sending newsletters to user + avatar: string + custom_hotkeys: optional + date_joined: optional email: type: optional validation: format: email maxLength: 254 - last_activity: datetime - custom_hotkeys: optional - avatar: string + first_name: + type: optional + validation: + maxLength: 256 + id: integer initials: type: string default: '?' - phone: + last_activity: datetime + last_name: type: optional validation: maxLength: 256 - active_organization: optional - active_organization_meta: string - allow_newsletters: - type: optional - docs: Allow sending newsletters to user - date_joined: optional - org_membership: list lse_fields: LseFields + org_membership: list pause: string + phone: + type: optional + validation: + maxLength: 256 + username: + type: string + validation: + maxLength: 256 source: openapi: openapi/openapi.yaml LseUserApi: @@ -4848,41 +4848,41 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer - first_name: + active_organization: optional + active_organization_meta: string + allow_newsletters: + type: optional + docs: Allow sending newsletters to user + avatar: string + custom_hotkeys: optional + date_joined: optional + email: type: optional validation: - maxLength: 256 - last_name: + format: email + maxLength: 254 + first_name: type: optional validation: maxLength: 256 - username: + id: integer + initials: type: string + default: '?' + last_activity: datetime + last_name: + type: optional validation: maxLength: 256 - email: + org_membership: list + phone: type: optional validation: - format: email - maxLength: 254 - last_activity: datetime - custom_hotkeys: optional - avatar: string - initials: + maxLength: 256 + username: type: string - default: '?' - phone: - type: optional validation: maxLength: 256 - active_organization: optional - active_organization_meta: string - allow_newsletters: - type: optional - docs: Allow sending newsletters to user - date_joined: optional - org_membership: list source: openapi: openapi/openapi.yaml LseUserOrganizationMemberList: @@ -4892,88 +4892,88 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer - first_name: - type: optional - validation: - maxLength: 256 - last_name: - type: optional - validation: - maxLength: 256 - username: - type: string - validation: - maxLength: 256 + active_organization: optional + allow_newsletters: + type: optional + docs: Allow sending newsletters to user + avatar: string + contributed_to_projects: string + created_projects: string + custom_hotkeys: optional + date_joined: optional email: type: optional validation: format: email maxLength: 254 - last_activity: datetime - custom_hotkeys: optional - avatar: string + first_name: + type: optional + validation: + maxLength: 256 + id: integer initials: type: string default: '?' - phone: + last_activity: datetime + last_name: type: optional validation: maxLength: 256 - active_organization: optional - allow_newsletters: - type: optional - docs: Allow sending newsletters to user - date_joined: optional lse_fields: LseFields pause: string - created_projects: string - contributed_to_projects: string + phone: + type: optional + validation: + maxLength: 256 + username: + type: string + validation: + maxLength: 256 source: openapi: openapi/openapi.yaml MlBackend: docs: Serializer for MLBackend model. properties: - id: integer - state: optional - readable_state: string - is_interactive: + auth_method: optional + auto_update: type: optional docs: >- - Used to interactively annotate tasks. If true, model returns one list - with results - url: - type: string - docs: URL for the machine learning model server - error_message: - type: optional - docs: Error message in error state - title: - type: optional - docs: Name of the machine learning backend - auth_method: optional + If false, model version is set by the user, if true - getting latest + version from backend. + basic_auth_pass_is_set: string basic_auth_user: type: optional docs: HTTP Basic Auth user - basic_auth_pass_is_set: string + created_at: datetime description: type: optional docs: Description for the machine learning backend + error_message: + type: optional + docs: Error message in error state extra_params: optional + id: integer + is_interactive: + type: optional + docs: >- + Used to interactively annotate tasks. If true, model returns one list + with results model_version: type: optional docs: Current model version associated with this machine learning backend + project: integer + readable_state: string + state: optional timeout: type: optional docs: Response model timeout - created_at: datetime + title: + type: optional + docs: Name of the machine learning backend updated_at: datetime - auto_update: - type: optional - docs: >- - If false, model version is set by the user, if true - getting latest - version from backend. - project: integer + url: + type: string + docs: URL for the machine learning model server source: openapi: openapi/openapi.yaml MaybeExpandedComment: @@ -4995,32 +4995,39 @@ types: openapi: openapi/openapi.yaml ModelInterface: properties: - id: integer + associated_projects: optional> + created_at: datetime created_by: type: optional docs: User who created Dataset + description: + type: optional + docs: Model description + id: integer + input_fields: optional + organization: optional + output_classes: optional skill_name: optional title: type: string docs: Model name validation: maxLength: 500 - description: - type: optional - docs: Model description - created_at: datetime updated_at: datetime - input_fields: optional - output_classes: optional - organization: optional - associated_projects: optional> source: openapi: openapi/openapi.yaml ModelInterfaceRequest: properties: + associated_projects: optional> created_by: type: optional docs: User who created Dataset + description: + type: optional + docs: Model description + input_fields: optional + organization: optional + output_classes: optional skill_name: optional title: type: string @@ -5028,36 +5035,29 @@ types: validation: minLength: 1 maxLength: 500 - description: - type: optional - docs: Model description - input_fields: optional - output_classes: optional - organization: optional - associated_projects: optional> source: openapi: openapi/openapi.yaml ModelInterfaceSerializerGet: properties: - id: integer + associated_projects: optional> + created_at: datetime created_by: type: optional docs: User who created Dataset + description: + type: optional + docs: Model description + id: integer + input_fields: optional + organization: optional + output_classes: optional skill_name: optional - associated_projects: optional> title: type: string docs: Model name validation: maxLength: 500 - description: - type: optional - docs: Model description - created_at: datetime updated_at: datetime - input_fields: optional - output_classes: optional - organization: optional source: openapi: openapi/openapi.yaml ModelProviderConnectionBudgetResetPeriod: @@ -5075,12 +5075,37 @@ types: inline: true ModelProviderConnection: properties: - id: integer + budget_alert_threshold: + type: optional + docs: Budget alert threshold for the given provider connection + budget_last_reset_date: + type: optional + docs: Date and time the budget was last reset + budget_limit: + type: optional + docs: Budget limit for the model provider connection (null if unlimited) + budget_reset_period: + type: optional + docs: >- + Budget reset period for the model provider connection (null if not + reset) + + + * `Monthly` - Monthly + + * `Yearly` - Yearly + budget_total_spent: + type: optional + docs: >- + Tracked total budget spent for the given provider connection within + the current budget period + cached_available_models: + type: optional + docs: List of available models from the provider + validation: + maxLength: 4096 + created_at: datetime created_by: UserSimple - model_params: - type: string - docs: JSON schema for the model parameters available for the provider - provider: optional deployment_name: type: optional docs: Azure OpenAI deployment name @@ -5091,65 +5116,47 @@ types: docs: Azure OpenAI endpoint validation: maxLength: 512 - google_project_id: - type: optional - docs: Google project ID - validation: - maxLength: 255 google_location: type: optional docs: Google project location validation: maxLength: 255 - cached_available_models: + google_project_id: type: optional - docs: List of available models from the provider + docs: Google project ID validation: - maxLength: 4096 - scope: optional - created_at: datetime - updated_at: datetime + maxLength: 255 + id: integer is_internal: type: optional docs: >- Whether the model provider connection is internal, not visible to the user - budget_limit: - type: optional - docs: Budget limit for the model provider connection (null if unlimited) - budget_last_reset_date: - type: optional - docs: Date and time the budget was last reset - budget_reset_period: - type: optional - docs: >- - Budget reset period for the model provider connection (null if not - reset) - - - * `Monthly` - Monthly - - * `Yearly` - Yearly - budget_total_spent: - type: optional - docs: >- - Tracked total budget spent for the given provider connection within - the current budget period - budget_alert_threshold: - type: optional - docs: Budget alert threshold for the given provider connection + model_params: + type: string + docs: JSON schema for the model parameters available for the provider organization: optional + provider: optional + scope: optional + updated_at: datetime source: openapi: openapi/openapi.yaml ModelProviderConnectionRequest: properties: - provider: optional api_key: type: optional docs: Model provider API key auth_token: type: optional docs: Model provider Auth token + budget_alert_threshold: + type: optional + docs: Budget alert threshold for the given provider connection + cached_available_models: + type: optional + docs: List of available models from the provider + validation: + maxLength: 4096 deployment_name: type: optional docs: Azure OpenAI deployment name @@ -5163,49 +5170,48 @@ types: google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: - type: optional - docs: Google project ID - validation: - maxLength: 255 google_location: type: optional docs: Google project location validation: maxLength: 255 - cached_available_models: + google_project_id: type: optional - docs: List of available models from the provider + docs: Google project ID validation: - maxLength: 4096 - scope: optional + maxLength: 255 is_internal: type: optional docs: >- Whether the model provider connection is internal, not visible to the user - budget_alert_threshold: - type: optional - docs: Budget alert threshold for the given provider connection + provider: optional + scope: optional source: openapi: openapi/openapi.yaml ModelRun: properties: + completed_at: optional + created_at: datetime + created_by: optional id: integer - parent_model: integer - project_subset: optional - status: ModelRunStatusEnum job_id: type: optional docs: Job ID for inference job for a ModelRun e.g. Adala job ID validation: maxLength: 255 - total_predictions: + organization: optional + parent_model: integer + predictions_updated_at: optional + project: integer + project_subset: optional + status: ModelRunStatusEnum + total_correct_predictions: type: optional validation: min: -2147483648 max: 2147483647 - total_correct_predictions: + total_predictions: type: optional validation: min: -2147483648 @@ -5215,13 +5221,7 @@ types: validation: min: -2147483648 max: 2147483647 - created_at: datetime triggered_at: optional - predictions_updated_at: optional - completed_at: optional - organization: optional - project: integer - created_by: optional source: openapi: openapi/openapi.yaml ModelRunStatusEnum: @@ -5259,8 +5259,8 @@ types: openapi: openapi/openapi.yaml OrganizationBilling: properties: - manual_workspace_management: string manual_role_management: string + manual_workspace_management: string source: openapi: openapi/openapi.yaml OrganizationId: @@ -5270,23 +5270,23 @@ types: which fields should be displayed. properties: - id: integer - title: - type: string - validation: - maxLength: 1000 contact_info: type: optional validation: format: email maxLength: 254 created_at: datetime + id: integer + title: + type: string + validation: + maxLength: 1000 source: openapi: openapi/openapi.yaml OrganizationInvite: properties: - token: optional invite_url: optional + token: optional source: openapi: openapi/openapi.yaml OrganizationMember: @@ -5296,24 +5296,24 @@ types: which fields should be displayed. properties: - user: - type: integer - docs: User ID + annotations_count: string + contributed_projects_count: string + created_at: datetime organization: type: integer docs: Organization ID - contributed_projects_count: string - annotations_count: string - created_at: datetime + user: + type: integer + docs: User ID source: openapi: openapi/openapi.yaml OrganizationMembership: properties: - role: string active: string organization_id: type: integer docs: Organization ID + role: string source: openapi: openapi/openapi.yaml OrganizationMembershipRequest: @@ -5443,14 +5443,20 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: + created_at: + type: datetime + docs: Timestamp when this pause record was created + deleted_at: + type: optional + docs: Timestamp when this pause record was soft-deleted + deleted_by: + type: optional + docs: User who soft-deleted this pause record id: integer + paused_by: UserSimple project: type: optional docs: Related project for which the pause is set - user: - type: optional - docs: User who is paused - paused_by: UserSimple reason: type: ReasonEnum docs: |- @@ -5461,23 +5467,17 @@ types: * `ANNOTATOR_EVALUATION` - Annotator evaluation * `ANNOTATION_LIMIT` - Annotation limit * `CUSTOM_SCRIPT` - Custom script + updated_at: + type: datetime + docs: Timestamp when this pause record was last updated + user: + type: optional + docs: User who is paused verbose_reason: type: optional docs: >- Detailed description of why the project is paused, will be readable by paused annotators - deleted_by: - type: optional - docs: User who soft-deleted this pause record - deleted_at: - type: optional - docs: Timestamp when this pause record was soft-deleted - created_at: - type: datetime - docs: Timestamp when this pause record was created - updated_at: - type: datetime - docs: Timestamp when this pause record was last updated source: openapi: openapi/openapi.yaml PauseRequest: @@ -5506,66 +5506,53 @@ types: openapi: openapi/openapi.yaml Prediction: properties: - id: integer - result: - docs: List of prediction results for the task - type: list> - model_version: - type: optional - docs: >- - Model version - tag for predictions that can be used to filter tasks - in Data Manager, as well as select specific model version for showing - preannotations in the labeling interface - created_ago: - type: string - docs: Delta time from creation time - default: '' - score: - type: optional - docs: Prediction score cluster: type: optional docs: Cluster for the current prediction validation: min: -2147483648 max: 2147483647 - neighbors: optional + created_ago: + type: string + docs: Delta time from creation time + default: '' + created_at: datetime + id: integer mislabeling: type: optional docs: Related task mislabeling score - created_at: datetime - updated_at: datetime model: type: optional docs: An ML Backend instance that created the prediction. model_run: type: optional docs: A run of a ModelVersion that created the prediction. - task: integer - project: optional - source: - openapi: openapi/openapi.yaml - PredictionRequest: - properties: - result: - docs: List of prediction results for the task - type: list> model_version: type: optional docs: >- Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + neighbors: optional + project: optional + result: + docs: List of prediction results for the task + type: list> score: type: optional docs: Prediction score + task: integer + updated_at: datetime + source: + openapi: openapi/openapi.yaml + PredictionRequest: + properties: cluster: type: optional docs: Cluster for the current prediction validation: min: -2147483648 max: 2147483647 - neighbors: optional mislabeling: type: optional docs: Related task mislabeling score @@ -5575,8 +5562,21 @@ types: model_run: type: optional docs: A run of a ModelVersion that created the prediction. - task: integer + model_version: + type: optional + docs: >- + Model version - tag for predictions that can be used to filter tasks + in Data Manager, as well as select specific model version for showing + preannotations in the labeling interface + neighbors: optional project: optional + result: + docs: List of prediction results for the task + type: list> + score: + type: optional + docs: Prediction score + task: integer source: openapi: openapi/openapi.yaml ProjectSampling: @@ -5600,39 +5600,49 @@ types: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: integer - title: + color: type: optional - docs: Project name. Must be between 3 and 50 characters long. validation: - minLength: 3 - maxLength: 50 + maxLength: 16 + config_has_control_tags: + type: boolean + docs: Flag to detect is project ready for labeling + config_suitable_for_bulk_annotation: + type: boolean + docs: Flag to detect is project ready for bulk annotation + control_weights: optional + created_at: datetime + created_by: + type: optional + docs: Project owner description: type: optional docs: Project description - label_config: - type: optional - docs: Label config in XML format. See more about it in documentation - expert_instruction: - type: optional - docs: Labeling instructions in HTML format - show_instruction: + enable_empty_annotation: type: optional - docs: Show instructions to the annotator before they start - show_skip_button: + docs: Allow annotators to submit empty annotations + evaluate_predictions_automatically: type: optional - docs: Show a skip button in interface and allow annotators to skip the task - enable_empty_annotation: + docs: Retrieve and display predictions when loading a task + expert_instruction: + type: optional + docs: Labeling instructions in HTML format + finished_task_number: + type: integer + docs: Finished tasks + ground_truth_number: + type: integer + docs: Honeypot annotation number in project + id: integer + is_draft: type: optional - docs: Allow annotators to submit empty annotations - show_annotation_history: + docs: Whether or not the project is in the middle of being created + is_published: type: optional - docs: Show annotation history to annotator - organization: optional - color: + docs: Whether or not the project is published to annotators + label_config: type: optional - validation: - maxLength: 16 + docs: Label config in XML format. See more about it in documentation maximum_annotations: type: optional docs: >- @@ -5642,19 +5652,6 @@ types: validation: min: -2147483648 max: 2147483647 - is_published: - type: optional - docs: Whether or not the project is published to annotators - model_version: - type: optional - docs: Machine learning model version - is_draft: - type: optional - docs: Whether or not the project is in the middle of being created - created_by: - type: optional - docs: Project owner - created_at: datetime min_annotations_to_start_training: type: optional docs: >- @@ -5663,49 +5660,49 @@ types: validation: min: -2147483648 max: 2147483647 - start_training_on_annotation_update: - type: boolean - docs: Start model training after any annotations are submitted or updated - show_collab_predictions: - type: optional - docs: If set, the annotator can view model predictions + model_version: + type: optional + docs: Machine learning model version num_tasks_with_annotations: type: integer docs: Tasks with annotations count - task_number: - type: integer - docs: Total task number in project - useful_annotation_number: - type: integer - docs: >- - Useful annotation number in project not including - skipped_annotations_number and ground_truth_number. Total annotations - = annotation_number + skipped_annotations_number + ground_truth_number - ground_truth_number: - type: integer - docs: Honeypot annotation number in project - skipped_annotations_number: - type: integer - docs: Skipped by collaborators annotation number in project - total_annotations_number: - type: integer - docs: >- - Total annotations number in project including - skipped_annotations_number and ground_truth_number. - total_predictions_number: - type: integer - docs: >- - Total predictions number in project including - skipped_annotations_number, ground_truth_number, and - useful_annotation_number. - sampling: optional - show_ground_truth_first: optional - show_overlap_first: optional + organization: optional overlap_cohort_percentage: type: optional validation: min: -2147483648 max: 2147483647 + parsed_label_config: unknown + pinned_at: + type: optional + docs: Pinned date and time + queue_done: integer + queue_total: integer + reveal_preannotations_interactively: + type: optional + docs: Reveal pre-annotations interactively + sampling: optional + show_annotation_history: + type: optional + docs: Show annotation history to annotator + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: Show a skip button in interface and allow annotators to skip the task + skip_queue: optional + skipped_annotations_number: + type: integer + docs: Skipped by collaborators annotation number in project + start_training_on_annotation_update: + type: boolean + docs: Start model training after any annotations are submitted or updated task_data_login: type: optional docs: 'Task data credentials: login' @@ -5716,45 +5713,48 @@ types: docs: 'Task data credentials: password' validation: maxLength: 256 - control_weights: optional - parsed_label_config: unknown - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean - docs: Flag to detect is project ready for labeling - skip_queue: optional - reveal_preannotations_interactively: - type: optional - docs: Reveal pre-annotations interactively - pinned_at: - type: optional - docs: Pinned date and time - finished_task_number: + task_number: type: integer - docs: Finished tasks - queue_total: integer - queue_done: integer - config_suitable_for_bulk_annotation: - type: boolean - docs: Flag to detect is project ready for bulk annotation + docs: Total task number in project + title: + type: optional + docs: Project name. Must be between 3 and 50 characters long. + validation: + minLength: 3 + maxLength: 50 + total_annotations_number: + type: integer + docs: >- + Total annotations number in project including + skipped_annotations_number and ground_truth_number. + total_predictions_number: + type: integer + docs: >- + Total predictions number in project including + skipped_annotations_number, ground_truth_number, and + useful_annotation_number. + useful_annotation_number: + type: integer + docs: >- + Useful annotation number in project not including + skipped_annotations_number and ground_truth_number. Total annotations + = annotation_number + skipped_annotations_number + ground_truth_number source: openapi: openapi/openapi.yaml ProjectGroup: properties: - project_id: integer group: string + project_id: integer role: ProjectGroupRoleEnum source: openapi: openapi/openapi.yaml ProjectGroupRequest: properties: - project_id: integer group: type: string validation: minLength: 1 + project_id: integer role: ProjectGroupRoleEnum source: openapi: openapi/openapi.yaml @@ -5771,52 +5771,52 @@ types: openapi: openapi/openapi.yaml ProjectImport: properties: - id: integer - project: optional - preannotated_from_fields: optional - commit_to_project: optional - return_task_ids: optional - status: optional - url: - type: optional - validation: - maxLength: 2048 - error: optional - created_at: - type: optional - docs: Creation time - updated_at: - type: optional - docs: Updated time - finished_at: - type: optional - docs: Complete or fail time - task_count: + annotation_count: type: optional validation: min: -2147483648 max: 2147483647 - annotation_count: + commit_to_project: optional + could_be_tasks_list: optional + created_at: + type: optional + docs: Creation time + data_columns: optional + duration: type: optional validation: min: -2147483648 max: 2147483647 + error: optional + file_upload_ids: optional + finished_at: + type: optional + docs: Complete or fail time + found_formats: optional + id: integer + preannotated_from_fields: optional prediction_count: type: optional validation: min: -2147483648 max: 2147483647 - duration: + project: optional + return_task_ids: optional + status: optional + task_count: type: optional validation: min: -2147483648 max: 2147483647 - file_upload_ids: optional - could_be_tasks_list: optional - found_formats: optional - data_columns: optional - tasks: optional task_ids: optional + tasks: optional + updated_at: + type: optional + docs: Updated time + url: + type: optional + validation: + maxLength: 2048 source: openapi: openapi/openapi.yaml ProjectLabelConfig: @@ -5842,39 +5842,40 @@ types: openapi: openapi/openapi.yaml ProjectReimport: properties: - id: integer - project: optional - status: optional - error: optional - task_count: + annotation_count: type: optional validation: min: -2147483648 max: 2147483647 - annotation_count: + data_columns: optional + duration: type: optional validation: min: -2147483648 max: 2147483647 + error: optional + file_upload_ids: optional + files_as_tasks_list: optional + found_formats: optional + id: integer prediction_count: type: optional validation: min: -2147483648 max: 2147483647 - duration: + project: optional + status: optional + task_count: type: optional validation: min: -2147483648 max: 2147483647 - file_upload_ids: optional - files_as_tasks_list: optional - found_formats: optional - data_columns: optional source: openapi: openapi/openapi.yaml ProjectRole: properties: id: integer + project: integer role: type: Role9E7Enum docs: |- @@ -5888,7 +5889,6 @@ types: * `DI` - Deactivated * `NO` - Not Activated user: integer - project: integer source: openapi: openapi/openapi.yaml ProjectSubsetEnum: @@ -5904,53 +5904,53 @@ types: openapi: openapi/openapi.yaml ProjectTemplate: properties: + assignment_settings: optional + created_at: datetime + created_by: optional + custom_script: + type: optional + docs: custom script for projects created from this template + description: optional id: integer name: type: string validation: maxLength: 1000 - description: optional - tags: optional + organization: optional project_settings: optional - review_settings: optional - assignment_settings: optional require_comment_on_skip: type: optional docs: flag to require comment on skip - custom_script: - type: optional - docs: custom script for projects created from this template - created_at: datetime + review_settings: optional + tags: optional updated_at: datetime - created_by: optional - organization: optional source: openapi: openapi/openapi.yaml ProjectTemplateRequest: properties: - name: - type: string + assignment_settings: optional + created_by: optional + custom_script: + type: optional + docs: custom script for projects created from this template validation: minLength: 1 - maxLength: 1000 description: type: optional validation: minLength: 1 - tags: optional + name: + type: string + validation: + minLength: 1 + maxLength: 1000 + organization: optional project_settings: optional - review_settings: optional - assignment_settings: optional require_comment_on_skip: type: optional docs: flag to require comment on skip - custom_script: - type: optional - docs: custom script for projects created from this template - validation: - minLength: 1 - created_by: optional - organization: optional + review_settings: optional + tags: optional source: openapi: openapi/openapi.yaml PromptsStatusEnum: @@ -6021,31 +6021,25 @@ types: openapi: openapi/openapi.yaml RedisExportStorage: properties: - id: integer - type: - type: string - default: redis - synchronizable: + can_delete_objects: type: optional - default: true - path: + docs: Deletion from storage enabled + created_at: + type: datetime + docs: Creation time + db: + type: optional + docs: Server Database + validation: + min: 0 + max: 32767 + description: type: optional - docs: Storage prefix (optional) + docs: Cloud storage description host: type: optional docs: Server Host IP (optional) - port: - type: optional - docs: Server Port (optional) - password: - type: optional - docs: Server Password (optional) - regex_filter: - type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + id: integer last_sync: type: optional docs: Last sync finished time @@ -6060,63 +6054,60 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) + port: + type: optional + docs: Server Port (optional) + project: + type: integer + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description + docs: Traceback report for the last failed sync + type: + type: string + default: redis + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + RedisImportStorage: + properties: created_at: type: datetime docs: Creation time - can_delete_objects: - type: optional - docs: Deletion from storage enabled db: type: optional docs: Server Database validation: min: 0 max: 32767 - project: - type: integer - docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - RedisImportStorage: - properties: - id: integer - type: - type: string - default: redis - synchronizable: - type: optional - default: true - path: + description: type: optional - docs: Storage prefix (optional) + docs: Cloud storage description host: type: optional docs: Server Host IP (optional) - port: - type: optional - docs: Server Port (optional) - password: - type: optional - docs: Server Password (optional) - regex_filter: - type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + id: integer last_sync: type: optional docs: Last sync finished time @@ -6131,56 +6122,65 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) + port: + type: optional + docs: Server Port (optional) + project: + type: integer + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - db: - type: optional - docs: Server Database - validation: - min: 0 - max: 32767 - project: - type: integer - docs: A unique integer value identifying this project. + docs: Traceback report for the last failed sync + type: + type: string + default: redis + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml RefinedPromptResponse: properties: - title: - type: optional - docs: Title of the refined prompt - reasoning: - type: optional - docs: Reasoning behind the refinement + previous_version: + type: optional + docs: Previous version of the prompt prompt: type: string docs: The refined prompt text + reasoning: + type: optional + docs: Reasoning behind the refinement refinement_job_id: type: optional docs: Unique identifier for the refinement job refinement_status: type: optional docs: Status of the refinement job + title: + type: optional + docs: Title of the refined prompt total_cost: type: optional docs: Total cost of the refinement job (in USD) - previous_version: - type: optional - docs: Previous version of the prompt source: openapi: openapi/openapi.yaml RequeueRejectedTasksModeEnum: @@ -6203,66 +6203,47 @@ types: * `one` - Task is reviewed if at least one annotation is reviewed source: openapi: openapi/openapi.yaml - ReviewSettingsReviewCriteria: + ReviewSettingsRequeueRejectedTasksMode: discriminated: false docs: |- - Criteria to mark task as reviewed + Requeue mode for rejected tasks - * `all` - Task is reviewed if all annotations are reviewed - * `one` - Task is reviewed if at least one annotation is reviewed + * `requeue` - Requeue + * `remove` - Remove + * `flexible` - Flexible union: - - ReviewCriteriaEnum + - RequeueRejectedTasksModeEnum + - BlankEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true - ReviewSettingsRequeueRejectedTasksMode: + ReviewSettingsReviewCriteria: discriminated: false docs: |- - Requeue mode for rejected tasks + Criteria to mark task as reviewed - * `requeue` - Requeue - * `remove` - Remove - * `flexible` - Flexible + * `all` - Task is reviewed if all annotations are reviewed + * `one` - Task is reviewed if at least one annotation is reviewed union: - - RequeueRejectedTasksModeEnum - - BlankEnum + - ReviewCriteriaEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true ReviewSettings: properties: - id: integer - requeue_rejected_tasks_to_annotator: boolean - review_criteria: - type: optional - docs: |- - Criteria to mark task as reviewed - - * `all` - Task is reviewed if all annotations are reviewed - * `one` - Task is reviewed if at least one annotation is reviewed anonymize_annotations: type: optional docs: Hide annotator names from annotations while review - only_finished_tasks: - type: optional - docs: Show only finished tasks in the review stream + id: integer instruction: type: optional docs: Reviewer instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the reviewers before they start - show_data_manager_to_reviewers: - type: optional - docs: Show the data manager to reviewers - show_agreement_to_reviewers: - type: optional - docs: Show the agreement column to reviewers - require_comment_on_reject: + only_finished_tasks: type: optional - docs: If set, the reviewer must leave a comment on reject + docs: Show only finished tasks in the review stream + project: optional requeue_rejected_tasks_mode: type: optional docs: |- @@ -6271,70 +6252,71 @@ types: * `requeue` - Requeue * `remove` - Remove * `flexible` - Flexible + requeue_rejected_tasks_to_annotator: boolean + require_comment_on_reject: + type: optional + docs: If set, the reviewer must leave a comment on reject + review_criteria: + type: optional + docs: |- + Criteria to mark task as reviewed + + * `all` - Task is reviewed if all annotations are reviewed + * `one` - Task is reviewed if at least one annotation is reviewed review_only_manual_assignments: type: optional docs: When set True, review queue is built only from manually assigned tasks - project: optional + show_agreement_to_reviewers: + type: optional + docs: Show the agreement column to reviewers + show_data_manager_to_reviewers: + type: optional + docs: Show the data manager to reviewers + show_instruction: + type: optional + docs: Show instructions to the reviewers before they start source: openapi: openapi/openapi.yaml - ReviewSettingsRequestReviewCriteria: + ReviewSettingsRequestRequeueRejectedTasksMode: discriminated: false docs: |- - Criteria to mark task as reviewed + Requeue mode for rejected tasks - * `all` - Task is reviewed if all annotations are reviewed - * `one` - Task is reviewed if at least one annotation is reviewed + * `requeue` - Requeue + * `remove` - Remove + * `flexible` - Flexible union: - - ReviewCriteriaEnum + - RequeueRejectedTasksModeEnum + - BlankEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true - ReviewSettingsRequestRequeueRejectedTasksMode: + ReviewSettingsRequestReviewCriteria: discriminated: false docs: |- - Requeue mode for rejected tasks + Criteria to mark task as reviewed - * `requeue` - Requeue - * `remove` - Remove - * `flexible` - Flexible + * `all` - Task is reviewed if all annotations are reviewed + * `one` - Task is reviewed if at least one annotation is reviewed union: - - RequeueRejectedTasksModeEnum - - BlankEnum + - ReviewCriteriaEnum - NullEnum source: openapi: openapi/openapi.yaml inline: true ReviewSettingsRequest: properties: - review_criteria: - type: optional - docs: |- - Criteria to mark task as reviewed - - * `all` - Task is reviewed if all annotations are reviewed - * `one` - Task is reviewed if at least one annotation is reviewed anonymize_annotations: type: optional docs: Hide annotator names from annotations while review - only_finished_tasks: - type: optional - docs: Show only finished tasks in the review stream instruction: type: optional docs: Reviewer instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the reviewers before they start - show_data_manager_to_reviewers: - type: optional - docs: Show the data manager to reviewers - show_agreement_to_reviewers: - type: optional - docs: Show the agreement column to reviewers - require_comment_on_reject: + only_finished_tasks: type: optional - docs: If set, the reviewer must leave a comment on reject + docs: Show only finished tasks in the review stream + project: optional requeue_rejected_tasks_mode: type: optional docs: |- @@ -6343,10 +6325,28 @@ types: * `requeue` - Requeue * `remove` - Remove * `flexible` - Flexible + require_comment_on_reject: + type: optional + docs: If set, the reviewer must leave a comment on reject + review_criteria: + type: optional + docs: |- + Criteria to mark task as reviewed + + * `all` - Task is reviewed if all annotations are reviewed + * `one` - Task is reviewed if at least one annotation is reviewed review_only_manual_assignments: type: optional docs: When set True, review queue is built only from manually assigned tasks - project: optional + show_agreement_to_reviewers: + type: optional + docs: Show the agreement column to reviewers + show_data_manager_to_reviewers: + type: optional + docs: Show the data manager to reviewers + show_instruction: + type: optional + docs: Show instructions to the reviewers before they start source: openapi: openapi/openapi.yaml ReviewedEnum: @@ -6388,16 +6388,36 @@ types: openapi: openapi/openapi.yaml S3DatasetStorage: properties: + aws_access_key_id: + type: optional + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + created_at: + type: datetime + docs: Creation time + dataset: + type: integer + docs: A unique integer value identifying this dataset. + description: + type: optional + docs: Cloud storage description + glob_pattern: + type: optional + docs: Glob pattern for syncing from bucket id: integer - type: - type: string - default: s3 - synchronizable: - type: optional - default: true - presign: - type: optional - default: true + job_id: + type: optional last_sync: type: optional docs: Last sync finished time @@ -6412,34 +6432,56 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + presign: + type: optional + default: true + presign_ttl: + type: optional + docs: Presigned URLs TTL (in minutes) + validation: + min: 0 + max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects + region_name: + type: optional + docs: AWS Region + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synced: + type: optional + docs: Flag if dataset has been previously synced or not + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + type: + type: string + default: s3 use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + S3DatasetStorageRequest: + properties: aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -6452,42 +6494,18 @@ types: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID - region_name: + bucket: type: optional - docs: AWS Region - s3_endpoint: + docs: S3 bucket name + dataset: + type: integer + docs: A unique integer value identifying this dataset. + description: type: optional - docs: S3 Endpoint - presign_ttl: - type: optional - docs: Presigned URLs TTL (in minutes) - validation: - min: 0 - max: 32767 - recursive_scan: - type: optional - docs: Perform recursive scan over the bucket content + docs: Cloud storage description glob_pattern: type: optional docs: Glob pattern for syncing from bucket - synced: - type: optional - docs: Flag if dataset has been previously synced or not - job_id: - type: optional - dataset: - type: integer - docs: A unique integer value identifying this dataset. - source: - openapi: openapi/openapi.yaml - S3DatasetStorageRequest: - properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true last_sync: type: optional docs: Last sync finished time @@ -6502,31 +6520,53 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: + prefix: type: optional - docs: Cloud storage title + docs: S3 bucket prefix + presign: + type: optional + default: true + presign_ttl: + type: optional + docs: Presigned URLs TTL (in minutes) validation: - maxLength: 256 - description: + min: 0 + max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content + regex_filter: type: optional - docs: Cloud storage description - bucket: + docs: Cloud storage regex for filtering objects + region_name: type: optional - docs: S3 bucket name - prefix: + docs: AWS Region + s3_endpoint: type: optional - docs: S3 bucket prefix - regex_filter: + docs: S3 Endpoint + status: optional + synced: + type: optional + docs: Flag if dataset has been previously synced or not + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: type: optional - docs: Cloud storage regex for filtering objects + docs: Traceback report for the last failed sync use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + S3ExportStorage: + properties: aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -6539,41 +6579,19 @@ types: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID - region_name: - type: optional - docs: AWS Region - s3_endpoint: + bucket: type: optional - docs: S3 Endpoint - presign_ttl: - type: optional - docs: Presigned URLs TTL (in minutes) - validation: - min: 0 - max: 32767 - recursive_scan: + docs: S3 bucket name + can_delete_objects: type: optional - docs: Perform recursive scan over the bucket content - glob_pattern: + docs: Deletion from storage enabled + created_at: + type: datetime + docs: Creation time + description: type: optional - docs: Glob pattern for syncing from bucket - synced: - type: optional - docs: Flag if dataset has been previously synced or not - dataset: - type: integer - docs: A unique integer value identifying this dataset. - source: - openapi: openapi/openapi.yaml - S3ExportStorage: - properties: + docs: Cloud storage description id: integer - type: - type: string - default: s3 - synchronizable: - type: optional - default: true last_sync: type: optional docs: Last sync finished time @@ -6588,37 +6606,44 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - can_delete_objects: - type: optional - docs: Deletion from storage enabled - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + project: + type: integer + docs: A unique integer value identifying this project. regex_filter: type: optional docs: Cloud storage regex for filtering objects + region_name: + type: optional + docs: AWS Region + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + type: + type: string + default: s3 use_blob_urls: type: optional docs: Interpret objects as BLOBs and generate URLs + source: + openapi: openapi/openapi.yaml + S3ImportStorage: + properties: aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -6631,29 +6656,16 @@ types: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID - region_name: + bucket: type: optional - docs: AWS Region - s3_endpoint: + docs: S3 bucket name + created_at: + type: datetime + docs: Creation time + description: type: optional - docs: S3 Endpoint - project: - type: integer - docs: A unique integer value identifying this project. - source: - openapi: openapi/openapi.yaml - S3ImportStorage: - properties: + docs: Cloud storage description id: integer - type: - type: string - default: s3 - synchronizable: - type: optional - default: true - presign: - type: optional - default: true last_sync: type: optional docs: Last sync finished time @@ -6668,78 +6680,66 @@ types: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - created_at: - type: datetime - docs: Creation time - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + presign: + type: optional + default: true + presign_ttl: + type: optional + docs: Presigned URLs TTL (in minutes) + validation: + min: 0 + max: 32767 + project: + type: integer + docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: optional - docs: AWS SSE KMS Key ID region_name: type: optional docs: AWS Region s3_endpoint: type: optional docs: S3 Endpoint - presign_ttl: - type: optional - docs: Presigned URLs TTL (in minutes) + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title validation: - min: 0 - max: 32767 - recursive_scan: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + type: + type: string + default: s3 + use_blob_urls: type: optional - docs: Perform recursive scan over the bucket content - project: - type: integer - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs source: openapi: openapi/openapi.yaml SamlSettings: properties: - workspaces_groups: optional - roles_groups: optional projects_groups: optional + roles_groups: optional + workspaces_groups: optional source: openapi: openapi/openapi.yaml SamlSettingsUpdate: properties: - workspaces_groups: optional>> - roles_groups: optional>> projects_groups: optional> + roles_groups: optional>> + workspaces_groups: optional>> source: openapi: openapi/openapi.yaml SamplingEnum: @@ -6761,16 +6761,16 @@ types: openapi: openapi/openapi.yaml ScimSettings: properties: - workspaces_groups: optional - roles_groups: optional projects_groups: optional + roles_groups: optional + workspaces_groups: optional source: openapi: openapi/openapi.yaml ScimSettingsUpdate: properties: - workspaces_groups: optional>> - roles_groups: optional>> projects_groups: optional> + roles_groups: optional>> + workspaces_groups: optional>> source: openapi: openapi/openapi.yaml ScopeEnum: @@ -6787,8 +6787,8 @@ types: SelectedItemsRequest: properties: all: boolean - included: optional> excluded: optional> + included: optional> source: openapi: openapi/openapi.yaml SerializationOption: @@ -6809,48 +6809,49 @@ types: openapi: openapi/openapi.yaml SerializationOptions: properties: - drafts: + annotations__completed_by: type: optional docs: JSON dict with parameters - predictions: + drafts: type: optional docs: JSON dict with parameters include_annotation_history: type: optional docs: Include annotation history default: false - annotations__completed_by: - type: optional - docs: JSON dict with parameters interpolate_key_frames: type: optional docs: Interpolate video key frames default: false + predictions: + type: optional + docs: JSON dict with parameters source: openapi: openapi/openapi.yaml SerializationOptionsRequest: properties: - drafts: + annotations__completed_by: type: optional docs: JSON dict with parameters - predictions: + drafts: type: optional docs: JSON dict with parameters include_annotation_history: type: optional docs: Include annotation history default: false - annotations__completed_by: - type: optional - docs: JSON dict with parameters interpolate_key_frames: type: optional docs: Interpolate video key frames default: false + predictions: + type: optional + docs: JSON dict with parameters source: openapi: openapi/openapi.yaml SessionTimeoutPolicy: properties: + created_at: datetime max_session_age: type: optional docs: >- @@ -6865,7 +6866,6 @@ types: validation: min: 1 max: 2147483647 - created_at: datetime updated_at: datetime source: openapi: openapi/openapi.yaml @@ -6946,10 +6946,16 @@ types: openapi: openapi/openapi.yaml TaskAssignment: properties: - id: integer + assignee: + type: integer + docs: Assigned user created_at: type: datetime docs: Time of assignment + id: integer + task: + type: integer + docs: Assigned task type: type: optional docs: |- @@ -6957,16 +6963,16 @@ types: * `AN` - Annotate * `RE` - Review - assignee: - type: integer - docs: Assigned user - task: - type: integer - docs: Assigned task source: openapi: openapi/openapi.yaml TaskAssignmentRequest: properties: + assignee: + type: integer + docs: Assigned user + task: + type: integer + docs: Assigned task type: type: optional docs: |- @@ -6974,39 +6980,56 @@ types: * `AN` - Annotate * `RE` - Review - assignee: - type: integer - docs: Assigned user - task: - type: integer - docs: Assigned task source: openapi: openapi/openapi.yaml TaskSimple: properties: - id: integer - data: unknown - meta: optional + annotations: list + cancelled_annotations: + type: optional + docs: Number of total cancelled annotations for the current task + validation: + min: -2147483648 + max: 2147483647 + comment_authors: + type: optional> + docs: Users who wrote comments + comment_count: + type: optional + docs: Number of comments in the task including all annotations + validation: + min: -2147483648 + max: 2147483647 created_at: type: datetime docs: Time a task was created - updated_at: - type: datetime - docs: Last time a task was updated + data: unknown + file_upload: + type: optional + docs: Uploaded file used as data source for this task + id: integer + inner_id: + type: optional + docs: Internal task ID in the project, starts with 1 is_labeled: type: optional docs: >- True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + last_comment_updated_at: + type: optional + docs: When the last comment was updated + meta: optional overlap: type: optional docs: Number of distinct annotators that processed the current task validation: min: -2147483648 max: 2147483647 - inner_id: - type: optional - docs: Internal task ID in the project, starts with 1 + predictions: list + project: + type: optional + docs: Project ID for this task total_annotations: type: optional docs: >- @@ -7015,64 +7038,38 @@ types: validation: min: -2147483648 max: 2147483647 - cancelled_annotations: - type: optional - docs: Number of total cancelled annotations for the current task - validation: - min: -2147483648 - max: 2147483647 total_predictions: type: optional docs: Number of total predictions for the current task validation: min: -2147483648 max: 2147483647 - comment_count: - type: optional - docs: Number of comments in the task including all annotations - validation: - min: -2147483648 - max: 2147483647 unresolved_comment_count: type: optional docs: Number of unresolved comments in the task including all annotations validation: min: -2147483648 max: 2147483647 - last_comment_updated_at: - type: optional - docs: When the last comment was updated - project: - type: optional - docs: Project ID for this task + updated_at: + type: datetime + docs: Last time a task was updated updated_by: type: optional docs: Last annotator or reviewer who updated this task - file_upload: - type: optional - docs: Uploaded file used as data source for this task - comment_authors: - type: optional> - docs: Users who wrote comments - annotations: list - predictions: list source: openapi: openapi/openapi.yaml ThirdPartyModelVersion: properties: - id: integer + created_at: datetime created_by: type: UserSimple docs: User who created Dataset - score: string + id: integer + model_provider_connection: optional + organization: optional parent_model: type: optional docs: Parent model interface ID - title: - type: string - docs: Model name - validation: - maxLength: 500 prompt: type: string docs: Prompt to execute @@ -7093,23 +7090,22 @@ types: docs: The model ID to use within the given provider, e.g. gpt-3.5 validation: maxLength: 255 - created_at: datetime + score: string + title: + type: string + docs: Model name + validation: + maxLength: 500 updated_at: datetime - model_provider_connection: optional - organization: optional source: openapi: openapi/openapi.yaml ThirdPartyModelVersionRequest: properties: + model_provider_connection: optional + organization: optional parent_model: type: optional docs: Parent model interface ID - title: - type: string - docs: Model name - validation: - minLength: 1 - maxLength: 500 prompt: type: string docs: Prompt to execute @@ -7133,8 +7129,12 @@ types: validation: minLength: 1 maxLength: 255 - model_provider_connection: optional - organization: optional + title: + type: string + docs: Model name + validation: + minLength: 1 + maxLength: 500 source: openapi: openapi/openapi.yaml TokenRefreshResponse: @@ -7182,21 +7182,21 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer + avatar: string + email: + type: optional + validation: + format: email + maxLength: 254 first_name: type: optional validation: maxLength: 256 + id: integer last_name: type: optional validation: maxLength: 256 - email: - type: optional - validation: - format: email - maxLength: 254 - avatar: string source: openapi: openapi/openapi.yaml UserSimpleRequest: @@ -7206,6 +7206,11 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: + email: + type: optional + validation: + format: email + maxLength: 254 first_name: type: optional validation: @@ -7214,23 +7219,12 @@ types: type: optional validation: maxLength: 256 - email: - type: optional - validation: - format: email - maxLength: 254 source: openapi: openapi/openapi.yaml VersionResponse: properties: - release: - type: string - docs: Current release version of Label Studio - label-studio-os-package: unknown - label-studio-os-backend: unknown - label-studio-frontend: unknown + backend: unknown dm2: unknown - label-studio-converter: unknown edition: type: EditionEnum docs: |- @@ -7238,16 +7232,21 @@ types: * `Community` - Community * `Enterprise` - Enterprise + label-studio-converter: unknown + label-studio-frontend: unknown + label-studio-os-backend: unknown + label-studio-os-package: unknown lsf: unknown - backend: unknown + release: + type: string + docs: Current release version of Label Studio source: openapi: openapi/openapi.yaml View: properties: - id: integer - filter_group: optional data: optional - ordering: optional + filter_group: optional + id: integer order: type: optional docs: >- @@ -7256,43 +7255,44 @@ types: validation: min: -2147483648 max: 2147483647 + ordering: optional + project: + type: integer + docs: Project ID selected_items: optional user: type: optional docs: User who made this view - project: - type: integer - docs: Project ID source: openapi: openapi/openapi.yaml Webhook: properties: + actions: optional> + created_at: + type: datetime + docs: Creation time + headers: optional id: integer + is_active: + type: optional + docs: If value is False the webhook is disabled organization: integer project: optional - url: - type: string - docs: URL of webhook - validation: - format: uri - maxLength: 2048 - send_payload: - type: optional - docs: If value is False send only action send_for_all_actions: type: optional docs: If value is False - used only for actions from WebhookAction - headers: optional - is_active: + send_payload: type: optional - docs: If value is False the webhook is disabled - actions: optional> - created_at: - type: datetime - docs: Creation time + docs: If value is False send only action updated_at: type: datetime docs: Last update time + url: + type: string + docs: URL of webhook + validation: + format: uri + maxLength: 2048 source: openapi: openapi/openapi.yaml WebhookSerializerForUpdate: @@ -7301,32 +7301,32 @@ types: Used to forbid updating project field. properties: + actions: optional> + created_at: + type: datetime + docs: Creation time + headers: optional id: integer + is_active: + type: optional + docs: If value is False the webhook is disabled organization: integer project: optional - url: - type: string - docs: URL of webhook - validation: - format: uri - maxLength: 2048 - send_payload: - type: optional - docs: If value is False send only action send_for_all_actions: type: optional docs: If value is False - used only for actions from WebhookAction - headers: optional - is_active: + send_payload: type: optional - docs: If value is False the webhook is disabled - actions: optional> - created_at: - type: datetime - docs: Creation time + docs: If value is False send only action updated_at: type: datetime docs: Last update time + url: + type: string + docs: URL of webhook + validation: + format: uri + maxLength: 2048 source: openapi: openapi/openapi.yaml Workspace: @@ -7336,26 +7336,26 @@ types: control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: integer - title: - type: string - docs: Workspace name - validation: - maxLength: 1000 - description: - type: optional - docs: Workspace description color: type: optional validation: maxLength: 16 - is_personal: - type: optional - docs: Workspace is a personal user workspace + created_by: integer + description: + type: optional + docs: Workspace description + id: integer is_archived: type: optional docs: Workspace is archived - created_by: integer + is_personal: + type: optional + docs: Workspace is a personal user workspace + title: + type: string + docs: Workspace name + validation: + maxLength: 1000 source: openapi: openapi/openapi.yaml WorkspaceMemberCreate: diff --git a/.mock/definition/actions.yml b/.mock/definition/actions.yml index f450fd613..747504855 100644 --- a/.mock/definition/actions.yml +++ b/.mock/definition/actions.yml @@ -1,31 +1,31 @@ types: ActionsListResponseItemDialog: properties: - title: - type: optional + form: + type: optional>> text: type: optional + title: + type: optional type: type: optional - form: - type: optional>> source: openapi: openapi/openapi.yaml inline: true ActionsListResponseItem: properties: + dialog: + type: optional + experimental: + type: optional id: type: optional - title: - type: optional order: type: optional permission: type: optional - experimental: - type: optional - dialog: - type: optional + title: + type: optional source: openapi: openapi/openapi.yaml ActionsCreateRequestId: @@ -305,41 +305,6 @@ types: source: openapi: openapi/openapi.yaml inline: true - ActionsCreateRequestSelectedItemsIncluded: - properties: - all: - type: boolean - docs: No tasks are selected - included: - type: optional> - docs: List of included task IDs - source: - openapi: openapi/openapi.yaml - inline: true - ActionsCreateRequestSelectedItemsExcluded: - properties: - all: - type: boolean - docs: All tasks are selected - excluded: - type: optional> - docs: List of excluded task IDs - source: - openapi: openapi/openapi.yaml - inline: true - ActionsCreateRequestSelectedItems: - discriminated: false - docs: >- - Task selection by IDs. If filters are applied, the selection will be - applied to the filtered tasks.If "all" is `false`, `"included"` must be - used. If "all" is `true`, `"excluded"` must be used.
Examples: `{"all": - false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` - union: - - type: ActionsCreateRequestSelectedItemsIncluded - - type: ActionsCreateRequestSelectedItemsExcluded - source: - openapi: openapi/openapi.yaml - inline: true ActionsCreateRequestOrderingItem: enum: - value: tasks:agreement @@ -389,6 +354,41 @@ types: inline: true source: openapi: openapi/openapi.yaml + ActionsCreateRequestSelectedItemsIncluded: + properties: + all: + type: boolean + docs: No tasks are selected + included: + type: optional> + docs: List of included task IDs + source: + openapi: openapi/openapi.yaml + inline: true + ActionsCreateRequestSelectedItemsExcluded: + properties: + all: + type: boolean + docs: All tasks are selected + excluded: + type: optional> + docs: List of excluded task IDs + source: + openapi: openapi/openapi.yaml + inline: true + ActionsCreateRequestSelectedItems: + discriminated: false + docs: >- + Task selection by IDs. If filters are applied, the selection will be + applied to the filtered tasks.If "all" is `false`, `"included"` must be + used. If "all" is `true`, `"excluded"` must be used.
Examples: `{"all": + false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` + union: + - type: ActionsCreateRequestSelectedItemsIncluded + - type: ActionsCreateRequestSelectedItemsExcluded + source: + openapi: openapi/openapi.yaml + inline: true service: auth: false base-path: '' @@ -418,20 +418,20 @@ service: project: 1 response: body: - - id: predictions_to_annotations - title: Create Annotations From Predictions - order: 91 - permission: tasks.change - experimental: false - dialog: - title: Create Annotations From Predictions + - dialog: + form: + - key: value text: >- Create annotations from predictions using selected predictions set for each selected task. Your account will be assigned as an owner to those annotations. + title: Create Annotations From Predictions type: confirm - form: - - key: value + experimental: false + id: predictions_to_annotations + order: 91 + permission: tasks.change + title: Create Annotations From Predictions audiences: - public create: @@ -473,6 +473,12 @@ service: Manager Filters.
Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}` + ordering: + type: optional> + docs: >- + List of fields to order by. Fields are similar to filters but + without the `filter:` prefix. To reverse the order, add a minus + sign before the field name, e.g. `-tasks:created_at`. selectedItems: type: optional docs: >- @@ -481,12 +487,6 @@ service: `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` - ordering: - type: optional> - docs: >- - List of fields to order by. Fields are similar to filters but - without the `filter:` prefix. To reverse the order, add a minus - sign before the field name, e.g. `-tasks:created_at`. content-type: application/json examples: - query-parameters: @@ -500,14 +500,14 @@ service: operator: greater type: Number value: 123 + ordering: + - tasks:total_annotations selectedItems: all: true excluded: - 124 - 125 - 126 - ordering: - - tasks:total_annotations audiences: - public source: diff --git a/.mock/definition/activityLog.yml b/.mock/definition/activityLog.yml index 69413863e..e56729be4 100644 --- a/.mock/definition/activityLog.yml +++ b/.mock/definition/activityLog.yml @@ -71,14 +71,14 @@ service: - response: body: - data: - - id: 1 - user_id: 1 + - datetime: '2024-01-15T09:30:00Z' email: email - request_url: request_url + id: 1 request_method: request_method + request_url: request_url response_code: response_code - datetime: '2024-01-15T09:30:00Z' - recordsTotal: 1 + user_id: 1 recordsFiltered: 1 + recordsTotal: 1 source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/annotationHistory.yml b/.mock/definition/annotationHistory.yml index c57597c8a..a3b0938f3 100644 --- a/.mock/definition/annotationHistory.yml +++ b/.mock/definition/annotationHistory.yml @@ -28,22 +28,22 @@ service: examples: - response: body: - - id: 1 + - action: prediction + annotation_id: 1 comment: comment + comment_id: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + draft_id: 1 + id: 1 + lead_time: 1.1 organization_id: 1 project_id: 1 - annotation_id: 1 - draft_id: 1 - review_id: 1 - task_id: 1 result: key: value - lead_time: 1.1 - action: prediction + review_id: 1 started_at: '2024-01-15T09:30:00Z' - created_at: '2024-01-15T09:30:00Z' - created_by: 1 - comment_id: 1 + task_id: 1 api_annotation_history_destroy: path: /api/annotation-history/ method: DELETE @@ -93,22 +93,22 @@ service: next: http://api.example.org/accounts/?page=4 previous: http://api.example.org/accounts/?page=2 results: - - id: 1 + - action: prediction + annotation_id: 1 comment: comment + comment_id: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + draft_id: 1 + id: 1 + lead_time: 1.1 organization_id: 1 project_id: 1 - annotation_id: 1 - draft_id: 1 - review_id: 1 - task_id: 1 result: key: value - lead_time: 1.1 - action: prediction + review_id: 1 started_at: '2024-01-15T09:30:00Z' - created_at: '2024-01-15T09:30:00Z' - created_by: 1 - comment_id: 1 + task_id: 1 source: openapi: openapi/openapi.yaml types: diff --git a/.mock/definition/annotationReviews.yml b/.mock/definition/annotationReviews.yml index 005d9e142..7aa4e626d 100644 --- a/.mock/definition/annotationReviews.yml +++ b/.mock/definition/annotationReviews.yml @@ -26,17 +26,17 @@ service: examples: - response: body: - - id: 1 - created_by: 1 - created_at: '2024-01-15T09:30:00Z' - accepted: true - result: - key: value + - accepted: true annotation: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 fixed_annotation_history: 1 - previous_annotation_history: 1 + id: 1 last_annotation_history: 1 + previous_annotation_history: 1 remove_from_queue: true + result: + key: value started_at: '2024-01-15T09:30:00Z' api_annotation_reviews_create: path: /api/annotation-reviews/ @@ -57,17 +57,17 @@ service: annotation: 1 response: body: - id: 1 - created_by: 1 - created_at: '2024-01-15T09:30:00Z' accepted: true - result: - key: value annotation: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 fixed_annotation_history: 1 - previous_annotation_history: 1 + id: 1 last_annotation_history: 1 + previous_annotation_history: 1 remove_from_queue: true + result: + key: value started_at: '2024-01-15T09:30:00Z' api_annotation_reviews_retrieve: path: /api/annotation-reviews/{id}/ @@ -89,17 +89,17 @@ service: id: 1 response: body: - id: 1 - created_by: 1 - created_at: '2024-01-15T09:30:00Z' accepted: true - result: - key: value annotation: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 fixed_annotation_history: 1 - previous_annotation_history: 1 + id: 1 last_annotation_history: 1 + previous_annotation_history: 1 remove_from_queue: true + result: + key: value started_at: '2024-01-15T09:30:00Z' api_annotation_reviews_update: path: /api/annotation-reviews/{id}/ @@ -126,17 +126,17 @@ service: annotation: 1 response: body: - id: 1 - created_by: 1 - created_at: '2024-01-15T09:30:00Z' accepted: true - result: - key: value annotation: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 fixed_annotation_history: 1 - previous_annotation_history: 1 + id: 1 last_annotation_history: 1 + previous_annotation_history: 1 remove_from_queue: true + result: + key: value started_at: '2024-01-15T09:30:00Z' api_annotation_reviews_destroy: path: /api/annotation-reviews/{id}/ @@ -172,16 +172,16 @@ service: accepted: type: optional docs: Accepted or rejected (if false) flag - result: optional annotation: type: optional docs: Corresponding annotation - last_annotation_history: optional comment: type: optional validation: minLength: 1 + last_annotation_history: optional remove_from_queue: optional + result: optional started_at: optional content-type: application/json response: @@ -193,17 +193,17 @@ service: request: {} response: body: - id: 1 - created_by: 1 - created_at: '2024-01-15T09:30:00Z' accepted: true - result: - key: value annotation: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 fixed_annotation_history: 1 - previous_annotation_history: 1 + id: 1 last_annotation_history: 1 + previous_annotation_history: 1 remove_from_queue: true + result: + key: value started_at: '2024-01-15T09:30:00Z' source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/annotations.yml b/.mock/definition/annotations.yml index 509cc26db..a01e0a71a 100644 --- a/.mock/definition/annotations.yml +++ b/.mock/definition/annotations.yml @@ -1,9 +1,127 @@ imports: root: __package__.yml +types: + AnnotationBulkSerializerWithSelectedItemsRequestLastAction: + discriminated: false + docs: |- + Action which was performed in the last annotation history item + + * `prediction` - Created from prediction + * `propagated_annotation` - Created from another annotation + * `imported` - Imported + * `submitted` - Submitted + * `updated` - Updated + * `skipped` - Skipped + * `accepted` - Accepted + * `rejected` - Rejected + * `fixed_and_accepted` - Fixed and accepted + * `deleted_review` - Deleted review + union: + - root.LastActionEnum + - root.NullEnum + source: + openapi: openapi/openapi.yaml + inline: true + AnnotationsCreateBulkResponseItem: + properties: + id: + type: integer + docs: Annotation ID + source: + openapi: openapi/openapi.yaml service: auth: false base-path: '' endpoints: + create_bulk: + path: /api/annotations/bulk/ + method: POST + auth: true + docs: Create multiple annotations at once + source: + openapi: openapi/openapi.yaml + display-name: Bulk create annotations + request: + name: AnnotationBulkSerializerWithSelectedItemsRequest + body: + properties: + bulk_created: + type: optional + docs: Annotation was created in bulk mode + completed_by: optional + draft_created_at: + type: optional + docs: Draft creation time + ground_truth: + type: optional + docs: This annotation is a Ground Truth (ground_truth) + import_id: + type: optional + docs: >- + Original annotation ID that was at the import step or NULL if + this annotation wasn't imported + last_action: + type: >- + optional + docs: |- + Action which was performed in the last annotation history item + + * `prediction` - Created from prediction + * `propagated_annotation` - Created from another annotation + * `imported` - Imported + * `submitted` - Submitted + * `updated` - Updated + * `skipped` - Skipped + * `accepted` - Accepted + * `rejected` - Rejected + * `fixed_and_accepted` - Fixed and accepted + * `deleted_review` - Deleted review + last_created_by: + type: optional + docs: User who created the last annotation history item + lead_time: + type: optional + docs: How much time it took to annotate the task + parent_annotation: + type: optional + docs: >- + Points to the parent annotation from which this annotation was + created + parent_prediction: + type: optional + docs: Points to the prediction from which this annotation was created + project: + type: optional + docs: Project ID for this annotation + result: + type: optional>> + docs: List of annotation results for the task + selected_items: optional + task: + type: optional + docs: Corresponding task for this annotation + tasks: optional> + unique_id: + type: optional + validation: + minLength: 1 + updated_by: + type: optional + docs: Last user who updated this annotation + was_cancelled: + type: optional + docs: User skipped the task + content-type: application/json + response: + docs: Bulk annotations created successfully + type: list + examples: + - request: {} + response: + body: + - id: 1 + audiences: + - public get: path: /api/annotations/{id}/ method: GET @@ -25,41 +143,41 @@ service: id: 1 response: body: + bulk_created: true + completed_by: 1 + created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' + created_username: created_username + draft_created_at: '2024-01-15T09:30:00Z' + ground_truth: false id: 1 + import_id: 1000000 + last_action: prediction + last_created_by: 1 + lead_time: 10 + parent_annotation: 1 + parent_prediction: 1 + project: 1 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person - created_username: created_username - created_ago: created_ago - completed_by: 1 - was_cancelled: false - ground_truth: false - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - draft_created_at: '2024-01-15T09:30:00Z' - lead_time: 10 - import_id: 1000000 - last_action: prediction - bulk_created: true + width: 50 + x: 20 + 'y': 30 task: 1 - project: 1 + updated_at: '2024-01-15T09:30:00Z' updated_by: 1 - parent_prediction: 1 - parent_annotation: 1 - last_created_by: 1 + was_cancelled: false audiences: - public delete: @@ -91,6 +209,18 @@ service: name: AnnotationsUpdateRequest body: properties: + completed_by: + type: optional + docs: User ID of the person who created this annotation + ground_truth: + type: optional + docs: This annotation is a Ground Truth + lead_time: + type: optional + docs: How much time it took to annotate the task (in seconds) + project: + type: optional + docs: Project ID for this annotation result: type: optional>> docs: >- @@ -100,24 +230,12 @@ service: task: type: optional docs: Corresponding task for this annotation - project: - type: optional - docs: Project ID for this annotation - completed_by: - type: optional - docs: User ID of the person who created this annotation updated_by: type: optional docs: Last user who updated this annotation was_cancelled: type: optional docs: User skipped the task - ground_truth: - type: optional - docs: This annotation is a Ground Truth - lead_time: - type: optional - docs: How much time it took to annotate the task (in seconds) content-type: application/json response: docs: Updated annotation @@ -127,61 +245,61 @@ service: path-parameters: id: 1 request: + ground_truth: true result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person + width: 50 + x: 20 + 'y': 30 was_cancelled: false - ground_truth: true response: body: + bulk_created: true + completed_by: 1 + created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' + created_username: created_username + draft_created_at: '2024-01-15T09:30:00Z' + ground_truth: false id: 1 + import_id: 1000000 + last_action: prediction + last_created_by: 1 + lead_time: 10 + parent_annotation: 1 + parent_prediction: 1 + project: 1 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person - created_username: created_username - created_ago: created_ago - completed_by: 1 - was_cancelled: false - ground_truth: false - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - draft_created_at: '2024-01-15T09:30:00Z' - lead_time: 10 - import_id: 1000000 - last_action: prediction - bulk_created: true + width: 50 + x: 20 + 'y': 30 task: 1 - project: 1 + updated_at: '2024-01-15T09:30:00Z' updated_by: 1 - parent_prediction: 1 - parent_annotation: 1 - last_created_by: 1 + was_cancelled: false audiences: - public api_annotations_convert_to_draft_create: @@ -199,95 +317,6 @@ service: id: 1 audiences: - internal - create_bulk: - path: /api/annotations/bulk/ - method: POST - auth: true - docs: Create multiple annotations at once - source: - openapi: openapi/openapi.yaml - display-name: Bulk create annotations - request: - name: AnnotationBulkSerializerWithSelectedItemsRequest - body: - properties: - result: - type: optional>> - docs: List of annotation results for the task - completed_by: optional - unique_id: - type: optional - validation: - minLength: 1 - tasks: optional> - selected_items: optional - was_cancelled: - type: optional - docs: User skipped the task - ground_truth: - type: optional - docs: This annotation is a Ground Truth (ground_truth) - draft_created_at: - type: optional - docs: Draft creation time - lead_time: - type: optional - docs: How much time it took to annotate the task - import_id: - type: optional - docs: >- - Original annotation ID that was at the import step or NULL if - this annotation wasn't imported - last_action: - type: >- - optional - docs: |- - Action which was performed in the last annotation history item - - * `prediction` - Created from prediction - * `propagated_annotation` - Created from another annotation - * `imported` - Imported - * `submitted` - Submitted - * `updated` - Updated - * `skipped` - Skipped - * `accepted` - Accepted - * `rejected` - Rejected - * `fixed_and_accepted` - Fixed and accepted - * `deleted_review` - Deleted review - bulk_created: - type: optional - docs: Annotation was created in bulk mode - task: - type: optional - docs: Corresponding task for this annotation - project: - type: optional - docs: Project ID for this annotation - updated_by: - type: optional - docs: Last user who updated this annotation - parent_prediction: - type: optional - docs: Points to the prediction from which this annotation was created - parent_annotation: - type: optional - docs: >- - Points to the parent annotation from which this annotation was - created - last_created_by: - type: optional - docs: User who created the last annotation history item - content-type: application/json - response: - docs: Bulk annotations created successfully - type: list - examples: - - request: {} - response: - body: - - id: 1 - audiences: - - public list: path: /api/tasks/{id}/annotations/ method: GET @@ -315,27 +344,27 @@ service: id: 1 response: body: - - id: 1 - result: - - key: value - created_username: created_username - created_ago: created_ago + - bulk_created: true completed_by: 1 - was_cancelled: true - ground_truth: true + created_ago: created_ago created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + created_username: created_username draft_created_at: '2024-01-15T09:30:00Z' - lead_time: 1.1 + ground_truth: true + id: 1 import_id: 1000000 last_action: prediction - bulk_created: true - task: 1 + last_created_by: 1 + lead_time: 1.1 + parent_annotation: 1 + parent_prediction: 1 project: 1 + result: + - key: value + task: 1 + updated_at: '2024-01-15T09:30:00Z' updated_by: 1 - parent_prediction: 1 - parent_annotation: 1 - last_created_by: 1 + was_cancelled: true audiences: - public create: @@ -370,6 +399,18 @@ service: name: AnnotationsCreateRequest body: properties: + completed_by: + type: optional + docs: User ID of the person who created this annotation + ground_truth: + type: optional + docs: This annotation is a Ground Truth + lead_time: + type: optional + docs: How much time it took to annotate the task (in seconds) + project: + type: optional + docs: Project ID for this annotation result: type: optional>> docs: >- @@ -379,24 +420,12 @@ service: task: type: optional docs: Corresponding task for this annotation - project: - type: optional - docs: Project ID for this annotation - completed_by: - type: optional - docs: User ID of the person who created this annotation updated_by: type: optional docs: Last user who updated this annotation was_cancelled: type: optional docs: User skipped the task - ground_truth: - type: optional - docs: This annotation is a Ground Truth - lead_time: - type: optional - docs: How much time it took to annotate the task (in seconds) content-type: application/json response: docs: Created annotation @@ -406,91 +435,62 @@ service: path-parameters: id: 1 request: + ground_truth: true result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person + width: 50 + x: 20 + 'y': 30 was_cancelled: false - ground_truth: true response: body: + bulk_created: true + completed_by: 1 + created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' + created_username: created_username + draft_created_at: '2024-01-15T09:30:00Z' + ground_truth: false id: 1 + import_id: 1000000 + last_action: prediction + last_created_by: 1 + lead_time: 10 + parent_annotation: 1 + parent_prediction: 1 + project: 1 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person - created_username: created_username - created_ago: created_ago - completed_by: 1 - was_cancelled: false - ground_truth: false - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - draft_created_at: '2024-01-15T09:30:00Z' - lead_time: 10 - import_id: 1000000 - last_action: prediction - bulk_created: true + width: 50 + x: 20 + 'y': 30 task: 1 - project: 1 + updated_at: '2024-01-15T09:30:00Z' updated_by: 1 - parent_prediction: 1 - parent_annotation: 1 - last_created_by: 1 + was_cancelled: false audiences: - public source: openapi: openapi/openapi.yaml -types: - AnnotationBulkSerializerWithSelectedItemsRequestLastAction: - discriminated: false - docs: |- - Action which was performed in the last annotation history item - - * `prediction` - Created from prediction - * `propagated_annotation` - Created from another annotation - * `imported` - Imported - * `submitted` - Submitted - * `updated` - Updated - * `skipped` - Skipped - * `accepted` - Accepted - * `rejected` - Rejected - * `fixed_and_accepted` - Fixed and accepted - * `deleted_review` - Deleted review - union: - - root.LastActionEnum - - root.NullEnum - source: - openapi: openapi/openapi.yaml - inline: true - AnnotationsCreateBulkResponseItem: - properties: - id: - type: integer - docs: Annotation ID - source: - openapi: openapi/openapi.yaml diff --git a/.mock/definition/billing.yml b/.mock/definition/billing.yml index 8f39d6a46..f8c4d9f7e 100644 --- a/.mock/definition/billing.yml +++ b/.mock/definition/billing.yml @@ -16,228 +16,228 @@ service: docs: Billing information for the active organization type: root.BillingInfoResponse examples: - - name: real-sample + - name: cloud response: body: billing_checks: - users: - count: 110 - limit: 1000 - reached: false - total: 221 - projects: - count: 2044 - limit: 1000000 + export_storages: + count: 0 + limit: 0 reached: false total: 1 - results: - count: 42949 - limit: 1000000000 + import_storages: + count: 0 + limit: 0 reached: false total: 1 - trial_days: 0 - organization_is_active: true - license_issued: '2000-01-01' - license_warning: '2030-01-01' - is_license_warning: false - license_expires: '2030-01-02' is_license_expired: false + is_license_warning: false + is_prompts_expire: false + is_prompts_warning: false + license_expires: '2025-01-01' + license_issued: '2023-01-01' + license_warning: '2024-12-01' + organization_is_active: true + projects: + count: 3 + limit: 50 + reached: false + total: 1 + prompts_api_keys_enabled: true prompts_enabled: true + prompts_expire: '2024-12-31' prompts_status: Enabled prompts_warning: prompts_warning - is_prompts_warning: false - prompts_expire: prompts_expire - is_prompts_expire: false - prompts_api_keys_enabled: true - import_storages: - count: 0 - limit: 0 + results: + count: 100 + limit: 1000 reached: false total: 1 - export_storages: - count: 0 - limit: 0 + trial_days: 14 + users: + count: 5 + limit: 10 reached: false - total: 1 + total: 6 billing_flags: - activated_at: '2024-01-15T09:30:00Z' - cloud_instance: true + activated_at: '2023-01-01T00:00:00Z' allow_activity_log: true - allow_invite_project_experts: true - allow_sso: true - white_label_id: white_label_id - allow_data_credentials: false - allow_organization_webhooks: false - disable_members_page: false - secure_mode: false - manual_workspace_management: true - manual_role_management: true - hide_storage_settings_for_manager: false - disable_project_imports: false - automax_token_exists: true - automax_enabled: true - storage_persistence: true allow_ai: true - early_adopter: true allow_ask_ai: true + allow_data_credentials: true allow_invite_people: true + allow_invite_project_experts: true + allow_organization_webhooks: true + allow_sso: false allow_storage_proxy: true - embed_enabled: true + automax_enabled: true + automax_token_exists: false + cloud_instance: true + disable_members_page: false + disable_project_imports: false + early_adopter: false embed_domains: - domain: http://localhost:3000 - - domain: https://purple-zoos-flash.loca.lt + - domain: https://example.com + embed_enabled: false embed_settings: public_verify_alg: - RS256 public_verify_key: .... - - name: cloud + hide_storage_settings_for_manager: false + manual_role_management: false + manual_workspace_management: false + secure_mode: false + storage_persistence: true + white_label_id: white_label_id + - name: enterprise response: body: billing_checks: - users: - count: 5 - limit: 10 - reached: false - total: 6 - projects: - count: 3 - limit: 50 + export_storages: + count: 0 + limit: 0 reached: false total: 1 - results: - count: 100 - limit: 1000 + import_storages: + count: 0 + limit: 0 reached: false total: 1 - trial_days: 14 - organization_is_active: true - license_issued: '2023-01-01' - license_warning: '2024-12-01' + is_license_expired: false is_license_warning: false + is_prompts_expire: false + is_prompts_warning: false license_expires: '2025-01-01' - is_license_expired: false + license_issued: '2023-01-01' + license_warning: '2024-12-01' + organization_is_active: true + projects: + count: 15 + limit: 200 + reached: false + total: 1 + prompts_api_keys_enabled: true prompts_enabled: true + prompts_expire: prompts_expire prompts_status: Enabled prompts_warning: prompts_warning - is_prompts_warning: false - prompts_expire: '2024-12-31' - is_prompts_expire: false - prompts_api_keys_enabled: true - import_storages: - count: 0 - limit: 0 + results: + count: 25000 + limit: 100000 reached: false total: 1 - export_storages: - count: 0 - limit: 0 + trial_days: 0 + users: + count: 20 + limit: 100 reached: false - total: 1 + total: 22 billing_flags: - activated_at: '2023-01-01T00:00:00Z' - cloud_instance: true + activated_at: '2024-01-15T09:30:00Z' allow_activity_log: true - allow_invite_project_experts: true - allow_sso: false - white_label_id: white_label_id + allow_ai: false + allow_ask_ai: true allow_data_credentials: true + allow_invite_people: true + allow_invite_project_experts: true allow_organization_webhooks: true + allow_sso: true + allow_storage_proxy: true + automax_enabled: true + automax_token_exists: true + cloud_instance: false disable_members_page: false - secure_mode: false - manual_workspace_management: false - manual_role_management: false - hide_storage_settings_for_manager: false disable_project_imports: false - automax_token_exists: false - automax_enabled: true - storage_persistence: true - allow_ai: true - early_adopter: false - allow_ask_ai: true - allow_invite_people: true - allow_storage_proxy: true - embed_enabled: false + early_adopter: true embed_domains: - domain: http://localhost:3000 - domain: https://example.com + embed_enabled: false embed_settings: public_verify_alg: - RS256 public_verify_key: .... - - name: enterprise + hide_storage_settings_for_manager: false + manual_role_management: false + manual_workspace_management: false + secure_mode: false + storage_persistence: true + white_label_id: wl-1 + - name: real-sample response: body: billing_checks: - users: - count: 20 - limit: 100 - reached: false - total: 22 - projects: - count: 15 - limit: 200 + export_storages: + count: 0 + limit: 0 reached: false total: 1 - results: - count: 25000 - limit: 100000 + import_storages: + count: 0 + limit: 0 reached: false total: 1 - trial_days: 0 - organization_is_active: true - license_issued: '2023-01-01' - license_warning: '2024-12-01' - is_license_warning: false - license_expires: '2025-01-01' is_license_expired: false + is_license_warning: false + is_prompts_expire: false + is_prompts_warning: false + license_expires: '2030-01-02' + license_issued: '2000-01-01' + license_warning: '2030-01-01' + organization_is_active: true + projects: + count: 2044 + limit: 1000000 + reached: false + total: 1 + prompts_api_keys_enabled: true prompts_enabled: true + prompts_expire: prompts_expire prompts_status: Enabled prompts_warning: prompts_warning - is_prompts_warning: false - prompts_expire: prompts_expire - is_prompts_expire: false - prompts_api_keys_enabled: true - import_storages: - count: 0 - limit: 0 + results: + count: 42949 + limit: 1000000000 reached: false total: 1 - export_storages: - count: 0 - limit: 0 + trial_days: 0 + users: + count: 110 + limit: 1000 reached: false - total: 1 + total: 221 billing_flags: activated_at: '2024-01-15T09:30:00Z' - cloud_instance: false allow_activity_log: true + allow_ai: true + allow_ask_ai: true + allow_data_credentials: false + allow_invite_people: true allow_invite_project_experts: true + allow_organization_webhooks: false allow_sso: true - white_label_id: wl-1 - allow_data_credentials: true - allow_organization_webhooks: true + allow_storage_proxy: true + automax_enabled: true + automax_token_exists: true + cloud_instance: true disable_members_page: false - secure_mode: false - manual_workspace_management: false - manual_role_management: false - hide_storage_settings_for_manager: false disable_project_imports: false - automax_token_exists: true - automax_enabled: true - storage_persistence: true - allow_ai: false early_adopter: true - allow_ask_ai: true - allow_invite_people: true - allow_storage_proxy: true - embed_enabled: false embed_domains: - domain: http://localhost:3000 - - domain: https://example.com + - domain: https://purple-zoos-flash.loca.lt + embed_enabled: true embed_settings: public_verify_alg: - RS256 public_verify_key: .... + hide_storage_settings_for_manager: false + manual_role_management: true + manual_workspace_management: true + secure_mode: false + storage_persistence: true + white_label_id: white_label_id audiences: - public source: diff --git a/.mock/definition/blueprints.yml b/.mock/definition/blueprints.yml index ddcfe1c5b..0e677f1d2 100644 --- a/.mock/definition/blueprints.yml +++ b/.mock/definition/blueprints.yml @@ -17,17 +17,17 @@ service: body: properties: created_by: optional - title: - type: optional - docs: Blueprint name. Must be between 3 and 50 characters long. - validation: - maxLength: 50 description: type: optional docs: Project description label_config: type: optional docs: Labeling configuration in XML format + title: + type: optional + docs: Blueprint name. Must be between 3 and 50 characters long. + validation: + maxLength: 50 content-type: application/json response: docs: '' @@ -36,15 +36,15 @@ service: - request: {} response: body: + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + description: description id: 1 + label_config: label_config + project: 1 share_id: share_id short_url: short_url - project: 1 - created_by: 1 title: title - description: description - label_config: label_config - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' api_blueprints_destroy: path: /api/blueprints/{id}/ diff --git a/.mock/definition/comments.yml b/.mock/definition/comments.yml index c2860a267..260ea6597 100644 --- a/.mock/definition/comments.yml +++ b/.mock/definition/comments.yml @@ -29,21 +29,21 @@ service: examples: - response: body: - - id: 1 - region_ref: - key: value + - annotation: 1 classifications: key: value - text: text created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + created_by: 1 + draft: 1 + id: 1 is_resolved: true - resolved_at: '2024-01-15T09:30:00Z' project: 1 + region_ref: + key: value + resolved_at: '2024-01-15T09:30:00Z' task: 1 - draft: 1 - annotation: 1 - created_by: 1 + text: text + updated_at: '2024-01-15T09:30:00Z' audiences: - public create: @@ -69,21 +69,47 @@ service: - request: {} response: body: - id: 1 - region_ref: - key: value + annotation: 1 classifications: key: value - text: text created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + created_by: 1 + draft: 1 + id: 1 is_resolved: true - resolved_at: '2024-01-15T09:30:00Z' project: 1 + region_ref: + key: value + resolved_at: '2024-01-15T09:30:00Z' task: 1 - draft: 1 - annotation: 1 - created_by: 1 + text: text + updated_at: '2024-01-15T09:30:00Z' + audiences: + - public + export: + path: /api/comments/export/ + method: GET + auth: true + docs: Export comments to CSV file + source: + openapi: openapi/openapi.yaml + display-name: Export comments to CSV + request: + name: CommentsExportRequest + query-parameters: + annotation: optional + annotators: optional + draft: optional + expand_created_by: optional + projects: optional + tz: + type: optional + docs: >- + Timezone in which to export the data. Format IANA timezone name, + e.g. "America/New_York" + response: + docs: CSV file with comments + type: file audiences: - public get: @@ -110,21 +136,21 @@ service: id: id response: body: - id: 1 - region_ref: - key: value + annotation: 1 classifications: key: value - text: text created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + created_by: 1 + draft: 1 + id: 1 is_resolved: true - resolved_at: '2024-01-15T09:30:00Z' project: 1 + region_ref: + key: value + resolved_at: '2024-01-15T09:30:00Z' task: 1 - draft: 1 - annotation: 1 - created_by: 1 + text: text + updated_at: '2024-01-15T09:30:00Z' audiences: - public api_comments_update: @@ -154,21 +180,21 @@ service: request: {} response: body: - id: 1 - region_ref: - key: value + annotation: 1 classifications: key: value - text: text created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + created_by: 1 + draft: 1 + id: 1 is_resolved: true - resolved_at: '2024-01-15T09:30:00Z' project: 1 + region_ref: + key: value + resolved_at: '2024-01-15T09:30:00Z' task: 1 - draft: 1 - annotation: 1 - created_by: 1 + text: text + updated_at: '2024-01-15T09:30:00Z' audiences: - internal delete: @@ -210,16 +236,16 @@ service: docs: Expand the created_by field body: properties: - region_ref: optional + annotation: optional classifications: optional - text: - type: optional - docs: Reviewer or annotator comment + draft: optional is_resolved: type: optional docs: True if the comment is resolved - draft: optional - annotation: optional + region_ref: optional + text: + type: optional + docs: Reviewer or annotator comment content-type: application/json response: docs: '' @@ -230,47 +256,21 @@ service: request: {} response: body: - id: 1 - region_ref: - key: value + annotation: 1 classifications: key: value - text: text created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + created_by: 1 + draft: 1 + id: 1 is_resolved: true - resolved_at: '2024-01-15T09:30:00Z' project: 1 + region_ref: + key: value + resolved_at: '2024-01-15T09:30:00Z' task: 1 - draft: 1 - annotation: 1 - created_by: 1 - audiences: - - public - export: - path: /api/comments/export/ - method: GET - auth: true - docs: Export comments to CSV file - source: - openapi: openapi/openapi.yaml - display-name: Export comments to CSV - request: - name: CommentsExportRequest - query-parameters: - annotation: optional - annotators: optional - draft: optional - expand_created_by: optional - projects: optional - tz: - type: optional - docs: >- - Timezone in which to export the data. Format IANA timezone name, - e.g. "America/New_York" - response: - docs: CSV file with comments - type: file + text: text + updated_at: '2024-01-15T09:30:00Z' audiences: - public source: diff --git a/.mock/definition/dashboard.yml b/.mock/definition/dashboard.yml index a1edfd0e2..9dedabf81 100644 --- a/.mock/definition/dashboard.yml +++ b/.mock/definition/dashboard.yml @@ -64,12 +64,12 @@ service: id: 1 response: body: - tasks: 1 - annotations: 1 annotated_tasks: 1 - skipped_tasks: 1 - reviewed_tasks: 1 + annotations: 1 remaining_tasks: 1 + reviewed_tasks: 1 + skipped_tasks: 1 + tasks: 1 api_projects_dashboard_members_retrieve: path: /api/projects/{id}/dashboard-members method: GET @@ -120,93 +120,93 @@ service: id: 1 response: body: - users: - - key: value similarity: - key: value stats: - - finished: 1 - skipped: 1 - accepted: 1 - rejected: 1 - progress: 1 + - accepted: 1 + finished: 1 + gt: 1.1 mean_time: 1.1 median_time: 1.1 - gt: 1.1 predictions: 1.1 + progress: 1 + rejected: 1 review_score: 1.1 + skipped: 1 + users: + - key: value source: openapi: openapi/openapi.yaml types: ApiProjectsDashboardRetrieveResponse: properties: - tasks: + annotated_tasks: type: optional - docs: Total number of tasks + docs: Number of annotated (completed) tasks annotations: type: optional docs: Total number of annotations - annotated_tasks: - type: optional - docs: Number of annotated (completed) tasks - skipped_tasks: + remaining_tasks: type: optional - docs: Number of tasks that have been skipped by at least one annotator + docs: Total number of uncompleted tasks reviewed_tasks: type: optional docs: Number of tasks that have been reviewed by at least one reviewer - remaining_tasks: + skipped_tasks: type: optional - docs: Total number of uncompleted tasks + docs: Number of tasks that have been skipped by at least one annotator + tasks: + type: optional + docs: Total number of tasks source: openapi: openapi/openapi.yaml ApiProjectsDashboardMembersRetrieveResponseStatsItem: docs: User statistics properties: - finished: - type: optional - skipped: - type: optional accepted: type: optional docs: Number of annotations marked as "Accepted" by reviewer - rejected: - type: optional - docs: Number of annotations marked as "Rejected" by reviewer - progress: + finished: type: optional - docs: Fraction of annotation work done so far + gt: + type: optional + docs: Average agreement with Ground Truth annotations mean_time: type: optional docs: Average mean time spent on annotation median_time: type: optional docs: Average median time spent on annotation - gt: - type: optional - docs: Average agreement with Ground Truth annotations predictions: type: optional docs: Average agreement with predictions + progress: + type: optional + docs: Fraction of annotation work done so far + rejected: + type: optional + docs: Number of annotations marked as "Rejected" by reviewer review_score: type: optional docs: >- Average reviewing score, when calling with "per_label=true", returns dictionary with labels to score breakdown + skipped: + type: optional source: openapi: openapi/openapi.yaml inline: true ApiProjectsDashboardMembersRetrieveResponse: docs: Task creation response properties: - users: - type: optional>> - docs: List of users similarity: type: optional>> docs: Consensus statistics between different users stats: type: optional> docs: Number of annotated (completed) tasks + users: + type: optional>> + docs: List of users source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/dataExplorer.yml b/.mock/definition/dataExplorer.yml index 6ae0277aa..5490e40ea 100644 --- a/.mock/definition/dataExplorer.yml +++ b/.mock/definition/dataExplorer.yml @@ -90,24 +90,24 @@ service: examples: - response: body: - id: 1 + data: + key: value + dataset: 1 filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 selected_items: key: value user: 1 - dataset: 1 api_datasets_tasks_metadata_retrieve: path: /api/datasets/tasks/metadata method: GET diff --git a/.mock/definition/dataManager.yml b/.mock/definition/dataManager.yml index 3a12df6a0..a671f8d7a 100644 --- a/.mock/definition/dataManager.yml +++ b/.mock/definition/dataManager.yml @@ -75,24 +75,24 @@ service: request: {} response: body: - id: 1 + data: + key: value filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 + project: 1 selected_items: key: value user: 1 - project: 1 audiences: - internal source: diff --git a/.mock/definition/datasetStorageAzure.yml b/.mock/definition/datasetStorageAzure.yml index 500cbce9c..874fa659c 100644 --- a/.mock/definition/datasetStorageAzure.yml +++ b/.mock/definition/datasetStorageAzure.yml @@ -27,31 +27,31 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - account_key: account_key account_name: account_name - account_key: account_key + container: container + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_azure_create: path: /api/dataset-storages/azure/ method: POST @@ -71,31 +71,121 @@ service: dataset: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true + account_key: account_key + account_name: account_name container: container + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value prefix: prefix + presign: true + presign_ttl: 1 regex_filter: regex_filter + status: initialized + synced: true + synchronizable: true + title: title + traceback: traceback + type: type use_blob_urls: true - account_name: account_name + api_dataset_storages_azure_check_for_records_create: + path: /api/dataset-storages/azure/check-for-records/ + method: POST + auth: true + docs: >- + Checks for existence of records matching the file pattern in the + bucket/prefix + source: + openapi: openapi/openapi.yaml + display-name: Check for records given the file pattern + request: + body: root.AzureDatasetStorageRequest + content-type: application/json + response: + docs: '' + type: root.AzureDatasetStorage + examples: + - request: + dataset: 1 + response: + body: account_key: account_key + account_name: account_name + container: container + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value + prefix: prefix + presign: true + presign_ttl: 1 + regex_filter: regex_filter + status: initialized + synced: true + synchronizable: true title: title - description: description + traceback: traceback + type: type + use_blob_urls: true + api_dataset_storages_azure_validate_create: + path: /api/dataset-storages/azure/validate/ + method: POST + auth: true + docs: Validate a specific Azure import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + body: root.AzureDatasetStorageRequest + content-type: application/json + response: + docs: '' + type: root.AzureDatasetStorage + examples: + - request: + dataset: 1 + response: + body: + account_key: account_key + account_name: account_name + container: container created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 + dataset: 1 + description: description glob_pattern: glob_pattern - synced: true + id: 1 job_id: job_id - dataset: 1 + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value + prefix: prefix + presign: true + presign_ttl: 1 + regex_filter: regex_filter + status: initialized + synced: true + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_azure_retrieve: path: /api/dataset-storages/azure/{id}/ method: GET @@ -114,31 +204,31 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + container: container + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_azure_destroy: path: /api/dataset-storages/azure/{id}/ method: DELETE @@ -166,30 +256,24 @@ service: name: PatchedAzureDatasetStorageRequest body: properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true - container: - type: optional - docs: Azure blob container - prefix: - type: optional - docs: Azure blob prefix name - regex_filter: + account_key: type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Azure Blob account key account_name: type: optional docs: Azure Blob account name - account_key: + container: type: optional - docs: Azure Blob account key + docs: Azure blob container + dataset: + type: optional + docs: A unique integer value identifying this dataset. + description: + type: optional + docs: Cloud storage description + glob_pattern: + type: optional + docs: Glob pattern for syncing from bucket last_sync: type: optional docs: Last sync finished time @@ -204,34 +288,40 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: Azure blob prefix name + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) validation: min: 0 max: 32767 - glob_pattern: + regex_filter: type: optional - docs: Glob pattern for syncing from bucket + docs: Cloud storage regex for filtering objects + status: optional synced: type: optional docs: Flag if dataset has been previously synced or not - dataset: - type: optional - docs: A unique integer value identifying this dataset. + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs content-type: application/json response: docs: '' @@ -242,31 +332,31 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + container: container + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_azure_columns_retrieve: path: /api/dataset-storages/azure/{id}/columns/ method: GET @@ -303,120 +393,30 @@ service: dataset: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value - title: title - description: description + account_name: account_name + container: container created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 - glob_pattern: glob_pattern - synced: true - job_id: job_id dataset: 1 - api_dataset_storages_azure_check_for_records_create: - path: /api/dataset-storages/azure/check-for-records/ - method: POST - auth: true - docs: >- - Checks for existence of records matching the file pattern in the - bucket/prefix - source: - openapi: openapi/openapi.yaml - display-name: Check for records given the file pattern - request: - body: root.AzureDatasetStorageRequest - content-type: application/json - response: - docs: '' - type: root.AzureDatasetStorage - examples: - - request: - dataset: 1 - response: - body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name - account_key: account_key - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value - title: title description: description - created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 glob_pattern: glob_pattern - synced: true - job_id: job_id - dataset: 1 - api_dataset_storages_azure_validate_create: - path: /api/dataset-storages/azure/validate/ - method: POST - auth: true - docs: Validate a specific Azure import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - body: root.AzureDatasetStorageRequest - content-type: application/json - response: - docs: '' - type: root.AzureDatasetStorage - examples: - - request: - dataset: 1 - response: - body: id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name - account_key: account_key + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/datasetStorageGcs.yml b/.mock/definition/datasetStorageGcs.yml index 4c51e2da2..313a7026d 100644 --- a/.mock/definition/datasetStorageGcs.yml +++ b/.mock/definition/datasetStorageGcs.yml @@ -27,31 +27,31 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_gcs_create: path: /api/dataset-storages/gcs/ method: POST @@ -71,31 +71,121 @@ service: dataset: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + google_application_credentials: google_application_credentials + google_project_id: google_project_id + id: 1 + job_id: job_id + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value prefix: prefix + presign: true + presign_ttl: 1 regex_filter: regex_filter + status: initialized + synced: true + synchronizable: true + title: title + traceback: traceback + type: type use_blob_urls: true + api_dataset_storages_gcs_check_for_records_create: + path: /api/dataset-storages/gcs/check-for-records/ + method: POST + auth: true + docs: >- + Checks for existence of records matching the file pattern in the + bucket/prefix + source: + openapi: openapi/openapi.yaml + display-name: Check for records given the file pattern + request: + body: root.GcsDatasetStorageRequest + content-type: application/json + response: + docs: '' + type: root.GcsDatasetStorage + examples: + - request: + dataset: 1 + response: + body: + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value + prefix: prefix + presign: true + presign_ttl: 1 + regex_filter: regex_filter + status: initialized + synced: true + synchronizable: true title: title - description: description + traceback: traceback + type: type + use_blob_urls: true + api_dataset_storages_gcs_validate_create: + path: /api/dataset-storages/gcs/validate/ + method: POST + auth: true + docs: Validate a specific GCS import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + body: root.GcsDatasetStorageRequest + content-type: application/json + response: + docs: '' + type: root.GcsDatasetStorage + examples: + - request: + dataset: 1 + response: + body: + bucket: bucket created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 + dataset: 1 + description: description glob_pattern: glob_pattern - synced: true + google_application_credentials: google_application_credentials + google_project_id: google_project_id + id: 1 job_id: job_id - dataset: 1 + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value + prefix: prefix + presign: true + presign_ttl: 1 + regex_filter: regex_filter + status: initialized + synced: true + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_gcs_retrieve: path: /api/dataset-storages/gcs/{id}/ method: GET @@ -114,31 +204,31 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_gcs_destroy: path: /api/dataset-storages/gcs/{id}/ method: DELETE @@ -166,24 +256,18 @@ service: name: PatchedGcsDatasetStorageRequest body: properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true bucket: type: optional docs: GCS bucket name - prefix: + dataset: + type: optional + docs: A unique integer value identifying this dataset. + description: type: optional - docs: GCS bucket prefix - regex_filter: + docs: Cloud storage description + glob_pattern: type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Glob pattern for syncing from bucket google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -204,34 +288,40 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: GCS bucket prefix + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) validation: min: 0 max: 32767 - glob_pattern: + regex_filter: type: optional - docs: Glob pattern for syncing from bucket + docs: Cloud storage regex for filtering objects + status: optional synced: type: optional docs: Flag if dataset has been previously synced or not - dataset: - type: optional - docs: A unique integer value identifying this dataset. + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs content-type: application/json response: docs: '' @@ -242,31 +332,31 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_gcs_columns_retrieve: path: /api/dataset-storages/gcs/{id}/columns/ method: GET @@ -303,120 +393,30 @@ service: dataset: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - google_application_credentials: google_application_credentials - google_project_id: google_project_id - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value - title: title - description: description created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 - glob_pattern: glob_pattern - synced: true - job_id: job_id dataset: 1 - api_dataset_storages_gcs_check_for_records_create: - path: /api/dataset-storages/gcs/check-for-records/ - method: POST - auth: true - docs: >- - Checks for existence of records matching the file pattern in the - bucket/prefix - source: - openapi: openapi/openapi.yaml - display-name: Check for records given the file pattern - request: - body: root.GcsDatasetStorageRequest - content-type: application/json - response: - docs: '' - type: root.GcsDatasetStorage - examples: - - request: - dataset: 1 - response: - body: - id: 1 - type: type - synchronizable: true - presign: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - google_application_credentials: google_application_credentials - google_project_id: google_project_id - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value - title: title description: description - created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 glob_pattern: glob_pattern - synced: true - job_id: job_id - dataset: 1 - api_dataset_storages_gcs_validate_create: - path: /api/dataset-storages/gcs/validate/ - method: POST - auth: true - docs: Validate a specific GCS import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - body: root.GcsDatasetStorageRequest - content-type: application/json - response: - docs: '' - type: root.GcsDatasetStorage - examples: - - request: - dataset: 1 - response: - body: - id: 1 - type: type - synchronizable: true - presign: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 - glob_pattern: glob_pattern + regex_filter: regex_filter + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/datasetStorageS3.yml b/.mock/definition/datasetStorageS3.yml index a0066d20c..fc11f29c2 100644 --- a/.mock/definition/datasetStorageS3.yml +++ b/.mock/definition/datasetStorageS3.yml @@ -27,36 +27,36 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true + - aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - glob_pattern: glob_pattern + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_s3_create: path: /api/dataset-storages/s3/ method: POST @@ -76,36 +76,136 @@ service: dataset: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern id: 1 - type: type - synchronizable: true - presign: true + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter + region_name: region_name + s3_endpoint: s3_endpoint + status: initialized + synced: true + synchronizable: true + title: title + traceback: traceback + type: type use_blob_urls: true + api_dataset_storages_s3_check_for_records_create: + path: /api/dataset-storages/s3/check-for-records/ + method: POST + auth: true + docs: >- + Checks for existence of records matching the file pattern in the + bucket/prefix + source: + openapi: openapi/openapi.yaml + display-name: Check for records given the file pattern + request: + body: root.S3DatasetStorageRequest + content-type: application/json + response: + docs: '' + type: root.S3DatasetStorage + examples: + - request: + dataset: 1 + response: + body: aws_access_key_id: aws_access_key_id aws_secret_access_key: aws_secret_access_key aws_session_token: aws_session_token aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value + prefix: prefix + presign: true + presign_ttl: 1 + recursive_scan: true + regex_filter: regex_filter region_name: region_name s3_endpoint: s3_endpoint + status: initialized + synced: true + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + api_dataset_storages_s3_validate_create: + path: /api/dataset-storages/s3/validate/ + method: POST + auth: true + docs: Validate a specific S3 import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + body: root.S3DatasetStorageRequest + content-type: application/json + response: + docs: '' + type: root.S3DatasetStorage + examples: + - request: + dataset: 1 + response: + body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern + id: 1 + job_id: job_id + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value + prefix: prefix + presign: true presign_ttl: 1 recursive_scan: true - glob_pattern: glob_pattern + regex_filter: regex_filter + region_name: region_name + s3_endpoint: s3_endpoint + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_s3_retrieve: path: /api/dataset-storages/s3/{id}/ method: GET @@ -124,36 +224,36 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern id: 1 - type: type - synchronizable: true - presign: true + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - glob_pattern: glob_pattern + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_s3_destroy: path: /api/dataset-storages/s3/{id}/ method: DELETE @@ -181,12 +281,30 @@ service: name: PatchedS3DatasetStorageRequest body: properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true + aws_access_key_id: + type: optional + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + dataset: + type: optional + docs: A unique integer value identifying this dataset. + description: + type: optional + docs: Cloud storage description + glob_pattern: + type: optional + docs: Glob pattern for syncing from bucket last_sync: type: optional docs: Last sync finished time @@ -201,49 +319,13 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix - regex_filter: - type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: + presign: type: optional - docs: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: optional - docs: AWS SSE KMS Key ID - region_name: - type: optional - docs: AWS Region - s3_endpoint: - type: optional - docs: S3 Endpoint + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -253,15 +335,33 @@ service: recursive_scan: type: optional docs: Perform recursive scan over the bucket content - glob_pattern: + regex_filter: type: optional - docs: Glob pattern for syncing from bucket + docs: Cloud storage regex for filtering objects + region_name: + type: optional + docs: AWS Region + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional synced: type: optional docs: Flag if dataset has been previously synced or not - dataset: - type: optional - docs: A unique integer value identifying this dataset. + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs content-type: application/json response: docs: '' @@ -272,36 +372,36 @@ service: request: {} response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + dataset: 1 + description: description + glob_pattern: glob_pattern id: 1 - type: type - synchronizable: true - presign: true + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - glob_pattern: glob_pattern + status: initialized synced: true - job_id: job_id - dataset: 1 + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_dataset_storages_s3_columns_retrieve: path: /api/dataset-storages/s3/{id}/columns/ method: GET @@ -338,135 +438,35 @@ service: dataset: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true aws_access_key_id: aws_access_key_id aws_secret_access_key: aws_secret_access_key aws_session_token: aws_session_token aws_sse_kms_key_id: aws_sse_kms_key_id - region_name: region_name - s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - glob_pattern: glob_pattern - synced: true - job_id: job_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' dataset: 1 - api_dataset_storages_s3_check_for_records_create: - path: /api/dataset-storages/s3/check-for-records/ - method: POST - auth: true - docs: >- - Checks for existence of records matching the file pattern in the - bucket/prefix - source: - openapi: openapi/openapi.yaml - display-name: Check for records given the file pattern - request: - body: root.S3DatasetStorageRequest - content-type: application/json - response: - docs: '' - type: root.S3DatasetStorage - examples: - - request: - dataset: 1 - response: - body: + description: description + glob_pattern: glob_pattern id: 1 - type: type - synchronizable: true - presign: true + job_id: job_id last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - glob_pattern: glob_pattern + status: initialized synced: true - job_id: job_id - dataset: 1 - api_dataset_storages_s3_validate_create: - path: /api/dataset-storages/s3/validate/ - method: POST - auth: true - docs: Validate a specific S3 import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - body: root.S3DatasetStorageRequest - content-type: application/json - response: - docs: '' - type: root.S3DatasetStorage - examples: - - request: - dataset: 1 - response: - body: - id: 1 - type: type synchronizable: true - presign: true - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket - prefix: prefix - regex_filter: regex_filter + traceback: traceback + type: type use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id - region_name: region_name - s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - glob_pattern: glob_pattern - synced: true - job_id: job_id - dataset: 1 source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/datasets.yml b/.mock/definition/datasets.yml index ad7a8e60d..57a962cd6 100644 --- a/.mock/definition/datasets.yml +++ b/.mock/definition/datasets.yml @@ -24,22 +24,22 @@ service: examples: - response: body: - - id: 1 + - columns: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - title: title description: description - columns: - key: value + id: 1 + organization: 1 + title: title total_entities: 1 + updated_at: '2024-01-15T09:30:00Z' vector_db_dataset_name: vector_db_dataset_name - organization: 1 api_datasets_create: path: /api/datasets/ method: POST @@ -59,244 +59,22 @@ service: title: title response: body: - id: 1 - created_by: - id: 1 - first_name: first_name - last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - title: title - description: description columns: key: value - total_entities: 1 - vector_db_dataset_name: vector_db_dataset_name - organization: 1 - api_datasets_retrieve: - path: /api/datasets/{id}/ - method: GET - auth: true - docs: Retrieve a specific dataset. - source: - openapi: openapi/openapi.yaml - path-parameters: - id: string - display-name: Get dataset - response: - docs: '' - type: root.Dataset - examples: - - path-parameters: - id: id - response: - body: - id: 1 - created_by: - id: 1 - first_name: first_name - last_name: last_name - email: email - avatar: avatar created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - title: title - description: description - columns: - key: value - total_entities: 1 - vector_db_dataset_name: vector_db_dataset_name - organization: 1 - api_datasets_update: - path: /api/datasets/{id}/ - method: PUT - auth: true - docs: Overwrite a specific dataset by ID. - source: - openapi: openapi/openapi.yaml - path-parameters: - id: string - display-name: Put dataset - request: - body: root.DatasetRequest - content-type: application/json - response: - docs: '' - type: root.Dataset - examples: - - path-parameters: - id: id - request: - title: title - response: - body: - id: 1 created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - title: title description: description - columns: - key: value - total_entities: 1 - vector_db_dataset_name: vector_db_dataset_name - organization: 1 - api_datasets_destroy: - path: /api/datasets/{id}/ - method: DELETE - auth: true - docs: Delete a dataset by ID - source: - openapi: openapi/openapi.yaml - path-parameters: - id: string - display-name: Delete dataset - examples: - - path-parameters: - id: id - api_datasets_partial_update: - path: /api/datasets/{id}/ - method: PATCH - auth: true - docs: Update a specific dataset by ID. - source: - openapi: openapi/openapi.yaml - path-parameters: - id: string - display-name: Update dataset - request: - name: PatchedDatasetRequest - body: - properties: - created_by: - type: optional - docs: User who created Dataset - title: - type: optional - docs: Dataset title - validation: - minLength: 1 - maxLength: 1000 - description: - type: optional - docs: Dataset description - columns: optional - total_entities: - type: optional - validation: - min: -2147483648 - max: 2147483647 - vector_db_dataset_name: - type: optional - docs: Dataset name for weaviate schema - validation: - minLength: 1 - maxLength: 37 - organization: optional - content-type: application/json - response: - docs: '' - type: root.Dataset - examples: - - path-parameters: - id: id - request: {} - response: - body: id: 1 - created_by: - id: 1 - first_name: first_name - last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + organization: 1 title: title - description: description - columns: - key: value total_entities: 1 + updated_at: '2024-01-15T09:30:00Z' vector_db_dataset_name: vector_db_dataset_name - organization: 1 - api_datasets_members_list: - path: /api/datasets/{id}/members - method: GET - auth: true - docs: Retrieve the members for a specific dataset. - source: - openapi: openapi/openapi.yaml - path-parameters: - id: integer - display-name: Get datasets members - request: - name: ApiDatasetsMembersListRequest - query-parameters: - ordering: - type: optional - docs: Which field to use when ordering the results. - response: - docs: '' - type: list - examples: - - path-parameters: - id: 1 - response: - body: - - user: 1 - api_datasets_members_create: - path: /api/datasets/{id}/members - method: POST - auth: true - docs: Add a member to a specific dataset. - source: - openapi: openapi/openapi.yaml - path-parameters: - id: integer - display-name: Add dataset member - request: - name: DatasetMemberRequest - body: - properties: - user: integer - content-type: application/json - response: - docs: '' - type: root.DatasetMember - examples: - - path-parameters: - id: 1 - request: - user: 1 - response: - body: - user: 1 - api_datasets_members_destroy: - path: /api/datasets/{id}/members - method: DELETE - auth: true - docs: Remove a member from a specific dataset. - source: - openapi: openapi/openapi.yaml - path-parameters: - id: integer - display-name: Remove member from dataset - request: - name: ApiDatasetsMembersDestroyRequest - query-parameters: - project_member: - type: optional - docs: A unique integer value identifying this dataset member. - examples: - - path-parameters: - id: 1 api_datasets_import_partial_update: path: /api/datasets/import method: PATCH @@ -336,24 +114,24 @@ service: examples: - response: body: - - id: 1 + - data: + key: value + dataset: 1 filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 selected_items: key: value user: 1 - dataset: 1 api_datasets_views_create: path: /api/datasets/views/ method: POST @@ -373,24 +151,34 @@ service: dataset: 1 response: body: - id: 1 + data: + key: value + dataset: 1 filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 selected_items: key: value user: 1 - dataset: 1 + api_datasets_views_reset_destroy: + path: /api/datasets/views/reset/ + method: DELETE + auth: true + docs: Reset all views for a specific dataset. + source: + openapi: openapi/openapi.yaml + display-name: Reset dataset views + examples: + - {} api_datasets_views_retrieve: path: /api/datasets/views/{id}/ method: GET @@ -411,24 +199,24 @@ service: id: id response: body: - id: 1 + data: + key: value + dataset: 1 filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 selected_items: key: value user: 1 - dataset: 1 api_datasets_views_update: path: /api/datasets/views/{id}/ method: PUT @@ -456,24 +244,24 @@ service: dataset: 1 response: body: - id: 1 + data: + key: value + dataset: 1 filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 selected_items: key: value user: 1 - dataset: 1 api_datasets_views_destroy: path: /api/datasets/views/{id}/ method: DELETE @@ -507,9 +295,11 @@ service: name: PatchedDatasetViewRequest body: properties: - filter_group: optional data: optional - ordering: optional + dataset: + type: optional + docs: Dataset ID + filter_group: optional order: type: optional docs: >- @@ -518,13 +308,11 @@ service: validation: min: -2147483648 max: 2147483647 + ordering: optional selected_items: optional user: type: optional docs: User who made this view - dataset: - type: optional - docs: Dataset ID content-type: application/json response: docs: '' @@ -535,33 +323,245 @@ service: request: {} response: body: - id: 1 + data: + key: value + dataset: 1 filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 selected_items: key: value user: 1 - dataset: 1 - api_datasets_views_reset_destroy: - path: /api/datasets/views/reset/ + api_datasets_retrieve: + path: /api/datasets/{id}/ + method: GET + auth: true + docs: Retrieve a specific dataset. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: string + display-name: Get dataset + response: + docs: '' + type: root.Dataset + examples: + - path-parameters: + id: id + response: + body: + columns: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: + avatar: avatar + email: email + first_name: first_name + id: 1 + last_name: last_name + description: description + id: 1 + organization: 1 + title: title + total_entities: 1 + updated_at: '2024-01-15T09:30:00Z' + vector_db_dataset_name: vector_db_dataset_name + api_datasets_update: + path: /api/datasets/{id}/ + method: PUT + auth: true + docs: Overwrite a specific dataset by ID. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: string + display-name: Put dataset + request: + body: root.DatasetRequest + content-type: application/json + response: + docs: '' + type: root.Dataset + examples: + - path-parameters: + id: id + request: + title: title + response: + body: + columns: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: + avatar: avatar + email: email + first_name: first_name + id: 1 + last_name: last_name + description: description + id: 1 + organization: 1 + title: title + total_entities: 1 + updated_at: '2024-01-15T09:30:00Z' + vector_db_dataset_name: vector_db_dataset_name + api_datasets_destroy: + path: /api/datasets/{id}/ method: DELETE auth: true - docs: Reset all views for a specific dataset. + docs: Delete a dataset by ID source: openapi: openapi/openapi.yaml - display-name: Reset dataset views + path-parameters: + id: string + display-name: Delete dataset examples: - - {} + - path-parameters: + id: id + api_datasets_partial_update: + path: /api/datasets/{id}/ + method: PATCH + auth: true + docs: Update a specific dataset by ID. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: string + display-name: Update dataset + request: + name: PatchedDatasetRequest + body: + properties: + columns: optional + created_by: + type: optional + docs: User who created Dataset + description: + type: optional + docs: Dataset description + organization: optional + title: + type: optional + docs: Dataset title + validation: + minLength: 1 + maxLength: 1000 + total_entities: + type: optional + validation: + min: -2147483648 + max: 2147483647 + vector_db_dataset_name: + type: optional + docs: Dataset name for weaviate schema + validation: + minLength: 1 + maxLength: 37 + content-type: application/json + response: + docs: '' + type: root.Dataset + examples: + - path-parameters: + id: id + request: {} + response: + body: + columns: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: + avatar: avatar + email: email + first_name: first_name + id: 1 + last_name: last_name + description: description + id: 1 + organization: 1 + title: title + total_entities: 1 + updated_at: '2024-01-15T09:30:00Z' + vector_db_dataset_name: vector_db_dataset_name + api_datasets_members_list: + path: /api/datasets/{id}/members + method: GET + auth: true + docs: Retrieve the members for a specific dataset. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: integer + display-name: Get datasets members + request: + name: ApiDatasetsMembersListRequest + query-parameters: + ordering: + type: optional + docs: Which field to use when ordering the results. + response: + docs: '' + type: list + examples: + - path-parameters: + id: 1 + response: + body: + - user: 1 + api_datasets_members_create: + path: /api/datasets/{id}/members + method: POST + auth: true + docs: Add a member to a specific dataset. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: integer + display-name: Add dataset member + request: + name: DatasetMemberRequest + body: + properties: + user: integer + content-type: application/json + response: + docs: '' + type: root.DatasetMember + examples: + - path-parameters: + id: 1 + request: + user: 1 + response: + body: + user: 1 + api_datasets_members_destroy: + path: /api/datasets/{id}/members + method: DELETE + auth: true + docs: Remove a member from a specific dataset. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: integer + display-name: Remove member from dataset + request: + name: ApiDatasetsMembersDestroyRequest + query-parameters: + project_member: + type: optional + docs: A unique integer value identifying this dataset member. + examples: + - path-parameters: + id: 1 source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/exportStorage/azure.yml b/.mock/definition/exportStorage/azure.yml index b00e81cb9..0e26ee5f1 100644 --- a/.mock/definition/exportStorage/azure.yml +++ b/.mock/definition/exportStorage/azure.yml @@ -27,27 +27,27 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - account_key: account_key account_name: account_name - account_key: account_key + can_delete_objects: true + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -62,33 +62,33 @@ service: name: AzureCreateRequest body: properties: + account_key: + type: optional + docs: Azure Blob account key + account_name: + type: optional + docs: Azure Blob account name can_delete_objects: type: optional docs: Deletion from storage enabled default: false - title: + container: type: optional - docs: Storage title - validation: - maxLength: 2048 + docs: Azure blob container description: type: optional docs: Storage description - project: - type: optional - docs: Project ID - container: - type: optional - docs: Azure blob container prefix: type: optional docs: Azure blob prefix name - account_name: - type: optional - docs: Azure Blob account name - account_key: + project: + type: optional + docs: Project ID + title: type: optional - docs: Azure Blob account key + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -97,27 +97,74 @@ service: - request: {} response: body: - id: 1 - type: type - synchronizable: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + can_delete_objects: true + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/export/azure/validate + method: POST + auth: true + docs: Validate a specific Azure export storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate export storage + request: + name: AzureValidateRequest + body: + properties: + account_key: + type: optional + docs: Azure Blob account key + account_name: + type: optional + docs: Azure Blob account name + can_delete_objects: + type: optional + docs: Deletion from storage enabled + default: false + container: + type: optional + docs: Azure blob container + description: + type: optional + docs: Storage description + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + prefix: + type: optional + docs: Azure blob prefix name + project: + type: optional + docs: Project ID + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -138,27 +185,27 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + can_delete_objects: true + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -190,33 +237,33 @@ service: name: AzureUpdateRequest body: properties: + account_key: + type: optional + docs: Azure Blob account key + account_name: + type: optional + docs: Azure Blob account name can_delete_objects: type: optional docs: Deletion from storage enabled default: false - title: + container: type: optional - docs: Storage title - validation: - maxLength: 2048 + docs: Azure blob container description: type: optional docs: Storage description - project: - type: optional - docs: Project ID - container: - type: optional - docs: Azure blob container prefix: type: optional docs: Azure blob prefix name - account_name: - type: optional - docs: Azure Blob account name - account_key: + project: + type: optional + docs: Project ID + title: type: optional - docs: Azure Blob account key + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -227,27 +274,27 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + can_delete_objects: true + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -268,74 +315,27 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + can_delete_objects: true + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 - audiences: - - public - validate: - path: /api/storages/export/azure/validate - method: POST - auth: true - docs: Validate a specific Azure export storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate export storage - request: - name: AzureValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - can_delete_objects: - type: optional - docs: Deletion from storage enabled - default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - container: - type: optional - docs: Azure blob container - prefix: - type: optional - docs: Azure blob prefix name - account_name: - type: optional - docs: Azure Blob account name - account_key: - type: optional - docs: Azure Blob account key - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/exportStorage/gcs.yml b/.mock/definition/exportStorage/gcs.yml index d3bd97442..c00e8b713 100644 --- a/.mock/definition/exportStorage/gcs.yml +++ b/.mock/definition/exportStorage/gcs.yml @@ -27,27 +27,27 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -62,27 +62,16 @@ service: name: GcsCreateRequest body: properties: + bucket: + type: optional + docs: GCS bucket name can_delete_objects: type: optional docs: Deletion from storage enabled. default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 description: type: optional docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix google_application_credentials: type: optional docs: >- @@ -92,6 +81,17 @@ service: google_project_id: type: optional docs: Google project ID + prefix: + type: optional + docs: GCS bucket prefix + project: + type: optional + docs: Project ID + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -100,27 +100,77 @@ service: - request: {} response: body: - id: 1 - type: type - synchronizable: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/export/gcs/validate + method: POST + auth: true + docs: Validate a specific GCS export storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate export storage + request: + name: GcsValidateRequest + body: + properties: + bucket: + type: optional + docs: GCS bucket name + can_delete_objects: + type: optional + docs: Deletion from storage enabled. + default: false + description: + type: optional + docs: Storage description + google_application_credentials: + type: optional + docs: >- + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check + official Google Cloud Authentication documentation for more + details. + google_project_id: + type: optional + docs: Google project ID + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + prefix: + type: optional + docs: GCS bucket prefix + project: + type: optional + docs: Project ID + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -141,27 +191,27 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -193,27 +243,16 @@ service: name: GcsUpdateRequest body: properties: + bucket: + type: optional + docs: GCS bucket name can_delete_objects: type: optional docs: Deletion from storage enabled. default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 description: type: optional docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix google_application_credentials: type: optional docs: >- @@ -223,6 +262,17 @@ service: google_project_id: type: optional docs: Google project ID + prefix: + type: optional + docs: GCS bucket prefix + project: + type: optional + docs: Project ID + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -233,27 +283,27 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -274,77 +324,27 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 - audiences: - - public - validate: - path: /api/storages/export/gcs/validate - method: POST - auth: true - docs: Validate a specific GCS export storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate export storage - request: - name: GcsValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - can_delete_objects: - type: optional - docs: Deletion from storage enabled. - default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - google_application_credentials: - type: optional - docs: >- - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check - official Google Cloud Authentication documentation for more - details. - google_project_id: - type: optional - docs: Google project ID - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/exportStorage/local.yml b/.mock/definition/exportStorage/local.yml index 94fc2c2fa..49b888aed 100644 --- a/.mock/definition/exportStorage/local.yml +++ b/.mock/definition/exportStorage/local.yml @@ -27,24 +27,24 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true + - can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -59,23 +59,23 @@ service: name: LocalCreateRequest body: properties: - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 description: type: optional docs: Storage description - project: - type: optional - docs: Project ID path: type: optional docs: Path to local directory + project: + type: optional + docs: Project ID regex_filter: type: optional docs: Regex for filtering objects + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 use_blob_urls: type: optional docs: >- @@ -92,24 +92,69 @@ service: - request: {} response: body: + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/export/localfiles/validate + method: POST + auth: true + docs: Validate a specific local file export storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate export storage + request: + name: LocalValidateRequest + body: + properties: + description: + type: optional + docs: Storage description + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + path: + type: optional + docs: Path to local directory + project: + type: optional + docs: Project ID + regex_filter: + type: optional + docs: Regex for filtering objects + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your directory contains images, you can use this option to + generate URLs for these images. If set to False, it will read + the content of the file and load it into Label Studio. + default: false + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -130,24 +175,24 @@ service: id: 1 response: body: + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -179,23 +224,23 @@ service: name: LocalUpdateRequest body: properties: - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 description: type: optional docs: Storage description - project: - type: optional - docs: Project ID path: type: optional docs: Path to local directory + project: + type: optional + docs: Project ID regex_filter: type: optional docs: Regex for filtering objects + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 use_blob_urls: type: optional docs: >- @@ -214,24 +259,24 @@ service: request: {} response: body: + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -252,69 +297,24 @@ service: id: 1 response: body: + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + path: path project: 1 - audiences: - - public - validate: - path: /api/storages/export/localfiles/validate - method: POST - auth: true - docs: Validate a specific local file export storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate export storage - request: - name: LocalValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Path to local directory - regex_filter: - type: optional - docs: Regex for filtering objects - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. - default: false - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/exportStorage/redis.yml b/.mock/definition/exportStorage/redis.yml index 50ec0fae6..a17299458 100644 --- a/.mock/definition/exportStorage/redis.yml +++ b/.mock/definition/exportStorage/redis.yml @@ -27,28 +27,28 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - path: path + - can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -63,36 +63,36 @@ service: name: RedisCreateRequest body: properties: - db: - type: optional - docs: Database ID of database to use can_delete_objects: type: optional docs: Deletion from storage enabled. default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 + db: + type: optional + docs: Database ID of database to use description: type: optional docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Storage prefix (optional) host: type: optional docs: Server Host IP (optional) + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) port: type: optional docs: Server Port (optional) - password: + project: + type: optional + docs: Project ID + title: type: optional - docs: Server Password (optional) + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -101,28 +101,78 @@ service: - request: {} response: body: - id: 1 - type: type - synchronizable: true - path: path + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/export/redis/validate + method: POST + auth: true + docs: Validate a specific Redis export storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate export storage + request: + name: RedisValidateRequest + body: + properties: + can_delete_objects: + type: optional + docs: Deletion from storage enabled. + default: false + db: + type: optional + docs: Database ID of database to use + description: + type: optional + docs: Storage description + host: + type: optional + docs: Server Host IP (optional) + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) + port: + type: optional + docs: Server Port (optional) + project: + type: optional + docs: Project ID + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -143,28 +193,28 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - path: path + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -196,36 +246,36 @@ service: name: RedisUpdateRequest body: properties: - db: - type: optional - docs: Database ID of database to use can_delete_objects: type: optional docs: Deletion from storage enabled. default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 + db: + type: optional + docs: Database ID of database to use description: type: optional docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Storage prefix (optional) host: type: optional docs: Server Host IP (optional) + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) port: type: optional docs: Server Port (optional) - password: + project: + type: optional + docs: Project ID + title: type: optional - docs: Server Password (optional) + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -236,28 +286,28 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - path: path + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -278,78 +328,28 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - path: path + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - db: 1 + password: password + path: path + port: port project: 1 - audiences: - - public - validate: - path: /api/storages/export/redis/validate - method: POST - auth: true - docs: Validate a specific Redis export storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate export storage - request: - name: RedisValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - db: - type: optional - docs: Database ID of database to use - can_delete_objects: - type: optional - docs: Deletion from storage enabled. - default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Storage prefix (optional) - host: - type: optional - docs: Server Host IP (optional) - port: - type: optional - docs: Server Port (optional) - password: - type: optional - docs: Server Password (optional) - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/exportStorage/s3.yml b/.mock/definition/exportStorage/s3.yml index e46fb73cb..964181a38 100644 --- a/.mock/definition/exportStorage/s3.yml +++ b/.mock/definition/exportStorage/s3.yml @@ -27,31 +27,31 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true + - aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - project: 1 + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -66,27 +66,6 @@ service: name: S3CreateRequest body: properties: - can_delete_objects: - type: optional - docs: Deletion from storage enabled. - default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: S3 bucket name - prefix: - type: optional - docs: S3 bucket prefix aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -99,12 +78,33 @@ service: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + can_delete_objects: + type: optional + docs: Deletion from storage enabled. + default: false + description: + type: optional + docs: Storage description + prefix: + type: optional + docs: S3 bucket prefix + project: + type: optional + docs: Project ID region_name: type: optional docs: AWS Region s3_endpoint: type: optional docs: S3 Endpoint + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -113,31 +113,90 @@ service: - request: {} response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - project: 1 + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/export/s3/validate + method: POST + auth: true + docs: Validate a specific S3 export storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate export storage + request: + name: S3ValidateRequest + body: + properties: + aws_access_key_id: + type: optional + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + can_delete_objects: + type: optional + docs: Deletion from storage enabled. + default: false + description: + type: optional + docs: Storage description + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + prefix: + type: optional + docs: S3 bucket prefix + project: + type: optional + docs: Project ID + region_name: + type: optional + docs: AWS Region + s3_endpoint: + type: optional + docs: S3 Endpoint + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -158,31 +217,31 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - project: 1 + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -214,27 +273,6 @@ service: name: S3UpdateRequest body: properties: - can_delete_objects: - type: optional - docs: Deletion from storage enabled. - default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: S3 bucket name - prefix: - type: optional - docs: S3 bucket prefix aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -247,12 +285,33 @@ service: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + can_delete_objects: + type: optional + docs: Deletion from storage enabled. + default: false + description: + type: optional + docs: Storage description + prefix: + type: optional + docs: S3 bucket prefix + project: + type: optional + docs: Project ID region_name: type: optional docs: AWS Region s3_endpoint: type: optional docs: S3 Endpoint + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -263,31 +322,31 @@ service: request: {} response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - project: 1 + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -308,90 +367,31 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - project: 1 - audiences: - - public - validate: - path: /api/storages/export/s3/validate - method: POST - auth: true - docs: Validate a specific S3 export storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate export storage - request: - name: S3ValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - can_delete_objects: - type: optional - docs: Deletion from storage enabled. - default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: S3 bucket name - prefix: - type: optional - docs: S3 bucket prefix - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: optional - docs: AWS SSE KMS Key ID - region_name: - type: optional - docs: AWS Region - s3_endpoint: - type: optional - docs: S3 Endpoint - content-type: application/json - examples: - - request: {} + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/exportStorage/s3S.yml b/.mock/definition/exportStorage/s3S.yml index 7d4600a82..348b15b35 100644 --- a/.mock/definition/exportStorage/s3S.yml +++ b/.mock/definition/exportStorage/s3S.yml @@ -29,34 +29,34 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true + - aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -77,38 +77,57 @@ service: type: root.LseS3ExportStorage examples: - request: - role_arn: role_arn project: 1 + role_arn: role_arn response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/export/s3s/validate + method: POST + auth: true + docs: >- + Validate a specific S3 export storage connection that was set up with + IAM role access. + source: + openapi: openapi/openapi.yaml + display-name: Validate export storage + request: + body: root.LseS3ExportStorageRequest + content-type: application/json + examples: + - request: + project: 1 + role_arn: role_arn audiences: - public get: @@ -131,34 +150,34 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -194,9 +213,30 @@ service: name: PatchedLseS3ExportStorageRequest body: properties: - synchronizable: + aws_access_key_id: + type: optional + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + can_delete_objects: type: optional - default: true + docs: Deletion from storage enabled + description: + type: optional + docs: Cloud storage description + external_id: + type: optional + docs: AWS ExternalId last_sync: type: optional docs: Last sync finished time @@ -211,64 +251,43 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync + legacy_auth: optional meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - can_delete_objects: - type: optional - docs: Deletion from storage enabled - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + project: + type: optional + docs: A unique integer value identifying this project. regex_filter: type: optional docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: optional - docs: AWS SSE KMS Key ID region_name: type: optional docs: AWS Region - s3_endpoint: - type: optional - docs: S3 Endpoint - external_id: - type: optional - docs: AWS ExternalId role_arn: type: optional docs: AWS RoleArn validation: minLength: 1 - legacy_auth: optional - project: - type: optional - docs: A unique integer value identifying this project. + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs content-type: application/json response: docs: '' @@ -279,34 +298,34 @@ service: request: {} response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -327,53 +346,34 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - bucket: bucket prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - project: 1 - audiences: - - public - validate: - path: /api/storages/export/s3s/validate - method: POST - auth: true - docs: >- - Validate a specific S3 export storage connection that was set up with - IAM role access. - source: - openapi: openapi/openapi.yaml - display-name: Validate export storage - request: - body: root.LseS3ExportStorageRequest - content-type: application/json - examples: - - request: - role_arn: role_arn - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/files.yml b/.mock/definition/files.yml index b6fb6c2aa..e45d20931 100644 --- a/.mock/definition/files.yml +++ b/.mock/definition/files.yml @@ -22,8 +22,8 @@ service: id: 1 response: body: - id: 1 file: file + id: 1 audiences: - public delete: @@ -66,8 +66,8 @@ service: request: {} response: body: - id: 1 file: file + id: 1 audiences: - public list: @@ -104,8 +104,8 @@ service: id: 1 response: body: - - id: 1 - file: file + - file: file + id: 1 audiences: - public delete_many: diff --git a/.mock/definition/importStorage/azure.yml b/.mock/definition/importStorage/azure.yml index ad23d958e..d70c13ee8 100644 --- a/.mock/definition/importStorage/azure.yml +++ b/.mock/definition/importStorage/azure.yml @@ -27,28 +27,28 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - account_key: account_key account_name: account_name - account_key: account_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -63,19 +63,21 @@ service: name: AzureCreateRequest body: properties: - regex_filter: + account_key: type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false + docs: Azure Blob account key + account_name: + type: optional + docs: Azure Blob account name + container: + type: optional + docs: Azure blob container + description: + type: optional + docs: Storage description + prefix: + type: optional + docs: Azure blob prefix name presign: type: optional docs: Presign URLs for direct download @@ -84,29 +86,27 @@ service: type: optional docs: Presign TTL in minutes default: 1 - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description project: type: optional docs: Project ID - container: - type: optional - docs: Azure blob container - prefix: - type: optional - docs: Azure blob prefix name - account_name: + regex_filter: type: optional - docs: Azure Blob account name - account_key: + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + title: type: optional - docs: Azure Blob account key + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false content-type: application/json response: docs: '' @@ -115,28 +115,92 @@ service: - request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/azure/validate + method: POST + auth: true + docs: Validate a specific Azure import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + name: AzureValidateRequest + body: + properties: + account_key: + type: optional + docs: Azure Blob account key + account_name: + type: optional + docs: Azure Blob account name + container: + type: optional + docs: Azure blob container + description: + type: optional + docs: Storage description + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + prefix: + type: optional + docs: Azure blob prefix name + presign: + type: optional + docs: Presign URLs for direct download + default: true + presign_ttl: + type: optional + docs: Presign TTL in minutes + default: 1 + project: + type: optional + docs: Project ID + regex_filter: + type: optional + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -157,28 +221,28 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -210,19 +274,21 @@ service: name: AzureUpdateRequest body: properties: - regex_filter: + account_key: type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false + docs: Azure Blob account key + account_name: + type: optional + docs: Azure Blob account name + container: + type: optional + docs: Azure blob container + description: + type: optional + docs: Storage description + prefix: + type: optional + docs: Azure blob prefix name presign: type: optional docs: Presign URLs for direct download @@ -231,29 +297,27 @@ service: type: optional docs: Presign TTL in minutes default: 1 - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description project: type: optional docs: Project ID - container: - type: optional - docs: Azure blob container - prefix: - type: optional - docs: Azure blob prefix name - account_name: + regex_filter: type: optional - docs: Azure Blob account name - account_key: + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + title: type: optional - docs: Azure Blob account key + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false content-type: application/json response: docs: '' @@ -264,28 +328,28 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -308,92 +372,28 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true - container: container - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name account_key: account_key + account_name: account_name + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 - audiences: - - public - validate: - path: /api/storages/azure/validate - method: POST - auth: true - docs: Validate a specific Azure import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - name: AzureValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - regex_filter: - type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: optional - docs: Presign URLs for direct download - default: true - presign_ttl: - type: optional - docs: Presign TTL in minutes - default: 1 - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - container: - type: optional - docs: Azure blob container - prefix: - type: optional - docs: Azure blob prefix name - account_name: - type: optional - docs: Azure Blob account name - account_key: - type: optional - docs: Azure Blob account key - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/importStorage/gcs.yml b/.mock/definition/importStorage/gcs.yml index f755039ea..088f6a655 100644 --- a/.mock/definition/importStorage/gcs.yml +++ b/.mock/definition/importStorage/gcs.yml @@ -27,28 +27,28 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -63,19 +63,24 @@ service: name: GcsCreateRequest body: properties: - regex_filter: + bucket: + type: optional + docs: GCS bucket name + description: + type: optional + docs: Storage description + google_application_credentials: type: optional docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check + official Google Cloud Authentication documentation for more + details. + google_project_id: + type: optional + docs: Google project ID + prefix: + type: optional + docs: GCS bucket prefix presign: type: optional docs: Presign URLs for direct download @@ -84,32 +89,27 @@ service: type: optional docs: Presign TTL in minutes default: 1 - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description project: type: optional docs: Project ID - bucket: - type: optional - docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - google_application_credentials: + regex_filter: type: optional docs: >- - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check - official Google Cloud Authentication documentation for more - details. - google_project_id: + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + title: type: optional - docs: Google project ID + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false content-type: application/json response: docs: '' @@ -118,28 +118,95 @@ service: - request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/gcs/validate + method: POST + auth: true + docs: Validate a specific GCS import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + name: GcsValidateRequest + body: + properties: + bucket: + type: optional + docs: GCS bucket name + description: + type: optional + docs: Storage description + google_application_credentials: + type: optional + docs: >- + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check + official Google Cloud Authentication documentation for more + details. + google_project_id: + type: optional + docs: Google project ID + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + prefix: + type: optional + docs: GCS bucket prefix + presign: + type: optional + docs: Presign URLs for direct download + default: true + presign_ttl: + type: optional + docs: Presign TTL in minutes + default: 1 + project: + type: optional + docs: Project ID + regex_filter: + type: optional + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -160,28 +227,28 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -213,19 +280,24 @@ service: name: GcsUpdateRequest body: properties: - regex_filter: + bucket: + type: optional + docs: GCS bucket name + description: + type: optional + docs: Storage description + google_application_credentials: type: optional docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check + official Google Cloud Authentication documentation for more + details. + google_project_id: + type: optional + docs: Google project ID + prefix: + type: optional + docs: GCS bucket prefix presign: type: optional docs: Presign URLs for direct download @@ -234,32 +306,27 @@ service: type: optional docs: Presign TTL in minutes default: 1 - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description project: type: optional docs: Project ID - bucket: - type: optional - docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - google_application_credentials: + regex_filter: type: optional docs: >- - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check - official Google Cloud Authentication documentation for more - details. - google_project_id: + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + title: type: optional - docs: Google project ID + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false content-type: application/json response: docs: '' @@ -270,28 +337,28 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -314,95 +381,28 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 - audiences: - - public - validate: - path: /api/storages/gcs/validate - method: POST - auth: true - docs: Validate a specific GCS import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - name: GcsValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - regex_filter: - type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: optional - docs: Presign URLs for direct download - default: true - presign_ttl: - type: optional - docs: Presign TTL in minutes - default: 1 - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - google_application_credentials: - type: optional - docs: >- - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check - official Google Cloud Authentication documentation for more - details. - google_project_id: - type: optional - docs: Google project ID - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/importStorage/local.yml b/.mock/definition/importStorage/local.yml index 2a162f3b9..0eb37cbed 100644 --- a/.mock/definition/importStorage/local.yml +++ b/.mock/definition/importStorage/local.yml @@ -27,23 +27,23 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true + - created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -58,23 +58,23 @@ service: name: LocalCreateRequest body: properties: - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 description: type: optional docs: Storage description - project: - type: optional - docs: Project ID path: type: optional docs: Path to local directory + project: + type: optional + docs: Project ID regex_filter: type: optional docs: Regex for filtering objects + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 use_blob_urls: type: optional docs: >- @@ -91,23 +91,68 @@ service: - request: {} response: body: + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/localfiles/validate + method: POST + auth: true + docs: Validate a specific local file import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + name: LocalValidateRequest + body: + properties: + description: + type: optional + docs: Storage description + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + path: + type: optional + docs: Path to local directory + project: + type: optional + docs: Project ID + regex_filter: + type: optional + docs: Regex for filtering objects + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your directory contains images, you can use this option to + generate URLs for these images. If set to False, it will read + the content of the file and load it into Label Studio. + default: false + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -128,23 +173,23 @@ service: id: 1 response: body: + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -176,23 +221,23 @@ service: name: LocalUpdateRequest body: properties: - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 description: type: optional docs: Storage description - project: - type: optional - docs: Project ID path: type: optional docs: Path to local directory + project: + type: optional + docs: Project ID regex_filter: type: optional docs: Regex for filtering objects + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 use_blob_urls: type: optional docs: >- @@ -211,23 +256,23 @@ service: request: {} response: body: + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + path: path project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -250,68 +295,23 @@ service: id: 1 response: body: + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - path: path - regex_filter: regex_filter - use_blob_urls: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + path: path project: 1 - audiences: - - public - validate: - path: /api/storages/localfiles/validate - method: POST - auth: true - docs: Validate a specific local file import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - name: LocalValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Path to local directory - regex_filter: - type: optional - docs: Regex for filtering objects - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. - default: false - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/importStorage/redis.yml b/.mock/definition/importStorage/redis.yml index 86ee7ab57..02d5a0e59 100644 --- a/.mock/definition/importStorage/redis.yml +++ b/.mock/definition/importStorage/redis.yml @@ -27,27 +27,27 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - path: path + - created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -62,11 +62,34 @@ service: name: RedisCreateRequest body: properties: + description: + type: optional + docs: Storage description + host: + type: optional + docs: Server Host IP (optional) + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) + port: + type: optional + docs: Server Port (optional) + project: + type: optional + docs: Project ID regex_filter: type: optional docs: >- Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 use_blob_urls: type: optional docs: >- @@ -75,29 +98,6 @@ service: URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Storage prefix (optional) - host: - type: optional - docs: Server Host IP (optional) - port: - type: optional - docs: Server Port (optional) - password: - type: optional - docs: Server Password (optional) content-type: application/json response: docs: '' @@ -106,27 +106,83 @@ service: - request: {} response: body: - id: 1 - type: type - synchronizable: true - path: path + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/redis/validate + method: POST + auth: true + docs: Validate a specific Redis import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + name: RedisValidateRequest + body: + properties: + description: + type: optional + docs: Storage description + host: + type: optional + docs: Server Host IP (optional) + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) + port: + type: optional + docs: Server Port (optional) + project: + type: optional + docs: Project ID + regex_filter: + type: optional + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false + content-type: application/json + examples: + - request: {} audiences: - public get: @@ -147,27 +203,27 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - path: path + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -199,11 +255,34 @@ service: name: RedisUpdateRequest body: properties: + description: + type: optional + docs: Storage description + host: + type: optional + docs: Server Host IP (optional) + password: + type: optional + docs: Server Password (optional) + path: + type: optional + docs: Storage prefix (optional) + port: + type: optional + docs: Server Port (optional) + project: + type: optional + docs: Project ID regex_filter: type: optional docs: >- Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 use_blob_urls: type: optional docs: >- @@ -212,29 +291,6 @@ service: URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Storage prefix (optional) - host: - type: optional - docs: Server Host IP (optional) - port: - type: optional - docs: Server Port (optional) - password: - type: optional - docs: Server Password (optional) content-type: application/json response: docs: '' @@ -245,27 +301,27 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - path: path + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - db: 1 + password: password + path: path + port: port project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -288,83 +344,27 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - path: path + created_at: '2024-01-15T09:30:00Z' + db: 1 + description: description host: host - port: port - password: password - regex_filter: regex_filter - use_blob_urls: true + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - db: 1 + password: password + path: path + port: port project: 1 - audiences: - - public - validate: - path: /api/storages/redis/validate - method: POST - auth: true - docs: Validate a specific Redis import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - name: RedisValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - regex_filter: - type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - path: - type: optional - docs: Storage prefix (optional) - host: - type: optional - docs: Server Host IP (optional) - port: - type: optional - docs: Server Port (optional) - password: - type: optional - docs: Server Password (optional) - content-type: application/json - examples: - - request: {} + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/importStorage/s3.yml b/.mock/definition/importStorage/s3.yml index cb05bbdc0..de67ea85b 100644 --- a/.mock/definition/importStorage/s3.yml +++ b/.mock/definition/importStorage/s3.yml @@ -27,33 +27,33 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true + - aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - project: 1 + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -68,19 +68,27 @@ service: name: S3CreateRequest body: properties: - regex_filter: + aws_access_key_id: type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + description: + type: optional + docs: Storage description + prefix: + type: optional + docs: S3 bucket prefix presign: type: optional docs: Presign URLs for download @@ -89,26 +97,85 @@ service: type: optional docs: Presign TTL in minutes default: 1 + project: + type: optional + docs: Project ID recursive_scan: type: optional docs: Scan recursively + regex_filter: + type: optional + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. + region_name: + type: optional + docs: AWS Region + s3_endpoint: + type: optional + docs: S3 Endpoint title: type: optional docs: Storage title validation: maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: S3 bucket name - prefix: - type: optional - docs: S3 bucket prefix + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false + content-type: application/json + response: + docs: '' + type: root.S3ImportStorage + examples: + - request: {} + response: + body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value + prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true + regex_filter: regex_filter + region_name: region_name + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/s3/validate + method: POST + auth: true + docs: Validate a specific S3 import storage connection. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + name: S3ValidateRequest + body: + properties: aws_access_key_id: type: optional docs: AWS_ACCESS_KEY_ID @@ -121,47 +188,59 @@ service: aws_sse_kms_key_id: type: optional docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + description: + type: optional + docs: Storage description + id: + type: optional + docs: Storage ID. If set, storage with specified ID will be updated + prefix: + type: optional + docs: S3 bucket prefix + presign: + type: optional + docs: Presign URLs for download + default: true + presign_ttl: + type: optional + docs: Presign TTL in minutes + default: 1 + project: + type: optional + docs: Project ID + recursive_scan: + type: optional + docs: Scan recursively + regex_filter: + type: optional + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. region_name: type: optional docs: AWS Region s3_endpoint: type: optional docs: S3 Endpoint + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false content-type: application/json - response: - docs: '' - type: root.S3ImportStorage examples: - request: {} - response: - body: - id: 1 - type: type - synchronizable: true - presign: true - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id - region_name: region_name - s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - project: 1 audiences: - public get: @@ -182,33 +261,33 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - presign: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - project: 1 + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -240,19 +319,27 @@ service: name: S3UpdateRequest body: properties: - regex_filter: + aws_access_key_id: type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + description: + type: optional + docs: Storage description + prefix: + type: optional + docs: S3 bucket prefix presign: type: optional docs: Presign URLs for download @@ -261,44 +348,36 @@ service: type: optional docs: Presign TTL in minutes default: 1 - recursive_scan: - type: optional - docs: Scan recursively - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description project: type: optional docs: Project ID - bucket: - type: optional - docs: S3 bucket name - prefix: - type: optional - docs: S3 bucket prefix - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: + recursive_scan: + type: optional + docs: Scan recursively + regex_filter: type: optional - docs: AWS SSE KMS Key ID + docs: >- + Cloud storage regex for filtering objects. You must specify it + otherwise no objects will be imported. region_name: type: optional docs: AWS Region s3_endpoint: type: optional docs: S3 Endpoint + title: + type: optional + docs: Storage title + validation: + maxLength: 2048 + use_blob_urls: + type: optional + docs: >- + Interpret objects as BLOBs and generate URLs. For example, if + your bucket contains images, you can use this option to generate + URLs for these images. If set to False, it will read the content + of the file and load it into Label Studio. + default: false content-type: application/json response: docs: '' @@ -309,33 +388,33 @@ service: request: {} response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - presign: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - project: 1 + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -358,112 +437,33 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - presign: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name s3_endpoint: s3_endpoint - presign_ttl: 1 - recursive_scan: true - project: 1 - audiences: - - public - validate: - path: /api/storages/s3/validate - method: POST - auth: true - docs: Validate a specific S3 import storage connection. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - name: S3ValidateRequest - body: - properties: - id: - type: optional - docs: Storage ID. If set, storage with specified ID will be updated - regex_filter: - type: optional - docs: >- - Cloud storage regex for filtering objects. You must specify it - otherwise no objects will be imported. - use_blob_urls: - type: optional - docs: >- - Interpret objects as BLOBs and generate URLs. For example, if - your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: optional - docs: Presign URLs for download - default: true - presign_ttl: - type: optional - docs: Presign TTL in minutes - default: 1 - recursive_scan: - type: optional - docs: Scan recursively - title: - type: optional - docs: Storage title - validation: - maxLength: 2048 - description: - type: optional - docs: Storage description - project: - type: optional - docs: Project ID - bucket: - type: optional - docs: S3 bucket name - prefix: - type: optional - docs: S3 bucket prefix - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: optional - docs: AWS SSE KMS Key ID - region_name: - type: optional - docs: AWS Region - s3_endpoint: - type: optional - docs: S3 Endpoint - content-type: application/json - examples: - - request: {} + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/importStorage/s3S.yml b/.mock/definition/importStorage/s3S.yml index 53e55b183..f11ecbdf2 100644 --- a/.mock/definition/importStorage/s3S.yml +++ b/.mock/definition/importStorage/s3S.yml @@ -29,36 +29,36 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true + - aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - presign_ttl: 1 - recursive_scan: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public create: @@ -77,40 +77,59 @@ service: type: root.LseS3ImportStorage examples: - request: - role_arn: role_arn project: 1 + role_arn: role_arn response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true - presign: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - presign_ttl: 1 - recursive_scan: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + audiences: + - public + validate: + path: /api/storages/s3s/validate + method: POST + auth: true + docs: >- + Validate a specific S3 import storage connection that was set up with + IAM role access. + source: + openapi: openapi/openapi.yaml + display-name: Validate import storage + request: + body: root.LseS3ImportStorageRequest + content-type: application/json + examples: + - request: + project: 1 + role_arn: role_arn audiences: - public get: @@ -133,36 +152,36 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true - presign: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - presign_ttl: 1 - recursive_scan: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public delete: @@ -198,12 +217,27 @@ service: name: PatchedLseS3ImportStorageRequest body: properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true + aws_access_key_id: + type: optional + docs: AWS_ACCESS_KEY_ID + aws_secret_access_key: + type: optional + docs: AWS_SECRET_ACCESS_KEY + aws_session_token: + type: optional + docs: AWS_SESSION_TOKEN + aws_sse_kms_key_id: + type: optional + docs: AWS SSE KMS Key ID + bucket: + type: optional + docs: S3 bucket name + description: + type: optional + docs: Cloud storage description + external_id: + type: optional + docs: AWS ExternalId last_sync: type: optional docs: Last sync finished time @@ -218,70 +252,55 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync + legacy_auth: optional meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: - type: optional - docs: Cloud storage description - bucket: - type: optional - docs: S3 bucket name prefix: type: optional docs: S3 bucket prefix + presign: + type: optional + default: true + presign_ttl: + type: optional + docs: Presigned URLs TTL (in minutes) + validation: + min: 0 + max: 32767 + project: + type: optional + docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: optional - docs: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: optional - docs: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: optional - docs: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: optional - docs: AWS SSE KMS Key ID region_name: type: optional docs: AWS Region - s3_endpoint: - type: optional - docs: S3 Endpoint - external_id: - type: optional - docs: AWS ExternalId role_arn: type: optional docs: AWS RoleArn validation: minLength: 1 - legacy_auth: optional - presign_ttl: - type: optional - docs: Presigned URLs TTL (in minutes) + s3_endpoint: + type: optional + docs: S3 Endpoint + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title validation: - min: 0 - max: 32767 - recursive_scan: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: type: optional - docs: Perform recursive scan over the bucket content - project: - type: optional - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs content-type: application/json response: docs: '' @@ -292,36 +311,36 @@ service: request: {} response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true - presign: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - presign_ttl: 1 - recursive_scan: true - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public sync: @@ -344,55 +363,36 @@ service: id: 1 response: body: + aws_access_key_id: aws_access_key_id + aws_secret_access_key: aws_secret_access_key + aws_session_token: aws_session_token + aws_sse_kms_key_id: aws_sse_kms_key_id + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + external_id: external_id id: 1 - type: type - synchronizable: true - presign: true last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback + legacy_auth: true meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - bucket: bucket prefix: prefix + presign: true + presign_ttl: 1 + project: 1 + recursive_scan: true regex_filter: regex_filter - use_blob_urls: true - aws_access_key_id: aws_access_key_id - aws_secret_access_key: aws_secret_access_key - aws_session_token: aws_session_token - aws_sse_kms_key_id: aws_sse_kms_key_id region_name: region_name - s3_endpoint: s3_endpoint - external_id: external_id role_arn: role_arn - legacy_auth: true - presign_ttl: 1 - recursive_scan: true - project: 1 - audiences: - - public - validate: - path: /api/storages/s3s/validate - method: POST - auth: true - docs: >- - Validate a specific S3 import storage connection that was set up with - IAM role access. - source: - openapi: openapi/openapi.yaml - display-name: Validate import storage - request: - body: root.LseS3ImportStorageRequest - content-type: application/json - examples: - - request: - role_arn: role_arn - project: 1 + s3_endpoint: s3_endpoint + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true audiences: - public source: diff --git a/.mock/definition/jwtSettings.yml b/.mock/definition/jwtSettings.yml index 6095ef348..247327deb 100644 --- a/.mock/definition/jwtSettings.yml +++ b/.mock/definition/jwtSettings.yml @@ -18,9 +18,9 @@ service: examples: - response: body: + api_token_ttl_days: 1 api_tokens_enabled: true legacy_api_tokens_enabled: true - api_token_ttl_days: 1 audiences: - public update: @@ -35,18 +35,18 @@ service: name: LsejwtSettingsRequest body: properties: - api_tokens_enabled: - type: optional - docs: Enable JWT API token authentication for this organization - legacy_api_tokens_enabled: - type: optional - docs: Enable legacy API token authentication for this organization api_token_ttl_days: type: optional docs: Number of days before JWT API tokens expire validation: min: -2147483648 max: 2147483647 + api_tokens_enabled: + type: optional + docs: Enable JWT API token authentication for this organization + legacy_api_tokens_enabled: + type: optional + docs: Enable legacy API token authentication for this organization content-type: application/json response: docs: '' @@ -55,9 +55,9 @@ service: - request: {} response: body: + api_token_ttl_days: 1 api_tokens_enabled: true legacy_api_tokens_enabled: true - api_token_ttl_days: 1 audiences: - public source: diff --git a/.mock/definition/labels.yml b/.mock/definition/labels.yml index ba18fc228..54617961c 100644 --- a/.mock/definition/labels.yml +++ b/.mock/definition/labels.yml @@ -33,21 +33,21 @@ service: next: http://api.example.org/accounts/?page=4 previous: http://api.example.org/accounts/?page=2 results: - - id: 1 - links: - - 1 + - approved: true + approved_by: 1 created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - value: - key: value - title: title - description: description - approved: true created_by: 1 - approved_by: 1 + description: description + id: 1 + links: + - 1 organization: 1 projects: - 1 + title: title + updated_at: '2024-01-15T09:30:00Z' + value: + key: value audiences: - internal create: @@ -80,21 +80,21 @@ service: next: http://api.example.org/accounts/?page=4 previous: http://api.example.org/accounts/?page=2 results: - - id: 1 + - approved: true + approved_by: 1 + created_at: '2024-01-15T09:30:00Z' created_by: 1 + description: description + from_name: from_name + id: 1 organization: 1 project: 1 - from_name: from_name - created_at: '2024-01-15T09:30:00Z' + projects: + - 1 + title: title updated_at: '2024-01-15T09:30:00Z' value: key: value - title: title - description: description - approved: true - approved_by: 1 - projects: - - 1 audiences: - internal get: @@ -118,21 +118,21 @@ service: id: id response: body: + approved: true + approved_by: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + description: description id: 1 links: - 1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - value: - key: value - title: title - description: description - approved: true - created_by: 1 - approved_by: 1 organization: 1 projects: - 1 + title: title + updated_at: '2024-01-15T09:30:00Z' + value: + key: value audiences: - internal delete: @@ -168,26 +168,26 @@ service: name: PatchedLabelRequest body: properties: - value: optional - title: - type: optional - docs: Label title - validation: - minLength: 1 - maxLength: 2048 - description: - type: optional - docs: Label description approved: type: optional docs: Status of label - created_by: - type: optional - docs: User who made this label approved_by: type: optional docs: User who approved this label + created_by: + type: optional + docs: User who made this label + description: + type: optional + docs: Label description organization: optional + title: + type: optional + docs: Label title + validation: + minLength: 1 + maxLength: 2048 + value: optional content-type: application/json response: docs: '' @@ -198,21 +198,21 @@ service: request: {} response: body: + approved: true + approved_by: 1 + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + description: description id: 1 links: - 1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - value: - key: value - title: title - description: description - approved: true - created_by: 1 - approved_by: 1 organization: 1 projects: - 1 + title: title + updated_at: '2024-01-15T09:30:00Z' + value: + key: value audiences: - internal source: diff --git a/.mock/definition/ml.yml b/.mock/definition/ml.yml index 37df79894..8373d7e80 100644 --- a/.mock/definition/ml.yml +++ b/.mock/definition/ml.yml @@ -30,25 +30,25 @@ service: examples: - response: body: - - id: 1 - state: CO - readable_state: readable_state - is_interactive: true - url: url - error_message: error_message - title: title - auth_method: NONE - basic_auth_user: basic_auth_user + - auth_method: NONE + auto_update: true basic_auth_pass_is_set: basic_auth_pass_is_set + basic_auth_user: basic_auth_user + created_at: '2024-01-15T09:30:00Z' description: description + error_message: error_message extra_params: key: value + id: 1 + is_interactive: true model_version: model_version + project: 1 + readable_state: readable_state + state: CO timeout: 1.1 - created_at: '2024-01-15T09:30:00Z' + title: title updated_at: '2024-01-15T09:30:00Z' - auto_update: true - project: 1 + url: url audiences: - public create: @@ -70,36 +70,36 @@ service: name: MlCreateRequest body: properties: - url: - type: optional - docs: ML backend URL - project: - type: optional - docs: Project ID - is_interactive: - type: optional - docs: Is interactive - title: - type: optional - docs: Title - description: - type: optional - docs: Description auth_method: type: optional docs: Auth method + basic_auth_pass: + type: optional + docs: Basic auth password basic_auth_user: type: optional docs: Basic auth user - basic_auth_pass: + description: type: optional - docs: Basic auth password + docs: Description extra_params: type: optional> docs: Extra parameters + is_interactive: + type: optional + docs: Is interactive + project: + type: optional + docs: Project ID timeout: type: optional docs: Response model timeout + title: + type: optional + docs: Title + url: + type: optional + docs: ML backend URL content-type: application/json response: docs: '' @@ -108,25 +108,25 @@ service: - request: {} response: body: - id: 1 - state: CO - readable_state: readable_state - is_interactive: true - url: url - error_message: error_message - title: title auth_method: NONE - basic_auth_user: basic_auth_user + auto_update: true basic_auth_pass_is_set: basic_auth_pass_is_set + basic_auth_user: basic_auth_user + created_at: '2024-01-15T09:30:00Z' description: description + error_message: error_message extra_params: key: value + id: 1 + is_interactive: true model_version: model_version + project: 1 + readable_state: readable_state + state: CO timeout: 1.1 - created_at: '2024-01-15T09:30:00Z' + title: title updated_at: '2024-01-15T09:30:00Z' - auto_update: true - project: 1 + url: url audiences: - public get: @@ -153,25 +153,25 @@ service: id: 1 response: body: - id: 1 - state: CO - readable_state: readable_state - is_interactive: true - url: url - error_message: error_message - title: title auth_method: NONE - basic_auth_user: basic_auth_user + auto_update: true basic_auth_pass_is_set: basic_auth_pass_is_set + basic_auth_user: basic_auth_user + created_at: '2024-01-15T09:30:00Z' description: description + error_message: error_message extra_params: key: value + id: 1 + is_interactive: true model_version: model_version + project: 1 + readable_state: readable_state + state: CO timeout: 1.1 - created_at: '2024-01-15T09:30:00Z' + title: title updated_at: '2024-01-15T09:30:00Z' - auto_update: true - project: 1 + url: url audiences: - public delete: @@ -215,36 +215,36 @@ service: name: MlUpdateRequest body: properties: - url: - type: optional - docs: ML backend URL - project: - type: optional - docs: Project ID - is_interactive: - type: optional - docs: Is interactive - title: - type: optional - docs: Title - description: - type: optional - docs: Description auth_method: type: optional docs: Auth method + basic_auth_pass: + type: optional + docs: Basic auth password basic_auth_user: type: optional docs: Basic auth user - basic_auth_pass: + description: type: optional - docs: Basic auth password + docs: Description extra_params: type: optional> docs: Extra parameters + is_interactive: + type: optional + docs: Is interactive + project: + type: optional + docs: Project ID timeout: type: optional docs: Response model timeout + title: + type: optional + docs: Title + url: + type: optional + docs: ML backend URL content-type: application/json response: docs: '' @@ -255,25 +255,25 @@ service: request: {} response: body: - id: 1 - state: CO - readable_state: readable_state - is_interactive: true - url: url - error_message: error_message - title: title auth_method: NONE - basic_auth_user: basic_auth_user + auto_update: true basic_auth_pass_is_set: basic_auth_pass_is_set + basic_auth_user: basic_auth_user + created_at: '2024-01-15T09:30:00Z' description: description + error_message: error_message extra_params: key: value + id: 1 + is_interactive: true model_version: model_version + project: 1 + readable_state: readable_state + state: CO timeout: 1.1 - created_at: '2024-01-15T09:30:00Z' + title: title updated_at: '2024-01-15T09:30:00Z' - auto_update: true - project: 1 + url: url audiences: - public predict_interactive: @@ -297,10 +297,10 @@ service: name: MlInteractiveAnnotatingRequestRequest body: properties: + context: optional task: type: integer docs: ID of task to annotate - context: optional content-type: application/json examples: - path-parameters: @@ -328,46 +328,46 @@ service: name: MlBackendRequest body: properties: - state: optional - is_interactive: + auth_method: optional + auto_update: type: optional docs: >- - Used to interactively annotate tasks. If true, model returns one - list with results - url: - type: string - docs: URL for the machine learning model server - validation: - minLength: 1 - error_message: - type: optional - docs: Error message in error state - title: - type: optional - docs: Name of the machine learning backend - auth_method: optional + If false, model version is set by the user, if true - getting + latest version from backend. + basic_auth_pass: optional basic_auth_user: type: optional docs: HTTP Basic Auth user - basic_auth_pass: optional description: type: optional docs: Description for the machine learning backend + error_message: + type: optional + docs: Error message in error state extra_params: optional + is_interactive: + type: optional + docs: >- + Used to interactively annotate tasks. If true, model returns one + list with results model_version: type: optional docs: >- Current model version associated with this machine learning backend + project: integer + state: optional timeout: type: optional docs: Response model timeout - auto_update: - type: optional - docs: >- - If false, model version is set by the user, if true - getting - latest version from backend. - project: integer + title: + type: optional + docs: Name of the machine learning backend + url: + type: string + docs: URL for the machine learning model server + validation: + minLength: 1 content-type: application/json errors: - root.InternalServerError @@ -375,8 +375,8 @@ service: - path-parameters: id: 1 request: - url: url project: 1 + url: url audiences: - internal train: @@ -431,9 +431,9 @@ service: id: 1 response: body: + message: message versions: - versions - message: message audiences: - public source: @@ -457,7 +457,7 @@ types: openapi: openapi/openapi.yaml MlListModelVersionsResponse: properties: - versions: optional> message: optional + versions: optional> source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/modelProviderConnection.yml b/.mock/definition/modelProviderConnection.yml index fb03527dc..d09b32f2d 100644 --- a/.mock/definition/modelProviderConnection.yml +++ b/.mock/definition/modelProviderConnection.yml @@ -26,30 +26,30 @@ service: request: {} response: body: - id: 1 + budget_alert_threshold: 1.1 + budget_last_reset_date: '2024-01-15T09:30:00Z' + budget_limit: 1.1 + budget_reset_period: Monthly + budget_total_spent: 1.1 + cached_available_models: cached_available_models + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - model_params: model_params - provider: OpenAI deployment_name: deployment_name endpoint: endpoint - google_project_id: google_project_id google_location: google_location - cached_available_models: cached_available_models - scope: Organization - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + google_project_id: google_project_id + id: 1 is_internal: true - budget_limit: 1.1 - budget_last_reset_date: '2024-01-15T09:30:00Z' - budget_reset_period: Monthly - budget_total_spent: 1.1 - budget_alert_threshold: 1.1 + model_params: model_params organization: 1 + provider: OpenAI + scope: Organization + updated_at: '2024-01-15T09:30:00Z' audiences: - internal source: diff --git a/.mock/definition/modelProviders.yml b/.mock/definition/modelProviders.yml index c2400de81..c4bf1ae32 100644 --- a/.mock/definition/modelProviders.yml +++ b/.mock/definition/modelProviders.yml @@ -24,30 +24,30 @@ service: examples: - response: body: - - id: 1 + - budget_alert_threshold: 1.1 + budget_last_reset_date: '2024-01-15T09:30:00Z' + budget_limit: 1.1 + budget_reset_period: Monthly + budget_total_spent: 1.1 + cached_available_models: cached_available_models + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - model_params: model_params - provider: OpenAI deployment_name: deployment_name endpoint: endpoint - google_project_id: google_project_id google_location: google_location - cached_available_models: cached_available_models - scope: Organization - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + google_project_id: google_project_id + id: 1 is_internal: true - budget_limit: 1.1 - budget_last_reset_date: '2024-01-15T09:30:00Z' - budget_reset_period: Monthly - budget_total_spent: 1.1 - budget_alert_threshold: 1.1 + model_params: model_params organization: 1 + provider: OpenAI + scope: Organization + updated_at: '2024-01-15T09:30:00Z' audiences: - public create: @@ -68,30 +68,48 @@ service: - request: {} response: body: - id: 1 + budget_alert_threshold: 1.1 + budget_last_reset_date: '2024-01-15T09:30:00Z' + budget_limit: 1.1 + budget_reset_period: Monthly + budget_total_spent: 1.1 + cached_available_models: cached_available_models + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - model_params: model_params - provider: OpenAI deployment_name: deployment_name endpoint: endpoint - google_project_id: google_project_id google_location: google_location - cached_available_models: cached_available_models - scope: Organization - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + google_project_id: google_project_id + id: 1 is_internal: true - budget_limit: 1.1 - budget_last_reset_date: '2024-01-15T09:30:00Z' - budget_reset_period: Monthly - budget_total_spent: 1.1 - budget_alert_threshold: 1.1 + model_params: model_params organization: 1 + provider: OpenAI + scope: Organization + updated_at: '2024-01-15T09:30:00Z' + audiences: + - public + list_model_provider_choices: + path: /api/model-provider-connections/provider-choices + method: GET + auth: true + docs: List all possible model provider choices + source: + openapi: openapi/openapi.yaml + display-name: List model provider choices + response: + docs: List of model provider choices + type: ModelProvidersListModelProviderChoicesResponse + examples: + - response: + body: + provider_choices: + - provider_choices audiences: - public get: @@ -112,30 +130,30 @@ service: id: id response: body: - id: 1 + budget_alert_threshold: 1.1 + budget_last_reset_date: '2024-01-15T09:30:00Z' + budget_limit: 1.1 + budget_reset_period: Monthly + budget_total_spent: 1.1 + cached_available_models: cached_available_models + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - model_params: model_params - provider: OpenAI deployment_name: deployment_name endpoint: endpoint - google_project_id: google_project_id google_location: google_location - cached_available_models: cached_available_models - scope: Organization - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + google_project_id: google_project_id + id: 1 is_internal: true - budget_limit: 1.1 - budget_last_reset_date: '2024-01-15T09:30:00Z' - budget_reset_period: Monthly - budget_total_spent: 1.1 - budget_alert_threshold: 1.1 + model_params: model_params organization: 1 + provider: OpenAI + scope: Organization + updated_at: '2024-01-15T09:30:00Z' audiences: - public delete: @@ -167,13 +185,20 @@ service: name: PatchedModelProviderConnectionRequest body: properties: - provider: optional api_key: type: optional docs: Model provider API key auth_token: type: optional docs: Model provider Auth token + budget_alert_threshold: + type: optional + docs: Budget alert threshold for the given provider connection + cached_available_models: + type: optional + docs: List of available models from the provider + validation: + maxLength: 4096 deployment_name: type: optional docs: Azure OpenAI deployment name @@ -187,30 +212,23 @@ service: google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: - type: optional - docs: Google project ID - validation: - maxLength: 255 google_location: type: optional docs: Google project location validation: maxLength: 255 - cached_available_models: + google_project_id: type: optional - docs: List of available models from the provider + docs: Google project ID validation: - maxLength: 4096 - scope: optional + maxLength: 255 is_internal: type: optional docs: >- Whether the model provider connection is internal, not visible to the user - budget_alert_threshold: - type: optional - docs: Budget alert threshold for the given provider connection + provider: optional + scope: optional content-type: application/json response: docs: '' @@ -221,48 +239,30 @@ service: request: {} response: body: - id: 1 + budget_alert_threshold: 1.1 + budget_last_reset_date: '2024-01-15T09:30:00Z' + budget_limit: 1.1 + budget_reset_period: Monthly + budget_total_spent: 1.1 + cached_available_models: cached_available_models + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - model_params: model_params - provider: OpenAI deployment_name: deployment_name endpoint: endpoint - google_project_id: google_project_id google_location: google_location - cached_available_models: cached_available_models - scope: Organization - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + google_project_id: google_project_id + id: 1 is_internal: true - budget_limit: 1.1 - budget_last_reset_date: '2024-01-15T09:30:00Z' - budget_reset_period: Monthly - budget_total_spent: 1.1 - budget_alert_threshold: 1.1 + model_params: model_params organization: 1 - audiences: - - public - list_model_provider_choices: - path: /api/model-provider-connections/provider-choices - method: GET - auth: true - docs: List all possible model provider choices - source: - openapi: openapi/openapi.yaml - display-name: List model provider choices - response: - docs: List of model provider choices - type: ModelProvidersListModelProviderChoicesResponse - examples: - - response: - body: - provider_choices: - - provider_choices + provider: OpenAI + scope: Organization + updated_at: '2024-01-15T09:30:00Z' audiences: - public source: diff --git a/.mock/definition/organizations.yml b/.mock/definition/organizations.yml index 80d05e163..2e7da056c 100644 --- a/.mock/definition/organizations.yml +++ b/.mock/definition/organizations.yml @@ -20,8 +20,8 @@ service: examples: - response: body: - token: token invite_url: invite_url + token: token audiences: - public list: @@ -47,10 +47,10 @@ service: examples: - response: body: - - id: 1 - title: title - contact_info: contact_info + - contact_info: contact_info created_at: '2024-01-15T09:30:00Z' + id: 1 + title: title audiences: - public get: @@ -71,22 +71,22 @@ service: id: 1 response: body: - id: 1 - external_id: external_id - title: title - token: token - default_role: OW - created_at: '2024-01-15T09:30:00Z' billing: - manual_workspace_management: manual_workspace_management manual_role_management: manual_role_management + manual_workspace_management: manual_workspace_management + created_at: '2024-01-15T09:30:00Z' + custom_scripts_editable_by: AD + custom_scripts_enabled: custom_scripts_enabled + default_role: OW + email_notification_settings: email_notification_settings embed_domains: key: value embed_settings: key: value - custom_scripts_enabled: custom_scripts_enabled - custom_scripts_editable_by: AD - email_notification_settings: email_notification_settings + external_id: external_id + id: 1 + title: title + token: token audiences: - public api_organizations_partial_update: @@ -105,28 +105,28 @@ service: name: PatchedLseOrganizationSerializerUpdateRequest body: properties: - title: + contact_info: type: optional validation: - minLength: 1 - embed_domains: optional>> - custom_scripts_enabled: optional + format: email + maxLength: 254 + created_by: optional custom_scripts_editable_by: type: optional validation: minLength: 1 - embed_settings: optional + custom_scripts_enabled: optional email_notification_settings: optional - token: + embed_domains: optional>> + embed_settings: optional + title: type: optional validation: - maxLength: 256 - contact_info: + minLength: 1 + token: type: optional validation: - format: email - maxLength: 254 - created_by: optional + maxLength: 256 content-type: application/json response: docs: '' @@ -141,22 +141,22 @@ service: request: {} response: body: - id: 1 - external_id: external_id - title: title - token: token - default_role: OW - created_at: '2024-01-15T09:30:00Z' billing: - manual_workspace_management: manual_workspace_management manual_role_management: manual_role_management + manual_workspace_management: manual_workspace_management + created_at: '2024-01-15T09:30:00Z' + custom_scripts_editable_by: AD + custom_scripts_enabled: custom_scripts_enabled + default_role: OW + email_notification_settings: email_notification_settings embed_domains: key: value embed_settings: key: value - custom_scripts_enabled: custom_scripts_enabled - custom_scripts_editable_by: AD - email_notification_settings: email_notification_settings + external_id: external_id + id: 1 + title: title + token: token api_organizations_set_default_role_partial_update: path: /api/organizations/{id}/set-default-role method: PATCH @@ -171,9 +171,32 @@ service: name: PatchedDefaultRoleRequest body: properties: - organization: - type: optional - docs: A unique integer value identifying this organization. + annotator_reviewer_firewall_enabled_at: + type: optional + docs: >- + Set to current time to restrict data sharing between annotators + and reviewers in the label stream, review stream, and + notifications (which will be disabled). In these settings, + information about annotator and reviewer identity is suppressed + in the UI. + custom_scripts_editable_by: + type: optional + docs: >- + Set the minimum user role that can edit custom scripts in the + UI. + + + * `AD` - Administrator + + * `MA` - Manager + custom_scripts_enabled_at: + type: optional + docs: >- + Set to current time to enabled custom scripts for this + organization. Can only be enabled if no organization members are + active members of any other organizations; otherwise an error + will be raised. If this occurs, contact the LEAP team for + assistance with enabling custom scripts. default_role: type: optional docs: |- @@ -186,50 +209,27 @@ service: * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated + email_notification_settings: optional + embed_domains: optional + embed_settings: optional external_id: type: optional docs: External ID to uniquely identify this organization - embed_domains: optional - embed_settings: optional extra_data_on_activity_logs: optional - custom_scripts_enabled_at: - type: optional - docs: >- - Set to current time to enabled custom scripts for this - organization. Can only be enabled if no organization members are - active members of any other organizations; otherwise an error - will be raised. If this occurs, contact the LEAP team for - assistance with enabling custom scripts. - custom_scripts_editable_by: - type: optional - docs: >- - Set the minimum user role that can edit custom scripts in the - UI. - - - * `AD` - Administrator - - * `MA` - Manager - annotator_reviewer_firewall_enabled_at: + label_stream_navigation_disabled_at: type: optional docs: >- - Set to current time to restrict data sharing between annotators - and reviewers in the label stream, review stream, and - notifications (which will be disabled). In these settings, - information about annotator and reviewer identity is suppressed - in the UI. + Set to current time to disable the label stream navigation for + this organization. This will prevent users from going back in + the label stream to view previous labels. + organization: + type: optional + docs: A unique integer value identifying this organization. read_only_quick_view_enabled_at: type: optional docs: >- Set to current time to prevent creating or editing annotations in quick view. - label_stream_navigation_disabled_at: - type: optional - docs: >- - Set to current time to disable the label stream navigation for - this organization. This will prevent users from going back in - the label stream to view previous labels. - email_notification_settings: optional content-type: application/json response: docs: '' @@ -240,21 +240,21 @@ service: request: {} response: body: - organization: 1 + annotator_reviewer_firewall_enabled_at: '2024-01-15T09:30:00Z' + custom_scripts_editable_by: AD + custom_scripts_enabled_at: '2024-01-15T09:30:00Z' default_role: OW - external_id: external_id + email_notification_settings: + key: value embed_domains: key: value embed_settings: key: value + external_id: external_id extra_data_on_activity_logs: true - custom_scripts_enabled_at: '2024-01-15T09:30:00Z' - custom_scripts_editable_by: AD - annotator_reviewer_firewall_enabled_at: '2024-01-15T09:30:00Z' - read_only_quick_view_enabled_at: '2024-01-15T09:30:00Z' label_stream_navigation_disabled_at: '2024-01-15T09:30:00Z' - email_notification_settings: - key: value + organization: 1 + read_only_quick_view_enabled_at: '2024-01-15T09:30:00Z' source: openapi: openapi/openapi.yaml types: diff --git a/.mock/definition/organizations/members.yml b/.mock/definition/organizations/members.yml index 3bfec0a23..0857be759 100644 --- a/.mock/definition/organizations/members.yml +++ b/.mock/definition/organizations/members.yml @@ -57,20 +57,20 @@ service: results: - id: 1 organization: 1 + role: role user: - id: 1 - username: username - last_activity: '2024-01-15T09:30:00Z' avatar: avatar + contributed_to_projects: contributed_to_projects + created_projects: created_projects + id: 1 initials: initials + last_activity: '2024-01-15T09:30:00Z' lse_fields: + email_notification_settings: email_notification_settings invite_expired: invite_expired invite_expired_at: invite_expired_at - email_notification_settings: email_notification_settings pause: pause - created_projects: created_projects - contributed_to_projects: contributed_to_projects - role: role + username: username audiences: - public update: @@ -123,8 +123,8 @@ service: name: PatchedOrganizationMemberCreateUpdateRequest body: properties: - user_id: optional role: optional + user_id: optional content-type: application/json response: docs: '' @@ -137,39 +137,39 @@ service: body: id: 1 organization: 1 + role: role user: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 allow_newsletters: true + avatar: avatar + contributed_to_projects: contributed_to_projects + created_projects: created_projects + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name lse_fields: + email_notification_settings: email_notification_settings + invite_activated: true invite_expired: invite_expired invite_expired_at: invite_expired_at invited_at: '2024-01-15T09:30:00Z' - invite_activated: true + invited_by: 1 + onboarding_state: not_started + social_auth_finished: true trial_company: trial_company - trial_role: annotator - trial_models_in_production: trial_models_in_production trial_experience_labeling: trial_experience_labeling trial_license_enterprise: true - social_auth_finished: true - invited_by: 1 - onboarding_state: not_started - email_notification_settings: email_notification_settings + trial_models_in_production: trial_models_in_production + trial_role: annotator pause: pause - created_projects: created_projects - contributed_to_projects: contributed_to_projects - role: role + phone: phone + username: username audiences: - public get: @@ -196,11 +196,11 @@ service: user_pk: 1 response: body: - user: 1 - organization: 1 - contributed_projects_count: contributed_projects_count annotations_count: annotations_count + contributed_projects_count: contributed_projects_count created_at: '2024-01-15T09:30:00Z' + organization: 1 + user: 1 audiences: - public delete: diff --git a/.mock/definition/pauses.yml b/.mock/definition/pauses.yml index 708e87111..a7ab6b91c 100644 --- a/.mock/definition/pauses.yml +++ b/.mock/definition/pauses.yml @@ -31,21 +31,21 @@ service: reason: MANUAL response: body: + created_at: '2024-01-15T09:30:00Z' + deleted_at: '2024-01-15T09:30:00Z' + deleted_by: 1 id: 1 - project: 1 - user: 1 paused_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar + project: 1 reason: MANUAL - verbose_reason: verbose_reason - deleted_by: 1 - deleted_at: '2024-01-15T09:30:00Z' - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' + user: 1 + verbose_reason: verbose_reason audiences: - internal source: diff --git a/.mock/definition/predictions.yml b/.mock/definition/predictions.yml index 74c9f150f..67f676175 100644 --- a/.mock/definition/predictions.yml +++ b/.mock/definition/predictions.yml @@ -28,22 +28,22 @@ service: - name: response response: body: - - id: 1 - result: - - key: value - model_version: model_version + - cluster: 1 created_ago: created_ago - score: 1.1 - cluster: 1 - neighbors: - key: value - mislabeling: 1.1 created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + id: 1 + mislabeling: 1.1 model: 1 model_run: 1 - task: 1 + model_version: model_version + neighbors: + key: value project: 1 + result: + - key: value + score: 1.1 + task: 1 + updated_at: '2024-01-15T09:30:00Z' audiences: - public create: @@ -58,9 +58,12 @@ service: name: PredictionsCreateRequest body: properties: - task: - type: optional - docs: Task ID for which the prediction is created + model_version: + type: optional + docs: >- + Model version - tag for predictions that can be used to filter + tasks in Data Manager, as well as select specific model version + for showing preannotations in the labeling interface result: type: optional>> docs: >- @@ -73,12 +76,9 @@ service: Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. - model_version: - type: optional - docs: >- - Model version - tag for predictions that can be used to filter - tasks in Data Manager, as well as select specific model version - for showing preannotations in the labeling interface + task: + type: optional + docs: Task ID for which the prediction is created content-type: application/json response: docs: Created prediction @@ -86,56 +86,56 @@ service: examples: - name: response request: + model_version: yolo-v8 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person + width: 50 + x: 20 + 'y': 30 score: 0.95 - model_version: yolo-v8 response: body: + cluster: 1 + created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' id: 1 + mislabeling: 1.1 + model: 1 + model_run: 1 + model_version: yolo-v8 + neighbors: + key: value + project: 1 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person - model_version: yolo-v8 - created_ago: created_ago + width: 50 + x: 20 + 'y': 30 score: 0.95 - cluster: 1 - neighbors: - key: value - mislabeling: 1.1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - model: 1 - model_run: 1 task: 1 - project: 1 + updated_at: '2024-01-15T09:30:00Z' audiences: - public get: @@ -159,36 +159,36 @@ service: id: 1 response: body: + cluster: 1 + created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' id: 1 + mislabeling: 1.1 + model: 1 + model_run: 1 + model_version: yolo-v8 + neighbors: + key: value + project: 1 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person - model_version: yolo-v8 - created_ago: created_ago + width: 50 + x: 20 + 'y': 30 score: 0.95 - cluster: 1 - neighbors: - key: value - mislabeling: 1.1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - model: 1 - model_run: 1 task: 1 - project: 1 + updated_at: '2024-01-15T09:30:00Z' audiences: - public api_predictions_update: @@ -207,9 +207,12 @@ service: name: ApiPredictionsUpdateRequest body: properties: - task: - type: optional - docs: Task ID for which the prediction is created + model_version: + type: optional + docs: >- + Model version - tag for predictions that can be used to filter + tasks in Data Manager, as well as select specific model version + for showing preannotations in the labeling interface result: type: optional>> docs: >- @@ -222,12 +225,9 @@ service: Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. - model_version: - type: optional - docs: >- - Model version - tag for predictions that can be used to filter - tasks in Data Manager, as well as select specific model version - for showing preannotations in the labeling interface + task: + type: optional + docs: Task ID for which the prediction is created content-type: application/json response: docs: Updated prediction @@ -237,56 +237,56 @@ service: path-parameters: id: 1 request: + model_version: yolo-v8 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person + width: 50 + x: 20 + 'y': 30 score: 0.95 - model_version: yolo-v8 response: body: + cluster: 1 + created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' id: 1 + mislabeling: 1.1 + model: 1 + model_run: 1 + model_version: yolo-v8 + neighbors: + key: value + project: 1 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person - model_version: yolo-v8 - created_ago: created_ago + width: 50 + x: 20 + 'y': 30 score: 0.95 - cluster: 1 - neighbors: - key: value - mislabeling: 1.1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - model: 1 - model_run: 1 task: 1 - project: 1 + updated_at: '2024-01-15T09:30:00Z' audiences: - internal delete: @@ -322,9 +322,12 @@ service: name: PredictionsUpdateRequest body: properties: - task: - type: optional - docs: Task ID for which the prediction is created + model_version: + type: optional + docs: >- + Model version - tag for predictions that can be used to filter + tasks in Data Manager, as well as select specific model version + for showing preannotations in the labeling interface result: type: optional>> docs: >- @@ -337,12 +340,9 @@ service: Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. - model_version: - type: optional - docs: >- - Model version - tag for predictions that can be used to filter - tasks in Data Manager, as well as select specific model version - for showing preannotations in the labeling interface + task: + type: optional + docs: Task ID for which the prediction is created content-type: application/json response: docs: Updated prediction @@ -352,56 +352,56 @@ service: path-parameters: id: 1 request: + model_version: yolo-v8 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person + width: 50 + x: 20 + 'y': 30 score: 0.95 - model_version: yolo-v8 response: body: + cluster: 1 + created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' id: 1 + mislabeling: 1.1 + model: 1 + model_run: 1 + model_version: yolo-v8 + neighbors: + key: value + project: 1 result: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - 'y': 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - Person - model_version: yolo-v8 - created_ago: created_ago + width: 50 + x: 20 + 'y': 30 score: 0.95 - cluster: 1 - neighbors: - key: value - mislabeling: 1.1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - model: 1 - model_run: 1 task: 1 - project: 1 + updated_at: '2024-01-15T09:30:00Z' audiences: - public source: diff --git a/.mock/definition/projectRoles.yml b/.mock/definition/projectRoles.yml index db93faeb4..b823c6ff4 100644 --- a/.mock/definition/projectRoles.yml +++ b/.mock/definition/projectRoles.yml @@ -4,32 +4,6 @@ service: auth: false base-path: '' endpoints: - api_projects_roles_retrieve: - path: /api/projects/{id}/roles - method: GET - auth: true - docs: |2- - - List users and their project level roles for a given project. - If user is not listed here and is a member of the project then they would behave as assigned role in organization. - - source: - openapi: openapi/openapi.yaml - path-parameters: - id: integer - display-name: List project roles - response: - docs: '' - type: root.ProjectRole - examples: - - path-parameters: - id: 1 - response: - body: - id: 1 - role: OW - user: 1 - project: 1 api_projects_roles_list: path: /api/projects/roles/ method: GET @@ -55,9 +29,9 @@ service: - response: body: - id: 1 + project: 1 role: OW user: 1 - project: 1 api_projects_roles_create: path: /api/projects/roles/ method: POST @@ -73,6 +47,7 @@ service: name: ProjectRoleRequest body: properties: + project: integer role: type: root.Role9E7Enum docs: |- @@ -86,22 +61,21 @@ service: * `DI` - Deactivated * `NO` - Not Activated user: integer - project: integer content-type: application/json response: docs: '' type: root.ProjectRole examples: - request: + project: 1 role: OW user: 1 - project: 1 response: body: id: 1 + project: 1 role: OW user: 1 - project: 1 api_projects_roles_destroy: path: /api/projects/roles/{id}/ method: DELETE @@ -120,5 +94,31 @@ service: examples: - path-parameters: id: 1 + api_projects_roles_retrieve: + path: /api/projects/{id}/roles + method: GET + auth: true + docs: |2- + + List users and their project level roles for a given project. + If user is not listed here and is a member of the project then they would behave as assigned role in organization. + + source: + openapi: openapi/openapi.yaml + path-parameters: + id: integer + display-name: List project roles + response: + docs: '' + type: root.ProjectRole + examples: + - path-parameters: + id: 1 + response: + body: + id: 1 + project: 1 + role: OW + user: 1 source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/projectTemplates.yml b/.mock/definition/projectTemplates.yml index 2154b4775..5e0cd13c3 100644 --- a/.mock/definition/projectTemplates.yml +++ b/.mock/definition/projectTemplates.yml @@ -24,23 +24,23 @@ service: examples: - response: body: - - id: 1 - name: name - description: description - tags: + - assignment_settings: key: value + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + custom_script: custom_script + description: description + id: 1 + name: name + organization: 1 project_settings: key: value + require_comment_on_skip: true review_settings: key: value - assignment_settings: + tags: key: value - require_comment_on_skip: true - custom_script: custom_script - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' - created_by: 1 - organization: 1 api_project_templates_create: path: /api/project-templates/ method: POST @@ -60,23 +60,23 @@ service: name: name response: body: + assignment_settings: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + custom_script: custom_script + description: description id: 1 name: name - description: description - tags: - key: value + organization: 1 project_settings: key: value + require_comment_on_skip: true review_settings: key: value - assignment_settings: + tags: key: value - require_comment_on_skip: true - custom_script: custom_script - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' - created_by: 1 - organization: 1 api_project_templates_retrieve: path: /api/project-templates/{id} method: GET @@ -95,23 +95,23 @@ service: id: 1 response: body: + assignment_settings: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + custom_script: custom_script + description: description id: 1 name: name - description: description - tags: - key: value + organization: 1 project_settings: key: value + require_comment_on_skip: true review_settings: key: value - assignment_settings: + tags: key: value - require_comment_on_skip: true - custom_script: custom_script - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' - created_by: 1 - organization: 1 api_project_templates_update: path: /api/project-templates/{id} method: PUT @@ -135,23 +135,23 @@ service: name: name response: body: + assignment_settings: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + custom_script: custom_script + description: description id: 1 name: name - description: description - tags: - key: value + organization: 1 project_settings: key: value + require_comment_on_skip: true review_settings: key: value - assignment_settings: + tags: key: value - require_comment_on_skip: true - custom_script: custom_script - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' - created_by: 1 - organization: 1 api_project_templates_destroy: path: /api/project-templates/{id} method: DELETE @@ -181,29 +181,29 @@ service: name: PatchedProjectTemplateRequest body: properties: - name: + assignment_settings: optional + created_by: optional + custom_script: type: optional + docs: custom script for projects created from this template validation: minLength: 1 - maxLength: 1000 description: type: optional validation: minLength: 1 - tags: optional - project_settings: optional - review_settings: optional - assignment_settings: optional - require_comment_on_skip: - type: optional - docs: flag to require comment on skip - custom_script: + name: type: optional - docs: custom script for projects created from this template validation: minLength: 1 - created_by: optional + maxLength: 1000 organization: optional + project_settings: optional + require_comment_on_skip: + type: optional + docs: flag to require comment on skip + review_settings: optional + tags: optional content-type: application/json response: docs: '' @@ -214,23 +214,23 @@ service: request: {} response: body: + assignment_settings: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + custom_script: custom_script + description: description id: 1 name: name - description: description - tags: - key: value + organization: 1 project_settings: key: value + require_comment_on_skip: true review_settings: key: value - assignment_settings: + tags: key: value - require_comment_on_skip: true - custom_script: custom_script - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' - created_by: 1 - organization: 1 api_project_templates_create_project_create: path: /api/project-templates/{id}/create-project method: POST @@ -247,12 +247,12 @@ service: name: ApiProjectTemplatesCreateProjectCreateRequest body: properties: - title: - type: string - docs: The title of the project to be created from the template. description: type: optional docs: A description for the project. + title: + type: string + docs: The title of the project to be created from the template. workspace_id: type: integer docs: >- @@ -270,94 +270,94 @@ service: workspace_id: 1 response: body: - id: 1 - title: title - description: description - label_config: label_config - expert_instruction: expert_instruction - show_instruction: true - show_skip_button: true - enable_empty_annotation: true - show_annotation_history: true - organization: 1 + annotation_limit_count: 1 + annotation_limit_percent: annotation_limit_percent + annotator_evaluation_minimum_score: annotator_evaluation_minimum_score + annotator_evaluation_minimum_tasks: 1 + assignment_settings: + id: 1 + label_stream_task_distribution: auto_distribution + project: 1 color: color - maximum_annotations: 1 - is_published: true - model_version: model_version - is_draft: true + comment_classification_config: comment_classification_config + config_has_control_tags: true + config_suitable_for_bulk_annotation: true + control_weights: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' + custom_script: custom_script + custom_task_lock_ttl: 1 + data_types: + key: value + description: description + duplication_done: true + duplication_status: duplication_status + enable_empty_annotation: true + evaluate_predictions_automatically: true + expert_instruction: expert_instruction + finished_task_number: 1 + ground_truth_number: 1 + id: 1 + is_draft: true + is_published: true + label_config: label_config + maximum_annotations: 1 + members: members + members_count: 1 min_annotations_to_start_training: 1 - start_training_on_annotation_update: true - show_collab_predictions: true + model_version: model_version num_tasks_with_annotations: 1 - task_number: 1 - useful_annotation_number: 1 - ground_truth_number: 1 - skipped_annotations_number: 1 - total_annotations_number: 1 - total_predictions_number: 1 - sampling: Sequential sampling - show_ground_truth_first: true - show_overlap_first: true + organization: 1 overlap_cohort_percentage: 1 - task_data_login: task_data_login - task_data_password: task_data_password - control_weights: - key: value parsed_label_config: key: value - evaluate_predictions_automatically: true - config_has_control_tags: true - skip_queue: REQUEUE_FOR_ME - reveal_preannotations_interactively: true + pause_on_failed_annotator_evaluation: true pinned_at: '2024-01-15T09:30:00Z' - finished_task_number: 1 - queue_total: queue_total + prompts: prompts queue_done: queue_done - config_suitable_for_bulk_annotation: true - workspace: workspace + queue_left: queue_left + queue_total: queue_total + require_comment_on_skip: true + reveal_preannotations_interactively: true review_settings: - id: 1 - requeue_rejected_tasks_to_annotator: true - review_criteria: all anonymize_annotations: true - only_finished_tasks: true + id: 1 instruction: instruction - show_instruction: true - show_data_manager_to_reviewers: true - show_agreement_to_reviewers: true - require_comment_on_reject: true + only_finished_tasks: true + project: 1 requeue_rejected_tasks_mode: requeue + requeue_rejected_tasks_to_annotator: true + require_comment_on_reject: true + review_criteria: all review_only_manual_assignments: true - project: 1 - assignment_settings: - id: 1 - label_stream_task_distribution: auto_distribution - project: 1 - members: members - custom_script: custom_script - comment_classification_config: comment_classification_config - duplication_done: true - duplication_status: duplication_status - require_comment_on_skip: true - data_types: - key: value + show_agreement_to_reviewers: true + show_data_manager_to_reviewers: true + show_instruction: true reviewer_queue_total: reviewer_queue_total - queue_left: queue_left - members_count: 1 - custom_task_lock_ttl: 1 - prompts: prompts - annotation_limit_count: 1 - annotation_limit_percent: annotation_limit_percent - pause_on_failed_annotator_evaluation: true - annotator_evaluation_minimum_score: annotator_evaluation_minimum_score - annotator_evaluation_minimum_tasks: 1 + sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: 1 + start_training_on_annotation_update: true + task_data_login: task_data_login + task_data_password: task_data_password + task_number: 1 + title: title + total_annotations_number: 1 + total_predictions_number: 1 + useful_annotation_number: 1 + workspace: workspace workspace_title: workspace_title source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/projects.yml b/.mock/definition/projects.yml index da61a7042..e98be2484 100644 --- a/.mock/definition/projects.yml +++ b/.mock/definition/projects.yml @@ -48,30 +48,30 @@ types: ProjectsImportTasksResponse: docs: Task creation response properties: - task_count: - type: optional - docs: Number of tasks added annotation_count: type: optional docs: Number of annotations added - predictions_count: - type: optional - docs: Number of predictions added + could_be_tasks_list: + type: optional + docs: Whether uploaded files can contain lists of tasks, like CSV/TSV files + data_columns: + type: optional> + docs: The list of found data columns duration: type: optional docs: Time in seconds to create file_upload_ids: type: optional> docs: Database IDs of uploaded files - could_be_tasks_list: - type: optional - docs: Whether uploaded files can contain lists of tasks, like CSV/TSV files found_formats: type: optional> docs: The list of found file formats - data_columns: - type: optional> - docs: The list of found data columns + predictions_count: + type: optional + docs: Number of predictions added + task_count: + type: optional + docs: Number of tasks added source: openapi: openapi/openapi.yaml ApiProjectsProjectExtraParamsRetrieveResponse: @@ -164,89 +164,89 @@ service: next: http://api.example.org/accounts/?page=4 previous: http://api.example.org/accounts/?page=2 results: - - control_weights: - key: value - start_training_on_annotation_update: true - id: 1 - ground_truth_number: 1 - config_has_control_tags: true + - allow_stream: allow_stream + annotation_limit_count: 1 annotation_limit_percent: annotation_limit_percent - duplication_done: true - finished_task_number: 1 - members: members - total_annotations_number: total_annotations_number - members_count: 1 - enable_empty_annotation: true + annotator_evaluation_minimum_score: annotator_evaluation_minimum_score + annotator_evaluation_minimum_tasks: 1 + assignment_settings: + id: 1 + blueprints: + - created_at: '2024-01-15T09:30:00Z' + id: 1 + share_id: share_id + short_url: short_url + color: color + comment_classification_config: comment_classification_config + config_has_control_tags: true config_suitable_for_bulk_annotation: true - task_number: 1 - workspace_title: workspace_title - total_predictions_number: 1 - is_published: true - is_draft: true - description: description - rejected: rejected - custom_script: custom_script - workspace: workspace - show_ground_truth_first: true - expert_instruction: expert_instruction - allow_stream: allow_stream - reviewer_queue_total: reviewer_queue_total + control_weights: + key: value created_at: '2024-01-15T09:30:00Z' - annotator_evaluation_minimum_tasks: 1 - review_total_tasks: review_total_tasks - min_annotations_to_start_training: 1 - label_config: label_config created_by: - id: 1 avatar: avatar - maximum_annotations: 1 + id: 1 + custom_script: custom_script + custom_task_lock_ttl: 1 + data_types: + key: value + description: description + description_short: description_short + duplication_done: true + duplication_status: duplication_status + enable_empty_annotation: true evaluate_predictions_automatically: true - annotator_evaluation_minimum_score: annotator_evaluation_minimum_score - model_version: model_version - useful_annotation_number: useful_annotation_number + expert_instruction: expert_instruction + finished_task_number: 1 + ground_truth_number: 1 has_blueprints: has_blueprints + id: 1 + is_draft: true + is_published: true + label_config: label_config + maximum_annotations: 1 + members: members + members_count: 1 + min_annotations_to_start_training: 1 + model_version: model_version + num_tasks_with_annotations: num_tasks_with_annotations + organization: 1 + overlap_cohort_percentage: 1 + parsed_label_config: + key: value pause_on_failed_annotator_evaluation: true - show_instruction: true - queue_left: queue_left - custom_task_lock_ttl: 1 pinned_at: '2024-01-15T09:30:00Z' + prompts: prompts + queue_done: queue_done + queue_left: queue_left + queue_total: queue_total ready: ready - description_short: description_short - show_overlap_first: true + rejected: rejected + require_comment_on_skip: true reveal_preannotations_interactively: true - comment_classification_config: comment_classification_config - show_skip_button: true - data_types: - key: value - organization: 1 - show_collab_predictions: true - reviewed_number: reviewed_number - prompts: prompts - overlap_cohort_percentage: 1 - duplication_status: duplication_status - skipped_annotations_number: skipped_annotations_number - blueprints: - - id: 1 - share_id: share_id - short_url: short_url - created_at: '2024-01-15T09:30:00Z' - sampling: Sequential sampling - color: color - title: title - skip_queue: REQUEUE_FOR_ME review_settings: id: 1 requeue_rejected_tasks_to_annotator: true - num_tasks_with_annotations: num_tasks_with_annotations - assignment_settings: - id: 1 - require_comment_on_skip: true - annotation_limit_count: 1 - queue_done: queue_done + review_total_tasks: review_total_tasks + reviewed_number: reviewed_number + reviewer_queue_total: reviewer_queue_total + sampling: Sequential sampling show_annotation_history: true - queue_total: queue_total - parsed_label_config: - key: value + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: skipped_annotations_number + start_training_on_annotation_update: true + task_number: 1 + title: title + total_annotations_number: total_annotations_number + total_predictions_number: 1 + useful_annotation_number: useful_annotation_number + workspace: workspace + workspace_title: workspace_title audiences: - public create: @@ -261,40 +261,35 @@ service: name: LseProjectCreateRequest body: properties: - title: + color: type: optional - docs: Project name. Must be between 3 and 50 characters long. validation: - minLength: 3 - maxLength: 50 + maxLength: 16 + control_weights: optional + created_by: + type: optional + docs: Project owner description: type: optional docs: Project description - label_config: - type: optional - docs: Label config in XML format. See more about it in documentation + enable_empty_annotation: + type: optional + docs: Allow annotators to submit empty annotations + evaluate_predictions_automatically: + type: optional + docs: Retrieve and display predictions when loading a task expert_instruction: type: optional docs: Labeling instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the annotator before they start - show_skip_button: - type: optional - docs: >- - Show a skip button in interface and allow annotators to skip the - task - enable_empty_annotation: + is_draft: type: optional - docs: Allow annotators to submit empty annotations - show_annotation_history: + docs: Whether or not the project is in the middle of being created + is_published: type: optional - docs: Show annotation history to annotator - organization: optional - color: + docs: Whether or not the project is published to annotators + label_config: type: optional - validation: - maxLength: 16 + docs: Label config in XML format. See more about it in documentation maximum_annotations: type: optional docs: >- @@ -304,18 +299,6 @@ service: validation: min: -2147483648 max: 2147483647 - is_published: - type: optional - docs: Whether or not the project is published to annotators - model_version: - type: optional - docs: Machine learning model version - is_draft: - type: optional - docs: Whether or not the project is in the middle of being created - created_by: - type: optional - docs: Project owner min_annotations_to_start_training: type: optional docs: >- @@ -324,17 +307,39 @@ service: validation: min: -2147483648 max: 2147483647 - show_collab_predictions: - type: optional - docs: If set, the annotator can view model predictions - sampling: optional - show_ground_truth_first: optional - show_overlap_first: optional + model_version: + type: optional + docs: Machine learning model version + organization: optional overlap_cohort_percentage: type: optional validation: min: -2147483648 max: 2147483647 + pinned_at: + type: optional + docs: Pinned date and time + reveal_preannotations_interactively: + type: optional + docs: Reveal pre-annotations interactively + sampling: optional + show_annotation_history: + type: optional + docs: Show annotation history to annotator + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: >- + Show a skip button in interface and allow annotators to skip the + task + skip_queue: optional task_data_login: type: optional docs: 'Task data credentials: login' @@ -345,17 +350,12 @@ service: docs: 'Task data credentials: password' validation: maxLength: 256 - control_weights: optional - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - skip_queue: optional - reveal_preannotations_interactively: - type: optional - docs: Reveal pre-annotations interactively - pinned_at: - type: optional - docs: Pinned date and time + title: + type: optional + docs: Project name. Must be between 3 and 50 characters long. + validation: + minLength: 3 + maxLength: 50 workspace: optional content-type: application/json response: @@ -365,60 +365,125 @@ service: - request: {} response: body: - id: 1 - title: title - description: description - label_config: label_config - expert_instruction: expert_instruction - show_instruction: true - show_skip_button: true - enable_empty_annotation: true - show_annotation_history: true - organization: 1 color: color - maximum_annotations: 1 - is_published: true - model_version: model_version - is_draft: true + config_has_control_tags: true + config_suitable_for_bulk_annotation: true + control_weights: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' + description: description + enable_empty_annotation: true + evaluate_predictions_automatically: true + expert_instruction: expert_instruction + finished_task_number: 1 + ground_truth_number: 1 + id: 1 + is_draft: true + is_published: true + label_config: label_config + maximum_annotations: 1 min_annotations_to_start_training: 1 - start_training_on_annotation_update: true - show_collab_predictions: true + model_version: model_version num_tasks_with_annotations: 1 - task_number: 1 - useful_annotation_number: 1 - ground_truth_number: 1 - skipped_annotations_number: 1 - total_annotations_number: 1 - total_predictions_number: 1 - sampling: Sequential sampling - show_ground_truth_first: true - show_overlap_first: true + organization: 1 overlap_cohort_percentage: 1 - task_data_login: task_data_login - task_data_password: task_data_password - control_weights: - key: value parsed_label_config: key: value - evaluate_predictions_automatically: true - config_has_control_tags: true - skip_queue: REQUEUE_FOR_ME - reveal_preannotations_interactively: true pinned_at: '2024-01-15T09:30:00Z' - finished_task_number: 1 - queue_total: 1 queue_done: 1 - config_suitable_for_bulk_annotation: true + queue_total: 1 + reveal_preannotations_interactively: true + sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: 1 + start_training_on_annotation_update: true + task_data_login: task_data_login + task_data_password: task_data_password + task_number: 1 + title: title + total_annotations_number: 1 + total_predictions_number: 1 + useful_annotation_number: 1 workspace: 1 audiences: - public + api_projects_counts_list: + path: /api/projects/counts/ + method: GET + auth: true + docs: >- + Returns a list of projects with their counts. For example, task_number + which is the total task number in project + source: + openapi: openapi/openapi.yaml + display-name: List project's counts + request: + name: ApiProjectsCountsListRequest + query-parameters: + ordering: + type: optional + docs: Which field to use when ordering the results. + page: + type: optional + docs: A page number within the paginated result set. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedLseProjectCountsList + examples: + - response: + body: + count: 123 + next: http://api.example.org/accounts/?page=4 + previous: http://api.example.org/accounts/?page=2 + results: + - finished_task_number: 1 + ground_truth_number: 1 + id: 1 + num_tasks_with_annotations: num_tasks_with_annotations + queue_done: queue_done + queue_left: queue_left + queue_total: queue_total + rejected: rejected + review_total_tasks: review_total_tasks + reviewed_number: reviewed_number + skipped_annotations_number: skipped_annotations_number + task_number: 1 + total_annotations_number: total_annotations_number + total_predictions_number: 1 + useful_annotation_number: useful_annotation_number + api_projects_validate_create: + path: /api/projects/validate/ + method: POST + auth: true + docs: Validate an arbitrary labeling configuration. + source: + openapi: openapi/openapi.yaml + display-name: Validate label config + request: + body: root.ProjectLabelConfigRequest + content-type: application/json + errors: + - root.BadRequestError + examples: + - request: + label_config: label_config + audiences: + - internal get: path: /api/projects/{id}/ method: GET @@ -438,55 +503,55 @@ service: id: 1 response: body: - id: 1 - title: My project - description: My first project - label_config: [...] - expert_instruction: Label all cats - show_instruction: true - show_skip_button: true - enable_empty_annotation: true - show_annotation_history: true - organization: 1 color: '#FF0000' - maximum_annotations: 1 - is_published: true - model_version: 1.0.0 - is_draft: false + config_has_control_tags: true + config_suitable_for_bulk_annotation: true + control_weights: {} + created_at: '2023-08-24T14:15:22Z' created_by: - id: 1 + avatar: avatar + email: manager@humansignal.com first_name: Jo + id: 1 last_name: Doe - email: manager@humansignal.com - avatar: avatar - created_at: '2023-08-24T14:15:22Z' + description: My first project + enable_empty_annotation: true + evaluate_predictions_automatically: false + expert_instruction: Label all cats + finished_task_number: 10 + ground_truth_number: 5 + id: 1 + is_draft: false + is_published: true + label_config: [...] + maximum_annotations: 1 min_annotations_to_start_training: 0 - start_training_on_annotation_update: true - show_collab_predictions: true + model_version: 1.0.0 num_tasks_with_annotations: 10 - task_number: 100 - useful_annotation_number: 10 - ground_truth_number: 5 - skipped_annotations_number: 0 - total_annotations_number: 10 - total_predictions_number: 0 + organization: 1 + overlap_cohort_percentage: 100 + parsed_label_config: '{"tag": {...}}' + pinned_at: '2023-08-24T14:15:22Z' + queue_done: 100 + queue_total: 10 + reveal_preannotations_interactively: true sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true show_ground_truth_first: true + show_instruction: true show_overlap_first: true - overlap_cohort_percentage: 100 + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: 0 + start_training_on_annotation_update: true task_data_login: user task_data_password: secret - control_weights: {} - parsed_label_config: '{"tag": {...}}' - evaluate_predictions_automatically: false - config_has_control_tags: true - skip_queue: REQUEUE_FOR_ME - reveal_preannotations_interactively: true - pinned_at: '2023-08-24T14:15:22Z' - finished_task_number: 10 - queue_total: 10 - queue_done: 100 - config_suitable_for_bulk_annotation: true + task_number: 100 + title: My project + total_annotations_number: 10 + total_predictions_number: 0 + useful_annotation_number: 10 audiences: - public delete: @@ -518,40 +583,62 @@ service: name: PatchedLseProjectUpdateRequest body: properties: - title: + annotation_limit_count: + type: optional + validation: + min: 1 + annotation_limit_percent: type: optional - docs: Project name. Must be between 3 and 50 characters long. validation: - minLength: 3 - maxLength: 50 + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_score: + type: optional + default: '95.00' + validation: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + annotator_evaluation_minimum_tasks: + type: optional + default: 10 + validation: + min: 0 + assignment_settings: optional + color: + type: optional + validation: + maxLength: 16 + comment_classification_config: optional + control_weights: optional + created_by: + type: optional + docs: Project owner + custom_script: optional + custom_task_lock_ttl: + type: optional + docs: TTL in seconds for task reservations, on new and existing tasks + validation: + min: 1 + max: 86400 description: type: optional docs: Project description - label_config: - type: optional - docs: Label config in XML format. See more about it in documentation + enable_empty_annotation: + type: optional + docs: Allow annotators to submit empty annotations + evaluate_predictions_automatically: + type: optional + docs: Retrieve and display predictions when loading a task expert_instruction: type: optional docs: Labeling instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the annotator before they start - show_skip_button: - type: optional - docs: >- - Show a skip button in interface and allow annotators to skip the - task - enable_empty_annotation: + is_draft: type: optional - docs: Allow annotators to submit empty annotations - show_annotation_history: + docs: Whether or not the project is in the middle of being created + is_published: type: optional - docs: Show annotation history to annotator - organization: optional - color: + docs: Whether or not the project is published to annotators + label_config: type: optional - validation: - maxLength: 16 + docs: Label config in XML format. See more about it in documentation maximum_annotations: type: optional docs: >- @@ -561,18 +648,6 @@ service: validation: min: -2147483648 max: 2147483647 - is_published: - type: optional - docs: Whether or not the project is published to annotators - model_version: - type: optional - docs: Machine learning model version - is_draft: - type: optional - docs: Whether or not the project is in the middle of being created - created_by: - type: optional - docs: Project owner min_annotations_to_start_training: type: optional docs: >- @@ -581,73 +656,63 @@ service: validation: min: -2147483648 max: 2147483647 - show_collab_predictions: - type: optional - docs: If set, the annotator can view model predictions - sampling: optional - show_ground_truth_first: optional - show_overlap_first: optional + model_version: + type: optional + docs: Machine learning model version + organization: optional overlap_cohort_percentage: type: optional validation: min: -2147483648 max: 2147483647 - task_data_login: - type: optional - docs: 'Task data credentials: login' - validation: - maxLength: 256 - task_data_password: - type: optional - docs: 'Task data credentials: password' - validation: - maxLength: 256 - control_weights: optional - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - skip_queue: optional - reveal_preannotations_interactively: + pause_on_failed_annotator_evaluation: type: optional - docs: Reveal pre-annotations interactively + default: false pinned_at: type: optional docs: Pinned date and time - workspace: optional - review_settings: optional - assignment_settings: optional - custom_script: optional - comment_classification_config: optional require_comment_on_skip: type: optional default: false - custom_task_lock_ttl: - type: optional - docs: TTL in seconds for task reservations, on new and existing tasks - validation: - min: 1 - max: 86400 - annotation_limit_count: - type: optional - validation: - min: 1 - annotation_limit_percent: + reveal_preannotations_interactively: + type: optional + docs: Reveal pre-annotations interactively + review_settings: optional + sampling: optional + show_annotation_history: + type: optional + docs: Show annotation history to annotator + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: >- + Show a skip button in interface and allow annotators to skip the + task + skip_queue: optional + task_data_login: type: optional + docs: 'Task data credentials: login' validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - pause_on_failed_annotator_evaluation: - type: optional - default: false - annotator_evaluation_minimum_score: + maxLength: 256 + task_data_password: type: optional - default: '95.00' + docs: 'Task data credentials: password' validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - annotator_evaluation_minimum_tasks: - type: optional - default: 10 + maxLength: 256 + title: + type: optional + docs: Project name. Must be between 3 and 50 characters long. validation: - min: 0 + minLength: 3 + maxLength: 50 + workspace: optional content-type: application/json response: docs: '' @@ -658,86 +723,86 @@ service: request: {} response: body: - id: 1 - title: title - description: description - label_config: label_config - expert_instruction: expert_instruction - show_instruction: true - show_skip_button: true - enable_empty_annotation: true - show_annotation_history: true - organization: 1 + annotation_limit_count: 1 + annotation_limit_percent: annotation_limit_percent + annotator_evaluation_minimum_score: annotator_evaluation_minimum_score + annotator_evaluation_minimum_tasks: 1 + assignment_settings: + id: 1 + label_stream_task_distribution: auto_distribution + project: 1 color: color - maximum_annotations: 1 - is_published: true - model_version: model_version - is_draft: true + comment_classification_config: comment_classification_config + config_has_control_tags: true + config_suitable_for_bulk_annotation: true + control_weights: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' + custom_script: custom_script + custom_task_lock_ttl: 1 + description: description + enable_empty_annotation: true + evaluate_predictions_automatically: true + expert_instruction: expert_instruction + finished_task_number: 1 + ground_truth_number: 1 + id: 1 + is_draft: true + is_published: true + label_config: label_config + maximum_annotations: 1 min_annotations_to_start_training: 1 - start_training_on_annotation_update: true - show_collab_predictions: true + model_version: model_version num_tasks_with_annotations: 1 - task_number: 1 - useful_annotation_number: 1 - ground_truth_number: 1 - skipped_annotations_number: 1 - total_annotations_number: 1 - total_predictions_number: 1 - sampling: Sequential sampling - show_ground_truth_first: true - show_overlap_first: true + organization: 1 overlap_cohort_percentage: 1 - task_data_login: task_data_login - task_data_password: task_data_password - control_weights: - key: value parsed_label_config: key: value - evaluate_predictions_automatically: true - config_has_control_tags: true - skip_queue: REQUEUE_FOR_ME - reveal_preannotations_interactively: true + pause_on_failed_annotator_evaluation: true pinned_at: '2024-01-15T09:30:00Z' - finished_task_number: 1 - queue_total: 1 + prompts: prompts queue_done: 1 - config_suitable_for_bulk_annotation: true - workspace: 1 + queue_total: 1 + require_comment_on_skip: true + reveal_preannotations_interactively: true review_settings: - id: 1 - requeue_rejected_tasks_to_annotator: true - review_criteria: all anonymize_annotations: true - only_finished_tasks: true + id: 1 instruction: instruction - show_instruction: true - show_data_manager_to_reviewers: true - show_agreement_to_reviewers: true - require_comment_on_reject: true + only_finished_tasks: true + project: 1 requeue_rejected_tasks_mode: requeue + requeue_rejected_tasks_to_annotator: true + require_comment_on_reject: true + review_criteria: all review_only_manual_assignments: true - project: 1 - assignment_settings: - id: 1 - label_stream_task_distribution: auto_distribution - project: 1 - custom_script: custom_script - comment_classification_config: comment_classification_config - require_comment_on_skip: true - custom_task_lock_ttl: 1 - prompts: prompts - annotation_limit_count: 1 - annotation_limit_percent: annotation_limit_percent - pause_on_failed_annotator_evaluation: true - annotator_evaluation_minimum_score: annotator_evaluation_minimum_score - annotator_evaluation_minimum_tasks: 1 + show_agreement_to_reviewers: true + show_data_manager_to_reviewers: true + show_instruction: true + sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: 1 + start_training_on_annotation_update: true + task_data_login: task_data_login + task_data_password: task_data_password + task_number: 1 + title: title + total_annotations_number: 1 + total_predictions_number: 1 + useful_annotation_number: 1 + workspace: 1 workspace_title: workspace_title audiences: - public @@ -755,6 +820,10 @@ service: name: ProjectDuplicateRequest body: properties: + description: + type: optional + docs: Description of duplicated project + default: '' mode: type: root.ModeEnum docs: >- @@ -765,19 +834,15 @@ service: * `settings` - Only settings * `settings,data` - Settings and tasks - workspace: - type: integer - docs: Workspace, where to place duplicated project title: type: string docs: Title of duplicated project validation: minLength: 3 maxLength: 50 - description: - type: optional - docs: Description of duplicated project - default: '' + workspace: + type: integer + docs: Workspace, where to place duplicated project content-type: application/json response: docs: Project duplicated @@ -787,8 +852,8 @@ service: id: 1 request: mode: settings - workspace: 1 title: title + workspace: 1 response: body: id: 1 @@ -891,17 +956,17 @@ service: request: [] response: body: - task_count: 1 annotation_count: 1 - predictions_count: 1 + could_be_tasks_list: true + data_columns: + - data_columns duration: 1.1 file_upload_ids: - 1 - could_be_tasks_list: true found_formats: - found_formats - data_columns: - - data_columns + predictions_count: 1 + task_count: 1 audiences: - public api_projects_members_retrieve: @@ -1009,13 +1074,13 @@ service: name: LseProjectParamsRequest body: properties: + annotator_params: optional use_kappa: type: optional docs: >- If categorical variables are used in labeling (e.g. choices), Cohen's Kappa statistic is computed to measure inter-rater reliability instead of basic agreement - annotator_params: optional content-type: application/json response: docs: Annotator weights created/updated @@ -1051,21 +1116,21 @@ service: reimport_pk: 1 response: body: - id: 1 - project: 1 - status: created - error: error - task_count: 1 annotation_count: 1 - prediction_count: 1 + data_columns: + key: value duration: 1 + error: error file_upload_ids: key: value files_as_tasks_list: true found_formats: key: value - data_columns: - key: value + id: 1 + prediction_count: 1 + project: 1 + status: created + task_count: 1 audiences: - internal api_projects_tasks_list: @@ -1108,41 +1173,41 @@ service: id: 1 response: body: - - id: 1 + - annotations: + - created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' + created_username: created_username + id: 1 + updated_at: '2024-01-15T09:30:00Z' + cancelled_annotations: 1 + comment_authors: + - 1 + comment_count: 1 + created_at: '2024-01-15T09:30:00Z' data: key: value + file_upload: 1 + id: 1 + inner_id: 1000000 + is_labeled: true + last_comment_updated_at: '2024-01-15T09:30:00Z' meta: key: value - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - is_labeled: true overlap: 1 - inner_id: 1000000 - total_annotations: 1 - cancelled_annotations: 1 - total_predictions: 1 - comment_count: 1 - unresolved_comment_count: 1 - last_comment_updated_at: '2024-01-15T09:30:00Z' - project: 1 - updated_by: 1 - file_upload: 1 - comment_authors: - - 1 - annotations: - - id: 1 - created_username: created_username - created_ago: created_ago - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' predictions: - - id: 1 + - created_ago: created_ago + created_at: '2024-01-15T09:30:00Z' + id: 1 result: - key: value - created_ago: created_ago - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' task: 1 + updated_at: '2024-01-15T09:30:00Z' + project: 1 + total_annotations: 1 + total_predictions: 1 + unresolved_comment_count: 1 + updated_at: '2024-01-15T09:30:00Z' + updated_by: 1 audiences: - internal validate_label_config: @@ -1227,70 +1292,5 @@ service: examples: - path-parameters: project_pk: 1 - api_projects_counts_list: - path: /api/projects/counts/ - method: GET - auth: true - docs: >- - Returns a list of projects with their counts. For example, task_number - which is the total task number in project - source: - openapi: openapi/openapi.yaml - display-name: List project's counts - request: - name: ApiProjectsCountsListRequest - query-parameters: - ordering: - type: optional - docs: Which field to use when ordering the results. - page: - type: optional - docs: A page number within the paginated result set. - page_size: - type: optional - docs: Number of results to return per page. - response: - docs: '' - type: root.PaginatedLseProjectCountsList - examples: - - response: - body: - count: 123 - next: http://api.example.org/accounts/?page=4 - previous: http://api.example.org/accounts/?page=2 - results: - - id: 1 - task_number: 1 - finished_task_number: 1 - total_predictions_number: 1 - total_annotations_number: total_annotations_number - num_tasks_with_annotations: num_tasks_with_annotations - useful_annotation_number: useful_annotation_number - ground_truth_number: 1 - skipped_annotations_number: skipped_annotations_number - rejected: rejected - queue_total: queue_total - queue_done: queue_done - queue_left: queue_left - reviewed_number: reviewed_number - review_total_tasks: review_total_tasks - api_projects_validate_create: - path: /api/projects/validate/ - method: POST - auth: true - docs: Validate an arbitrary labeling configuration. - source: - openapi: openapi/openapi.yaml - display-name: Validate label config - request: - body: root.ProjectLabelConfigRequest - content-type: application/json - errors: - - root.BadRequestError - examples: - - request: - label_config: label_config - audiences: - - internal source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/projects/exports.yml b/.mock/definition/projects/exports.yml index abdb63606..d611051ef 100644 --- a/.mock/definition/projects/exports.yml +++ b/.mock/definition/projects/exports.yml @@ -108,23 +108,23 @@ service: id: 1 response: body: - - title: title - id: 1 + - converted_formats: + - export_type: export_type + id: 1 + counters: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' finished_at: '2024-01-15T09:30:00Z' - status: created + id: 1 md5: md5 - counters: - key: value - converted_formats: - - id: 1 - export_type: export_type + status: created + title: title audiences: - public create: @@ -145,25 +145,25 @@ service: name: LseExportCreateRequest body: properties: - title: - type: optional - validation: - maxLength: 2048 + annotation_filter_options: optional + converted_formats: optional> + counters: optional created_by: optional finished_at: type: optional docs: Complete or fail time - status: optional md5: type: optional validation: minLength: 1 maxLength: 128 - counters: optional - converted_formats: optional> - task_filter_options: optional - annotation_filter_options: optional serialization_options: optional + status: optional + task_filter_options: optional + title: + type: optional + validation: + maxLength: 2048 content-type: application/json response: docs: '' @@ -174,46 +174,46 @@ service: request: {} response: body: - title: title - id: 1 + annotation_filter_options: + ground_truth: true + reviewed: only + skipped: true + usual: true + converted_formats: + - export_type: export_type + id: 1 + status: created + traceback: traceback + counters: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' finished_at: '2024-01-15T09:30:00Z' - status: created + id: 1 md5: md5 - counters: - key: value - converted_formats: - - id: 1 - status: created - export_type: export_type - traceback: traceback - task_filter_options: - view: 1 - skipped: only - finished: only - annotated: only - only_with_annotations: true - reviewed: only - annotation_filter_options: - usual: true - ground_truth: true - skipped: true - reviewed: only serialization_options: - drafts: + annotations__completed_by: only_id: true - predictions: + drafts: only_id: true include_annotation_history: true - annotations__completed_by: - only_id: true interpolate_key_frames: true + predictions: + only_id: true + status: created + task_filter_options: + annotated: only + finished: only + only_with_annotations: true + reviewed: only + skipped: only + view: 1 + title: title audiences: - public get: @@ -242,25 +242,25 @@ service: id: 1 response: body: - title: title - id: 1 + converted_formats: + - export_type: export_type + id: 1 + status: created + traceback: traceback + counters: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' finished_at: '2024-01-15T09:30:00Z' - status: created + id: 1 md5: md5 - counters: - key: value - converted_formats: - - id: 1 - status: created - export_type: export_type - traceback: traceback + status: created + title: title audiences: - public delete: @@ -303,14 +303,14 @@ service: name: ExportConvertRequest body: properties: + download_resources: + type: optional + docs: Download resources in converter. export_type: type: string docs: Export file format. validation: minLength: 1 - download_resources: - type: optional - docs: Download resources in converter. content-type: application/json response: docs: '' @@ -323,8 +323,8 @@ service: export_type: export_type response: body: - export_type: export_type converted_format: 1 + export_type: export_type audiences: - public download: @@ -368,7 +368,7 @@ imports: types: ExportsConvertResponse: properties: - export_type: optional converted_format: optional + export_type: optional source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/projects/labels.yml b/.mock/definition/projects/labels.yml index bd374937b..abce93f27 100644 --- a/.mock/definition/projects/labels.yml +++ b/.mock/definition/projects/labels.yml @@ -28,11 +28,11 @@ service: next: http://api.example.org/accounts/?page=4 previous: http://api.example.org/accounts/?page=2 results: - - id: 1 - annotations_count: 1 + - annotations_count: 1 from_name: from_name - project: 1 + id: 1 label: 1 + project: 1 audiences: - internal create: @@ -55,8 +55,8 @@ service: validation: minLength: 1 maxLength: 2048 - project: integer label: integer + project: integer content-type: application/json response: docs: '' @@ -64,15 +64,15 @@ service: examples: - request: from_name: from_name - project: 1 label: 1 + project: 1 response: body: - id: 1 annotations_count: 1 from_name: from_name - project: 1 + id: 1 label: 1 + project: 1 audiences: - internal get: @@ -93,11 +93,11 @@ service: id: id response: body: - id: 1 annotations_count: 1 from_name: from_name - project: 1 + id: 1 label: 1 + project: 1 audiences: - internal delete: @@ -143,8 +143,8 @@ service: validation: minLength: 1 maxLength: 2048 - project: optional label: optional + project: optional content-type: application/json response: docs: '' @@ -155,11 +155,11 @@ service: request: {} response: body: - id: 1 annotations_count: 1 from_name: from_name - project: 1 + id: 1 label: 1 + project: 1 audiences: - internal update_many: diff --git a/.mock/definition/projects/pauses.yml b/.mock/definition/projects/pauses.yml index 57ec0df8c..a5e2524c7 100644 --- a/.mock/definition/projects/pauses.yml +++ b/.mock/definition/projects/pauses.yml @@ -33,21 +33,21 @@ service: user_pk: 1 response: body: - - id: 1 - project: 1 - user: 1 + - created_at: '2024-01-15T09:30:00Z' + deleted_at: '2024-01-15T09:30:00Z' + deleted_by: 1 + id: 1 paused_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar + project: 1 reason: MANUAL - verbose_reason: verbose_reason - deleted_by: 1 - deleted_at: '2024-01-15T09:30:00Z' - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' + user: 1 + verbose_reason: verbose_reason audiences: - public create: @@ -75,21 +75,21 @@ service: reason: MANUAL response: body: + created_at: '2024-01-15T09:30:00Z' + deleted_at: '2024-01-15T09:30:00Z' + deleted_by: 1 id: 1 - project: 1 - user: 1 paused_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar + project: 1 reason: MANUAL - verbose_reason: verbose_reason - deleted_by: 1 - deleted_at: '2024-01-15T09:30:00Z' - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' + user: 1 + verbose_reason: verbose_reason audiences: - public get: @@ -114,21 +114,21 @@ service: user_pk: 1 response: body: + created_at: '2024-01-15T09:30:00Z' + deleted_at: '2024-01-15T09:30:00Z' + deleted_by: 1 id: 1 - project: 1 - user: 1 paused_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar + project: 1 reason: MANUAL - verbose_reason: verbose_reason - deleted_by: 1 - deleted_at: '2024-01-15T09:30:00Z' - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' + user: 1 + verbose_reason: verbose_reason audiences: - public delete: @@ -193,21 +193,21 @@ service: request: {} response: body: + created_at: '2024-01-15T09:30:00Z' + deleted_at: '2024-01-15T09:30:00Z' + deleted_by: 1 id: 1 - project: 1 - user: 1 paused_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar + project: 1 reason: MANUAL - verbose_reason: verbose_reason - deleted_by: 1 - deleted_at: '2024-01-15T09:30:00Z' - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' + user: 1 + verbose_reason: verbose_reason audiences: - public source: diff --git a/.mock/definition/projects/stats.yml b/.mock/definition/projects/stats.yml index 049bec559..6861e6353 100644 --- a/.mock/definition/projects/stats.yml +++ b/.mock/definition/projects/stats.yml @@ -12,18 +12,6 @@ types: source: openapi: openapi/openapi.yaml inline: true - StatsIaaResponseStd: - discriminated: false - docs: >- - Standard deviation - number when per_label=false, object with label keys - when per_label=true - union: - - double - - type: map - docs: Standard deviation per label when per_label=true - source: - openapi: openapi/openapi.yaml - inline: true StatsIaaResponseCommonTasks: discriminated: false docs: >- @@ -39,6 +27,18 @@ types: source: openapi: openapi/openapi.yaml inline: true + StatsIaaResponseStd: + discriminated: false + docs: >- + Standard deviation - number when per_label=false, object with label keys + when per_label=true + union: + - double + - type: map + docs: Standard deviation per label when per_label=true + source: + openapi: openapi/openapi.yaml + inline: true StatsIaaResponse: properties: IAA: @@ -46,19 +46,19 @@ types: docs: >- Inter-Annotator Agreement matrix - 2D array when per_label=false, object with label keys when per_label=true - users: - type: optional>> - docs: List of users in the matrix - std: - type: optional - docs: >- - Standard deviation - number when per_label=false, object with label - keys when per_label=true common_tasks: type: optional docs: >- Common tasks matrix - 2D array when per_label=false, object with label keys when per_label=true + std: + type: optional + docs: >- + Standard deviation - number when per_label=false, object with label + keys when per_label=true + users: + type: optional>> + docs: List of users in the matrix source: openapi: openapi/openapi.yaml service: @@ -108,17 +108,17 @@ service: - 0.5 - - 0.5 - 1 - users: - - id: 1 - email: user1@example.com - - id: 2 - email: user2@example.com - std: 1.1 common_tasks: - - 0 - 1 - - 1 - 0 + std: 1.1 + users: + - email: user1@example.com + id: 1 + - email: user2@example.com + id: 2 - name: Inter-Annotator Agreement Matrix (per_label=true) path-parameters: id: 1 @@ -135,14 +135,6 @@ service: - 0.5 - - 0.5 - 1.1 - users: - - id: 1 - email: user1@example.com - - id: 2 - email: user2@example.com - std: - neg: 0.1 - pos: 0.2 common_tasks: neg: - - 0 @@ -154,6 +146,14 @@ service: - 4 - - 4 - 0 + std: + neg: 0.1 + pos: 0.2 + users: + - email: user1@example.com + id: 1 + - email: user2@example.com + id: 2 audiences: - public source: diff --git a/.mock/definition/prompts.yml b/.mock/definition/prompts.yml index 7bbcddeea..3a1b65c84 100644 --- a/.mock/definition/prompts.yml +++ b/.mock/definition/prompts.yml @@ -22,12 +22,12 @@ service: no effect) body: properties: + failed_predictions: list job_id: type: optional validation: minLength: 1 maxLength: 255 - failed_predictions: list modelrun_id: integer content-type: application/json response: @@ -39,9 +39,9 @@ service: modelrun_id: 1 response: body: - job_id: job_id failed_predictions: - key: value + job_id: job_id audiences: - public batch_predictions: @@ -67,16 +67,16 @@ service: validation: minLength: 1 maxLength: 255 - results: list modelrun_id: integer + results: list content-type: application/json response: docs: '' type: root.BatchPredictions examples: - request: - results: [] modelrun_id: 1 + results: [] response: body: job_id: job_id @@ -104,25 +104,25 @@ service: examples: - response: body: - - id: 1 + - associated_projects: + - id: 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - skill_name: TextClassification - associated_projects: - - id: 1 - title: title description: description - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + id: 1 input_fields: key: value + organization: 1 output_classes: key: value - organization: 1 + skill_name: TextClassification + title: title + updated_at: '2024-01-15T09:30:00Z' audiences: - public create: @@ -144,25 +144,144 @@ service: title: title response: body: - id: 1 + associated_projects: + - 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - skill_name: TextClassification - title: title description: description - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + id: 1 input_fields: key: value + organization: 1 output_classes: key: value - organization: 1 - associated_projects: - - 1 + skill_name: TextClassification + title: title + updated_at: '2024-01-15T09:30:00Z' + audiences: + - public + compatible_projects: + path: /api/prompts/compatible-projects + method: GET + auth: true + docs: Retrieve a list of compatible project for prompt. + source: + openapi: openapi/openapi.yaml + display-name: List projects compatible with prompt + request: + name: PromptsCompatibleProjectsRequest + query-parameters: + ordering: + type: optional + docs: Which field to use when ordering the results. + page: + type: optional + docs: A page number within the paginated result set. + page_size: + type: optional + docs: Number of results to return per page. + project_type: + type: optional + default: TextClassification + docs: Skill to filter by + response: + docs: '' + type: root.PaginatedAllRolesProjectListList + examples: + - response: + body: + count: 123 + next: http://api.example.org/accounts/?page=4 + previous: http://api.example.org/accounts/?page=2 + results: + - allow_stream: allow_stream + annotation_limit_count: 1 + annotation_limit_percent: annotation_limit_percent + annotator_evaluation_minimum_score: annotator_evaluation_minimum_score + annotator_evaluation_minimum_tasks: 1 + assignment_settings: + id: 1 + blueprints: + - created_at: '2024-01-15T09:30:00Z' + id: 1 + share_id: share_id + short_url: short_url + color: color + comment_classification_config: comment_classification_config + config_has_control_tags: true + config_suitable_for_bulk_annotation: true + control_weights: + key: value + created_at: '2024-01-15T09:30:00Z' + created_by: + avatar: avatar + id: 1 + custom_script: custom_script + custom_task_lock_ttl: 1 + data_types: + key: value + description: description + description_short: description_short + duplication_done: true + duplication_status: duplication_status + enable_empty_annotation: true + evaluate_predictions_automatically: true + expert_instruction: expert_instruction + finished_task_number: 1 + ground_truth_number: 1 + has_blueprints: has_blueprints + id: 1 + is_draft: true + is_published: true + label_config: label_config + maximum_annotations: 1 + members: members + members_count: 1 + min_annotations_to_start_training: 1 + model_version: model_version + num_tasks_with_annotations: num_tasks_with_annotations + organization: 1 + overlap_cohort_percentage: 1 + parsed_label_config: + key: value + pause_on_failed_annotator_evaluation: true + pinned_at: '2024-01-15T09:30:00Z' + prompts: prompts + queue_done: queue_done + queue_left: queue_left + queue_total: queue_total + ready: ready + rejected: rejected + require_comment_on_skip: true + reveal_preannotations_interactively: true + review_settings: + id: 1 + requeue_rejected_tasks_to_annotator: true + review_total_tasks: review_total_tasks + reviewed_number: reviewed_number + reviewer_queue_total: reviewer_queue_total + sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: skipped_annotations_number + start_training_on_annotation_update: true + task_number: 1 + title: title + total_annotations_number: total_annotations_number + total_predictions_number: 1 + useful_annotation_number: useful_annotation_number + workspace: workspace + workspace_title: workspace_title audiences: - public get: @@ -183,26 +302,26 @@ service: id: id response: body: - id: 1 - created_by: - id: 1 - first_name: first_name - last_name: last_name - email: email - avatar: avatar - skill_name: TextClassification associated_projects: - id: 1 title: title - title: title - description: description created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + created_by: + avatar: avatar + email: email + first_name: first_name + id: 1 + last_name: last_name + description: description + id: 1 input_fields: key: value + organization: 1 output_classes: key: value - organization: 1 + skill_name: TextClassification + title: title + updated_at: '2024-01-15T09:30:00Z' audiences: - public api_prompts_update: @@ -228,25 +347,25 @@ service: title: title response: body: - id: 1 + associated_projects: + - 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - skill_name: TextClassification - title: title description: description - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + id: 1 input_fields: key: value + organization: 1 output_classes: key: value - organization: 1 - associated_projects: - - 1 + skill_name: TextClassification + title: title + updated_at: '2024-01-15T09:30:00Z' audiences: - internal delete: @@ -278,9 +397,16 @@ service: name: PatchedModelInterfaceRequest body: properties: + associated_projects: optional> created_by: type: optional docs: User who created Dataset + description: + type: optional + docs: Model description + input_fields: optional + organization: optional + output_classes: optional skill_name: optional title: type: optional @@ -288,13 +414,6 @@ service: validation: minLength: 1 maxLength: 500 - description: - type: optional - docs: Model description - input_fields: optional - output_classes: optional - organization: optional - associated_projects: optional> content-type: application/json response: docs: '' @@ -305,25 +424,25 @@ service: request: {} response: body: - id: 1 + associated_projects: + - 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - skill_name: TextClassification - title: title description: description - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' + id: 1 input_fields: key: value + organization: 1 output_classes: key: value - organization: 1 - associated_projects: - - 1 + skill_name: TextClassification + title: title + updated_at: '2024-01-15T09:30:00Z' audiences: - public api_prompts_versions_update: @@ -348,28 +467,28 @@ service: prompt_id: 1 version_id: 1 request: - title: title prompt: prompt provider_model_id: provider_model_id + title: title response: body: - id: 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - score: score + id: 1 + model_provider_connection: 1 + organization: 1 parent_model: 1 - title: title prompt: prompt provider: OpenAI provider_model_id: provider_model_id - created_at: '2024-01-15T09:30:00Z' + score: score + title: title updated_at: '2024-01-15T09:30:00Z' - model_provider_connection: 1 - organization: 1 audiences: - internal api_prompts_versions_inference_runs_cancel_create: @@ -390,125 +509,6 @@ service: inference_run_id: 1 prompt_id: 1 version_id: 1 - compatible_projects: - path: /api/prompts/compatible-projects - method: GET - auth: true - docs: Retrieve a list of compatible project for prompt. - source: - openapi: openapi/openapi.yaml - display-name: List projects compatible with prompt - request: - name: PromptsCompatibleProjectsRequest - query-parameters: - ordering: - type: optional - docs: Which field to use when ordering the results. - page: - type: optional - docs: A page number within the paginated result set. - page_size: - type: optional - docs: Number of results to return per page. - project_type: - type: optional - default: TextClassification - docs: Skill to filter by - response: - docs: '' - type: root.PaginatedAllRolesProjectListList - examples: - - response: - body: - count: 123 - next: http://api.example.org/accounts/?page=4 - previous: http://api.example.org/accounts/?page=2 - results: - - control_weights: - key: value - start_training_on_annotation_update: true - id: 1 - ground_truth_number: 1 - config_has_control_tags: true - annotation_limit_percent: annotation_limit_percent - duplication_done: true - finished_task_number: 1 - members: members - total_annotations_number: total_annotations_number - members_count: 1 - enable_empty_annotation: true - config_suitable_for_bulk_annotation: true - task_number: 1 - workspace_title: workspace_title - total_predictions_number: 1 - is_published: true - is_draft: true - description: description - rejected: rejected - custom_script: custom_script - workspace: workspace - show_ground_truth_first: true - expert_instruction: expert_instruction - allow_stream: allow_stream - reviewer_queue_total: reviewer_queue_total - created_at: '2024-01-15T09:30:00Z' - annotator_evaluation_minimum_tasks: 1 - review_total_tasks: review_total_tasks - min_annotations_to_start_training: 1 - label_config: label_config - created_by: - id: 1 - avatar: avatar - maximum_annotations: 1 - evaluate_predictions_automatically: true - annotator_evaluation_minimum_score: annotator_evaluation_minimum_score - model_version: model_version - useful_annotation_number: useful_annotation_number - has_blueprints: has_blueprints - pause_on_failed_annotator_evaluation: true - show_instruction: true - queue_left: queue_left - custom_task_lock_ttl: 1 - pinned_at: '2024-01-15T09:30:00Z' - ready: ready - description_short: description_short - show_overlap_first: true - reveal_preannotations_interactively: true - comment_classification_config: comment_classification_config - show_skip_button: true - data_types: - key: value - organization: 1 - show_collab_predictions: true - reviewed_number: reviewed_number - prompts: prompts - overlap_cohort_percentage: 1 - duplication_status: duplication_status - skipped_annotations_number: skipped_annotations_number - blueprints: - - id: 1 - share_id: share_id - short_url: short_url - created_at: '2024-01-15T09:30:00Z' - sampling: Sequential sampling - color: color - title: title - skip_queue: REQUEUE_FOR_ME - review_settings: - id: 1 - requeue_rejected_tasks_to_annotator: true - num_tasks_with_annotations: num_tasks_with_annotations - assignment_settings: - id: 1 - require_comment_on_skip: true - annotation_limit_count: 1 - queue_done: queue_done - show_annotation_history: true - queue_total: queue_total - parsed_label_config: - key: value - audiences: - - public source: openapi: openapi/openapi.yaml types: diff --git a/.mock/definition/prompts/runs.yml b/.mock/definition/prompts/runs.yml index 76320ba23..26679188a 100644 --- a/.mock/definition/prompts/runs.yml +++ b/.mock/definition/prompts/runs.yml @@ -50,21 +50,21 @@ service: version_id: 1 response: body: - - id: 1 + - completed_at: '2024-01-15T09:30:00Z' + created_at: '2024-01-15T09:30:00Z' + created_by: 1 + id: 1 + job_id: job_id + organization: 1 parent_model: 1 + predictions_updated_at: '2024-01-15T09:30:00Z' + project: 1 project_subset: All status: Pending - job_id: job_id - total_predictions: 1 total_correct_predictions: 1 + total_predictions: 1 total_tasks: 1 - created_at: '2024-01-15T09:30:00Z' triggered_at: '2024-01-15T09:30:00Z' - predictions_updated_at: '2024-01-15T09:30:00Z' - completed_at: '2024-01-15T09:30:00Z' - organization: 1 - project: 1 - created_by: 1 audiences: - public create: @@ -82,18 +82,21 @@ service: name: ModelRunRequest body: properties: - project_subset: optional job_id: type: optional docs: Job ID for inference job for a ModelRun e.g. Adala job ID validation: maxLength: 255 - total_predictions: + organization: optional + predictions_updated_at: optional + project: integer + project_subset: optional + total_correct_predictions: type: optional validation: min: -2147483648 max: 2147483647 - total_correct_predictions: + total_predictions: type: optional validation: min: -2147483648 @@ -103,9 +106,6 @@ service: validation: min: -2147483648 max: 2147483647 - predictions_updated_at: optional - organization: optional - project: integer content-type: application/json response: docs: '' @@ -118,21 +118,21 @@ service: project: 1 response: body: + completed_at: '2024-01-15T09:30:00Z' + created_at: '2024-01-15T09:30:00Z' + created_by: 1 id: 1 + job_id: job_id + organization: 1 parent_model: 1 + predictions_updated_at: '2024-01-15T09:30:00Z' + project: 1 project_subset: All status: Pending - job_id: job_id - total_predictions: 1 total_correct_predictions: 1 + total_predictions: 1 total_tasks: 1 - created_at: '2024-01-15T09:30:00Z' triggered_at: '2024-01-15T09:30:00Z' - predictions_updated_at: '2024-01-15T09:30:00Z' - completed_at: '2024-01-15T09:30:00Z' - organization: 1 - project: 1 - created_by: 1 audiences: - public source: diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml index 90fa18a02..da6eafc7e 100644 --- a/.mock/definition/prompts/versions.yml +++ b/.mock/definition/prompts/versions.yml @@ -48,23 +48,23 @@ service: prompt_id: 1 response: body: - - id: 1 + - created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - score: score + id: 1 + model_provider_connection: 1 + organization: 1 parent_model: 1 - title: title prompt: prompt provider: OpenAI provider_model_id: provider_model_id - created_at: '2024-01-15T09:30:00Z' + score: score + title: title updated_at: '2024-01-15T09:30:00Z' - model_provider_connection: 1 - organization: 1 audiences: - public create: @@ -87,28 +87,28 @@ service: - path-parameters: prompt_id: 1 request: - title: title prompt: prompt provider_model_id: provider_model_id + title: title response: body: - id: 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - score: score + id: 1 + model_provider_connection: 1 + organization: 1 parent_model: 1 - title: title prompt: prompt provider: OpenAI provider_model_id: provider_model_id - created_at: '2024-01-15T09:30:00Z' + score: score + title: title updated_at: '2024-01-15T09:30:00Z' - model_provider_connection: 1 - organization: 1 audiences: - public get: @@ -131,23 +131,23 @@ service: version_id: 1 response: body: - id: 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - score: score + id: 1 + model_provider_connection: 1 + organization: 1 parent_model: 1 - title: title prompt: prompt provider: OpenAI provider_model_id: provider_model_id - created_at: '2024-01-15T09:30:00Z' + score: score + title: title updated_at: '2024-01-15T09:30:00Z' - model_provider_connection: 1 - organization: 1 audiences: - public delete: @@ -182,15 +182,11 @@ service: name: PatchedThirdPartyModelVersionRequest body: properties: + model_provider_connection: optional + organization: optional parent_model: type: optional docs: Parent model interface ID - title: - type: optional - docs: Model name - validation: - minLength: 1 - maxLength: 500 prompt: type: optional docs: Prompt to execute @@ -214,8 +210,12 @@ service: validation: minLength: 1 maxLength: 255 - model_provider_connection: optional - organization: optional + title: + type: optional + docs: Model name + validation: + minLength: 1 + maxLength: 500 content-type: application/json response: docs: '' @@ -227,23 +227,23 @@ service: request: {} response: body: - id: 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - score: score + id: 1 + model_provider_connection: 1 + organization: 1 parent_model: 1 - title: title prompt: prompt provider: OpenAI provider_model_id: provider_model_id - created_at: '2024-01-15T09:30:00Z' + score: score + title: title updated_at: '2024-01-15T09:30:00Z' - model_provider_connection: 1 - organization: 1 audiences: - public cost_estimate: @@ -270,12 +270,12 @@ service: version_id: 1 response: body: - prompt_cost_usd: prompt_cost_usd completion_cost_usd: completion_cost_usd - total_cost_usd: total_cost_usd - is_error: true - error_type: error_type error_message: error_message + error_type: error_type + is_error: true + prompt_cost_usd: prompt_cost_usd + total_cost_usd: total_cost_usd audiences: - public get_refined_prompt: @@ -306,30 +306,30 @@ service: version_id: 1 response: body: - title: title - reasoning: reasoning - prompt: prompt - refinement_job_id: refinement_job_id - refinement_status: refinement_status - total_cost: total_cost previous_version: - id: 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - score: score + id: 1 + model_provider_connection: 1 + organization: 1 parent_model: 1 - title: title prompt: prompt provider: OpenAI provider_model_id: provider_model_id - created_at: '2024-01-15T09:30:00Z' + score: score + title: title updated_at: '2024-01-15T09:30:00Z' - model_provider_connection: 1 - organization: 1 + prompt: prompt + reasoning: reasoning + refinement_job_id: refinement_job_id + refinement_status: refinement_status + title: title + total_cost: total_cost audiences: - public refine_prompt: @@ -353,17 +353,17 @@ service: docs: Whether to run the refinement asynchronously body: properties: - teacher_model_provider_connection_id: + project_id: type: integer - docs: Model Provider Connection ID to use to refine the prompt + docs: Project ID to target the refined prompt for teacher_model_name: type: string docs: Name of the model to use to refine the prompt validation: minLength: 1 - project_id: + teacher_model_provider_connection_id: type: integer - docs: Project ID to target the refined prompt for + docs: Model Provider Connection ID to use to refine the prompt content-type: application/json response: docs: Refined prompt response @@ -373,35 +373,35 @@ service: prompt_id: 1 version_id: 1 request: - teacher_model_provider_connection_id: 1 - teacher_model_name: teacher_model_name project_id: 1 + teacher_model_name: teacher_model_name + teacher_model_provider_connection_id: 1 response: body: - title: title - reasoning: reasoning - prompt: prompt - refinement_job_id: refinement_job_id - refinement_status: refinement_status - total_cost: total_cost previous_version: - id: 1 + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - score: score + id: 1 + model_provider_connection: 1 + organization: 1 parent_model: 1 - title: title prompt: prompt provider: OpenAI provider_model_id: provider_model_id - created_at: '2024-01-15T09:30:00Z' + score: score + title: title updated_at: '2024-01-15T09:30:00Z' - model_provider_connection: 1 - organization: 1 + prompt: prompt + reasoning: reasoning + refinement_job_id: refinement_job_id + refinement_status: refinement_status + title: title + total_cost: total_cost audiences: - public source: diff --git a/.mock/definition/sessionPolicy.yml b/.mock/definition/sessionPolicy.yml index d613c1188..194c21ab7 100644 --- a/.mock/definition/sessionPolicy.yml +++ b/.mock/definition/sessionPolicy.yml @@ -18,9 +18,9 @@ service: examples: - response: body: + created_at: '2024-01-15T09:30:00Z' max_session_age: 1 max_time_between_activity: 1 - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' api_session_policy_partial_update: path: /api/session-policy/ @@ -58,9 +58,9 @@ service: - request: {} response: body: + created_at: '2024-01-15T09:30:00Z' max_session_age: 1 max_time_between_activity: 1 - created_at: '2024-01-15T09:30:00Z' updated_at: '2024-01-15T09:30:00Z' source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/sso.yml b/.mock/definition/sso.yml index 08bbd507f..8bfef9bfa 100644 --- a/.mock/definition/sso.yml +++ b/.mock/definition/sso.yml @@ -18,11 +18,11 @@ service: examples: - response: body: - workspaces_groups: + projects_groups: key: value roles_groups: key: value - projects_groups: + workspaces_groups: key: value api_saml_settings_create: path: /api/saml/settings @@ -36,9 +36,9 @@ service: name: SamlSettingsUpdateRequest body: properties: - workspaces_groups: optional>> - roles_groups: optional>> projects_groups: optional> + roles_groups: optional>> + workspaces_groups: optional>> content-type: application/json response: docs: '' @@ -47,14 +47,14 @@ service: - request: {} response: body: - workspaces_groups: - - - workspaces_groups - roles_groups: - - - roles_groups projects_groups: - - project_id: 1 - group: group + - group: group + project_id: 1 role: Inherit + roles_groups: + - - roles_groups + workspaces_groups: + - - workspaces_groups api_scim_settings_retrieve: path: /api/scim/settings method: GET @@ -69,11 +69,11 @@ service: examples: - response: body: - workspaces_groups: + projects_groups: key: value roles_groups: key: value - projects_groups: + workspaces_groups: key: value api_scim_settings_create: path: /api/scim/settings @@ -87,9 +87,9 @@ service: name: ScimSettingsUpdateRequest body: properties: - workspaces_groups: optional>> - roles_groups: optional>> projects_groups: optional> + roles_groups: optional>> + workspaces_groups: optional>> content-type: application/json response: docs: '' @@ -98,13 +98,13 @@ service: - request: {} response: body: - workspaces_groups: - - - workspaces_groups - roles_groups: - - - roles_groups projects_groups: - - project_id: 1 - group: group + - group: group + project_id: 1 role: Inherit + roles_groups: + - - roles_groups + workspaces_groups: + - - workspaces_groups source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/storageAzureSpi.yml b/.mock/definition/storageAzureSpi.yml index d8e911f69..452cda177 100644 --- a/.mock/definition/storageAzureSpi.yml +++ b/.mock/definition/storageAzureSpi.yml @@ -26,31 +26,31 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - presign: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name - container: container - tenant_id: tenant_id + - account_name: account_name client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_azure_spi_create: path: /api/storages/azure_spi/ method: POST @@ -70,31 +70,77 @@ service: project: 1 response: body: + account_name: account_name + client_id: client_id + client_secret: client_secret + container: container + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true - presign: true + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value prefix: prefix + presign: true + presign_ttl: 1 + project: 1 regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type use_blob_urls: true + user_delegation_key: user_delegation_key + api_storages_azure_spi_validate_create: + path: /api/storages/azure_spi/validate + method: POST + auth: true + docs: >- + Validate a specific Azure import storage connection that was set up with + Service Principal authentication. + source: + openapi: openapi/openapi.yaml + display-name: Validate Azure SPI import storage + request: + body: root.AzureServicePrincipalImportStorageRequest + content-type: application/json + response: + docs: '' + type: root.AzureServicePrincipalImportStorage + examples: + - request: + project: 1 + response: + body: account_name: account_name - container: container - tenant_id: tenant_id client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_azure_spi_retrieve: path: /api/storages/azure_spi/{id} method: GET @@ -115,31 +161,31 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true account_name: account_name - container: container - tenant_id: tenant_id client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_azure_spi_destroy: path: /api/storages/azure_spi/{id} method: DELETE @@ -171,39 +217,21 @@ service: name: PatchedAzureServicePrincipalImportStorageRequest body: properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true - prefix: - type: optional - docs: Azure blob prefix name - regex_filter: - type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs account_name: type: optional docs: Azure Blob account name - container: - type: optional - docs: Azure blob container - tenant_id: - type: optional - docs: Azure Tenant ID client_id: type: optional docs: Azure Blob Service Principal Client ID client_secret: type: optional docs: Azure Blob Service Principal Client Secret - user_delegation_key: + container: type: optional - docs: User Delegation Key (Backend) + docs: Azure blob container + description: + type: optional + docs: Cloud storage description last_sync: type: optional docs: Last sync finished time @@ -218,19 +246,13 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: Azure blob prefix name + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -240,6 +262,30 @@ service: project: type: optional docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true + tenant_id: + type: optional + docs: Azure Tenant ID + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs + user_delegation_key: + type: optional + docs: User Delegation Key (Backend) content-type: application/json response: docs: '' @@ -250,31 +296,31 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true account_name: account_name - container: container - tenant_id: tenant_id client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_azure_spi_sync_create: path: /api/storages/azure_spi/{id}/sync method: POST @@ -300,77 +346,31 @@ service: project: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true account_name: account_name - container: container - tenant_id: tenant_id client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 - api_storages_azure_spi_validate_create: - path: /api/storages/azure_spi/validate - method: POST - auth: true - docs: >- - Validate a specific Azure import storage connection that was set up with - Service Principal authentication. - source: - openapi: openapi/openapi.yaml - display-name: Validate Azure SPI import storage - request: - body: root.AzureServicePrincipalImportStorageRequest - content-type: application/json - response: - docs: '' - type: root.AzureServicePrincipalImportStorage - examples: - - request: - project: 1 - response: - body: - id: 1 - type: type - synchronizable: true - presign: true - prefix: prefix regex_filter: regex_filter - use_blob_urls: true - account_name: account_name - container: container - tenant_id: tenant_id - client_id: client_id - client_secret: client_secret - user_delegation_key: user_delegation_key - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job status: initialized - traceback: traceback - meta: - key: value + synchronizable: true + tenant_id: tenant_id title: title - description: description - created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 - project: 1 + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_export_azure_spi_list: path: /api/storages/export/azure_spi method: GET @@ -393,30 +393,30 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - account_name: account_name - container: container - tenant_id: tenant_id + - account_name: account_name + can_delete_objects: true client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_export_azure_spi_create: path: /api/storages/export/azure_spi method: POST @@ -438,30 +438,75 @@ service: project: 1 response: body: + account_name: account_name + can_delete_objects: true + client_id: client_id + client_secret: client_secret + container: container + created_at: '2024-01-15T09:30:00Z' + description: description id: 1 - type: type - synchronizable: true + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value prefix: prefix + project: 1 regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type use_blob_urls: true + user_delegation_key: user_delegation_key + api_storages_export_azure_spi_validate_create: + path: /api/storages/export/azure_spi/validate + method: POST + auth: true + docs: >- + Validate a specific Azure export storage connection that was set up with + Service Principal authentication. + source: + openapi: openapi/openapi.yaml + display-name: Validate Azure SPI export storage + request: + body: root.AzureServicePrincipalExportStorageRequest + content-type: application/json + response: + docs: '' + type: root.AzureServicePrincipalExportStorage + examples: + - request: + project: 1 + response: + body: account_name: account_name - container: container - tenant_id: tenant_id + can_delete_objects: true client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_export_azure_spi_retrieve: path: /api/storages/export/azure_spi/{id} method: GET @@ -482,30 +527,30 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true account_name: account_name - container: container - tenant_id: tenant_id + can_delete_objects: true client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_export_azure_spi_destroy: path: /api/storages/export/azure_spi/{id} method: DELETE @@ -537,36 +582,24 @@ service: name: PatchedAzureServicePrincipalExportStorageRequest body: properties: - synchronizable: - type: optional - default: true - prefix: - type: optional - docs: Azure blob prefix name - regex_filter: - type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs account_name: type: optional docs: Azure Blob account name - container: - type: optional - docs: Azure blob container - tenant_id: - type: optional - docs: Azure Tenant ID + can_delete_objects: + type: optional + docs: Deletion from storage enabled client_id: type: optional docs: Azure Blob Service Principal Client ID client_secret: type: optional docs: Azure Blob Service Principal Client Secret - user_delegation_key: + container: type: optional - docs: User Delegation Key (Backend) + docs: Azure blob container + description: + type: optional + docs: Cloud storage description last_sync: type: optional docs: Last sync finished time @@ -581,25 +614,37 @@ service: docs: Last sync job ID validation: maxLength: 256 + meta: optional + prefix: + type: optional + docs: Azure blob prefix name + project: + type: optional + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects status: optional - traceback: + synchronizable: + type: optional + default: true + tenant_id: type: optional - docs: Traceback report for the last failed sync - meta: optional + docs: Azure Tenant ID title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description - can_delete_objects: + docs: Traceback report for the last failed sync + use_blob_urls: type: optional - docs: Deletion from storage enabled - project: - type: optional - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs + user_delegation_key: + type: optional + docs: User Delegation Key (Backend) content-type: application/json response: docs: '' @@ -610,30 +655,30 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true account_name: account_name - container: container - tenant_id: tenant_id + can_delete_objects: true client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + tenant_id: tenant_id + title: title + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key api_storages_export_azure_spi_sync_create: path: /api/storages/export/azure_spi/{id}/sync method: POST @@ -657,74 +702,29 @@ service: project: 1 response: body: - id: 1 - type: type - synchronizable: true - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true account_name: account_name - container: container - tenant_id: tenant_id + can_delete_objects: true client_id: client_id client_secret: client_secret - user_delegation_key: user_delegation_key + container: container + created_at: '2024-01-15T09:30:00Z' + description: description + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - project: 1 - api_storages_export_azure_spi_validate_create: - path: /api/storages/export/azure_spi/validate - method: POST - auth: true - docs: >- - Validate a specific Azure export storage connection that was set up with - Service Principal authentication. - source: - openapi: openapi/openapi.yaml - display-name: Validate Azure SPI export storage - request: - body: root.AzureServicePrincipalExportStorageRequest - content-type: application/json - response: - docs: '' - type: root.AzureServicePrincipalExportStorage - examples: - - request: - project: 1 - response: - body: - id: 1 - type: type - synchronizable: true prefix: prefix + project: 1 regex_filter: regex_filter - use_blob_urls: true - account_name: account_name - container: container - tenant_id: tenant_id - client_id: client_id - client_secret: client_secret - user_delegation_key: user_delegation_key - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job status: initialized - traceback: traceback - meta: - key: value + synchronizable: true + tenant_id: tenant_id title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - project: 1 + traceback: traceback + type: type + use_blob_urls: true + user_delegation_key: user_delegation_key source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/storageGcsWif.yml b/.mock/definition/storageGcsWif.yml index 673c40196..4505b555e 100644 --- a/.mock/definition/storageGcsWif.yml +++ b/.mock/definition/storageGcsWif.yml @@ -26,31 +26,31 @@ service: examples: - response: body: - - id: 1 - type: type - synchronizable: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_export_gcswif_create: path: /api/storages/export/gcswif method: POST @@ -72,31 +72,77 @@ service: project: 1 response: body: - id: 1 - type: type - synchronizable: true bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description + google_application_credentials: google_application_credentials + google_project_id: google_project_id + google_project_number: google_project_number + google_service_account_email: google_service_account_email + google_wif_pool_id: google_wif_pool_id + google_wif_provider_id: google_wif_provider_id + id: 1 + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value prefix: prefix + project: 1 regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type use_blob_urls: true + api_storages_export_gcswif_validate_create: + path: /api/storages/export/gcswif/validate + method: POST + auth: true + docs: >- + Validate a specific GCS export storage connection that was set up with + WIF authentication. + source: + openapi: openapi/openapi.yaml + display-name: Validate GCS WIF export storage + request: + body: root.GcswifExportStorageRequest + content-type: application/json + response: + docs: '' + type: root.GcswifExportStorage + examples: + - request: + project: 1 + response: + body: + bucket: bucket + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_export_gcswif_retrieve: path: /api/storages/export/gcswif/{id} method: GET @@ -117,31 +163,31 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_export_gcswif_destroy: path: /api/storages/export/gcswif/{id} method: DELETE @@ -173,21 +219,15 @@ service: name: PatchedGcswifExportStorageRequest body: properties: - synchronizable: - type: optional - default: true bucket: type: optional docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - regex_filter: - type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: + can_delete_objects: type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Deletion from storage enabled + description: + type: optional + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -197,15 +237,15 @@ service: google_project_number: type: optional docs: Google project number + google_service_account_email: + type: optional + docs: Google service account email google_wif_pool_id: type: optional docs: Google WIF pool ID google_wif_provider_id: type: optional docs: Google WIF provider ID - google_service_account_email: - type: optional - docs: Google service account email last_sync: type: optional docs: Last sync finished time @@ -220,25 +260,31 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional + prefix: + type: optional + docs: GCS bucket prefix + project: + type: optional + docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true title: type: optional docs: Cloud storage title validation: maxLength: 256 - description: + traceback: type: optional - docs: Cloud storage description - can_delete_objects: + docs: Traceback report for the last failed sync + use_blob_urls: type: optional - docs: Deletion from storage enabled - project: - type: optional - docs: A unique integer value identifying this project. + docs: Interpret objects as BLOBs and generate URLs content-type: application/json response: docs: '' @@ -249,31 +295,31 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_export_gcswif_sync_create: path: /api/storages/export/gcswif/{id}/sync method: POST @@ -297,125 +343,79 @@ service: project: 1 response: body: - id: 1 - type: type - synchronizable: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + can_delete_objects: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true + prefix: prefix project: 1 - api_storages_export_gcswif_validate_create: - path: /api/storages/export/gcswif/validate - method: POST + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true + api_storages_gcswif_list: + path: /api/storages/gcswif/ + method: GET auth: true docs: >- - Validate a specific GCS export storage connection that was set up with - WIF authentication. + Get list of all GCS import storage connections set up with WIF + authentication. source: openapi: openapi/openapi.yaml - display-name: Validate GCS WIF export storage + display-name: Get GCS WIF import storage request: - body: root.GcswifExportStorageRequest - content-type: application/json + name: ApiStoragesGcswifListRequest + query-parameters: + ordering: + type: optional + docs: Which field to use when ordering the results. response: docs: '' - type: root.GcswifExportStorage + type: list examples: - - request: - project: 1 - response: + - response: body: - id: 1 - type: type - synchronizable: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true - google_application_credentials: google_application_credentials - google_project_id: google_project_id - google_project_number: google_project_number - google_wif_pool_id: google_wif_pool_id - google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job - status: initialized - traceback: traceback - meta: - key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' - can_delete_objects: true - project: 1 - api_storages_gcswif_list: - path: /api/storages/gcswif/ - method: GET - auth: true - docs: >- - Get list of all GCS import storage connections set up with WIF - authentication. - source: - openapi: openapi/openapi.yaml - display-name: Get GCS WIF import storage - request: - name: ApiStoragesGcswifListRequest - query-parameters: - ordering: - type: optional - docs: Which field to use when ordering the results. - response: - docs: '' - type: list - examples: - - response: - body: - - id: 1 - type: type - synchronizable: true - presign: true - bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + - bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_gcswif_create: path: /api/storages/gcswif/ method: POST @@ -435,32 +435,79 @@ service: project: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description + google_application_credentials: google_application_credentials + google_project_id: google_project_id + google_project_number: google_project_number + google_service_account_email: google_service_account_email + google_wif_pool_id: google_wif_pool_id + google_wif_provider_id: google_wif_provider_id + id: 1 + last_sync: '2024-01-15T09:30:00Z' + last_sync_count: 1 + last_sync_job: last_sync_job + meta: + key: value prefix: prefix + presign: true + presign_ttl: 1 + project: 1 regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type use_blob_urls: true + api_storages_gcswif_validate_create: + path: /api/storages/gcswif/validate + method: POST + auth: true + docs: >- + Validate a specific GCS import storage connection that was set up with + WIF authentication. + source: + openapi: openapi/openapi.yaml + display-name: Validate GCS WIF import storage + request: + body: root.GcswifImportStorageRequest + content-type: application/json + response: + docs: '' + type: root.GcswifImportStorage + examples: + - request: + project: 1 + response: + body: + bucket: bucket + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_gcswif_retrieve: path: /api/storages/gcswif/{id} method: GET @@ -479,32 +526,32 @@ service: id: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_gcswif_destroy: path: /api/storages/gcswif/{id} method: DELETE @@ -536,24 +583,12 @@ service: name: PatchedGcswifImportStorageRequest body: properties: - synchronizable: - type: optional - default: true - presign: - type: optional - default: true bucket: type: optional docs: GCS bucket name - prefix: - type: optional - docs: GCS bucket prefix - regex_filter: + description: type: optional - docs: Cloud storage regex for filtering objects - use_blob_urls: - type: optional - docs: Interpret objects as BLOBs and generate URLs + docs: Cloud storage description google_application_credentials: type: optional docs: The content of GOOGLE_APPLICATION_CREDENTIALS json file @@ -563,15 +598,15 @@ service: google_project_number: type: optional docs: Google project number + google_service_account_email: + type: optional + docs: Google service account email google_wif_pool_id: type: optional docs: Google WIF pool ID google_wif_provider_id: type: optional docs: Google WIF provider ID - google_service_account_email: - type: optional - docs: Google service account email last_sync: type: optional docs: Last sync finished time @@ -586,19 +621,13 @@ service: docs: Last sync job ID validation: maxLength: 256 - status: optional - traceback: - type: optional - docs: Traceback report for the last failed sync meta: optional - title: - type: optional - docs: Cloud storage title - validation: - maxLength: 256 - description: + prefix: type: optional - docs: Cloud storage description + docs: GCS bucket prefix + presign: + type: optional + default: true presign_ttl: type: optional docs: Presigned URLs TTL (in minutes) @@ -608,6 +637,24 @@ service: project: type: optional docs: A unique integer value identifying this project. + regex_filter: + type: optional + docs: Cloud storage regex for filtering objects + status: optional + synchronizable: + type: optional + default: true + title: + type: optional + docs: Cloud storage title + validation: + maxLength: 256 + traceback: + type: optional + docs: Traceback report for the last failed sync + use_blob_urls: + type: optional + docs: Interpret objects as BLOBs and generate URLs content-type: application/json response: docs: '' @@ -618,32 +665,32 @@ service: request: {} response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 + regex_filter: regex_filter + status: initialized + synchronizable: true + title: title + traceback: traceback + type: type + use_blob_urls: true api_storages_gcswif_sync_create: path: /api/storages/gcswif/{id}/sync method: POST @@ -669,78 +716,31 @@ service: project: 1 response: body: - id: 1 - type: type - synchronizable: true - presign: true bucket: bucket - prefix: prefix - regex_filter: regex_filter - use_blob_urls: true + created_at: '2024-01-15T09:30:00Z' + description: description google_application_credentials: google_application_credentials google_project_id: google_project_id google_project_number: google_project_number + google_service_account_email: google_service_account_email google_wif_pool_id: google_wif_pool_id google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email + id: 1 last_sync: '2024-01-15T09:30:00Z' last_sync_count: 1 last_sync_job: last_sync_job - status: initialized - traceback: traceback meta: key: value - title: title - description: description - created_at: '2024-01-15T09:30:00Z' + prefix: prefix + presign: true presign_ttl: 1 project: 1 - api_storages_gcswif_validate_create: - path: /api/storages/gcswif/validate - method: POST - auth: true - docs: >- - Validate a specific GCS import storage connection that was set up with - WIF authentication. - source: - openapi: openapi/openapi.yaml - display-name: Validate GCS WIF import storage - request: - body: root.GcswifImportStorageRequest - content-type: application/json - response: - docs: '' - type: root.GcswifImportStorage - examples: - - request: - project: 1 - response: - body: - id: 1 - type: type - synchronizable: true - presign: true - bucket: bucket - prefix: prefix regex_filter: regex_filter - use_blob_urls: true - google_application_credentials: google_application_credentials - google_project_id: google_project_id - google_project_number: google_project_number - google_wif_pool_id: google_wif_pool_id - google_wif_provider_id: google_wif_provider_id - google_service_account_email: google_service_account_email - last_sync: '2024-01-15T09:30:00Z' - last_sync_count: 1 - last_sync_job: last_sync_job status: initialized - traceback: traceback - meta: - key: value + synchronizable: true title: title - description: description - created_at: '2024-01-15T09:30:00Z' - presign_ttl: 1 - project: 1 + traceback: traceback + type: type + use_blob_urls: true source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/tasks.yml b/.mock/definition/tasks.yml index 7cf2ecea9..23495c5a9 100644 --- a/.mock/definition/tasks.yml +++ b/.mock/definition/tasks.yml @@ -26,33 +26,33 @@ service: import_pk: 1 response: body: - id: 1 - project: 1 - preannotated_from_fields: - key: value + annotation_count: 1 commit_to_project: true - return_task_ids: true - status: created - url: url - error: error + could_be_tasks_list: true created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - finished_at: '2024-01-15T09:30:00Z' - task_count: 1 - annotation_count: 1 - prediction_count: 1 + data_columns: + key: value duration: 1 + error: error file_upload_ids: key: value - could_be_tasks_list: true + finished_at: '2024-01-15T09:30:00Z' found_formats: key: value - data_columns: - key: value - tasks: + id: 1 + preannotated_from_fields: key: value + prediction_count: 1 + project: 1 + return_task_ids: true + status: created + task_count: 1 task_ids: key: value + tasks: + key: value + updated_at: '2024-01-15T09:30:00Z' + url: url audiences: - public delete_all_tasks: @@ -72,6 +72,45 @@ service: id: 1 audiences: - public + api_projects_tasks_assignees_create: + path: /api/projects/{id}/tasks/assignees + method: POST + auth: true + docs: Assign multiple tasks to a specific user for a specific project. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: integer + display-name: Bulk assign tasks + request: + body: root.TaskAssignmentRequest + query-parameters: + selected_items: + type: optional + docs: Selected items + type: + type: optional + docs: Assignment type + users: + type: optional + docs: Assignees + name: ApiProjectsTasksAssigneesCreateRequest + content-type: application/json + response: + docs: Success + type: ApiProjectsTasksAssigneesCreateResponse + errors: + - root.BadRequestError + examples: + - path-parameters: + id: 1 + request: + assignee: 1 + task: 1 + response: + body: + assignments: + - key: value api_projects_tasks_assignees_retrieve: path: /api/projects/{id}/tasks/{task_pk}/assignees method: GET @@ -98,11 +137,11 @@ service: task_pk: 1 response: body: - id: 1 - created_at: '2024-01-15T09:30:00Z' - type: AN assignee: 1 + created_at: '2024-01-15T09:30:00Z' + id: 1 task: 1 + type: AN api_projects_tasks_assignees_create_2: path: /api/projects/{id}/tasks/{task_pk}/assignees method: POST @@ -133,11 +172,11 @@ service: task: 1 response: body: - id: 1 - created_at: '2024-01-15T09:30:00Z' - type: AN assignee: 1 + created_at: '2024-01-15T09:30:00Z' + id: 1 task: 1 + type: AN api_projects_tasks_assignees_destroy: path: /api/projects/{id}/tasks/{task_pk}/assignees method: DELETE @@ -176,6 +215,12 @@ service: name: PatchedTaskAssignmentRequest body: properties: + assignee: + type: optional + docs: Assigned user + task: + type: optional + docs: Assigned task type: type: optional docs: |- @@ -183,12 +228,6 @@ service: * `AN` - Annotate * `RE` - Review - assignee: - type: optional - docs: Assigned user - task: - type: optional - docs: Assigned task content-type: application/json response: docs: '' @@ -200,50 +239,11 @@ service: request: {} response: body: - id: 1 - created_at: '2024-01-15T09:30:00Z' - type: AN assignee: 1 + created_at: '2024-01-15T09:30:00Z' + id: 1 task: 1 - api_projects_tasks_assignees_create: - path: /api/projects/{id}/tasks/assignees - method: POST - auth: true - docs: Assign multiple tasks to a specific user for a specific project. - source: - openapi: openapi/openapi.yaml - path-parameters: - id: integer - display-name: Bulk assign tasks - request: - body: root.TaskAssignmentRequest - query-parameters: - selected_items: - type: optional - docs: Selected items - type: - type: optional - docs: Assignment type - users: - type: optional - docs: Assignees - name: ApiProjectsTasksAssigneesCreateRequest - content-type: application/json - response: - docs: Success - type: ApiProjectsTasksAssigneesCreateResponse - errors: - - root.BadRequestError - examples: - - path-parameters: - id: 1 - request: - assignee: 1 - task: 1 - response: - body: - assignments: - - key: value + type: AN list: path: /api/tasks/ method: GET @@ -341,55 +341,55 @@ service: - response: body: tasks: - - id: 1 - agreement: agreement - predictions: - - {} + - agreement: agreement annotations: annotations - drafts: - - {} + annotations_ids: annotations_ids + annotations_results: annotations_results annotators: - 1 - inner_id: 1 - cancelled_annotations: 1 - total_annotations: 1 - total_predictions: 1 - completed_at: '2024-01-15T09:30:00Z' - annotations_results: annotations_results - predictions_results: predictions_results - predictions_score: 1.1 - file_upload: file_upload - storage_filename: storage_filename - annotations_ids: annotations_ids - predictions_model_versions: predictions_model_versions + annotators_count: 1 avg_lead_time: 1.1 - draft_exists: true - updated_by: - - key: value - reviewers: - - key: value - comments: comments + cancelled_annotations: 1 comment_authors: - key: value - reviewed: true - reviews_accepted: 1 - reviews_rejected: 1 - ground_truth: true - annotators_count: 1 - reviewers_count: 1 comment_authors_count: 1 + comment_count: 1 + comments: comments + completed_at: '2024-01-15T09:30:00Z' + created_at: '2024-01-15T09:30:00Z' data: key: value + draft_exists: true + drafts: + - {} + file_upload: file_upload + ground_truth: true + id: 1 + inner_id: 1 + is_labeled: true + last_comment_updated_at: '2024-01-15T09:30:00Z' meta: key: value - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - is_labeled: true overlap: 1 - comment_count: 1 - unresolved_comment_count: 1 - last_comment_updated_at: '2024-01-15T09:30:00Z' + predictions: + - {} + predictions_model_versions: predictions_model_versions + predictions_results: predictions_results + predictions_score: 1.1 project: 1 + reviewed: true + reviewers: + - key: value + reviewers_count: 1 + reviews_accepted: 1 + reviews_rejected: 1 + storage_filename: storage_filename + total_annotations: 1 + total_predictions: 1 + unresolved_comment_count: 1 + updated_at: '2024-01-15T09:30:00Z' + updated_by: + - key: value total: 123 total_annotations: 456 total_predictions: 78 @@ -407,22 +407,46 @@ service: name: LseTaskRequest body: properties: + cancelled_annotations: + type: optional + docs: Number of total cancelled annotations for the current task + validation: + min: -2147483648 + max: 2147483647 + comment_authors: + type: optional> + docs: Users who wrote comments + comment_count: + type: optional + docs: Number of comments in the task including all annotations + validation: + min: -2147483648 + max: 2147483647 data: unknown - meta: optional + file_upload: + type: optional + docs: Uploaded file used as data source for this task + inner_id: + type: optional + docs: Internal task ID in the project, starts with 1 is_labeled: type: optional docs: >- True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + last_comment_updated_at: + type: optional + docs: When the last comment was updated + meta: optional overlap: type: optional docs: Number of distinct annotators that processed the current task validation: min: -2147483648 max: 2147483647 - inner_id: - type: optional - docs: Internal task ID in the project, starts with 1 + project: + type: optional + docs: Project ID for this task total_annotations: type: optional docs: >- @@ -431,24 +455,12 @@ service: validation: min: -2147483648 max: 2147483647 - cancelled_annotations: - type: optional - docs: Number of total cancelled annotations for the current task - validation: - min: -2147483648 - max: 2147483647 total_predictions: type: optional docs: Number of total predictions for the current task validation: min: -2147483648 max: 2147483647 - comment_count: - type: optional - docs: Number of comments in the task including all annotations - validation: - min: -2147483648 - max: 2147483647 unresolved_comment_count: type: optional docs: >- @@ -457,21 +469,9 @@ service: validation: min: -2147483648 max: 2147483647 - last_comment_updated_at: - type: optional - docs: When the last comment was updated - project: - type: optional - docs: Project ID for this task updated_by: type: optional docs: Last annotator or reviewer who updated this task - file_upload: - type: optional - docs: Uploaded file used as data source for this task - comment_authors: - type: optional> - docs: Users who wrote comments content-type: application/json response: docs: '' @@ -500,69 +500,69 @@ service: id: id response: body: - id: 1 agreement: agreement - predictions: - - result: + annotations: annotations + annotations_ids: annotations_ids + annotations_results: annotations_results + annotators: + - 1 + annotators_count: 1 + avg_lead_time: 1.1 + cancelled_annotations: 1 + comment_authors: + - key: value + comment_authors_count: 1 + comment_count: 1 + comments: comments + completed_at: '2024-01-15T09:30:00Z' + created_at: '2024-01-15T09:30:00Z' + data: + key: value + draft_exists: true + drafts: + - created_at: '2024-01-15T09:30:00Z' + result: - key: value - score: 1.1 - model_version: model_version + updated_at: '2024-01-15T09:30:00Z' + file_upload: file_upload + ground_truth: true + id: 1 + inner_id: 1 + is_labeled: true + last_comment_updated_at: '2024-01-15T09:30:00Z' + meta: + key: value + overlap: 1 + predictions: + - created_at: '2024-01-15T09:30:00Z' model: key: value model_run: key: value - task: 1 + model_version: model_version project: 1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - annotations: annotations - drafts: - - result: + result: - key: value - created_at: '2024-01-15T09:30:00Z' + score: 1.1 + task: 1 updated_at: '2024-01-15T09:30:00Z' - annotators: - - 1 - inner_id: 1 - cancelled_annotations: 1 - total_annotations: 1 - total_predictions: 1 - completed_at: '2024-01-15T09:30:00Z' - annotations_results: annotations_results + predictions_model_versions: predictions_model_versions predictions_results: predictions_results predictions_score: 1.1 - file_upload: file_upload - storage_filename: storage_filename - annotations_ids: annotations_ids - predictions_model_versions: predictions_model_versions - avg_lead_time: 1.1 - draft_exists: true - updated_by: - - key: value + project: 1 + reviewed: true reviewers: - key: value - comments: comments - comment_authors: - - key: value - reviewed: true + reviewers_count: 1 reviews_accepted: 1 reviews_rejected: 1 - ground_truth: true - annotators_count: 1 - reviewers_count: 1 - comment_authors_count: 1 - data: - key: value - meta: - key: value - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - is_labeled: true - overlap: 1 - comment_count: 1 + storage_filename: storage_filename + total_annotations: 1 + total_predictions: 1 unresolved_comment_count: 1 - last_comment_updated_at: '2024-01-15T09:30:00Z' - project: 1 + updated_at: '2024-01-15T09:30:00Z' + updated_by: + - key: value audiences: - public delete: @@ -598,37 +598,43 @@ service: name: PatchedLseTaskRequest body: properties: - inner_id: optional + avg_lead_time: optional cancelled_annotations: optional - total_annotations: optional - total_predictions: optional + comment_count: + type: optional + docs: Number of comments in the task including all annotations + validation: + min: -2147483648 + max: 2147483647 completed_at: optional - predictions_score: optional - avg_lead_time: optional + data: optional draft_exists: optional - reviewed: optional - reviews_accepted: optional - reviews_rejected: optional ground_truth: optional - data: optional - meta: optional + inner_id: optional is_labeled: type: optional docs: >- True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + last_comment_updated_at: + type: optional + docs: When the last comment was updated + meta: optional overlap: type: optional docs: Number of distinct annotators that processed the current task validation: min: -2147483648 max: 2147483647 - comment_count: + predictions_score: optional + project: type: optional - docs: Number of comments in the task including all annotations - validation: - min: -2147483648 - max: 2147483647 + docs: Project ID for this task + reviewed: optional + reviews_accepted: optional + reviews_rejected: optional + total_annotations: optional + total_predictions: optional unresolved_comment_count: type: optional docs: >- @@ -637,12 +643,6 @@ service: validation: min: -2147483648 max: 2147483647 - last_comment_updated_at: - type: optional - docs: When the last comment was updated - project: - type: optional - docs: Project ID for this task content-type: application/json response: docs: '' @@ -653,69 +653,69 @@ service: request: {} response: body: - id: 1 agreement: agreement - predictions: - - result: + annotations: annotations + annotations_ids: annotations_ids + annotations_results: annotations_results + annotators: + - 1 + annotators_count: 1 + avg_lead_time: 1.1 + cancelled_annotations: 1 + comment_authors: + - key: value + comment_authors_count: 1 + comment_count: 1 + comments: comments + completed_at: '2024-01-15T09:30:00Z' + created_at: '2024-01-15T09:30:00Z' + data: + key: value + draft_exists: true + drafts: + - created_at: '2024-01-15T09:30:00Z' + result: - key: value - score: 1.1 - model_version: model_version + updated_at: '2024-01-15T09:30:00Z' + file_upload: file_upload + ground_truth: true + id: 1 + inner_id: 1 + is_labeled: true + last_comment_updated_at: '2024-01-15T09:30:00Z' + meta: + key: value + overlap: 1 + predictions: + - created_at: '2024-01-15T09:30:00Z' model: key: value model_run: key: value - task: 1 + model_version: model_version project: 1 - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - annotations: annotations - drafts: - - result: + result: - key: value - created_at: '2024-01-15T09:30:00Z' + score: 1.1 + task: 1 updated_at: '2024-01-15T09:30:00Z' - annotators: - - 1 - inner_id: 1 - cancelled_annotations: 1 - total_annotations: 1 - total_predictions: 1 - completed_at: '2024-01-15T09:30:00Z' - annotations_results: annotations_results + predictions_model_versions: predictions_model_versions predictions_results: predictions_results predictions_score: 1.1 - file_upload: file_upload - storage_filename: storage_filename - annotations_ids: annotations_ids - predictions_model_versions: predictions_model_versions - avg_lead_time: 1.1 - draft_exists: true - updated_by: - - key: value + project: 1 + reviewed: true reviewers: - key: value - comments: comments - comment_authors: - - key: value - reviewed: true + reviewers_count: 1 reviews_accepted: 1 reviews_rejected: 1 - ground_truth: true - annotators_count: 1 - reviewers_count: 1 - comment_authors_count: 1 - data: - key: value - meta: - key: value - created_at: '2024-01-15T09:30:00Z' - updated_at: '2024-01-15T09:30:00Z' - is_labeled: true - overlap: 1 - comment_count: 1 + storage_filename: storage_filename + total_annotations: 1 + total_predictions: 1 unresolved_comment_count: 1 - last_comment_updated_at: '2024-01-15T09:30:00Z' - project: 1 + updated_at: '2024-01-15T09:30:00Z' + updated_by: + - key: value audiences: - public source: diff --git a/.mock/definition/tokens.yml b/.mock/definition/tokens.yml index 9ec0f2c07..cf7c12c2f 100644 --- a/.mock/definition/tokens.yml +++ b/.mock/definition/tokens.yml @@ -24,9 +24,9 @@ service: examples: - response: body: - - token: token - created_at: created_at + - created_at: created_at expires_at: expires_at + token: token audiences: - public create: @@ -43,9 +43,9 @@ service: examples: - response: body: - token: token created_at: created_at expires_at: expires_at + token: token audiences: - public blacklist: diff --git a/.mock/definition/users.yml b/.mock/definition/users.yml index d0726496a..e47a0ea7e 100644 --- a/.mock/definition/users.yml +++ b/.mock/definition/users.yml @@ -18,25 +18,25 @@ service: examples: - response: body: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name org_membership: - - role: role - active: active + - active: active organization_id: 1 + role: role + phone: phone + username: username audiences: - public update_current_user: @@ -51,39 +51,39 @@ service: name: PatchedLseUserSerializerUpdateRequest body: properties: + active_organization: optional + allow_newsletters: + type: optional + docs: Allow sending newsletters to user + custom_hotkeys: optional + date_joined: optional + email_notification_settings: optional first_name: type: optional validation: maxLength: 256 + is_email_verified: optional last_name: type: optional validation: maxLength: 256 - username: + onboarding_state: type: optional validation: minLength: 1 - maxLength: 256 - custom_hotkeys: optional - phone: - type: optional - validation: - maxLength: 256 - active_organization: optional - allow_newsletters: - type: optional - docs: Allow sending newsletters to user - date_joined: optional password: type: optional validation: minLength: 1 - onboarding_state: + phone: + type: optional + validation: + maxLength: 256 + username: type: optional validation: minLength: 1 - is_email_verified: optional - email_notification_settings: optional + maxLength: 256 content-type: application/json response: docs: '' @@ -92,25 +92,25 @@ service: - request: {} response: body: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name org_membership: - - role: role - active: active + - active: active organization_id: 1 + role: role + phone: phone + username: username audiences: - public get_hotkeys: @@ -204,40 +204,40 @@ service: examples: - response: body: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' - org_membership: - - role: role - active: active - organization_id: 1 + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name lse_fields: + email_notification_settings: email_notification_settings + invite_activated: true invite_expired: invite_expired invite_expired_at: invite_expired_at invited_at: '2024-01-15T09:30:00Z' - invite_activated: true + invited_by: 1 + onboarding_state: not_started + social_auth_finished: true trial_company: trial_company - trial_role: annotator - trial_models_in_production: trial_models_in_production trial_experience_labeling: trial_experience_labeling trial_license_enterprise: true - social_auth_finished: true - invited_by: 1 - onboarding_state: not_started - email_notification_settings: email_notification_settings + trial_models_in_production: trial_models_in_production + trial_role: annotator + org_membership: + - active: active + organization_id: 1 + role: role pause: pause + phone: phone + username: username audiences: - public list: @@ -260,25 +260,25 @@ service: examples: - response: body: - - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone - active_organization: 1 + - active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name org_membership: - - role: role - active: active + - active: active organization_id: 1 + role: role + phone: phone + username: username audiences: - public create: @@ -293,33 +293,33 @@ service: name: UsersCreateRequest body: properties: - id: - type: optional - docs: User ID - first_name: - type: optional - docs: First name of the user - last_name: - type: optional - docs: Last name of the user - username: + allow_newsletters: + type: optional + docs: Whether the user allows newsletters + avatar: type: optional - docs: Username of the user + docs: Avatar URL of the user email: type: optional docs: Email of the user - avatar: + first_name: type: optional - docs: Avatar URL of the user + docs: First name of the user + id: + type: optional + docs: User ID initials: type: optional docs: Initials of the user + last_name: + type: optional + docs: Last name of the user phone: type: optional docs: Phone number of the user - allow_newsletters: - type: optional - docs: Whether the user allows newsletters + username: + type: optional + docs: Username of the user content-type: application/json response: docs: '' @@ -328,40 +328,40 @@ service: - request: {} response: body: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' - org_membership: - - role: role - active: active - organization_id: 1 + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name lse_fields: + email_notification_settings: email_notification_settings + invite_activated: true invite_expired: invite_expired invite_expired_at: invite_expired_at invited_at: '2024-01-15T09:30:00Z' - invite_activated: true + invited_by: 1 + onboarding_state: not_started + social_auth_finished: true trial_company: trial_company - trial_role: annotator - trial_models_in_production: trial_models_in_production trial_experience_labeling: trial_experience_labeling trial_license_enterprise: true - social_auth_finished: true - invited_by: 1 - onboarding_state: not_started - email_notification_settings: email_notification_settings + trial_models_in_production: trial_models_in_production + trial_role: annotator + org_membership: + - active: active + organization_id: 1 + role: role pause: pause + phone: phone + username: username audiences: - public get: @@ -384,40 +384,40 @@ service: id: 1 response: body: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' - org_membership: - - role: role - active: active - organization_id: 1 + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name lse_fields: + email_notification_settings: email_notification_settings + invite_activated: true invite_expired: invite_expired invite_expired_at: invite_expired_at invited_at: '2024-01-15T09:30:00Z' - invite_activated: true + invited_by: 1 + onboarding_state: not_started + social_auth_finished: true trial_company: trial_company - trial_role: annotator - trial_models_in_production: trial_models_in_production trial_experience_labeling: trial_experience_labeling trial_license_enterprise: true - social_auth_finished: true - invited_by: 1 - onboarding_state: not_started - email_notification_settings: email_notification_settings + trial_models_in_production: trial_models_in_production + trial_role: annotator + org_membership: + - active: active + organization_id: 1 + role: role pause: pause + phone: phone + username: username audiences: - public delete: @@ -463,34 +463,34 @@ service: name: UsersUpdateRequest body: properties: - id: - type: optional - docs: User ID - name: usersUpdateRequestId - first_name: - type: optional - docs: First name of the user - last_name: - type: optional - docs: Last name of the user - username: + allow_newsletters: + type: optional + docs: Whether the user allows newsletters + avatar: type: optional - docs: Username of the user + docs: Avatar URL of the user email: type: optional docs: Email of the user - avatar: + first_name: type: optional - docs: Avatar URL of the user + docs: First name of the user + id: + type: optional + docs: User ID + name: usersUpdateRequestId initials: type: optional docs: Initials of the user + last_name: + type: optional + docs: Last name of the user phone: type: optional docs: Phone number of the user - allow_newsletters: - type: optional - docs: Whether the user allows newsletters + username: + type: optional + docs: Username of the user content-type: application/json response: docs: '' @@ -501,40 +501,40 @@ service: request: {} response: body: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' - org_membership: - - role: role - active: active - organization_id: 1 + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name lse_fields: + email_notification_settings: email_notification_settings + invite_activated: true invite_expired: invite_expired invite_expired_at: invite_expired_at invited_at: '2024-01-15T09:30:00Z' - invite_activated: true + invited_by: 1 + onboarding_state: not_started + social_auth_finished: true trial_company: trial_company - trial_role: annotator - trial_models_in_production: trial_models_in_production trial_experience_labeling: trial_experience_labeling trial_license_enterprise: true - social_auth_finished: true - invited_by: 1 - onboarding_state: not_started - email_notification_settings: email_notification_settings + trial_models_in_production: trial_models_in_production + trial_role: annotator + org_membership: + - active: active + organization_id: 1 + role: role pause: pause + phone: phone + username: username audiences: - public source: diff --git a/.mock/definition/versions.yml b/.mock/definition/versions.yml index b01714a85..77ca4e0a8 100644 --- a/.mock/definition/versions.yml +++ b/.mock/definition/versions.yml @@ -18,22 +18,22 @@ service: examples: - response: body: - release: release - label-studio-os-package: + backend: key: value - label-studio-os-backend: + dm2: + key: value + edition: Community + label-studio-converter: key: value label-studio-frontend: key: value - dm2: + label-studio-os-backend: key: value - label-studio-converter: + label-studio-os-package: key: value - edition: Community lsf: key: value - backend: - key: value + release: release audiences: - public source: diff --git a/.mock/definition/views.yml b/.mock/definition/views.yml index 29f2438ae..f1e17ed9a 100644 --- a/.mock/definition/views.yml +++ b/.mock/definition/views.yml @@ -24,24 +24,24 @@ service: examples: - response: body: - - id: 1 + - data: + key: value filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 + project: 1 selected_items: key: value user: 1 - project: 1 audiences: - public create: @@ -70,24 +70,67 @@ service: - request: {} response: body: - id: 1 + data: + key: value filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 + project: 1 selected_items: key: value user: 1 - project: 1 + audiences: + - public + update_order: + path: /api/dm/views/order/ + method: POST + auth: true + docs: Update the order field of views based on the provided list of view IDs + source: + openapi: openapi/openapi.yaml + display-name: Update order of views + request: + name: ViewOrderRequest + body: + properties: + ids: + docs: A list of view IDs in the desired order. + type: list + project: integer + content-type: application/json + examples: + - request: + ids: + - 1 + project: 1 + audiences: + - public + delete_all: + path: /api/dm/views/reset/ + method: DELETE + auth: true + docs: Delete all views for a specific project. + source: + openapi: openapi/openapi.yaml + display-name: Delete all project views + request: + name: ViewsDeleteAllRequest + query-parameters: + project: + type: integer + docs: Project ID + examples: + - query-parameters: + project: 1 audiences: - public get: @@ -110,24 +153,24 @@ service: id: id response: body: - id: 1 + data: + key: value filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 + project: 1 selected_items: key: value user: 1 - project: 1 audiences: - public delete: @@ -181,67 +224,24 @@ service: request: {} response: body: - id: 1 + data: + key: value filter_group: - id: 1 + conjunction: conjunction filters: - - id: 1 - column: column - type: type + - column: column + id: 1 operator: operator - conjunction: conjunction - data: - key: value + type: type + id: 1 + id: 1 + order: 1 ordering: key: value - order: 1 + project: 1 selected_items: key: value user: 1 - project: 1 - audiences: - - public - update_order: - path: /api/dm/views/order/ - method: POST - auth: true - docs: Update the order field of views based on the provided list of view IDs - source: - openapi: openapi/openapi.yaml - display-name: Update order of views - request: - name: ViewOrderRequest - body: - properties: - project: integer - ids: - docs: A list of view IDs in the desired order. - type: list - content-type: application/json - examples: - - request: - project: 1 - ids: - - 1 - audiences: - - public - delete_all: - path: /api/dm/views/reset/ - method: DELETE - auth: true - docs: Delete all views for a specific project. - source: - openapi: openapi/openapi.yaml - display-name: Delete all project views - request: - name: ViewsDeleteAllRequest - query-parameters: - project: - type: integer - docs: Project ID - examples: - - query-parameters: - project: 1 audiences: - public source: diff --git a/.mock/definition/webhooks.yml b/.mock/definition/webhooks.yml index ca741ff95..6868bda2d 100644 --- a/.mock/definition/webhooks.yml +++ b/.mock/definition/webhooks.yml @@ -24,19 +24,19 @@ service: examples: - response: body: - - id: 1 - organization: 1 - project: 1 - url: url - send_payload: true - send_for_all_actions: true + - actions: + - PROJECT_CREATED + created_at: '2024-01-15T09:30:00Z' headers: key: value + id: 1 is_active: true - actions: - - PROJECT_CREATED - created_at: '2024-01-15T09:30:00Z' + organization: 1 + project: 1 + send_for_all_actions: true + send_payload: true updated_at: '2024-01-15T09:30:00Z' + url: url audiences: - public create: @@ -51,7 +51,18 @@ service: name: WebhookRequest body: properties: + actions: optional> + headers: optional + is_active: + type: optional + docs: If value is False the webhook is disabled project: optional + send_for_all_actions: + type: optional + docs: If value is False - used only for actions from WebhookAction + send_payload: + type: optional + docs: If value is False send only action url: type: string docs: URL of webhook @@ -59,17 +70,6 @@ service: format: uri minLength: 1 maxLength: 2048 - send_payload: - type: optional - docs: If value is False send only action - send_for_all_actions: - type: optional - docs: If value is False - used only for actions from WebhookAction - headers: optional - is_active: - type: optional - docs: If value is False the webhook is disabled - actions: optional> content-type: application/json response: docs: '' @@ -79,19 +79,116 @@ service: url: url response: body: + actions: + - PROJECT_CREATED + created_at: '2024-01-15T09:30:00Z' + headers: + key: value id: 1 + is_active: true organization: 1 project: 1 - url: url - send_payload: true send_for_all_actions: true - headers: - key: value - is_active: true - actions: - - PROJECT_CREATED - created_at: '2024-01-15T09:30:00Z' + send_payload: true updated_at: '2024-01-15T09:30:00Z' + url: url + audiences: + - public + info: + path: /api/webhooks/info/ + method: GET + auth: true + docs: Get descriptions of all available webhook actions to set up webhooks. + source: + openapi: openapi/openapi.yaml + display-name: Get all webhook actions + request: + name: WebhooksInfoRequest + query-parameters: + organization-only: + type: optional + docs: organization-only or not + response: + docs: Object with webhook action descriptions. + type: WebhooksInfoResponse + examples: + - response: + body: + ANNOTATIONS_CREATED: + description: description + key: key + name: name + organization-only: true + ANNOTATIONS_DELETED: + description: description + key: key + name: name + organization-only: true + ANNOTATION_CREATED: + description: description + key: key + name: name + organization-only: true + ANNOTATION_UPDATED: + description: description + key: key + name: name + organization-only: true + LABEL_LINK_CREATED: + description: description + key: key + name: name + organization-only: true + LABEL_LINK_DELETED: + description: description + key: key + name: name + organization-only: true + LABEL_LINK_UPDATED: + description: description + key: key + name: name + organization-only: true + PROJECT_CREATED: + description: description + key: key + name: name + organization-only: true + PROJECT_DELETED: + description: description + key: key + name: name + organization-only: true + PROJECT_UPDATED: + description: description + key: key + name: name + organization-only: true + REVIEWS_DELETED: + description: description + key: key + name: name + organization-only: true + REVIEW_CREATED: + description: description + key: key + name: name + organization-only: true + REVIEW_UPDATED: + description: description + key: key + name: name + organization-only: true + TASKS_CREATED: + description: description + key: key + name: name + organization-only: true + TASKS_DELETED: + description: description + key: key + name: name + organization-only: true audiences: - public get: @@ -111,19 +208,19 @@ service: id: 1 response: body: + actions: + - PROJECT_CREATED + created_at: '2024-01-15T09:30:00Z' + headers: + key: value id: 1 + is_active: true organization: 1 project: 1 - url: url - send_payload: true send_for_all_actions: true - headers: - key: value - is_active: true - actions: - - PROJECT_CREATED - created_at: '2024-01-15T09:30:00Z' + send_payload: true updated_at: '2024-01-15T09:30:00Z' + url: url audiences: - public api_webhooks_update: @@ -139,6 +236,17 @@ service: name: WebhookSerializerForUpdateRequest body: properties: + actions: optional> + headers: optional + is_active: + type: optional + docs: If value is False the webhook is disabled + send_for_all_actions: + type: optional + docs: If value is False - used only for actions from WebhookAction + send_payload: + type: optional + docs: If value is False send only action url: type: string docs: URL of webhook @@ -146,17 +254,6 @@ service: format: uri minLength: 1 maxLength: 2048 - send_payload: - type: optional - docs: If value is False send only action - send_for_all_actions: - type: optional - docs: If value is False - used only for actions from WebhookAction - headers: optional - is_active: - type: optional - docs: If value is False the webhook is disabled - actions: optional> content-type: application/json response: docs: '' @@ -168,19 +265,19 @@ service: url: url response: body: + actions: + - PROJECT_CREATED + created_at: '2024-01-15T09:30:00Z' + headers: + key: value id: 1 + is_active: true organization: 1 project: 1 - url: url - send_payload: true send_for_all_actions: true - headers: - key: value - is_active: true - actions: - - PROJECT_CREATED - created_at: '2024-01-15T09:30:00Z' + send_payload: true updated_at: '2024-01-15T09:30:00Z' + url: url audiences: - internal delete: @@ -210,6 +307,17 @@ service: name: PatchedWebhookSerializerForUpdateRequest body: properties: + actions: optional> + headers: optional + is_active: + type: optional + docs: If value is False the webhook is disabled + send_for_all_actions: + type: optional + docs: If value is False - used only for actions from WebhookAction + send_payload: + type: optional + docs: If value is False send only action url: type: optional docs: URL of webhook @@ -217,17 +325,6 @@ service: format: uri minLength: 1 maxLength: 2048 - send_payload: - type: optional - docs: If value is False send only action - send_for_all_actions: - type: optional - docs: If value is False - used only for actions from WebhookAction - headers: optional - is_active: - type: optional - docs: If value is False the webhook is disabled - actions: optional> content-type: application/json response: docs: '' @@ -238,272 +335,175 @@ service: request: {} response: body: + actions: + - PROJECT_CREATED + created_at: '2024-01-15T09:30:00Z' + headers: + key: value id: 1 + is_active: true organization: 1 project: 1 - url: url - send_payload: true send_for_all_actions: true - headers: - key: value - is_active: true - actions: - - PROJECT_CREATED - created_at: '2024-01-15T09:30:00Z' + send_payload: true updated_at: '2024-01-15T09:30:00Z' - audiences: - - public - info: - path: /api/webhooks/info/ - method: GET - auth: true - docs: Get descriptions of all available webhook actions to set up webhooks. - source: - openapi: openapi/openapi.yaml - display-name: Get all webhook actions - request: - name: WebhooksInfoRequest - query-parameters: - organization-only: - type: optional - docs: organization-only or not - response: - docs: Object with webhook action descriptions. - type: WebhooksInfoResponse - examples: - - response: - body: - PROJECT_CREATED: - name: name - description: description - key: key - organization-only: true - PROJECT_UPDATED: - name: name - description: description - key: key - organization-only: true - PROJECT_DELETED: - name: name - description: description - key: key - organization-only: true - TASKS_CREATED: - name: name - description: description - key: key - organization-only: true - TASKS_DELETED: - name: name - description: description - key: key - organization-only: true - ANNOTATION_CREATED: - name: name - description: description - key: key - organization-only: true - ANNOTATIONS_CREATED: - name: name - description: description - key: key - organization-only: true - ANNOTATION_UPDATED: - name: name - description: description - key: key - organization-only: true - ANNOTATIONS_DELETED: - name: name - description: description - key: key - organization-only: true - LABEL_LINK_CREATED: - name: name - description: description - key: key - organization-only: true - LABEL_LINK_UPDATED: - name: name - description: description - key: key - organization-only: true - LABEL_LINK_DELETED: - name: name - description: description - key: key - organization-only: true - REVIEW_CREATED: - name: name - description: description - key: key - organization-only: true - REVIEW_UPDATED: - name: name - description: description - key: key - organization-only: true - REVIEWS_DELETED: - name: name - description: description - key: key - organization-only: true + url: url audiences: - public source: openapi: openapi/openapi.yaml types: - WebhooksInfoResponseProjectCreated: + WebhooksInfoResponseAnnotationsCreated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseProjectUpdated: + WebhooksInfoResponseAnnotationsDeleted: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseProjectDeleted: + WebhooksInfoResponseAnnotationCreated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseTasksCreated: + WebhooksInfoResponseAnnotationUpdated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseTasksDeleted: + WebhooksInfoResponseLabelLinkCreated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseAnnotationCreated: + WebhooksInfoResponseLabelLinkDeleted: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseAnnotationsCreated: + WebhooksInfoResponseLabelLinkUpdated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseAnnotationUpdated: + WebhooksInfoResponseProjectCreated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseAnnotationsDeleted: + WebhooksInfoResponseProjectDeleted: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseLabelLinkCreated: + WebhooksInfoResponseProjectUpdated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseLabelLinkUpdated: + WebhooksInfoResponseReviewsDeleted: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseLabelLinkDeleted: + WebhooksInfoResponseReviewCreated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseReviewCreated: + WebhooksInfoResponseReviewUpdated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseReviewUpdated: + WebhooksInfoResponseTasksCreated: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true - WebhooksInfoResponseReviewsDeleted: + WebhooksInfoResponseTasksDeleted: properties: - name: string description: string key: string + name: string organization-only: boolean source: openapi: openapi/openapi.yaml inline: true WebhooksInfoResponse: properties: - PROJECT_CREATED: optional - PROJECT_UPDATED: optional - PROJECT_DELETED: optional - TASKS_CREATED: optional - TASKS_DELETED: optional - ANNOTATION_CREATED: optional ANNOTATIONS_CREATED: optional - ANNOTATION_UPDATED: optional ANNOTATIONS_DELETED: optional + ANNOTATION_CREATED: optional + ANNOTATION_UPDATED: optional LABEL_LINK_CREATED: optional - LABEL_LINK_UPDATED: optional LABEL_LINK_DELETED: optional + LABEL_LINK_UPDATED: optional + PROJECT_CREATED: optional + PROJECT_DELETED: optional + PROJECT_UPDATED: optional + REVIEWS_DELETED: optional REVIEW_CREATED: optional REVIEW_UPDATED: optional - REVIEWS_DELETED: optional + TASKS_CREATED: optional + TASKS_DELETED: optional source: openapi: openapi/openapi.yaml diff --git a/.mock/definition/workspaces.yml b/.mock/definition/workspaces.yml index 03dd75e92..a5a3bee8c 100644 --- a/.mock/definition/workspaces.yml +++ b/.mock/definition/workspaces.yml @@ -32,13 +32,13 @@ service: examples: - response: body: - - id: 1 - title: title + - color: color + created_by: 1 description: description - color: color - is_personal: true + id: 1 is_archived: true - created_by: 1 + is_personal: true + title: title audiences: - public create: @@ -58,25 +58,25 @@ service: name: WorkspaceRequest body: properties: - title: - type: string - docs: Workspace name - validation: - minLength: 1 - maxLength: 1000 - description: - type: optional - docs: Workspace description color: type: optional validation: maxLength: 16 - is_personal: - type: optional - docs: Workspace is a personal user workspace + description: + type: optional + docs: Workspace description is_archived: type: optional docs: Workspace is archived + is_personal: + type: optional + docs: Workspace is a personal user workspace + title: + type: string + docs: Workspace name + validation: + minLength: 1 + maxLength: 1000 content-type: application/json response: docs: '' @@ -86,13 +86,13 @@ service: title: title response: body: - id: 1 - title: title - description: description color: color - is_personal: true - is_archived: true created_by: 1 + description: description + id: 1 + is_archived: true + is_personal: true + title: title audiences: - public get: @@ -113,13 +113,13 @@ service: id: 1 response: body: - id: 1 - title: title - description: description color: color - is_personal: true - is_archived: true created_by: 1 + description: description + id: 1 + is_archived: true + is_personal: true + title: title audiences: - public delete: @@ -151,25 +151,25 @@ service: name: PatchedWorkspaceRequest body: properties: - title: + color: type: optional - docs: Workspace name validation: - minLength: 1 - maxLength: 1000 + maxLength: 16 description: type: optional docs: Workspace description - color: - type: optional - validation: - maxLength: 16 - is_personal: - type: optional - docs: Workspace is a personal user workspace is_archived: type: optional docs: Workspace is archived + is_personal: + type: optional + docs: Workspace is a personal user workspace + title: + type: optional + docs: Workspace name + validation: + minLength: 1 + maxLength: 1000 content-type: application/json response: docs: '' @@ -180,13 +180,13 @@ service: request: {} response: body: - id: 1 - title: title - description: description color: color - is_personal: true - is_archived: true created_by: 1 + description: description + id: 1 + is_archived: true + is_personal: true + title: title audiences: - public api_workspaces_projects_retrieve: @@ -207,57 +207,57 @@ service: id: 1 response: body: - id: 1 - title: title - description: description - label_config: label_config - expert_instruction: expert_instruction - show_instruction: true - show_skip_button: true - enable_empty_annotation: true - show_annotation_history: true - organization: 1 color: color - maximum_annotations: 1 - is_published: true - model_version: model_version - is_draft: true + config_has_control_tags: true + config_suitable_for_bulk_annotation: true + control_weights: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' + description: description + enable_empty_annotation: true + evaluate_predictions_automatically: true + expert_instruction: expert_instruction + finished_task_number: 1 + ground_truth_number: 1 + id: 1 + is_draft: true + is_published: true + label_config: label_config + maximum_annotations: 1 min_annotations_to_start_training: 1 - start_training_on_annotation_update: true - show_collab_predictions: true + model_version: model_version num_tasks_with_annotations: 1 - task_number: 1 - useful_annotation_number: 1 - ground_truth_number: 1 - skipped_annotations_number: 1 - total_annotations_number: 1 - total_predictions_number: 1 - sampling: Sequential sampling - show_ground_truth_first: true - show_overlap_first: true + organization: 1 overlap_cohort_percentage: 1 - task_data_login: task_data_login - task_data_password: task_data_password - control_weights: - key: value parsed_label_config: key: value - evaluate_predictions_automatically: true - config_has_control_tags: true - skip_queue: REQUEUE_FOR_ME - reveal_preannotations_interactively: true pinned_at: '2024-01-15T09:30:00Z' - finished_task_number: 1 - queue_total: 1 queue_done: 1 - config_suitable_for_bulk_annotation: true + queue_total: 1 + reveal_preannotations_interactively: true + sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: 1 + start_training_on_annotation_update: true + task_data_login: task_data_login + task_data_password: task_data_password + task_number: 1 + title: title + total_annotations_number: 1 + total_predictions_number: 1 + useful_annotation_number: 1 api_workspaces_projects_create: path: /api/workspaces/{id}/projects/ method: POST @@ -272,40 +272,35 @@ service: name: ProjectRequest body: properties: - title: + color: type: optional - docs: Project name. Must be between 3 and 50 characters long. validation: - minLength: 3 - maxLength: 50 + maxLength: 16 + control_weights: optional + created_by: + type: optional + docs: Project owner description: type: optional docs: Project description - label_config: - type: optional - docs: Label config in XML format. See more about it in documentation + enable_empty_annotation: + type: optional + docs: Allow annotators to submit empty annotations + evaluate_predictions_automatically: + type: optional + docs: Retrieve and display predictions when loading a task expert_instruction: type: optional docs: Labeling instructions in HTML format - show_instruction: - type: optional - docs: Show instructions to the annotator before they start - show_skip_button: - type: optional - docs: >- - Show a skip button in interface and allow annotators to skip the - task - enable_empty_annotation: + is_draft: type: optional - docs: Allow annotators to submit empty annotations - show_annotation_history: + docs: Whether or not the project is in the middle of being created + is_published: type: optional - docs: Show annotation history to annotator - organization: optional - color: + docs: Whether or not the project is published to annotators + label_config: type: optional - validation: - maxLength: 16 + docs: Label config in XML format. See more about it in documentation maximum_annotations: type: optional docs: >- @@ -315,18 +310,6 @@ service: validation: min: -2147483648 max: 2147483647 - is_published: - type: optional - docs: Whether or not the project is published to annotators - model_version: - type: optional - docs: Machine learning model version - is_draft: - type: optional - docs: Whether or not the project is in the middle of being created - created_by: - type: optional - docs: Project owner min_annotations_to_start_training: type: optional docs: >- @@ -335,17 +318,39 @@ service: validation: min: -2147483648 max: 2147483647 - show_collab_predictions: - type: optional - docs: If set, the annotator can view model predictions - sampling: optional - show_ground_truth_first: optional - show_overlap_first: optional + model_version: + type: optional + docs: Machine learning model version + organization: optional overlap_cohort_percentage: type: optional validation: min: -2147483648 max: 2147483647 + pinned_at: + type: optional + docs: Pinned date and time + reveal_preannotations_interactively: + type: optional + docs: Reveal pre-annotations interactively + sampling: optional + show_annotation_history: + type: optional + docs: Show annotation history to annotator + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + show_ground_truth_first: optional + show_instruction: + type: optional + docs: Show instructions to the annotator before they start + show_overlap_first: optional + show_skip_button: + type: optional + docs: >- + Show a skip button in interface and allow annotators to skip the + task + skip_queue: optional task_data_login: type: optional docs: 'Task data credentials: login' @@ -356,17 +361,12 @@ service: docs: 'Task data credentials: password' validation: maxLength: 256 - control_weights: optional - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - skip_queue: optional - reveal_preannotations_interactively: - type: optional - docs: Reveal pre-annotations interactively - pinned_at: - type: optional - docs: Pinned date and time + title: + type: optional + docs: Project name. Must be between 3 and 50 characters long. + validation: + minLength: 3 + maxLength: 50 content-type: application/json response: docs: '' @@ -377,57 +377,57 @@ service: request: {} response: body: - id: 1 - title: title - description: description - label_config: label_config - expert_instruction: expert_instruction - show_instruction: true - show_skip_button: true - enable_empty_annotation: true - show_annotation_history: true - organization: 1 color: color - maximum_annotations: 1 - is_published: true - model_version: model_version - is_draft: true + config_has_control_tags: true + config_suitable_for_bulk_annotation: true + control_weights: + key: value + created_at: '2024-01-15T09:30:00Z' created_by: - id: 1 + avatar: avatar + email: email first_name: first_name + id: 1 last_name: last_name - email: email - avatar: avatar - created_at: '2024-01-15T09:30:00Z' + description: description + enable_empty_annotation: true + evaluate_predictions_automatically: true + expert_instruction: expert_instruction + finished_task_number: 1 + ground_truth_number: 1 + id: 1 + is_draft: true + is_published: true + label_config: label_config + maximum_annotations: 1 min_annotations_to_start_training: 1 - start_training_on_annotation_update: true - show_collab_predictions: true + model_version: model_version num_tasks_with_annotations: 1 - task_number: 1 - useful_annotation_number: 1 - ground_truth_number: 1 - skipped_annotations_number: 1 - total_annotations_number: 1 - total_predictions_number: 1 - sampling: Sequential sampling - show_ground_truth_first: true - show_overlap_first: true + organization: 1 overlap_cohort_percentage: 1 - task_data_login: task_data_login - task_data_password: task_data_password - control_weights: - key: value parsed_label_config: key: value - evaluate_predictions_automatically: true - config_has_control_tags: true - skip_queue: REQUEUE_FOR_ME - reveal_preannotations_interactively: true pinned_at: '2024-01-15T09:30:00Z' - finished_task_number: 1 - queue_total: 1 queue_done: 1 - config_suitable_for_bulk_annotation: true + queue_total: 1 + reveal_preannotations_interactively: true + sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: 1 + start_training_on_annotation_update: true + task_data_login: task_data_login + task_data_password: task_data_password + task_number: 1 + title: title + total_annotations_number: 1 + total_predictions_number: 1 + useful_annotation_number: 1 api_workspaces_projects_destroy: path: /api/workspaces/{id}/projects/ method: DELETE diff --git a/.mock/definition/workspaces/members.yml b/.mock/definition/workspaces/members.yml index c531f7454..f48b32497 100644 --- a/.mock/definition/workspaces/members.yml +++ b/.mock/definition/workspaces/members.yml @@ -23,30 +23,30 @@ service: response: body: - user: - id: 1 - first_name: first_name - last_name: last_name - username: username - email: email - last_activity: '2024-01-15T09:30:00Z' - custom_hotkeys: - key: value - avatar: avatar - initials: initials - phone: phone active_organization: 1 active_organization_meta: active_organization_meta allow_newsletters: true + avatar: avatar + custom_hotkeys: + key: value date_joined: '2024-01-15T09:30:00Z' - org_membership: - - role: role - active: active - organization_id: 1 + email: email + first_name: first_name + id: 1 + initials: initials + last_activity: '2024-01-15T09:30:00Z' + last_name: last_name lse_fields: + email_notification_settings: email_notification_settings invite_expired: invite_expired invite_expired_at: invite_expired_at - email_notification_settings: email_notification_settings + org_membership: + - active: active + organization_id: 1 + role: role pause: pause + phone: phone + username: username workspace: 1 audiences: - public diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index 6a582b6a4..0a7a70bf8 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -1,181 +1,171 @@ openapi: 3.0.3 info: - title: Label Studio API - version: '' - description: Label Studio API for data annotation and labeling contact: url: https://labelstud.io + description: Label Studio API for data annotation and labeling + title: Label Studio API + version: '' paths: /api/activity-logs/: get: + description: Retrieve activity logs filtered by workspace, project, user, HTTP method, date range or search query. operationId: api_activity_logs_list - description: Retrieve activity logs filtered by workspace, project, user, HTTP - method, date range or search query. - summary: Get activity logs parameters: - - in: query - name: end_date - schema: - type: string - description: End date/time (ISO-8601) for log filtering. - - in: query - name: method - schema: - type: string - enum: - - DELETE - - GET - - PATCH - - POST - - PUT - - all - default: all - description: HTTP request method used in the log. - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: page - schema: - type: integer - description: '[or "start"] Current page index.' - - in: query - name: page_size - schema: - type: integer - description: '[or "length"] Logs per page, use -1 to obtain all logs (might - be slow).' - - in: query - name: project - schema: - type: integer - description: Project ID to filter logs. - - in: query - name: search - schema: - type: string - description: Search expression using "AND"/"OR" to filter by request URL. - - in: query - name: start_date - schema: - type: string - description: Start date/time (ISO-8601) for log filtering. - - in: query - name: user - schema: - type: integer - description: User ID to filter logs. - - in: query - name: workspace - schema: - type: integer - description: Workspace owner ID to filter logs. - tags: - - Activity Log - security: - - Token: [] + - description: End date/time (ISO-8601) for log filtering. + in: query + name: end_date + schema: + type: string + - description: HTTP request method used in the log. + in: query + name: method + schema: + default: all + enum: + - DELETE + - GET + - PATCH + - POST + - PUT + - all + type: string + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: '[or "start"] Current page index.' + in: query + name: page + schema: + type: integer + - description: '[or "length"] Logs per page, use -1 to obtain all logs (might be slow).' + in: query + name: page_size + schema: + type: integer + - description: Project ID to filter logs. + in: query + name: project + schema: + type: integer + - description: Search expression using "AND"/"OR" to filter by request URL. + in: query + name: search + schema: + type: string + - description: Start date/time (ISO-8601) for log filtering. + in: query + name: start_date + schema: + type: string + - description: User ID to filter logs. + in: query + name: user + schema: + type: integer + - description: Workspace owner ID to filter logs. + in: query + name: workspace + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/ActivityLogResponse' + type: array description: Activity logs '404': description: No more logs found - /api/annotation-history/: - get: - operationId: api_annotation_history_list - description: 'List annotation history items for an annotation. Annotation history - logs all actions performed with annotations, such as: imports, submits, updates, - reviews, and more. Users can view annotation history items in the Annotation - History panel during labeling.' - summary: List all annotation history items for annotation - parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Annotation History security: - - Token: [] + - Token: [] + summary: Get activity logs + tags: + - Activity Log + /api/annotation-history/: + delete: + description: Delete all annotation history items for a specific annotation, task or project. This method is available only for users with administrator roles. + operationId: api_annotation_history_destroy responses: '200': content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/AnnotationHistory' - description: '' - delete: - operationId: api_annotation_history_destroy - description: Delete all annotation history items for a specific annotation, - task or project. This method is available only for users with administrator - roles. + properties: + removed: + description: Number of removed items + type: integer + type: object + description: Returns a dict containing the count of removed items. + security: + - Token: [] summary: Delete annotation history items tags: - - Annotation History - security: - - Token: [] + - Annotation History + get: + description: 'List annotation history items for an annotation. Annotation history logs all actions performed with annotations, such as: imports, submits, updates, reviews, and more. Users can view annotation history items in the Annotation History panel during labeling.' + operationId: api_annotation_history_list + parameters: + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: object - properties: - removed: - type: integer - description: Number of removed items - description: Returns a dict containing the count of removed items. + items: + $ref: '#/components/schemas/AnnotationHistory' + type: array + description: '' + security: + - Token: [] + summary: List all annotation history items for annotation + tags: + - Annotation History /api/annotation-reviews/: get: - operationId: api_annotation_reviews_list description: List all reviews for a specific annotation ID. - summary: List reviews + operationId: api_annotation_reviews_list parameters: - - in: query - name: annotation - schema: - type: integer - - in: query - name: annotation__task__project - schema: - type: integer - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Annotation Reviews - security: - - Token: [] + - in: query + name: annotation + schema: + type: integer + - in: query + name: annotation__task__project + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/AnnotationReview' + type: array description: '' + security: + - Token: [] + summary: List reviews + tags: + - Annotation Reviews post: - operationId: api_annotation_reviews_create description: Create a review for a specific annotation ID. - summary: Create review - tags: - - Annotation Reviews + operationId: api_annotation_reviews_create requestBody: content: application/json: @@ -188,8 +178,6 @@ paths: schema: $ref: '#/components/schemas/AnnotationReviewRequest' required: true - security: - - Token: [] responses: '201': content: @@ -197,22 +185,73 @@ paths: schema: $ref: '#/components/schemas/AnnotationReview' description: '' + security: + - Token: [] + summary: Create review + tags: + - Annotation Reviews /api/annotation-reviews/{id}/: + delete: + description: Delete a review by ID + operationId: api_annotation_reviews_destroy + parameters: + - description: A unique integer value identifying this annotation review. + in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete review + tags: + - Annotation Reviews get: - operationId: api_annotation_reviews_retrieve description: Retrieve a specific review by ID for an annotation. - summary: Get review + operationId: api_annotation_reviews_retrieve parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this annotation review. - required: true - tags: - - Annotation Reviews + - description: A unique integer value identifying this annotation review. + in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AnnotationReview' + description: '' security: - - Token: [] + - Token: [] + summary: Get review + tags: + - Annotation Reviews + patch: + description: Update a specific review by ID. + operationId: api_annotation_reviews_partial_update + parameters: + - description: A unique integer value identifying this annotation review. + in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAnnotationReviewRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAnnotationReviewRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAnnotationReviewRequest' responses: '200': content: @@ -220,19 +259,21 @@ paths: schema: $ref: '#/components/schemas/AnnotationReview' description: '' + security: + - Token: [] + summary: Update review + tags: + - Annotation Reviews put: - operationId: api_annotation_reviews_update description: Overwrite a specific review by ID. - summary: Put review + operationId: api_annotation_reviews_update parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this annotation review. - required: true - tags: - - Annotation Reviews + - description: A unique integer value identifying this annotation review. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -245,8 +286,6 @@ paths: schema: $ref: '#/components/schemas/AnnotationReviewRequest' required: true - security: - - Token: [] responses: '200': content: @@ -254,554 +293,503 @@ paths: schema: $ref: '#/components/schemas/AnnotationReview' description: '' - patch: - operationId: api_annotation_reviews_partial_update - description: Update a specific review by ID. - summary: Update review - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this annotation review. - required: true + security: + - Token: [] + summary: Put review tags: - - Annotation Reviews + - Annotation Reviews + /api/annotations/bulk/: + post: + description: Create multiple annotations at once + operationId: api_annotations_bulk_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedAnnotationReviewRequest' + $ref: '#/components/schemas/AnnotationBulkSerializerWithSelectedItemsRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedAnnotationReviewRequest' + $ref: '#/components/schemas/AnnotationBulkSerializerWithSelectedItemsRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedAnnotationReviewRequest' - security: - - Token: [] + $ref: '#/components/schemas/AnnotationBulkSerializerWithSelectedItemsRequest' responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/AnnotationReview' - description: '' + items: + properties: + id: + description: Annotation ID + type: integer + required: + - id + type: object + type: array + description: Bulk annotations created successfully + security: + - Token: [] + summary: Bulk create annotations + tags: + - Annotations + x-fern-audiences: + - public + x-fern-sdk-group-name: annotations + x-fern-sdk-method-name: create_bulk + /api/annotations/{id}/: delete: - operationId: api_annotation_reviews_destroy - description: Delete a review by ID - summary: Delete review + description: Delete an annotation. This action can't be undone! + operationId: api_annotations_destroy parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this annotation review. - required: true - tags: - - Annotation Reviews - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body - /api/annotations/{id}/: + security: + - Token: [] + summary: Delete annotation + tags: + - Annotations + x-fern-audiences: + - public + x-fern-sdk-group-name: annotations + x-fern-sdk-method-name: delete get: + description: Retrieve a specific annotation for a task using the annotation result ID. operationId: api_annotations_retrieve - description: Retrieve a specific annotation for a task using the annotation - result ID. - summary: Get annotation by its ID parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Annotations - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: - schema: - $ref: '#/components/schemas/Annotation' examples: Response: + summary: response value: + completed_by: 1 + ground_truth: false id: 1 + lead_time: 10 + project: 1 result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 task: 1 - project: 1 - completed_by: 1 updated_by: 1 was_cancelled: false - ground_truth: false - lead_time: 10 - summary: response + schema: + $ref: '#/components/schemas/Annotation' description: Retrieved annotation - x-fern-sdk-group-name: annotations - x-fern-sdk-method-name: get + security: + - Token: [] + summary: Get annotation by its ID + tags: + - Annotations x-fern-audiences: - - public + - public + x-fern-sdk-group-name: annotations + x-fern-sdk-method-name: get patch: - operationId: api_annotations_partial_update description: Update existing attributes on an annotation. - summary: Update annotation + operationId: api_annotations_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Annotations + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object - properties: + example: + ground_truth: true result: - type: array - items: - type: object - description: Labeling result in JSON format. Read more about the - format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) - example: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - y: 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - - Person - task: + - Person + width: 50 + x: 20 + y: 30 + was_cancelled: false + properties: + completed_by: + description: User ID of the person who created this annotation type: integer - description: Corresponding task for this annotation + ground_truth: + description: This annotation is a Ground Truth + type: boolean + lead_time: + description: How much time it took to annotate the task (in seconds) + example: 100.5 + type: number project: - type: integer description: Project ID for this annotation - completed_by: type: integer - description: User ID of the person who created this annotation - updated_by: + result: + description: Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + example: + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 + items: + type: object + type: array + task: + description: Corresponding task for this annotation type: integer + updated_by: description: Last user who updated this annotation + type: integer was_cancelled: - type: boolean description: User skipped the task - ground_truth: type: boolean - description: This annotation is a Ground Truth - lead_time: - type: number - description: How much time it took to annotate the task (in seconds) - example: 100.5 required: [] - example: - result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person - was_cancelled: false - ground_truth: true - security: - - Token: [] + type: object responses: '200': content: application/json: - schema: - $ref: '#/components/schemas/Annotation' examples: Response: + summary: response value: + completed_by: 1 + ground_truth: false id: 1 + lead_time: 10 + project: 1 result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 task: 1 - project: 1 - completed_by: 1 updated_by: 1 was_cancelled: false - ground_truth: false - lead_time: 10 - summary: response + schema: + $ref: '#/components/schemas/Annotation' description: Updated annotation - x-fern-sdk-group-name: annotations - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_annotations_destroy - description: Delete an annotation. This action can't be undone! - summary: Delete annotation - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Annotations security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: annotations - x-fern-sdk-method-name: delete + - Token: [] + summary: Update annotation + tags: + - Annotations x-fern-audiences: - - public + - public + x-fern-sdk-group-name: annotations + x-fern-sdk-method-name: update /api/annotations/{id}/convert-to-draft: post: - operationId: api_annotations_convert_to_draft_create description: Convert annotation to draft - summary: Convert annotation to draft + operationId: api_annotations_convert_to_draft_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Annotations - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': description: No response body - x-fern-audiences: - - internal - /api/annotations/bulk/: - post: - operationId: api_annotations_bulk_create - description: Create multiple annotations at once - summary: Bulk create annotations - tags: - - Annotations - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AnnotationBulkSerializerWithSelectedItemsRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AnnotationBulkSerializerWithSelectedItemsRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/AnnotationBulkSerializerWithSelectedItemsRequest' security: - - Token: [] - responses: - '201': - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: integer - description: Annotation ID - required: - - id - description: Bulk annotations created successfully - x-fern-sdk-group-name: annotations - x-fern-sdk-method-name: create_bulk + - Token: [] + summary: Convert annotation to draft + tags: + - Annotations x-fern-audiences: - - public + - internal /api/billing/info: get: - operationId: api_billing_info_retrieve description: Retrieve billing checks and feature flags for the active organization. - summary: Get billing info - tags: - - Billing - security: - - Token: [] + operationId: api_billing_info_retrieve responses: '200': content: application/json: - schema: - $ref: '#/components/schemas/BillingInfoResponse' examples: - Real-sample: + Cloud: + summary: cloud value: billing_checks: - users: - count: 110 - total: 221 - limit: 1000 - reached: false - trial_days: 0 - projects: - count: 2044 - limit: 1000000 - reached: false - organization_is_active: true - license_issued: '2000-01-01' - license_warning: '2030-01-01' - is_license_warning: false - license_expires: '2030-01-02' - is_license_expired: false - prompts_enabled: true - prompts_status: Enabled - prompts_warning: null - is_prompts_warning: false - prompts_expire: null - is_prompts_expire: false - prompts_api_keys_enabled: true - import_storages: + export_storages: count: 0 limit: 0 reached: false - export_storages: + import_storages: count: 0 limit: 0 reached: false + is_license_expired: false + is_license_warning: false + is_prompts_expire: false + is_prompts_warning: false + license_expires: '2025-01-01' + license_issued: '2023-01-01' + license_warning: '2024-12-01' + organization_is_active: true + projects: + count: 3 + limit: 50 + reached: false + prompts_api_keys_enabled: true + prompts_enabled: true + prompts_expire: '2024-12-31' + prompts_status: Enabled + prompts_warning: null results: - count: 42949 - limit: 1000000000 + count: 100 + limit: 1000 + reached: false + trial_days: 14 + users: + count: 5 + limit: 10 reached: false + total: 6 billing_flags: - cloud_instance: true + activated_at: '2023-01-01T00:00:00Z' allow_activity_log: true - allow_invite_project_experts: true - allow_sso: true - white_label_id: null - allow_data_credentials: false - allow_organization_webhooks: false - disable_members_page: false - secure_mode: false - manual_workspace_management: true - manual_role_management: true - hide_storage_settings_for_manager: false - disable_project_imports: false - automax_token_exists: true - automax_enabled: true - storage_persistence: true allow_ai: true - early_adopter: true allow_ask_ai: true + allow_data_credentials: true allow_invite_people: true + allow_invite_project_experts: true + allow_organization_webhooks: true + allow_sso: false allow_storage_proxy: true - embed_enabled: true + automax_enabled: true + automax_token_exists: false + cloud_instance: true + disable_members_page: false + disable_project_imports: false + early_adopter: false embed_domains: - - domain: http://localhost:3000 - - domain: https://purple-zoos-flash.loca.lt + - domain: http://localhost:3000 + - domain: https://example.com + embed_enabled: false embed_settings: public_verify_alg: - - RS256 + - RS256 public_verify_key: '....' - activated_at: null - summary: real-sample - Cloud: + hide_storage_settings_for_manager: false + manual_role_management: false + manual_workspace_management: false + secure_mode: false + storage_persistence: true + white_label_id: null + Enterprise: + summary: enterprise value: billing_checks: - users: - count: 5 - total: 6 - limit: 10 - reached: false - projects: - count: 3 - limit: 50 + export_storages: + count: 0 + limit: 0 reached: false - results: - count: 100 - limit: 1000 + import_storages: + count: 0 + limit: 0 reached: false - trial_days: 14 - organization_is_active: true - license_issued: '2023-01-01' - license_warning: '2024-12-01' + is_license_expired: false is_license_warning: false + is_prompts_expire: false + is_prompts_warning: false license_expires: '2025-01-01' - is_license_expired: false + license_issued: '2023-01-01' + license_warning: '2024-12-01' + organization_is_active: true + projects: + count: 15 + limit: 200 + reached: false + prompts_api_keys_enabled: true prompts_enabled: true + prompts_expire: null prompts_status: Enabled prompts_warning: null - is_prompts_warning: false - prompts_expire: '2024-12-31' - is_prompts_expire: false - prompts_api_keys_enabled: true - import_storages: - count: 0 - limit: 0 + results: + count: 25000 + limit: 100000 reached: false - export_storages: - count: 0 - limit: 0 + trial_days: 0 + users: + count: 20 + limit: 100 reached: false + total: 22 billing_flags: - activated_at: '2023-01-01T00:00:00Z' - cloud_instance: true + activated_at: null allow_activity_log: true - allow_invite_project_experts: true - allow_sso: false - white_label_id: null + allow_ai: false + allow_ask_ai: true allow_data_credentials: true + allow_invite_people: true + allow_invite_project_experts: true allow_organization_webhooks: true + allow_sso: true + allow_storage_proxy: true + automax_enabled: true + automax_token_exists: true + cloud_instance: false disable_members_page: false - secure_mode: false - manual_workspace_management: false - manual_role_management: false - hide_storage_settings_for_manager: false disable_project_imports: false - automax_token_exists: false - automax_enabled: true - storage_persistence: true - allow_ai: true - early_adopter: false - allow_ask_ai: true - allow_invite_people: true - allow_storage_proxy: true - embed_enabled: false + early_adopter: true embed_domains: - - domain: http://localhost:3000 - - domain: https://example.com + - domain: http://localhost:3000 + - domain: https://example.com + embed_enabled: false embed_settings: public_verify_alg: - - RS256 + - RS256 public_verify_key: '....' - summary: cloud - Enterprise: + hide_storage_settings_for_manager: false + manual_role_management: false + manual_workspace_management: false + secure_mode: false + storage_persistence: true + white_label_id: wl-1 + Real-sample: + summary: real-sample value: billing_checks: - users: - count: 20 - total: 22 - limit: 100 - reached: false - projects: - count: 15 - limit: 200 + export_storages: + count: 0 + limit: 0 reached: false - results: - count: 25000 - limit: 100000 + import_storages: + count: 0 + limit: 0 reached: false - trial_days: 0 - organization_is_active: true - license_issued: '2023-01-01' - license_warning: '2024-12-01' - is_license_warning: false - license_expires: '2025-01-01' is_license_expired: false + is_license_warning: false + is_prompts_expire: false + is_prompts_warning: false + license_expires: '2030-01-02' + license_issued: '2000-01-01' + license_warning: '2030-01-01' + organization_is_active: true + projects: + count: 2044 + limit: 1000000 + reached: false + prompts_api_keys_enabled: true prompts_enabled: true + prompts_expire: null prompts_status: Enabled prompts_warning: null - is_prompts_warning: false - prompts_expire: null - is_prompts_expire: false - prompts_api_keys_enabled: true - import_storages: - count: 0 - limit: 0 + results: + count: 42949 + limit: 1000000000 reached: false - export_storages: - count: 0 - limit: 0 + trial_days: 0 + users: + count: 110 + limit: 1000 reached: false + total: 221 billing_flags: activated_at: null - cloud_instance: false allow_activity_log: true + allow_ai: true + allow_ask_ai: true + allow_data_credentials: false + allow_invite_people: true allow_invite_project_experts: true + allow_organization_webhooks: false allow_sso: true - white_label_id: wl-1 - allow_data_credentials: true - allow_organization_webhooks: true + allow_storage_proxy: true + automax_enabled: true + automax_token_exists: true + cloud_instance: true disable_members_page: false - secure_mode: false - manual_workspace_management: false - manual_role_management: false - hide_storage_settings_for_manager: false disable_project_imports: false - automax_token_exists: true - automax_enabled: true - storage_persistence: true - allow_ai: false early_adopter: true - allow_ask_ai: true - allow_invite_people: true - allow_storage_proxy: true - embed_enabled: false embed_domains: - - domain: http://localhost:3000 - - domain: https://example.com + - domain: http://localhost:3000 + - domain: https://purple-zoos-flash.loca.lt + embed_enabled: true embed_settings: public_verify_alg: - - RS256 + - RS256 public_verify_key: '....' - summary: enterprise + hide_storage_settings_for_manager: false + manual_role_management: true + manual_workspace_management: true + secure_mode: false + storage_persistence: true + white_label_id: null + schema: + $ref: '#/components/schemas/BillingInfoResponse' description: Billing information for the active organization + security: + - Token: [] + summary: Get billing info + tags: + - Billing + x-fern-audiences: + - public x-fern-sdk-group-name: - - billing + - billing x-fern-sdk-method-name: info - x-fern-audiences: - - public /api/blueprints/: post: - operationId: api_blueprints_create description: Create a new blueprint - summary: Create blueprint - tags: - - Blueprints + operationId: api_blueprints_create requestBody: content: application/json: @@ -813,8 +801,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/BlueprintRequest' - security: - - Token: [] responses: '201': content: @@ -822,115 +808,117 @@ paths: schema: $ref: '#/components/schemas/Blueprint' description: '' + security: + - Token: [] + summary: Create blueprint + tags: + - Blueprints /api/blueprints/{id}/: delete: - operationId: api_blueprints_destroy description: Delete a blueprint by ID - summary: Delete blueprint + operationId: api_blueprints_destroy parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Blueprints - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: string responses: '204': description: No response body + security: + - Token: [] + summary: Delete blueprint + tags: + - Blueprints /api/blueprints/{share_id}/create-project: get: - operationId: api_blueprints_create_project_retrieve description: Create a new project from an existing blueprint - summary: Create project from blueprint + operationId: api_blueprints_create_project_retrieve parameters: - - in: path - name: share_id - schema: - type: string - description: Blueprint share ID - required: true - tags: - - Blueprints - security: - - {} + - description: Blueprint share ID + in: path + name: share_id + required: true + schema: + type: string responses: '302': content: application/json: schema: - type: object properties: redirect_url: - type: string description: URL to redirect to the new project + type: string + type: object description: Redirect to new project '404': description: Blueprint not found + security: + - {} + summary: Create project from blueprint + tags: + - Blueprints /api/comments/: get: - operationId: api_comments_list description: List all comments for a specific annotation ID. - summary: List comments + operationId: api_comments_list parameters: - - in: query - name: annotation - schema: - type: integer - - in: query - name: annotators - schema: - type: string - - in: query - name: draft - schema: - type: integer - - in: query - name: expand_created_by - schema: - type: boolean - default: false - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: projects - schema: - type: string - tags: - - Comments - security: - - Token: [] + - in: query + name: annotation + schema: + type: integer + - in: query + name: annotators + schema: + type: string + - in: query + name: draft + schema: + type: integer + - in: query + name: expand_created_by + schema: + default: false + type: boolean + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - in: query + name: projects + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/MaybeExpandedComment' + type: array description: List of comments + security: + - Token: [] + summary: List comments + tags: + - Comments + x-fern-audiences: + - public x-fern-sdk-group-name: comments x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_comments_create description: Create a comment for a specific annotation ID. - summary: Create comment + operationId: api_comments_create parameters: - - in: query - name: expand_created_by - schema: - type: boolean - description: Expand the created_by field - tags: - - Comments + - description: Expand the created_by field + in: query + name: expand_created_by + schema: + type: boolean requestBody: content: application/json: @@ -942,8 +930,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/CommentRequest' - security: - - Token: [] responses: '201': content: @@ -951,30 +937,104 @@ paths: schema: $ref: '#/components/schemas/MaybeExpandedComment' description: '' + security: + - Token: [] + summary: Create comment + tags: + - Comments + x-fern-audiences: + - public x-fern-sdk-group-name: comments x-fern-sdk-method-name: create + /api/comments/export/: + get: + description: Export comments to CSV file + operationId: api_comments_export_retrieve + parameters: + - in: query + name: annotation + schema: + type: integer + - in: query + name: annotators + schema: + type: string + - in: query + name: draft + schema: + type: integer + - in: query + name: expand_created_by + schema: + default: false + type: boolean + - in: query + name: projects + schema: + type: string + - description: Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York" + in: query + name: tz + schema: + type: string + responses: + '200': + content: + application/json: + schema: + format: binary + type: string + description: CSV file with comments + security: + - Token: [] + summary: Export comments to CSV + tags: + - Comments x-fern-audiences: - - public + - public + x-fern-sdk-group-name: comments + x-fern-sdk-method-name: export /api/comments/{id}/: + delete: + description: Delete a comment by ID + operationId: api_comments_destroy + parameters: + - description: Expand the created_by field + in: query + name: expand_created_by + schema: + type: boolean + - in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete comment + tags: + - Comments + x-fern-audiences: + - public + x-fern-sdk-group-name: comments + x-fern-sdk-method-name: delete get: - operationId: api_comments_retrieve description: Retrieve a specific comment by ID for an annotation. - summary: Get comment + operationId: api_comments_retrieve parameters: - - in: query - name: expand_created_by - schema: - type: boolean - description: Expand the created_by field - - in: path - name: id - schema: - type: string - required: true - tags: - - Comments - security: - - Token: [] + - description: Expand the created_by field + in: query + name: expand_created_by + schema: + type: boolean + - in: path + name: id + required: true + schema: + type: string responses: '200': content: @@ -982,174 +1042,99 @@ paths: schema: $ref: '#/components/schemas/MaybeExpandedComment' description: '' + security: + - Token: [] + summary: Get comment + tags: + - Comments + x-fern-audiences: + - public x-fern-sdk-group-name: comments x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_comments_update - description: Overwrite a specific comment by ID. - summary: Put comment + patch: + description: Update a specific comment by ID. + operationId: api_comments_partial_update parameters: - - in: query - name: expand_created_by - schema: - type: boolean - description: Expand the created_by field - - in: path - name: id - schema: - type: string - required: true - tags: - - Comments + - description: Expand the created_by field + in: query + name: expand_created_by + schema: + type: boolean + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/CommentRequest' + $ref: '#/components/schemas/PatchedCommentRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/CommentRequest' + $ref: '#/components/schemas/PatchedCommentRequest' multipart/form-data: schema: - $ref: '#/components/schemas/CommentRequest' - security: - - Token: [] + $ref: '#/components/schemas/PatchedCommentRequest' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Comment' + $ref: '#/components/schemas/MaybeExpandedComment' description: '' - x-fern-audiences: - - internal - patch: - operationId: api_comments_partial_update - description: Update a specific comment by ID. + security: + - Token: [] summary: Update comment - parameters: - - in: query - name: expand_created_by - schema: - type: boolean - description: Expand the created_by field - - in: path - name: id - schema: - type: string - required: true tags: - - Comments + - Comments + x-fern-audiences: + - public + x-fern-sdk-group-name: comments + x-fern-sdk-method-name: update + put: + description: Overwrite a specific comment by ID. + operationId: api_comments_update + parameters: + - description: Expand the created_by field + in: query + name: expand_created_by + schema: + type: boolean + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedCommentRequest' + $ref: '#/components/schemas/CommentRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedCommentRequest' + $ref: '#/components/schemas/CommentRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedCommentRequest' - security: - - Token: [] + $ref: '#/components/schemas/CommentRequest' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MaybeExpandedComment' + $ref: '#/components/schemas/Comment' description: '' - x-fern-sdk-group-name: comments - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_comments_destroy - description: Delete a comment by ID - summary: Delete comment - parameters: - - in: query - name: expand_created_by - schema: - type: boolean - description: Expand the created_by field - - in: path - name: id - schema: - type: string - required: true - tags: - - Comments security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: comments - x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/comments/export/: - get: - operationId: api_comments_export_retrieve - description: Export comments to CSV file - summary: Export comments to CSV - parameters: - - in: query - name: annotation - schema: - type: integer - - in: query - name: annotators - schema: - type: string - - in: query - name: draft - schema: - type: integer - - in: query - name: expand_created_by - schema: - type: boolean - default: false - - in: query - name: projects - schema: - type: string - - in: query - name: tz - schema: - type: string - description: Timezone in which to export the data. Format IANA timezone name, - e.g. "America/New_York" + - Token: [] + summary: Put comment tags: - - Comments - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - type: string - format: binary - description: CSV file with comments - x-fern-sdk-group-name: comments - x-fern-sdk-method-name: export + - Comments x-fern-audiences: - - public + - internal /api/current-user: get: - operationId: api_current_user_retrieve description: Get info about the currently authenticated user. - summary: Get current user info - tags: - - Users - security: - - Token: [] + operationId: api_current_user_retrieve responses: '200': content: @@ -1157,16 +1142,18 @@ paths: schema: $ref: '#/components/schemas/LseUserAPI' description: '' + security: + - Token: [] + summary: Get current user info + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: get_current_user - x-fern-audiences: - - public patch: - operationId: api_current_user_partial_update description: Update details for the currently authenticated user. - summary: Update current user - tags: - - Users + operationId: api_current_user_partial_update requestBody: content: application/json: @@ -1178,8 +1165,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedLseUserSerializerUpdateRequest' - security: - - Token: [] responses: '200': content: @@ -1187,19 +1172,19 @@ paths: schema: $ref: '#/components/schemas/LseUserAPI' description: '' + security: + - Token: [] + summary: Update current user + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: update_current_user - x-fern-audiences: - - public /api/current-user/hotkeys/: get: - operationId: api_current_user_hotkeys_retrieve description: Retrieve the custom hotkeys configuration for the current user. - summary: Get user hotkeys - tags: - - Users - security: - - Token: [] + operationId: api_current_user_hotkeys_retrieve responses: '200': content: @@ -1207,16 +1192,18 @@ paths: schema: $ref: '#/components/schemas/Hotkeys' description: '' + security: + - Token: [] + summary: Get user hotkeys + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: get_hotkeys - x-fern-audiences: - - public patch: - operationId: api_current_user_hotkeys_partial_update description: Update the custom hotkeys configuration for the current user. - summary: Update user hotkeys - tags: - - Users + operationId: api_current_user_hotkeys_partial_update requestBody: content: application/json: @@ -1228,8 +1215,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedHotkeysRequest' - security: - - Token: [] responses: '200': content: @@ -1237,66 +1222,65 @@ paths: schema: $ref: '#/components/schemas/Hotkeys' description: '' + security: + - Token: [] + summary: Update user hotkeys + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: update_hotkeys - x-fern-audiences: - - public /api/current-user/reset-token/: post: - operationId: api_current_user_reset_token_create description: Reset the user token for the current user. - summary: Reset user token - tags: - - Users - security: - - Token: [] + operationId: api_current_user_reset_token_create responses: '201': content: application/json: schema: - type: object properties: token: type: string + type: object description: User token response + security: + - Token: [] + summary: Reset user token + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: reset_token - x-fern-audiences: - - public /api/current-user/token: get: - operationId: api_current_user_token_retrieve description: Get a user token to authenticate to the API as the current user. - summary: Get user token - tags: - - Users - security: - - Token: [] + operationId: api_current_user_token_retrieve responses: '200': content: application/json: schema: - type: object properties: detail: type: string + type: object description: User token response + security: + - Token: [] + summary: Get user token + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: get_token - x-fern-audiences: - - public /api/current-user/whoami: get: + description: Retrieve details of the account that you are using to access the API. operationId: api_current_user_whoami_retrieve - description: Retrieve details of the account that you are using to access the - API. - summary: Retrieve my user - tags: - - Users - security: - - Token: [] responses: '200': content: @@ -1304,117 +1288,144 @@ paths: schema: $ref: '#/components/schemas/LseUser' description: '' + security: + - Token: [] + summary: Retrieve my user + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: whoami - x-fern-audiences: - - public /api/dashboards/{id}/kpis/{kpi_key}: get: + description: 'Get Key Performance Indicator (KPI) data for a dashboard. Supports various KPIs including: skipped_annotations, accepted_annotations, rejected_annotations, average_time_per_task_min, total_annotations, regions_created, and more.' operationId: api_dashboards_kpis_retrieve - description: 'Get Key Performance Indicator (KPI) data for a dashboard. Supports - various KPIs including: skipped_annotations, accepted_annotations, rejected_annotations, - average_time_per_task_min, total_annotations, regions_created, and more.' - summary: Get KPI data parameters: - - in: query - name: end - schema: - type: string - description: End date for filtering (ISO format) - - in: path - name: id - schema: - type: integer - required: true - - in: path - name: kpi_key - schema: - type: string - required: true - - in: query - name: members - schema: - type: array - items: + - description: End date for filtering (ISO format) + in: query + name: end + schema: + type: string + - in: path + name: id + required: true + schema: type: integer - description: Array of user IDs to filter by - - in: query - name: start - schema: - type: string - description: Start date for filtering (ISO format) - tags: - - Dashboard - security: - - Token: [] + - in: path + name: kpi_key + required: true + schema: + type: string + - description: Array of user IDs to filter by + in: query + name: members + schema: + items: + type: integer + type: array + - description: Start date for filtering (ISO format) + in: query + name: start + schema: + type: string responses: '200': content: application/json: schema: - type: object description: KPI data with the requested key and its value + type: object description: KPI data '404': description: KPI not found '501': description: KPI depends on other KPIs - not implemented + security: + - Token: [] + summary: Get KPI data + tags: + - Dashboard /api/dataset-storages/: get: + description: Retrieve a list of the dataset storages of all types with their IDs. operationId: api_dataset_storages_list - description: Retrieve a list of the dataset storages of all types with their - IDs. - summary: List all dataset storages from the project parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Storage - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': description: List of DatasetStorageSerializer + security: + - Token: [] + summary: List all dataset storages from the project + tags: + - Storage /api/dataset-storages/azure/: get: - operationId: api_dataset_storages_azure_list description: Get a list of all Azure import storage connections. - summary: Get all import storage + operationId: api_dataset_storages_azure_list parameters: - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - 'Dataset Storage: Azure' - security: - - Token: [] + - description: Dataset ID + in: query + name: dataset + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/AzureDatasetStorage' + type: array description: '' + security: + - Token: [] + summary: Get all import storage + tags: + - 'Dataset Storage: Azure' post: - operationId: api_dataset_storages_azure_create description: Create a new Azure import storage connection. + operationId: api_dataset_storages_azure_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureDatasetStorageRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureDatasetStorageRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureDatasetStorageRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureDatasetStorage' + description: '' + security: + - Token: [] summary: Create import storage tags: - - 'Dataset Storage: Azure' + - 'Dataset Storage: Azure' + /api/dataset-storages/azure/check-for-records/: + post: + description: Checks for existence of records matching the file pattern in the bucket/prefix + operationId: api_dataset_storages_azure_check_for_records_create requestBody: content: application/json: @@ -1427,8 +1438,34 @@ paths: schema: $ref: '#/components/schemas/AzureDatasetStorageRequest' required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureDatasetStorage' + description: '' security: - - Token: [] + - Token: [] + summary: Check for records given the file pattern + tags: + - 'Dataset Storage: Azure' + /api/dataset-storages/azure/validate/: + post: + description: Validate a specific Azure import storage connection. + operationId: api_dataset_storages_azure_validate_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureDatasetStorageRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureDatasetStorageRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureDatasetStorageRequest' + required: true responses: '201': content: @@ -1436,21 +1473,38 @@ paths: schema: $ref: '#/components/schemas/AzureDatasetStorage' description: '' + security: + - Token: [] + summary: Validate import storage + tags: + - 'Dataset Storage: Azure' /api/dataset-storages/azure/{id}/: + delete: + description: Delete a specific Azure import storage connection. + operationId: api_dataset_storages_azure_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Dataset Storage: Azure' get: - operationId: api_dataset_storages_azure_retrieve description: Get a specific Azure import storage connection. - summary: Get import storage + operationId: api_dataset_storages_azure_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: Azure' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -1458,18 +1512,20 @@ paths: schema: $ref: '#/components/schemas/AzureDatasetStorage' description: '' + security: + - Token: [] + summary: Get import storage + tags: + - 'Dataset Storage: Azure' patch: - operationId: api_dataset_storages_azure_partial_update description: Update a specific Azure import storage connection. - summary: Update import storage + operationId: api_dataset_storages_azure_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: Azure' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -1481,8 +1537,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedAzureDatasetStorageRequest' - security: - - Token: [] responses: '200': content: @@ -1490,54 +1544,39 @@ paths: schema: $ref: '#/components/schemas/AzureDatasetStorage' description: '' - delete: - operationId: api_dataset_storages_azure_destroy - description: Delete a specific Azure import storage connection. - summary: Delete import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: Azure' security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Update import storage + tags: + - 'Dataset Storage: Azure' /api/dataset-storages/azure/{id}/columns/: get: - operationId: api_dataset_storages_azure_columns_retrieve description: Retrieves column names from users JSON/blob data in bucket - summary: Get data column names from storage + operationId: api_dataset_storages_azure_columns_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: Azure' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': description: No response body + security: + - Token: [] + summary: Get data column names from storage + tags: + - 'Dataset Storage: Azure' /api/dataset-storages/azure/{id}/sync/: post: - operationId: api_dataset_storages_azure_sync_create description: Sync tasks from an Azure import storage connection. - summary: Sync import storage + operationId: api_dataset_storages_azure_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: Azure' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -1550,8 +1589,6 @@ paths: schema: $ref: '#/components/schemas/AzureDatasetStorageRequest' required: true - security: - - Token: [] responses: '200': content: @@ -1559,99 +1596,100 @@ paths: schema: $ref: '#/components/schemas/AzureDatasetStorage' description: '' - /api/dataset-storages/azure/check-for-records/: - post: - operationId: api_dataset_storages_azure_check_for_records_create - description: Checks for existence of records matching the file pattern in the - bucket/prefix - summary: Check for records given the file pattern + security: + - Token: [] + summary: Sync import storage + tags: + - 'Dataset Storage: Azure' + /api/dataset-storages/gcs/: + get: + description: Get a list of all GCS import storage connections. + operationId: api_dataset_storages_gcs_list + parameters: + - description: Dataset ID + in: query + name: dataset + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + $ref: '#/components/schemas/GCSDatasetStorage' + type: array + description: '' + security: + - Token: [] + summary: Get all import storage tags: - - 'Dataset Storage: Azure' + - 'Dataset Storage: GCS' + post: + description: Create a new GCS import storage connection. + operationId: api_dataset_storages_gcs_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/AzureDatasetStorageRequest' + $ref: '#/components/schemas/GCSDatasetStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/AzureDatasetStorageRequest' + $ref: '#/components/schemas/GCSDatasetStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/AzureDatasetStorageRequest' + $ref: '#/components/schemas/GCSDatasetStorageRequest' required: true - security: - - Token: [] responses: '201': content: application/json: schema: - $ref: '#/components/schemas/AzureDatasetStorage' + $ref: '#/components/schemas/GCSDatasetStorage' description: '' - /api/dataset-storages/azure/validate/: - post: - operationId: api_dataset_storages_azure_validate_create - description: Validate a specific Azure import storage connection. - summary: Validate import storage + security: + - Token: [] + summary: Create import storage tags: - - 'Dataset Storage: Azure' + - 'Dataset Storage: GCS' + /api/dataset-storages/gcs/check-for-records/: + post: + description: Checks for existence of records matching the file pattern in the bucket/prefix + operationId: api_dataset_storages_gcs_check_for_records_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/AzureDatasetStorageRequest' + $ref: '#/components/schemas/GCSDatasetStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/AzureDatasetStorageRequest' + $ref: '#/components/schemas/GCSDatasetStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/AzureDatasetStorageRequest' + $ref: '#/components/schemas/GCSDatasetStorageRequest' required: true - security: - - Token: [] responses: '201': content: application/json: schema: - $ref: '#/components/schemas/AzureDatasetStorage' + $ref: '#/components/schemas/GCSDatasetStorage' description: '' - /api/dataset-storages/gcs/: - get: - operationId: api_dataset_storages_gcs_list - description: Get a list of all GCS import storage connections. - summary: Get all import storage - parameters: - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - 'Dataset Storage: GCS' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/GCSDatasetStorage' - description: '' - post: - operationId: api_dataset_storages_gcs_create - description: Create a new GCS import storage connection. - summary: Create import storage + - Token: [] + summary: Check for records given the file pattern tags: - - 'Dataset Storage: GCS' + - 'Dataset Storage: GCS' + /api/dataset-storages/gcs/validate/: + post: + description: Validate a specific GCS import storage connection. + operationId: api_dataset_storages_gcs_validate_create requestBody: content: application/json: @@ -1664,8 +1702,6 @@ paths: schema: $ref: '#/components/schemas/GCSDatasetStorageRequest' required: true - security: - - Token: [] responses: '201': content: @@ -1673,21 +1709,38 @@ paths: schema: $ref: '#/components/schemas/GCSDatasetStorage' description: '' + security: + - Token: [] + summary: Validate import storage + tags: + - 'Dataset Storage: GCS' /api/dataset-storages/gcs/{id}/: + delete: + description: Delete a specific GCS import storage connection. + operationId: api_dataset_storages_gcs_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Dataset Storage: GCS' get: - operationId: api_dataset_storages_gcs_retrieve description: Get a specific GCS import storage connection. - summary: Get import storage + operationId: api_dataset_storages_gcs_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: GCS' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -1695,18 +1748,20 @@ paths: schema: $ref: '#/components/schemas/GCSDatasetStorage' description: '' - patch: - operationId: api_dataset_storages_gcs_partial_update + security: + - Token: [] + summary: Get import storage + tags: + - 'Dataset Storage: GCS' + patch: description: Update a specific GCS import storage connection. - summary: Update import storage + operationId: api_dataset_storages_gcs_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: GCS' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -1718,8 +1773,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedGCSDatasetStorageRequest' - security: - - Token: [] responses: '200': content: @@ -1727,54 +1780,39 @@ paths: schema: $ref: '#/components/schemas/GCSDatasetStorage' description: '' - delete: - operationId: api_dataset_storages_gcs_destroy - description: Delete a specific GCS import storage connection. - summary: Delete import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: GCS' security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Update import storage + tags: + - 'Dataset Storage: GCS' /api/dataset-storages/gcs/{id}/columns/: get: - operationId: api_dataset_storages_gcs_columns_retrieve description: Retrieves column names from users JSON/blob data in bucket - summary: Get data column names from storage + operationId: api_dataset_storages_gcs_columns_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: GCS' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': description: No response body + security: + - Token: [] + summary: Get data column names from storage + tags: + - 'Dataset Storage: GCS' /api/dataset-storages/gcs/{id}/sync/: post: - operationId: api_dataset_storages_gcs_sync_create description: Sync tasks from an GCS import storage connection. - summary: Sync import storage + operationId: api_dataset_storages_gcs_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: GCS' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -1787,8 +1825,6 @@ paths: schema: $ref: '#/components/schemas/GCSDatasetStorageRequest' required: true - security: - - Token: [] responses: '200': content: @@ -1796,99 +1832,100 @@ paths: schema: $ref: '#/components/schemas/GCSDatasetStorage' description: '' - /api/dataset-storages/gcs/check-for-records/: - post: - operationId: api_dataset_storages_gcs_check_for_records_create - description: Checks for existence of records matching the file pattern in the - bucket/prefix - summary: Check for records given the file pattern + security: + - Token: [] + summary: Sync import storage + tags: + - 'Dataset Storage: GCS' + /api/dataset-storages/s3/: + get: + description: Get a list of all S3 import storage connections. + operationId: api_dataset_storages_s3_list + parameters: + - description: Dataset ID + in: query + name: dataset + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + $ref: '#/components/schemas/S3DatasetStorage' + type: array + description: '' + security: + - Token: [] + summary: Get all import storage tags: - - 'Dataset Storage: GCS' + - 'Dataset Storage: S3' + post: + description: Create a new S3 import storage connection. + operationId: api_dataset_storages_s3_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/GCSDatasetStorageRequest' + $ref: '#/components/schemas/S3DatasetStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/GCSDatasetStorageRequest' + $ref: '#/components/schemas/S3DatasetStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/GCSDatasetStorageRequest' + $ref: '#/components/schemas/S3DatasetStorageRequest' required: true - security: - - Token: [] responses: '201': content: application/json: schema: - $ref: '#/components/schemas/GCSDatasetStorage' + $ref: '#/components/schemas/S3DatasetStorage' description: '' - /api/dataset-storages/gcs/validate/: - post: - operationId: api_dataset_storages_gcs_validate_create - description: Validate a specific GCS import storage connection. - summary: Validate import storage + security: + - Token: [] + summary: Create import storage tags: - - 'Dataset Storage: GCS' + - 'Dataset Storage: S3' + /api/dataset-storages/s3/check-for-records/: + post: + description: Checks for existence of records matching the file pattern in the bucket/prefix + operationId: api_dataset_storages_s3_check_for_records_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/GCSDatasetStorageRequest' + $ref: '#/components/schemas/S3DatasetStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/GCSDatasetStorageRequest' + $ref: '#/components/schemas/S3DatasetStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/GCSDatasetStorageRequest' + $ref: '#/components/schemas/S3DatasetStorageRequest' required: true - security: - - Token: [] responses: '201': content: application/json: schema: - $ref: '#/components/schemas/GCSDatasetStorage' + $ref: '#/components/schemas/S3DatasetStorage' description: '' - /api/dataset-storages/s3/: - get: - operationId: api_dataset_storages_s3_list - description: Get a list of all S3 import storage connections. - summary: Get all import storage - parameters: - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - 'Dataset Storage: S3' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/S3DatasetStorage' - description: '' - post: - operationId: api_dataset_storages_s3_create - description: Create a new S3 import storage connection. - summary: Create import storage + - Token: [] + summary: Check for records given the file pattern tags: - - 'Dataset Storage: S3' + - 'Dataset Storage: S3' + /api/dataset-storages/s3/validate/: + post: + description: Validate a specific S3 import storage connection. + operationId: api_dataset_storages_s3_validate_create requestBody: content: application/json: @@ -1901,8 +1938,6 @@ paths: schema: $ref: '#/components/schemas/S3DatasetStorageRequest' required: true - security: - - Token: [] responses: '201': content: @@ -1910,21 +1945,38 @@ paths: schema: $ref: '#/components/schemas/S3DatasetStorage' description: '' + security: + - Token: [] + summary: Validate import storage + tags: + - 'Dataset Storage: S3' /api/dataset-storages/s3/{id}/: + delete: + description: Delete a specific S3 import storage connection. + operationId: api_dataset_storages_s3_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Dataset Storage: S3' get: - operationId: api_dataset_storages_s3_retrieve description: Get a specific S3 import storage connection. - summary: Get import storage + operationId: api_dataset_storages_s3_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: S3' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -1932,18 +1984,20 @@ paths: schema: $ref: '#/components/schemas/S3DatasetStorage' description: '' + security: + - Token: [] + summary: Get import storage + tags: + - 'Dataset Storage: S3' patch: - operationId: api_dataset_storages_s3_partial_update description: Update a specific S3 import storage connection. - summary: Update import storage + operationId: api_dataset_storages_s3_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: S3' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -1955,8 +2009,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedS3DatasetStorageRequest' - security: - - Token: [] responses: '200': content: @@ -1964,54 +2016,39 @@ paths: schema: $ref: '#/components/schemas/S3DatasetStorage' description: '' - delete: - operationId: api_dataset_storages_s3_destroy - description: Delete a specific S3 import storage connection. - summary: Delete import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: S3' security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Update import storage + tags: + - 'Dataset Storage: S3' /api/dataset-storages/s3/{id}/columns/: get: - operationId: api_dataset_storages_s3_columns_retrieve description: Retrieves column names from users JSON/blob data in bucket - summary: Get data column names from storage + operationId: api_dataset_storages_s3_columns_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: S3' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': description: No response body + security: + - Token: [] + summary: Get data column names from storage + tags: + - 'Dataset Storage: S3' /api/dataset-storages/s3/{id}/sync/: post: - operationId: api_dataset_storages_s3_sync_create description: Sync tasks from an S3 import storage connection. - summary: Sync import storage + operationId: api_dataset_storages_s3_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Dataset Storage: S3' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -2024,8 +2061,6 @@ paths: schema: $ref: '#/components/schemas/S3DatasetStorageRequest' required: true - security: - - Token: [] responses: '200': content: @@ -2033,1335 +2068,1124 @@ paths: schema: $ref: '#/components/schemas/S3DatasetStorage' description: '' - /api/dataset-storages/s3/check-for-records/: - post: - operationId: api_dataset_storages_s3_check_for_records_create - description: Checks for existence of records matching the file pattern in the - bucket/prefix - summary: Check for records given the file pattern + security: + - Token: [] + summary: Sync import storage tags: - - 'Dataset Storage: S3' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/S3DatasetStorageRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/S3DatasetStorageRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/S3DatasetStorageRequest' - required: true + - 'Dataset Storage: S3' + /api/dataset-storages/types/: + get: + description: Retrieve a list of the dataset storages types. + operationId: api_dataset_storages_types_retrieve + responses: + '200': + description: 'A list of dataset storages types {''name'': name, ''title'': title}.' security: - - Token: [] + - Token: [] + summary: List all dataset storages types + tags: + - Storage + /api/datasets/: + get: + description: List all datasets. + operationId: api_datasets_list + parameters: + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/S3DatasetStorage' + items: + $ref: '#/components/schemas/Dataset' + type: array description: '' - /api/dataset-storages/s3/validate/: - post: - operationId: api_dataset_storages_s3_validate_create - description: Validate a specific S3 import storage connection. - summary: Validate import storage + security: + - Token: [] + summary: List datasets tags: - - 'Dataset Storage: S3' + - Datasets + post: + description: Create a new dataset. + operationId: api_datasets_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/S3DatasetStorageRequest' + $ref: '#/components/schemas/DatasetRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/S3DatasetStorageRequest' + $ref: '#/components/schemas/DatasetRequest' multipart/form-data: schema: - $ref: '#/components/schemas/S3DatasetStorageRequest' + $ref: '#/components/schemas/DatasetRequest' required: true - security: - - Token: [] responses: '201': content: application/json: schema: - $ref: '#/components/schemas/S3DatasetStorage' + $ref: '#/components/schemas/Dataset' description: '' - /api/dataset-storages/types/: - get: - operationId: api_dataset_storages_types_retrieve - description: Retrieve a list of the dataset storages types. - summary: List all dataset storages types - tags: - - Storage security: - - Token: [] - responses: + - Token: [] + summary: Create dataset + tags: + - Datasets + /api/datasets/columns: + get: + description: Retrieve the data explorer columns available for a specific Dataset. + operationId: api_datasets_columns_retrieve + parameters: + - description: Dataset ID + in: query + name: dataset + schema: + type: integer + responses: '200': - description: 'A list of dataset storages types {''name'': name, ''title'': - title}.' - /api/datasets/: + description: No response body + security: + - Token: [] + summary: Get data explorer columns + tags: + - Data Explorer + /api/datasets/import: + patch: + description: Export Candidate task for a specific dataset to project. + operationId: api_datasets_import_partial_update + parameters: + - description: Job ID to start or cancel + in: query + name: job_id + schema: + type: integer + - description: 'Signal type: start or cancel' + in: query + name: signal + schema: + type: string + responses: + '200': + description: No response body + security: + - Token: [] + summary: Export candidate tasks to project + tags: + - Datasets + post: + description: "\n Export Candidate task for a specific dataset to project.\n " + operationId: api_datasets_import_create + parameters: + - description: Additional filters like page and page_size to limit export + in: query + name: additional_filters + schema: + additionalProperties: {} + type: object + - description: Dataset ID + in: query + name: dataset + schema: + type: integer + - description: Candidate tasks IDs to exclude from export + in: query + name: excluded + schema: + additionalProperties: {} + type: object + - description: Candidate tasks IDs from vectordb database + in: query + name: included + schema: + additionalProperties: {} + type: object + - description: Project ID + in: query + name: project + schema: + type: integer + - description: View ID + in: query + name: view + schema: + type: integer + responses: + '200': + description: No response body + security: + - Token: [] + summary: Export candidate tasks to project + tags: + - Data Explorer + /api/datasets/tasks: get: - operationId: api_datasets_list - description: List all datasets. - summary: List datasets + description: "\n Retrieve a list of Data Explorer tasks with pagination for a specific view or dataset, by using filters and ordering.\n " + operationId: api_datasets_tasks_retrieve parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string + - description: Dataset ID + in: query + name: dataset + schema: + type: integer + - description: Maximum threshold for candidate score + in: query + name: max_threshold + schema: + type: number + - description: Minimum threshold for candidate score + in: query + name: min_threshold + schema: + type: number + - description: Page number in request + in: query + name: page + schema: + type: integer + - description: Number of tasks to return in response + in: query + name: page_size + schema: + type: integer + - description: View ID + in: query + name: view + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetView' + description: '' + security: + - Token: [] + summary: Get Data Explorer tasks list tags: - - Datasets + - Data Explorer + /api/datasets/tasks/metadata: + get: + description: "\n Retrieve Candidate task metadata for a specific dataset, by using candidate_task_id or weaviate_id.\n " + operationId: api_datasets_tasks_metadata_retrieve + parameters: + - description: Candidate task path in the bucket + in: query + name: candidate_task_id + schema: + type: string + - description: Dataset ID + in: query + name: dataset + schema: + type: integer + - description: Task ID from vectordb database + in: query + name: vectordb_id + schema: + type: string + responses: + '200': + description: No response body security: - - Token: [] + - Token: [] + summary: Get Candidate task metadata + tags: + - Data Explorer + /api/datasets/views/: + get: + description: List all views for a specific dataset. + operationId: api_datasets_views_list + parameters: + - description: Dataset ID + in: query + name: dataset + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetView' + type: array description: '' - post: - operationId: api_datasets_create - description: Create a new dataset. - summary: Create dataset + security: + - Token: [] + summary: List dataset views tags: - - Datasets + - Datasets + post: + description: Create a view for a specific dataset. + operationId: api_datasets_views_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/DatasetRequest' + $ref: '#/components/schemas/DatasetViewRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/DatasetRequest' + $ref: '#/components/schemas/DatasetViewRequest' multipart/form-data: schema: - $ref: '#/components/schemas/DatasetRequest' + $ref: '#/components/schemas/DatasetViewRequest' required: true - security: - - Token: [] responses: '201': content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetView' description: '' - /api/datasets/{id}/: - get: - operationId: api_datasets_retrieve - description: Retrieve a specific dataset. - summary: Get dataset - parameters: - - in: path - name: id - schema: - type: string - required: true + security: + - Token: [] + summary: Create dataset view + tags: + - Datasets + /api/datasets/views/reset/: + delete: + description: Reset all views for a specific dataset. + operationId: api_datasets_views_reset_destroy + responses: + '204': + description: No response body + security: + - Token: [] + summary: Reset dataset views tags: - - Datasets + - Datasets + /api/datasets/views/{id}/: + delete: + description: Delete a specific view by ID. + operationId: api_datasets_views_destroy + parameters: + - description: View ID + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No response body security: - - Token: [] + - Token: [] + summary: Delete dataset view + tags: + - Datasets + get: + description: Get the details about a specific view in the data manager + operationId: api_datasets_views_retrieve + parameters: + - description: View ID + in: path + name: id + required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetView' description: '' - put: - operationId: api_datasets_update - description: Overwrite a specific dataset by ID. - summary: Put dataset - parameters: - - in: path - name: id - schema: - type: string - required: true + security: + - Token: [] + summary: Get dataset view details tags: - - Datasets + - Datasets + patch: + description: Update view data with additional filters and other information for a specific dataset. + operationId: api_datasets_views_partial_update + parameters: + - description: View ID + in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/DatasetRequest' + $ref: '#/components/schemas/PatchedDatasetViewRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/DatasetRequest' + $ref: '#/components/schemas/PatchedDatasetViewRequest' multipart/form-data: schema: - $ref: '#/components/schemas/DatasetRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedDatasetViewRequest' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetView' description: '' - patch: - operationId: api_datasets_partial_update - description: Update a specific dataset by ID. - summary: Update dataset - parameters: - - in: path - name: id - schema: - type: string - required: true + security: + - Token: [] + summary: Update dataset view tags: - - Datasets + - Datasets + put: + description: Overwrite view data with updated filters and other information for a specific dataset. + operationId: api_datasets_views_update + parameters: + - description: View ID + in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedDatasetRequest' + $ref: '#/components/schemas/DatasetViewRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedDatasetRequest' + $ref: '#/components/schemas/DatasetViewRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedDatasetRequest' - security: - - Token: [] + $ref: '#/components/schemas/DatasetViewRequest' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetView' description: '' + security: + - Token: [] + summary: Put dataset view + tags: + - Datasets + /api/datasets/{id}/: delete: - operationId: api_datasets_destroy description: Delete a dataset by ID - summary: Delete dataset + operationId: api_datasets_destroy parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Datasets - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: string responses: '204': description: No response body - /api/datasets/{id}/members: + security: + - Token: [] + summary: Delete dataset + tags: + - Datasets get: - operationId: api_datasets_members_list - description: Retrieve the members for a specific dataset. - summary: Get datasets members + description: Retrieve a specific dataset. + operationId: api_datasets_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Datasets - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: string responses: '200': content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/DatasetMember' + $ref: '#/components/schemas/Dataset' description: '' - post: - operationId: api_datasets_members_create - description: Add a member to a specific dataset. - summary: Add dataset member - parameters: - - in: path - name: id - schema: - type: integer - required: true + security: + - Token: [] + summary: Get dataset tags: - - Datasets + - Datasets + patch: + description: Update a specific dataset by ID. + operationId: api_datasets_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/DatasetMemberRequest' + $ref: '#/components/schemas/PatchedDatasetRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/DatasetMemberRequest' + $ref: '#/components/schemas/PatchedDatasetRequest' multipart/form-data: schema: - $ref: '#/components/schemas/DatasetMemberRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedDatasetRequest' responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/DatasetMember' + $ref: '#/components/schemas/Dataset' description: '' - delete: - operationId: api_datasets_members_destroy - description: Remove a member from a specific dataset. - summary: Remove member from dataset - parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: project_member - schema: - type: integer - description: A unique integer value identifying this dataset member. - tags: - - Datasets security: - - Token: [] - responses: - '204': - description: No response body - /api/datasets/columns: - get: - operationId: api_datasets_columns_retrieve - description: Retrieve the data explorer columns available for a specific Dataset. - summary: Get data explorer columns - parameters: - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - tags: - - Data Explorer - security: - - Token: [] - responses: - '200': - description: No response body - /api/datasets/import: - post: - operationId: api_datasets_import_create - description: "\n Export Candidate task for a specific dataset to project.\n\ - \ " - summary: Export candidate tasks to project - parameters: - - in: query - name: additional_filters - schema: - type: object - additionalProperties: {} - description: Additional filters like page and page_size to limit export - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - - in: query - name: excluded - schema: - type: object - additionalProperties: {} - description: Candidate tasks IDs to exclude from export - - in: query - name: included - schema: - type: object - additionalProperties: {} - description: Candidate tasks IDs from vectordb database - - in: query - name: project - schema: - type: integer - description: Project ID - - in: query - name: view - schema: - type: integer - description: View ID - tags: - - Data Explorer - security: - - Token: [] - responses: - '200': - description: No response body - patch: - operationId: api_datasets_import_partial_update - description: Export Candidate task for a specific dataset to project. - summary: Export candidate tasks to project - parameters: - - in: query - name: job_id - schema: - type: integer - description: Job ID to start or cancel - - in: query - name: signal - schema: - type: string - description: 'Signal type: start or cancel' - tags: - - Datasets - security: - - Token: [] - responses: - '200': - description: No response body - /api/datasets/tasks: - get: - operationId: api_datasets_tasks_retrieve - description: "\n Retrieve a list of Data Explorer tasks with pagination for\ - \ a specific view or dataset, by using filters and ordering.\n " - summary: Get Data Explorer tasks list - parameters: - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - - in: query - name: max_threshold - schema: - type: number - description: Maximum threshold for candidate score - - in: query - name: min_threshold - schema: - type: number - description: Minimum threshold for candidate score - - in: query - name: page - schema: - type: integer - description: Page number in request - - in: query - name: page_size - schema: - type: integer - description: Number of tasks to return in response - - in: query - name: view - schema: - type: integer - description: View ID - tags: - - Data Explorer - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DatasetView' - description: '' - /api/datasets/tasks/metadata: - get: - operationId: api_datasets_tasks_metadata_retrieve - description: "\n Retrieve Candidate task metadata for a specific dataset,\ - \ by using candidate_task_id or weaviate_id.\n " - summary: Get Candidate task metadata - parameters: - - in: query - name: candidate_task_id - schema: - type: string - description: Candidate task path in the bucket - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - - in: query - name: vectordb_id - schema: - type: string - description: Task ID from vectordb database + - Token: [] + summary: Update dataset tags: - - Data Explorer - security: - - Token: [] - responses: - '200': - description: No response body - /api/datasets/views/: - get: - operationId: api_datasets_views_list - description: List all views for a specific dataset. - summary: List dataset views + - Datasets + put: + description: Overwrite a specific dataset by ID. + operationId: api_datasets_update parameters: - - in: query - name: dataset - schema: - type: integer - description: Dataset ID - tags: - - Datasets - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DatasetView' - description: '' - post: - operationId: api_datasets_views_create - description: Create a view for a specific dataset. - summary: Create dataset view - tags: - - Datasets + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/DatasetViewRequest' + $ref: '#/components/schemas/DatasetRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/DatasetViewRequest' + $ref: '#/components/schemas/DatasetRequest' multipart/form-data: schema: - $ref: '#/components/schemas/DatasetViewRequest' - required: true - security: - - Token: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/DatasetView' - description: '' - /api/datasets/views/{id}/: - get: - operationId: api_datasets_views_retrieve - description: Get the details about a specific view in the data manager - summary: Get dataset view details - parameters: - - in: path - name: id - schema: - type: string - description: View ID + $ref: '#/components/schemas/DatasetRequest' required: true - tags: - - Datasets - security: - - Token: [] responses: '200': content: application/json: schema: - $ref: '#/components/schemas/DatasetView' + $ref: '#/components/schemas/Dataset' description: '' - put: - operationId: api_datasets_views_update - description: Overwrite view data with updated filters and other information - for a specific dataset. - summary: Put dataset view - parameters: - - in: path - name: id - schema: - type: string - description: View ID - required: true + security: + - Token: [] + summary: Put dataset tags: - - Datasets - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DatasetViewRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/DatasetViewRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/DatasetViewRequest' - required: true + - Datasets + /api/datasets/{id}/members: + delete: + description: Remove a member from a specific dataset. + operationId: api_datasets_members_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying this dataset member. + in: query + name: project_member + schema: + type: integer + responses: + '204': + description: No response body security: - - Token: [] + - Token: [] + summary: Remove member from dataset + tags: + - Datasets + get: + description: Retrieve the members for a specific dataset. + operationId: api_datasets_members_list + parameters: + - in: path + name: id + required: true + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/DatasetView' + items: + $ref: '#/components/schemas/DatasetMember' + type: array description: '' - patch: - operationId: api_datasets_views_partial_update - description: Update view data with additional filters and other information - for a specific dataset. - summary: Update dataset view - parameters: - - in: path - name: id - schema: - type: string - description: View ID - required: true + security: + - Token: [] + summary: Get datasets members tags: - - Datasets + - Datasets + post: + description: Add a member to a specific dataset. + operationId: api_datasets_members_create + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedDatasetViewRequest' + $ref: '#/components/schemas/DatasetMemberRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedDatasetViewRequest' + $ref: '#/components/schemas/DatasetMemberRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedDatasetViewRequest' - security: - - Token: [] + $ref: '#/components/schemas/DatasetMemberRequest' + required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/DatasetView' + $ref: '#/components/schemas/DatasetMember' description: '' - delete: - operationId: api_datasets_views_destroy - description: Delete a specific view by ID. - summary: Delete dataset view - parameters: - - in: path - name: id - schema: - type: string - description: View ID - required: true - tags: - - Datasets security: - - Token: [] - responses: - '204': - description: No response body - /api/datasets/views/reset/: - delete: - operationId: api_datasets_views_reset_destroy - description: Reset all views for a specific dataset. - summary: Reset dataset views + - Token: [] + summary: Add dataset member tags: - - Datasets - security: - - Token: [] - responses: - '204': - description: No response body + - Datasets /api/dm/actions/: get: + description: Retrieve all the registered actions with descriptions that data manager can use. operationId: api_dm_actions_retrieve - description: Retrieve all the registered actions with descriptions that data - manager can use. - summary: Get actions parameters: - - in: query - name: project - schema: - type: integer - description: Project ID - required: true - tags: - - Data Manager - security: - - Token: [] + - description: Project ID + in: query + name: project + required: true + schema: + type: integer responses: '200': content: application/json: + examples: + Response: + summary: response + value: + - dialog: + form: null + text: Create annotations from predictions using selected predictions set for each selected task. Your account will be assigned as an owner to those annotations. + title: Create Annotations From Predictions + type: confirm + experimental: false + id: predictions_to_annotations + order: 91 + permission: tasks.change + title: Create Annotations From Predictions schema: - type: array - title: Action list description: List of available actions items: - type: object - title: Action properties: - id: - type: string - title: Action ID - title: - type: string - title: Title - order: - type: integer - title: Order - permission: - type: string - title: Permission - experimental: - type: boolean - title: Experimental dialog: - type: object - title: Dialog properties: - title: - type: string - title: Title + form: + items: + type: object nullable: true + title: Form + type: array text: - type: string - title: Text nullable: true - type: + title: Text type: string - title: Type + title: nullable: true - form: - type: array - title: Form - items: - type: object + title: Title + type: string + type: nullable: true - examples: - Response: - value: - - id: predictions_to_annotations - title: Create Annotations From Predictions - order: 91 - permission: tasks.change - experimental: false - dialog: - title: Create Annotations From Predictions - text: Create annotations from predictions using selected predictions - set for each selected task. Your account will be assigned - as an owner to those annotations. - type: confirm - form: null - summary: response + title: Type + type: string + title: Dialog + type: object + experimental: + title: Experimental + type: boolean + id: + title: Action ID + type: string + order: + title: Order + type: integer + permission: + title: Permission + type: string + title: + title: Title + type: string + title: Action + type: object + title: Action list + type: array description: Actions retrieved successfully + security: + - Token: [] + summary: Get actions + tags: + - Data Manager + x-fern-audiences: + - public x-fern-sdk-group-name: actions x-fern-sdk-method-name: list - x-fern-audiences: - - public post: + description: 'Perform a Data Manager action with the selected tasks and filters. Note: More complex actions require additional parameters in the request body. Call `GET api/actions?project=` to explore them.
Example: `GET api/actions?id=delete_tasks&project=1`' operationId: api_dm_actions_create - description: 'Perform a Data Manager action with the selected tasks and filters. - Note: More complex actions require additional parameters in the request body. - Call `GET api/actions?project=` to explore them.
Example: `GET api/actions?id=delete_tasks&project=1`' - summary: Post actions parameters: - - in: query - name: id - schema: - type: string - enum: - - delete_annotators - - delete_ground_truths - - delete_reviewers - - delete_tasks - - delete_tasks_annotations - - delete_tasks_predictions - - delete_tasks_reviews - - predictions_to_annotations - - remove_duplicates - - retrieve_tasks_predictions - description: Action name ID, see the full list of actions in the `GET api/actions` - request - required: true - - in: query - name: project - schema: - type: integer - description: Project ID - required: true - - in: query - name: view - schema: - type: integer - description: View ID (optional, it has higher priority than filters, selectedItems - and ordering from the request body payload) - tags: - - Data Manager + - description: Action name ID, see the full list of actions in the `GET api/actions` request + in: query + name: id + required: true + schema: + enum: + - delete_annotators + - delete_ground_truths + - delete_reviewers + - delete_tasks + - delete_tasks_annotations + - delete_tasks_predictions + - delete_tasks_reviews + - predictions_to_annotations + - remove_duplicates + - retrieve_tasks_predictions + type: string + - description: Project ID + in: query + name: project + required: true + schema: + type: integer + - description: View ID (optional, it has higher priority than filters, selectedItems and ordering from the request body payload) + in: query + name: view + schema: + type: integer requestBody: content: application/json: schema: - type: object + description: Data payload containing task filters, selected task items, and ordering + example: + filters: + conjunction: or + items: + - filter: filter:tasks:id + operator: greater + type: Number + value: 123 + ordering: + - tasks:total_annotations + selectedItems: + all: true + excluded: + - 124 + - 125 + - 126 properties: filters: - type: object + description: 'Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' properties: conjunction: - type: string + description: Logical conjunction for the filters. This conjunction (either "or" or "and") will be applied to all items in the filters list. It is not possible to combine "or" and "and" within one list of filters. All filters will be either combined with "or" or with "and", but not a mix of both. enum: - - or - - and - description: Logical conjunction for the filters. This conjunction - (either "or" or "and") will be applied to all items in the - filters list. It is not possible to combine "or" and "and" - within one list of filters. All filters will be either combined - with "or" or with "and", but not a mix of both. + - or + - and + type: string items: - type: array + description: List of filter items items: - type: object + example: + filter: filter:tasks:id + operator: greater + type: Number + value: 123 properties: filter: - type: string + description: 'Filter identifier, it should start with `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. For `task.data` fields it may look like `filter:tasks:data.field_name`. If you need more info about columns, check the [Get data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) API endpoint. Possible values:
  • `filter:tasks:agreement`
    (Number) Agreement for annotation results for a specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    (List) Annotators that completed the task (Community). Can include assigned annotators (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    (Number) Number of cancelled or skipped annotations for the task

  • `filter:tasks:comments`
    (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    (String) Name of the file uploaded to create the tasks

  • `filter:tasks:ground_truth`
    (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    (Number) Task ID

  • `filter:tasks:inner_id`
    (Number) Task Inner ID, it starts from 1 for all projects

  • `filter:tasks:predictions_model_versions`
    (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    (Boolean) Whether the tasks have been reviewed (Enterprise only)

  • `filter:tasks:reviewers`
    (String) Reviewers that reviewed the task, or assigned reviewers (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    (Number) Number of annotations accepted for a task in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    (Number) Number of annotations rejected for a task in review (Enterprise only)

  • `filter:tasks:total_annotations`
    (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    (Datetime) Time the task was updated at (e.g. new annotation was created, review added, etc)
  • ' enum: - - filter:tasks:agreement - - filter:tasks:annotations_results - - filter:tasks:annotators - - filter:tasks:cancelled_annotations - - filter:tasks:comments - - filter:tasks:completed_at - - filter:tasks:created_at - - filter:tasks:file_upload - - filter:tasks:ground_truth - - filter:tasks:id - - filter:tasks:inner_id - - filter:tasks:predictions_model_versions - - filter:tasks:predictions_results - - filter:tasks:predictions_score - - filter:tasks:reviewed - - filter:tasks:reviewers - - filter:tasks:reviews_accepted - - filter:tasks:reviews_rejected - - filter:tasks:total_annotations - - filter:tasks:total_predictions - - filter:tasks:unresolved_comment_count - - filter:tasks:updated_at - description: 'Filter identifier, it should start with - `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. - For `task.data` fields it may look like `filter:tasks:data.field_name`. - If you need more info about columns, check the [Get - data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) - API endpoint. Possible values:
  • `filter:tasks:agreement`
    - (Number) Agreement for annotation results for a specific - task (Enterprise only)

  • `filter:tasks:annotations_results`
    - (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    - (List) Annotators that completed the task (Community). - Can include assigned annotators (Enterprise only). Important - note: the filter `type` should be List, but the filter - `value` is integer

  • `filter:tasks:cancelled_annotations`
    - (Number) Number of cancelled or skipped annotations - for the task

  • `filter:tasks:comments`
    - (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    - (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    - (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    - (String) Name of the file uploaded to create the tasks

  • `filter:tasks:ground_truth`
    - (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    - (Number) Task ID

  • `filter:tasks:inner_id`
    - (Number) Task Inner ID, it starts from 1 for all projects

  • `filter:tasks:predictions_model_versions`
    - (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    - (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    - (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    - (Boolean) Whether the tasks have been reviewed (Enterprise - only)

  • `filter:tasks:reviewers`
    (String) - Reviewers that reviewed the task, or assigned reviewers - (Enterprise only). Important note: the filter `type` - should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    - (Number) Number of annotations accepted for a task in - review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    - (Number) Number of annotations rejected for a task in - review (Enterprise only)

  • `filter:tasks:total_annotations`
    - (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    - (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    - (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    - (Datetime) Time the task was updated at (e.g. new annotation - was created, review added, etc)
  • ' - operator: + - filter:tasks:agreement + - filter:tasks:annotations_results + - filter:tasks:annotators + - filter:tasks:cancelled_annotations + - filter:tasks:comments + - filter:tasks:completed_at + - filter:tasks:created_at + - filter:tasks:file_upload + - filter:tasks:ground_truth + - filter:tasks:id + - filter:tasks:inner_id + - filter:tasks:predictions_model_versions + - filter:tasks:predictions_results + - filter:tasks:predictions_score + - filter:tasks:reviewed + - filter:tasks:reviewers + - filter:tasks:reviews_accepted + - filter:tasks:reviews_rejected + - filter:tasks:total_annotations + - filter:tasks:total_predictions + - filter:tasks:unresolved_comment_count + - filter:tasks:updated_at type: string + operator: + description: 'Filter operator. Possible values:
  • `contains`
    Contains

  • `ends_with`
    Ends with

  • `equal`
    Equal to

  • `exists`
    Exists

  • `greater`
    Greater than

  • `greater_or_equal`
    Greater than or equal to

  • `in`
    Is between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `less`
    Less than

  • `less_or_equal`
    Less than or equal to

  • `not_contains`
    Does not contain

  • `not_equal`
    Not equal to

  • `not_exists`
    Does not exist

  • `not_in`
    Is not between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    Starts with
  • ' enum: - - contains - - ends_with - - equal - - exists - - greater - - greater_or_equal - - in - - less - - less_or_equal - - not_contains - - not_equal - - not_exists - - not_in - - starts_with - description: 'Filter operator. Possible values:
  • `contains`
    - Contains

  • `ends_with`
    Ends with

  • `equal`
    - Equal to

  • `exists`
    Exists

  • `greater`
    - Greater than

  • `greater_or_equal`
    Greater - than or equal to

  • `in`
    Is between min - and max values, so the filter `value` should be e.g. - `{"min": 1, "max": 7}`

  • `less`
    Less than

  • `less_or_equal`
    - Less than or equal to

  • `not_contains`
    - Does not contain

  • `not_equal`
    Not equal - to

  • `not_exists`
    Does not exist

  • `not_in`
    - Is not between min and max values, so the filter `value` - should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    - Starts with
  • ' + - contains + - ends_with + - equal + - exists + - greater + - greater_or_equal + - in + - less + - less_or_equal + - not_contains + - not_equal + - not_exists + - not_in + - starts_with + type: string type: + description: Type of the filter value. Possible values:
  • `Boolean`
    Boolean

  • `Datetime`
    Datetime string in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    List of items

  • `Number`
    Float or Integer

  • `String`
    String

  • `Unknown`
    Unknown is explicitly converted to string format
  • type: string - description: Type of the filter value. Possible values:
  • `Boolean`
    - Boolean

  • `Datetime`
    Datetime string in - `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    - List of items

  • `Number`
    Float or Integer

  • `String`
    - String

  • `Unknown`
    Unknown is explicitly - converted to string format
  • value: - type: object - oneOf: - - type: string - title: String - description: String - - type: integer - title: Integer - description: Integer - - type: number - title: Float - format: float - description: Float - - type: boolean - title: Boolean - description: Boolean - - type: object - title: Dictionary - description: Dictionary is used for some operator types, - e.g. `in` and `not_in` - - type: object - title: List - description: List of strings or integers description: Value to filter by + oneOf: + - description: String + title: String + type: string + - description: Integer + title: Integer + type: integer + - description: Float + format: float + title: Float + type: number + - description: Boolean + title: Boolean + type: boolean + - description: Dictionary is used for some operator types, e.g. `in` and `not_in` + title: Dictionary + type: object + - description: List of strings or integers + title: List + type: object + type: object required: - - filter - - operator - - type - - value - example: - filter: filter:tasks:id - operator: greater - type: Number - value: 123 - description: List of filter items + - filter + - operator + - type + - value + type: object + type: array required: - - conjunction - - items - description: 'Filters to apply on tasks. You can use [the helper - class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) - to create Data Manager Filters.
    Example: `{"conjunction": "or", - "items": [{"filter": "filter:tasks:completed_at", "operator": - "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' - selectedItems: + - conjunction + - items type: object - required: - - all - description: 'Task selection by IDs. If filters are applied, the - selection will be applied to the filtered tasks.If "all" is `false`, - `"included"` must be used. If "all" is `true`, `"excluded"` must - be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` - or `{"all": true, "excluded": [4, 5]}`' - oneOf: - - title: 'all: false' - type: object - properties: - all: - type: boolean - enum: - - false - description: No tasks are selected - included: - type: array - items: - type: integer - description: List of included task IDs - required: - - all - - title: 'all: true' - type: object - properties: - all: - type: boolean - enum: - - true - description: All tasks are selected - excluded: - type: array - items: - type: integer - description: List of excluded task IDs - required: - - all ordering: - type: array + description: List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`. items: - type: string enum: - - tasks:agreement - - tasks:annotations_results - - tasks:annotators - - tasks:cancelled_annotations - - tasks:comments - - tasks:completed_at - - tasks:created_at - - tasks:file_upload - - tasks:ground_truth - - tasks:id - - tasks:inner_id - - tasks:predictions_model_versions - - tasks:predictions_results - - tasks:predictions_score - - tasks:reviewed - - tasks:reviewers - - tasks:reviews_accepted - - tasks:reviews_rejected - - tasks:total_annotations - - tasks:total_predictions - - tasks:unresolved_comment_count - - tasks:updated_at - description: List of fields to order by. Fields are similar to filters - but without the `filter:` prefix. To reverse the order, add a - minus sign before the field name, e.g. `-tasks:created_at`. - description: Data payload containing task filters, selected task items, - and ordering - example: - filters: - conjunction: or - items: - - filter: filter:tasks:id - operator: greater - type: Number - value: 123 + - tasks:agreement + - tasks:annotations_results + - tasks:annotators + - tasks:cancelled_annotations + - tasks:comments + - tasks:completed_at + - tasks:created_at + - tasks:file_upload + - tasks:ground_truth + - tasks:id + - tasks:inner_id + - tasks:predictions_model_versions + - tasks:predictions_results + - tasks:predictions_score + - tasks:reviewed + - tasks:reviewers + - tasks:reviews_accepted + - tasks:reviews_rejected + - tasks:total_annotations + - tasks:total_predictions + - tasks:unresolved_comment_count + - tasks:updated_at + type: string + type: array selectedItems: - all: true - excluded: - - 124 - - 125 - - 126 - ordering: - - tasks:total_annotations - security: - - Token: [] + description: 'Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}`' + oneOf: + - properties: + all: + description: No tasks are selected + enum: + - false + type: boolean + included: + description: List of included task IDs + items: + type: integer + type: array + required: + - all + title: 'all: false' + type: object + - properties: + all: + description: All tasks are selected + enum: + - true + type: boolean + excluded: + description: List of excluded task IDs + items: + type: integer + type: array + required: + - all + title: 'all: true' + type: object + required: + - all + type: object + type: object responses: '200': description: Action performed successfully + security: + - Token: [] + summary: Post actions + tags: + - Data Manager + x-fern-audiences: + - public x-fern-sdk-group-name: actions x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/dm/actions/{action_id}/form/: get: - operationId: api_dm_actions_form_retrieve description: Get the form configuration for a specific action. - summary: Get action form + operationId: api_dm_actions_form_retrieve parameters: - - in: path - name: action_id - schema: - type: string - required: true - - in: query - name: project - schema: - type: integer - description: Project ID - required: true - tags: - - Data Manager - security: - - Token: [] + - in: path + name: action_id + required: true + schema: + type: string + - description: Project ID + in: query + name: project + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object description: Form configuration object + type: object description: Action form configuration returned successfully + security: + - Token: [] + summary: Get action form + tags: + - Data Manager /api/dm/project/: get: - operationId: api_dm_project_retrieve description: Retrieve the project state for the data manager. - summary: Get project state - tags: - - Data Manager - security: - - Token: [] + operationId: api_dm_project_retrieve responses: '200': description: No response body + security: + - Token: [] + summary: Get project state + tags: + - Data Manager x-fern-audiences: - - internal + - internal /api/dm/views/: get: - operationId: api_dm_views_list description: List all views for a specific project. - summary: List views + operationId: api_dm_views_list parameters: - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - Data Manager - security: - - Token: [] + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/View' + type: array description: '' + security: + - Token: [] + summary: List views + tags: + - Data Manager + x-fern-audiences: + - public x-fern-sdk-group-name: views x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_dm_views_create description: Create a view for a specific project. - summary: Create view - tags: - - Data Manager + operationId: api_dm_views_create requestBody: content: application/json: schema: - type: object properties: data: - type: object description: Custom view data properties: filters: - type: object + description: 'Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
    Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' properties: conjunction: - type: string + description: Logical conjunction for the filters. This conjunction (either "or" or "and") will be applied to all items in the filters list. It is not possible to combine "or" and "and" within one list of filters. All filters will be either combined with "or" or with "and", but not a mix of both. enum: - - or - - and - description: Logical conjunction for the filters. This conjunction - (either "or" or "and") will be applied to all items in - the filters list. It is not possible to combine "or" and - "and" within one list of filters. All filters will be - either combined with "or" or with "and", but not a mix - of both. + - or + - and + type: string items: - type: array + description: List of filter items items: - type: object + example: + filter: filter:tasks:id + operator: greater + type: Number + value: 123 properties: filter: - type: string + description: 'Filter identifier, it should start with `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. For `task.data` fields it may look like `filter:tasks:data.field_name`. If you need more info about columns, check the [Get data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) API endpoint. Possible values:
  • `filter:tasks:agreement`
    (Number) Agreement for annotation results for a specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    (List) Annotators that completed the task (Community). Can include assigned annotators (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    (Number) Number of cancelled or skipped annotations for the task

  • `filter:tasks:comments`
    (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    (String) Name of the file uploaded to create the tasks

  • `filter:tasks:ground_truth`
    (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    (Number) Task ID

  • `filter:tasks:inner_id`
    (Number) Task Inner ID, it starts from 1 for all projects

  • `filter:tasks:predictions_model_versions`
    (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    (Boolean) Whether the tasks have been reviewed (Enterprise only)

  • `filter:tasks:reviewers`
    (String) Reviewers that reviewed the task, or assigned reviewers (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    (Number) Number of annotations accepted for a task in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    (Number) Number of annotations rejected for a task in review (Enterprise only)

  • `filter:tasks:total_annotations`
    (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    (Datetime) Time the task was updated at (e.g. new annotation was created, review added, etc)
  • ' enum: - - filter:tasks:agreement - - filter:tasks:annotations_results - - filter:tasks:annotators - - filter:tasks:cancelled_annotations - - filter:tasks:comments - - filter:tasks:completed_at - - filter:tasks:created_at - - filter:tasks:file_upload - - filter:tasks:ground_truth - - filter:tasks:id - - filter:tasks:inner_id - - filter:tasks:predictions_model_versions - - filter:tasks:predictions_results - - filter:tasks:predictions_score - - filter:tasks:reviewed - - filter:tasks:reviewers - - filter:tasks:reviews_accepted - - filter:tasks:reviews_rejected - - filter:tasks:total_annotations - - filter:tasks:total_predictions - - filter:tasks:unresolved_comment_count - - filter:tasks:updated_at - description: 'Filter identifier, it should start with - `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. - For `task.data` fields it may look like `filter:tasks:data.field_name`. - If you need more info about columns, check the [Get - data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) - API endpoint. Possible values:
  • `filter:tasks:agreement`
    - (Number) Agreement for annotation results for a - specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    - (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    - (List) Annotators that completed the task (Community). - Can include assigned annotators (Enterprise only). - Important note: the filter `type` should be List, - but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    - (Number) Number of cancelled or skipped annotations - for the task

  • `filter:tasks:comments`
    - (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    - (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    - (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    - (String) Name of the file uploaded to create the - tasks

  • `filter:tasks:ground_truth`
    - (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    - (Number) Task ID

  • `filter:tasks:inner_id`
    - (Number) Task Inner ID, it starts from 1 for all - projects

  • `filter:tasks:predictions_model_versions`
    - (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    - (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    - (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    - (Boolean) Whether the tasks have been reviewed (Enterprise - only)

  • `filter:tasks:reviewers`
    (String) - Reviewers that reviewed the task, or assigned reviewers - (Enterprise only). Important note: the filter `type` - should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    - (Number) Number of annotations accepted for a task - in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    - (Number) Number of annotations rejected for a task - in review (Enterprise only)

  • `filter:tasks:total_annotations`
    - (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    - (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    - (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    - (Datetime) Time the task was updated at (e.g. new - annotation was created, review added, etc)
  • ' - operator: + - filter:tasks:agreement + - filter:tasks:annotations_results + - filter:tasks:annotators + - filter:tasks:cancelled_annotations + - filter:tasks:comments + - filter:tasks:completed_at + - filter:tasks:created_at + - filter:tasks:file_upload + - filter:tasks:ground_truth + - filter:tasks:id + - filter:tasks:inner_id + - filter:tasks:predictions_model_versions + - filter:tasks:predictions_results + - filter:tasks:predictions_score + - filter:tasks:reviewed + - filter:tasks:reviewers + - filter:tasks:reviews_accepted + - filter:tasks:reviews_rejected + - filter:tasks:total_annotations + - filter:tasks:total_predictions + - filter:tasks:unresolved_comment_count + - filter:tasks:updated_at type: string + operator: + description: 'Filter operator. Possible values:
  • `contains`
    Contains

  • `ends_with`
    Ends with

  • `equal`
    Equal to

  • `exists`
    Exists

  • `greater`
    Greater than

  • `greater_or_equal`
    Greater than or equal to

  • `in`
    Is between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `less`
    Less than

  • `less_or_equal`
    Less than or equal to

  • `not_contains`
    Does not contain

  • `not_equal`
    Not equal to

  • `not_exists`
    Does not exist

  • `not_in`
    Is not between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    Starts with
  • ' enum: - - contains - - ends_with - - equal - - exists - - greater - - greater_or_equal - - in - - less - - less_or_equal - - not_contains - - not_equal - - not_exists - - not_in - - starts_with - description: 'Filter operator. Possible values:
  • `contains`
    - Contains

  • `ends_with`
    Ends with

  • `equal`
    - Equal to

  • `exists`
    Exists

  • `greater`
    - Greater than

  • `greater_or_equal`
    - Greater than or equal to

  • `in`
    Is - between min and max values, so the filter `value` - should be e.g. `{"min": 1, "max": 7}`

  • `less`
    - Less than

  • `less_or_equal`
    Less than - or equal to

  • `not_contains`
    Does - not contain

  • `not_equal`
    Not equal - to

  • `not_exists`
    Does not exist

  • `not_in`
    - Is not between min and max values, so the filter - `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    - Starts with
  • ' + - contains + - ends_with + - equal + - exists + - greater + - greater_or_equal + - in + - less + - less_or_equal + - not_contains + - not_equal + - not_exists + - not_in + - starts_with + type: string type: + description: Type of the filter value. Possible values:
  • `Boolean`
    Boolean

  • `Datetime`
    Datetime string in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    List of items

  • `Number`
    Float or Integer

  • `String`
    String

  • `Unknown`
    Unknown is explicitly converted to string format
  • type: string - description: Type of the filter value. Possible values:
  • `Boolean`
    - Boolean

  • `Datetime`
    Datetime string - in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    - List of items

  • `Number`
    Float or - Integer

  • `String`
    String

  • `Unknown`
    - Unknown is explicitly converted to string format
  • value: - type: object - oneOf: - - type: string - title: String - description: String - - type: integer - title: Integer - description: Integer - - type: number - title: Float - format: float - description: Float - - type: boolean - title: Boolean - description: Boolean - - type: object - title: Dictionary - description: Dictionary is used for some operator - types, e.g. `in` and `not_in` - - type: object - title: List - description: List of strings or integers description: Value to filter by + oneOf: + - description: String + title: String + type: string + - description: Integer + title: Integer + type: integer + - description: Float + format: float + title: Float + type: number + - description: Boolean + title: Boolean + type: boolean + - description: Dictionary is used for some operator types, e.g. `in` and `not_in` + title: Dictionary + type: object + - description: List of strings or integers + title: List + type: object + type: object required: - - filter - - operator - - type - - value - example: - filter: filter:tasks:id - operator: greater - type: Number - value: 123 - description: List of filter items + - filter + - operator + - type + - value + type: object + type: array required: - - conjunction - - items - description: 'Filters to apply on tasks. You can use [the helper - class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) - to create Data Manager Filters.
    Example: `{"conjunction": - "or", "items": [{"filter": "filter:tasks:completed_at", "operator": - "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' + - conjunction + - items + type: object ordering: - type: array + description: List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`. items: - type: string enum: - - tasks:agreement - - tasks:annotations_results - - tasks:annotators - - tasks:cancelled_annotations - - tasks:comments - - tasks:completed_at - - tasks:created_at - - tasks:file_upload - - tasks:ground_truth - - tasks:id - - tasks:inner_id - - tasks:predictions_model_versions - - tasks:predictions_results - - tasks:predictions_score - - tasks:reviewed - - tasks:reviewers - - tasks:reviews_accepted - - tasks:reviews_rejected - - tasks:total_annotations - - tasks:total_predictions - - tasks:unresolved_comment_count - - tasks:updated_at - description: List of fields to order by. Fields are similar - to filters but without the `filter:` prefix. To reverse the - order, add a minus sign before the field name, e.g. `-tasks:created_at`. + - tasks:agreement + - tasks:annotations_results + - tasks:annotators + - tasks:cancelled_annotations + - tasks:comments + - tasks:completed_at + - tasks:created_at + - tasks:file_upload + - tasks:ground_truth + - tasks:id + - tasks:inner_id + - tasks:predictions_model_versions + - tasks:predictions_results + - tasks:predictions_score + - tasks:reviewed + - tasks:reviewers + - tasks:reviews_accepted + - tasks:reviews_rejected + - tasks:total_annotations + - tasks:total_predictions + - tasks:unresolved_comment_count + - tasks:updated_at + type: string + type: array + type: object project: - type: integer description: Project ID - security: - - Token: [] + type: integer + type: object responses: '201': content: @@ -3369,26 +3193,99 @@ paths: schema: $ref: '#/components/schemas/View' description: '' + security: + - Token: [] + summary: Create view + tags: + - Data Manager + x-fern-audiences: + - public x-fern-sdk-group-name: views x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/dm/views/{id}/: - get: - operationId: api_dm_views_retrieve - description: Get the details about a specific view in the data manager - summary: Get view details - parameters: - - in: path - name: id - schema: - type: string - description: View ID + /api/dm/views/order/: + post: + description: Update the order field of views based on the provided list of view IDs + operationId: api_dm_views_order_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ViewOrderRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ViewOrderRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ViewOrderRequest' required: true + responses: + '200': + description: View order updated successfully + security: + - Token: [] + summary: Update order of views + tags: + - Data Manager + x-fern-audiences: + - public + x-fern-sdk-group-name: views + x-fern-sdk-method-name: update_order + /api/dm/views/reset/: + delete: + description: Delete all views for a specific project. + operationId: api_dm_views_reset_destroy + parameters: + - description: Project ID + in: query + name: project + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete all project views tags: - - Data Manager + - Data Manager + x-fern-audiences: + - public + x-fern-sdk-group-name: views + x-fern-sdk-method-name: delete_all + /api/dm/views/{id}/: + delete: + description: Delete a specific view by ID. + operationId: api_dm_views_destroy + parameters: + - description: View ID + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No response body security: - - Token: [] + - Token: [] + summary: Delete view + tags: + - Data Manager + x-fern-audiences: + - public + x-fern-sdk-group-name: views + x-fern-sdk-method-name: delete + get: + description: Get the details about a specific view in the data manager + operationId: api_dm_views_retrieve + parameters: + - description: View ID + in: path + name: id + required: true + schema: + type: string responses: '200': content: @@ -3396,236 +3293,165 @@ paths: schema: $ref: '#/components/schemas/View' description: '' + security: + - Token: [] + summary: Get view details + tags: + - Data Manager + x-fern-audiences: + - public x-fern-sdk-group-name: views x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_dm_views_update - description: Overwrite view data with updated filters and other information - for a specific project. - summary: Put view + patch: + description: Update view data with additional filters and other information for a specific project. + operationId: api_dm_views_partial_update parameters: - - in: path - name: id - schema: - type: string - description: View ID - required: true - tags: - - Data Manager + - description: View ID + in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - type: object properties: data: - type: object description: Custom view data properties: filters: - type: object + description: 'Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
    Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' properties: conjunction: - type: string + description: Logical conjunction for the filters. This conjunction (either "or" or "and") will be applied to all items in the filters list. It is not possible to combine "or" and "and" within one list of filters. All filters will be either combined with "or" or with "and", but not a mix of both. enum: - - or - - and - description: Logical conjunction for the filters. This conjunction - (either "or" or "and") will be applied to all items in - the filters list. It is not possible to combine "or" and - "and" within one list of filters. All filters will be - either combined with "or" or with "and", but not a mix - of both. + - or + - and + type: string items: - type: array + description: List of filter items items: - type: object + example: + filter: filter:tasks:id + operator: greater + type: Number + value: 123 properties: filter: - type: string + description: 'Filter identifier, it should start with `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. For `task.data` fields it may look like `filter:tasks:data.field_name`. If you need more info about columns, check the [Get data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) API endpoint. Possible values:
  • `filter:tasks:agreement`
    (Number) Agreement for annotation results for a specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    (List) Annotators that completed the task (Community). Can include assigned annotators (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    (Number) Number of cancelled or skipped annotations for the task

  • `filter:tasks:comments`
    (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    (String) Name of the file uploaded to create the tasks

  • `filter:tasks:ground_truth`
    (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    (Number) Task ID

  • `filter:tasks:inner_id`
    (Number) Task Inner ID, it starts from 1 for all projects

  • `filter:tasks:predictions_model_versions`
    (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    (Boolean) Whether the tasks have been reviewed (Enterprise only)

  • `filter:tasks:reviewers`
    (String) Reviewers that reviewed the task, or assigned reviewers (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    (Number) Number of annotations accepted for a task in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    (Number) Number of annotations rejected for a task in review (Enterprise only)

  • `filter:tasks:total_annotations`
    (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    (Datetime) Time the task was updated at (e.g. new annotation was created, review added, etc)
  • ' enum: - - filter:tasks:agreement - - filter:tasks:annotations_results - - filter:tasks:annotators - - filter:tasks:cancelled_annotations - - filter:tasks:comments - - filter:tasks:completed_at - - filter:tasks:created_at - - filter:tasks:file_upload - - filter:tasks:ground_truth - - filter:tasks:id - - filter:tasks:inner_id - - filter:tasks:predictions_model_versions - - filter:tasks:predictions_results - - filter:tasks:predictions_score - - filter:tasks:reviewed - - filter:tasks:reviewers - - filter:tasks:reviews_accepted - - filter:tasks:reviews_rejected - - filter:tasks:total_annotations - - filter:tasks:total_predictions - - filter:tasks:unresolved_comment_count - - filter:tasks:updated_at - description: 'Filter identifier, it should start with - `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. - For `task.data` fields it may look like `filter:tasks:data.field_name`. - If you need more info about columns, check the [Get - data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) - API endpoint. Possible values:
  • `filter:tasks:agreement`
    - (Number) Agreement for annotation results for a - specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    - (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    - (List) Annotators that completed the task (Community). - Can include assigned annotators (Enterprise only). - Important note: the filter `type` should be List, - but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    - (Number) Number of cancelled or skipped annotations - for the task

  • `filter:tasks:comments`
    - (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    - (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    - (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    - (String) Name of the file uploaded to create the - tasks

  • `filter:tasks:ground_truth`
    - (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    - (Number) Task ID

  • `filter:tasks:inner_id`
    - (Number) Task Inner ID, it starts from 1 for all - projects

  • `filter:tasks:predictions_model_versions`
    - (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    - (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    - (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    - (Boolean) Whether the tasks have been reviewed (Enterprise - only)

  • `filter:tasks:reviewers`
    (String) - Reviewers that reviewed the task, or assigned reviewers - (Enterprise only). Important note: the filter `type` - should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    - (Number) Number of annotations accepted for a task - in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    - (Number) Number of annotations rejected for a task - in review (Enterprise only)

  • `filter:tasks:total_annotations`
    - (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    - (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    - (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    - (Datetime) Time the task was updated at (e.g. new - annotation was created, review added, etc)
  • ' - operator: + - filter:tasks:agreement + - filter:tasks:annotations_results + - filter:tasks:annotators + - filter:tasks:cancelled_annotations + - filter:tasks:comments + - filter:tasks:completed_at + - filter:tasks:created_at + - filter:tasks:file_upload + - filter:tasks:ground_truth + - filter:tasks:id + - filter:tasks:inner_id + - filter:tasks:predictions_model_versions + - filter:tasks:predictions_results + - filter:tasks:predictions_score + - filter:tasks:reviewed + - filter:tasks:reviewers + - filter:tasks:reviews_accepted + - filter:tasks:reviews_rejected + - filter:tasks:total_annotations + - filter:tasks:total_predictions + - filter:tasks:unresolved_comment_count + - filter:tasks:updated_at type: string + operator: + description: 'Filter operator. Possible values:
  • `contains`
    Contains

  • `ends_with`
    Ends with

  • `equal`
    Equal to

  • `exists`
    Exists

  • `greater`
    Greater than

  • `greater_or_equal`
    Greater than or equal to

  • `in`
    Is between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `less`
    Less than

  • `less_or_equal`
    Less than or equal to

  • `not_contains`
    Does not contain

  • `not_equal`
    Not equal to

  • `not_exists`
    Does not exist

  • `not_in`
    Is not between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    Starts with
  • ' enum: - - contains - - ends_with - - equal - - exists - - greater - - greater_or_equal - - in - - less - - less_or_equal - - not_contains - - not_equal - - not_exists - - not_in - - starts_with - description: 'Filter operator. Possible values:
  • `contains`
    - Contains

  • `ends_with`
    Ends with

  • `equal`
    - Equal to

  • `exists`
    Exists

  • `greater`
    - Greater than

  • `greater_or_equal`
    - Greater than or equal to

  • `in`
    Is - between min and max values, so the filter `value` - should be e.g. `{"min": 1, "max": 7}`

  • `less`
    - Less than

  • `less_or_equal`
    Less than - or equal to

  • `not_contains`
    Does - not contain

  • `not_equal`
    Not equal - to

  • `not_exists`
    Does not exist

  • `not_in`
    - Is not between min and max values, so the filter - `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    - Starts with
  • ' + - contains + - ends_with + - equal + - exists + - greater + - greater_or_equal + - in + - less + - less_or_equal + - not_contains + - not_equal + - not_exists + - not_in + - starts_with + type: string type: + description: Type of the filter value. Possible values:
  • `Boolean`
    Boolean

  • `Datetime`
    Datetime string in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    List of items

  • `Number`
    Float or Integer

  • `String`
    String

  • `Unknown`
    Unknown is explicitly converted to string format
  • type: string - description: Type of the filter value. Possible values:
  • `Boolean`
    - Boolean

  • `Datetime`
    Datetime string - in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    - List of items

  • `Number`
    Float or - Integer

  • `String`
    String

  • `Unknown`
    - Unknown is explicitly converted to string format
  • value: - type: object - oneOf: - - type: string - title: String - description: String - - type: integer - title: Integer - description: Integer - - type: number - title: Float - format: float - description: Float - - type: boolean - title: Boolean - description: Boolean - - type: object - title: Dictionary - description: Dictionary is used for some operator - types, e.g. `in` and `not_in` - - type: object - title: List - description: List of strings or integers description: Value to filter by + oneOf: + - description: String + title: String + type: string + - description: Integer + title: Integer + type: integer + - description: Float + format: float + title: Float + type: number + - description: Boolean + title: Boolean + type: boolean + - description: Dictionary is used for some operator types, e.g. `in` and `not_in` + title: Dictionary + type: object + - description: List of strings or integers + title: List + type: object + type: object required: - - filter - - operator - - type - - value - example: - filter: filter:tasks:id - operator: greater - type: Number - value: 123 - description: List of filter items + - filter + - operator + - type + - value + type: object + type: array required: - - conjunction - - items - description: 'Filters to apply on tasks. You can use [the helper - class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) - to create Data Manager Filters.
    Example: `{"conjunction": - "or", "items": [{"filter": "filter:tasks:completed_at", "operator": - "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' + - conjunction + - items + type: object ordering: - type: array + description: List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`. items: - type: string enum: - - tasks:agreement - - tasks:annotations_results - - tasks:annotators - - tasks:cancelled_annotations - - tasks:comments - - tasks:completed_at - - tasks:created_at - - tasks:file_upload - - tasks:ground_truth - - tasks:id - - tasks:inner_id - - tasks:predictions_model_versions - - tasks:predictions_results - - tasks:predictions_score - - tasks:reviewed - - tasks:reviewers - - tasks:reviews_accepted - - tasks:reviews_rejected - - tasks:total_annotations - - tasks:total_predictions - - tasks:unresolved_comment_count - - tasks:updated_at - description: List of fields to order by. Fields are similar - to filters but without the `filter:` prefix. To reverse the - order, add a minus sign before the field name, e.g. `-tasks:created_at`. + - tasks:agreement + - tasks:annotations_results + - tasks:annotators + - tasks:cancelled_annotations + - tasks:comments + - tasks:completed_at + - tasks:created_at + - tasks:file_upload + - tasks:ground_truth + - tasks:id + - tasks:inner_id + - tasks:predictions_model_versions + - tasks:predictions_results + - tasks:predictions_score + - tasks:reviewed + - tasks:reviewers + - tasks:reviews_accepted + - tasks:reviews_rejected + - tasks:total_annotations + - tasks:total_predictions + - tasks:unresolved_comment_count + - tasks:updated_at + type: string + type: array + type: object project: - type: integer description: Project ID - security: - - Token: [] + type: integer + type: object responses: '200': content: @@ -3633,234 +3459,165 @@ paths: schema: $ref: '#/components/schemas/View' description: '' - x-fern-audiences: - - internal - patch: - operationId: api_dm_views_partial_update - description: Update view data with additional filters and other information - for a specific project. + security: + - Token: [] summary: Update view - parameters: - - in: path - name: id - schema: - type: string - description: View ID - required: true tags: - - Data Manager + - Data Manager + x-fern-audiences: + - public + x-fern-sdk-group-name: views + x-fern-sdk-method-name: update + put: + description: Overwrite view data with updated filters and other information for a specific project. + operationId: api_dm_views_update + parameters: + - description: View ID + in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - type: object properties: data: - type: object description: Custom view data properties: filters: - type: object + description: 'Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
    Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' properties: conjunction: - type: string + description: Logical conjunction for the filters. This conjunction (either "or" or "and") will be applied to all items in the filters list. It is not possible to combine "or" and "and" within one list of filters. All filters will be either combined with "or" or with "and", but not a mix of both. enum: - - or - - and - description: Logical conjunction for the filters. This conjunction - (either "or" or "and") will be applied to all items in - the filters list. It is not possible to combine "or" and - "and" within one list of filters. All filters will be - either combined with "or" or with "and", but not a mix - of both. + - or + - and + type: string items: - type: array + description: List of filter items items: - type: object + example: + filter: filter:tasks:id + operator: greater + type: Number + value: 123 properties: filter: - type: string + description: 'Filter identifier, it should start with `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. For `task.data` fields it may look like `filter:tasks:data.field_name`. If you need more info about columns, check the [Get data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) API endpoint. Possible values:
  • `filter:tasks:agreement`
    (Number) Agreement for annotation results for a specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    (List) Annotators that completed the task (Community). Can include assigned annotators (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    (Number) Number of cancelled or skipped annotations for the task

  • `filter:tasks:comments`
    (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    (String) Name of the file uploaded to create the tasks

  • `filter:tasks:ground_truth`
    (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    (Number) Task ID

  • `filter:tasks:inner_id`
    (Number) Task Inner ID, it starts from 1 for all projects

  • `filter:tasks:predictions_model_versions`
    (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    (Boolean) Whether the tasks have been reviewed (Enterprise only)

  • `filter:tasks:reviewers`
    (String) Reviewers that reviewed the task, or assigned reviewers (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    (Number) Number of annotations accepted for a task in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    (Number) Number of annotations rejected for a task in review (Enterprise only)

  • `filter:tasks:total_annotations`
    (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    (Datetime) Time the task was updated at (e.g. new annotation was created, review added, etc)
  • ' enum: - - filter:tasks:agreement - - filter:tasks:annotations_results - - filter:tasks:annotators - - filter:tasks:cancelled_annotations - - filter:tasks:comments - - filter:tasks:completed_at - - filter:tasks:created_at - - filter:tasks:file_upload - - filter:tasks:ground_truth - - filter:tasks:id - - filter:tasks:inner_id - - filter:tasks:predictions_model_versions - - filter:tasks:predictions_results - - filter:tasks:predictions_score - - filter:tasks:reviewed - - filter:tasks:reviewers - - filter:tasks:reviews_accepted - - filter:tasks:reviews_rejected - - filter:tasks:total_annotations - - filter:tasks:total_predictions - - filter:tasks:unresolved_comment_count - - filter:tasks:updated_at - description: 'Filter identifier, it should start with - `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. - For `task.data` fields it may look like `filter:tasks:data.field_name`. - If you need more info about columns, check the [Get - data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) - API endpoint. Possible values:
  • `filter:tasks:agreement`
    - (Number) Agreement for annotation results for a - specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    - (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    - (List) Annotators that completed the task (Community). - Can include assigned annotators (Enterprise only). - Important note: the filter `type` should be List, - but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    - (Number) Number of cancelled or skipped annotations - for the task

  • `filter:tasks:comments`
    - (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    - (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    - (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    - (String) Name of the file uploaded to create the - tasks

  • `filter:tasks:ground_truth`
    - (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    - (Number) Task ID

  • `filter:tasks:inner_id`
    - (Number) Task Inner ID, it starts from 1 for all - projects

  • `filter:tasks:predictions_model_versions`
    - (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    - (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    - (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    - (Boolean) Whether the tasks have been reviewed (Enterprise - only)

  • `filter:tasks:reviewers`
    (String) - Reviewers that reviewed the task, or assigned reviewers - (Enterprise only). Important note: the filter `type` - should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    - (Number) Number of annotations accepted for a task - in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    - (Number) Number of annotations rejected for a task - in review (Enterprise only)

  • `filter:tasks:total_annotations`
    - (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    - (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    - (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    - (Datetime) Time the task was updated at (e.g. new - annotation was created, review added, etc)
  • ' - operator: + - filter:tasks:agreement + - filter:tasks:annotations_results + - filter:tasks:annotators + - filter:tasks:cancelled_annotations + - filter:tasks:comments + - filter:tasks:completed_at + - filter:tasks:created_at + - filter:tasks:file_upload + - filter:tasks:ground_truth + - filter:tasks:id + - filter:tasks:inner_id + - filter:tasks:predictions_model_versions + - filter:tasks:predictions_results + - filter:tasks:predictions_score + - filter:tasks:reviewed + - filter:tasks:reviewers + - filter:tasks:reviews_accepted + - filter:tasks:reviews_rejected + - filter:tasks:total_annotations + - filter:tasks:total_predictions + - filter:tasks:unresolved_comment_count + - filter:tasks:updated_at type: string + operator: + description: 'Filter operator. Possible values:
  • `contains`
    Contains

  • `ends_with`
    Ends with

  • `equal`
    Equal to

  • `exists`
    Exists

  • `greater`
    Greater than

  • `greater_or_equal`
    Greater than or equal to

  • `in`
    Is between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `less`
    Less than

  • `less_or_equal`
    Less than or equal to

  • `not_contains`
    Does not contain

  • `not_equal`
    Not equal to

  • `not_exists`
    Does not exist

  • `not_in`
    Is not between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    Starts with
  • ' enum: - - contains - - ends_with - - equal - - exists - - greater - - greater_or_equal - - in - - less - - less_or_equal - - not_contains - - not_equal - - not_exists - - not_in - - starts_with - description: 'Filter operator. Possible values:
  • `contains`
    - Contains

  • `ends_with`
    Ends with

  • `equal`
    - Equal to

  • `exists`
    Exists

  • `greater`
    - Greater than

  • `greater_or_equal`
    - Greater than or equal to

  • `in`
    Is - between min and max values, so the filter `value` - should be e.g. `{"min": 1, "max": 7}`

  • `less`
    - Less than

  • `less_or_equal`
    Less than - or equal to

  • `not_contains`
    Does - not contain

  • `not_equal`
    Not equal - to

  • `not_exists`
    Does not exist

  • `not_in`
    - Is not between min and max values, so the filter - `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    - Starts with
  • ' + - contains + - ends_with + - equal + - exists + - greater + - greater_or_equal + - in + - less + - less_or_equal + - not_contains + - not_equal + - not_exists + - not_in + - starts_with + type: string type: + description: Type of the filter value. Possible values:
  • `Boolean`
    Boolean

  • `Datetime`
    Datetime string in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    List of items

  • `Number`
    Float or Integer

  • `String`
    String

  • `Unknown`
    Unknown is explicitly converted to string format
  • type: string - description: Type of the filter value. Possible values:
  • `Boolean`
    - Boolean

  • `Datetime`
    Datetime string - in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    - List of items

  • `Number`
    Float or - Integer

  • `String`
    String

  • `Unknown`
    - Unknown is explicitly converted to string format
  • value: - type: object - oneOf: - - type: string - title: String - description: String - - type: integer - title: Integer - description: Integer - - type: number - title: Float - format: float - description: Float - - type: boolean - title: Boolean - description: Boolean - - type: object - title: Dictionary - description: Dictionary is used for some operator - types, e.g. `in` and `not_in` - - type: object - title: List - description: List of strings or integers description: Value to filter by + oneOf: + - description: String + title: String + type: string + - description: Integer + title: Integer + type: integer + - description: Float + format: float + title: Float + type: number + - description: Boolean + title: Boolean + type: boolean + - description: Dictionary is used for some operator types, e.g. `in` and `not_in` + title: Dictionary + type: object + - description: List of strings or integers + title: List + type: object + type: object required: - - filter - - operator - - type - - value - example: - filter: filter:tasks:id - operator: greater - type: Number - value: 123 - description: List of filter items + - filter + - operator + - type + - value + type: object + type: array required: - - conjunction - - items - description: 'Filters to apply on tasks. You can use [the helper - class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) - to create Data Manager Filters.
    Example: `{"conjunction": - "or", "items": [{"filter": "filter:tasks:completed_at", "operator": - "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' + - conjunction + - items + type: object ordering: - type: array + description: List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`. items: - type: string enum: - - tasks:agreement - - tasks:annotations_results - - tasks:annotators - - tasks:cancelled_annotations - - tasks:comments - - tasks:completed_at - - tasks:created_at - - tasks:file_upload - - tasks:ground_truth - - tasks:id - - tasks:inner_id - - tasks:predictions_model_versions - - tasks:predictions_results - - tasks:predictions_score - - tasks:reviewed - - tasks:reviewers - - tasks:reviews_accepted - - tasks:reviews_rejected - - tasks:total_annotations - - tasks:total_predictions - - tasks:unresolved_comment_count - - tasks:updated_at - description: List of fields to order by. Fields are similar - to filters but without the `filter:` prefix. To reverse the - order, add a minus sign before the field name, e.g. `-tasks:created_at`. + - tasks:agreement + - tasks:annotations_results + - tasks:annotators + - tasks:cancelled_annotations + - tasks:comments + - tasks:completed_at + - tasks:created_at + - tasks:file_upload + - tasks:ground_truth + - tasks:id + - tasks:inner_id + - tasks:predictions_model_versions + - tasks:predictions_results + - tasks:predictions_score + - tasks:reviewed + - tasks:reviewers + - tasks:reviews_accepted + - tasks:reviews_rejected + - tasks:total_annotations + - tasks:total_predictions + - tasks:unresolved_comment_count + - tasks:updated_at + type: string + type: array + type: object project: - type: integer description: Project ID - security: - - Token: [] + type: integer + type: object responses: '200': content: @@ -3868,99 +3625,45 @@ paths: schema: $ref: '#/components/schemas/View' description: '' - x-fern-sdk-group-name: views - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_dm_views_destroy - description: Delete a specific view by ID. - summary: Delete view - parameters: - - in: path - name: id - schema: - type: string - description: View ID - required: true - tags: - - Data Manager security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: views - x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/dm/views/order/: - post: - operationId: api_dm_views_order_create - description: Update the order field of views based on the provided list of view - IDs - summary: Update order of views + - Token: [] + summary: Put view tags: - - Data Manager - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ViewOrderRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ViewOrderRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ViewOrderRequest' - required: true - security: - - Token: [] - responses: - '200': - description: View order updated successfully - x-fern-sdk-group-name: views - x-fern-sdk-method-name: update_order + - Data Manager x-fern-audiences: - - public - /api/dm/views/reset/: + - internal + /api/import/file-upload/{id}: delete: - operationId: api_dm_views_reset_destroy - description: Delete all views for a specific project. - summary: Delete all project views + description: Delete a specific uploaded file. + operationId: api_import_file_upload_destroy parameters: - - in: query - name: project - schema: - type: integer - description: Project ID - required: true - tags: - - Data Manager - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body - x-fern-sdk-group-name: views - x-fern-sdk-method-name: delete_all + security: + - Token: [] + summary: Delete file upload + tags: + - Import x-fern-audiences: - - public - /api/import/file-upload/{id}: + - public + x-fern-sdk-group-name: + - files + x-fern-sdk-method-name: delete get: - operationId: api_import_file_upload_retrieve description: Retrieve details about a specific uploaded file. - summary: Get file upload + operationId: api_import_file_upload_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Import - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -3968,36 +3671,36 @@ paths: schema: $ref: '#/components/schemas/FileUpload' description: '' + security: + - Token: [] + summary: Get file upload + tags: + - Import + x-fern-audiences: + - public x-fern-sdk-group-name: - - files + - files x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: - operationId: api_import_file_upload_partial_update description: Update a specific uploaded file. - summary: Update file upload + operationId: api_import_file_upload_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Import + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedFileUploadRequest' - multipart/form-data: + application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedFileUploadRequest' - application/x-www-form-urlencoded: + multipart/form-data: schema: $ref: '#/components/schemas/PatchedFileUploadRequest' - security: - - Token: [] responses: '200': content: @@ -4005,88 +3708,66 @@ paths: schema: $ref: '#/components/schemas/FileUpload' description: '' - x-fern-sdk-group-name: - - files - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_import_file_upload_destroy - description: Delete a specific uploaded file. - summary: Delete file upload - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Import security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - files - x-fern-sdk-method-name: delete + - Token: [] + summary: Update file upload + tags: + - Import x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - files + x-fern-sdk-method-name: update /api/inference-runs/{id}/indicators/: get: - operationId: api_inference_runs_indicators_retrieve description: Get key indicators for the Prompt dashboard. - summary: Get key indicators + operationId: api_inference_runs_indicators_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: - type: object properties: title: type: string values: type: object + type: object + type: array description: Key indicators + security: + - Token: [] + summary: Get key indicators + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - indicators + - prompts + - indicators x-fern-sdk-method-name: list - x-fern-audiences: - - public /api/inference-runs/{id}/indicators/{indicator_key}: get: - operationId: api_inference_runs_indicators_retrieve_2 description: Get a specific key indicator for the Prompt dashboard. - summary: Get key indicator + operationId: api_inference_runs_indicators_retrieve_2 parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: path - name: indicator_key - schema: - type: string - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: indicator_key + required: true + schema: + type: string responses: '200': content: @@ -4094,34 +3775,33 @@ paths: schema: $ref: '#/components/schemas/LSEKeyIndicatorValue' description: Key indicator + security: + - Token: [] + summary: Get key indicator + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - indicators + - prompts + - indicators x-fern-sdk-method-name: get - x-fern-audiences: - - public /api/invite: get: - operationId: api_invite_retrieve description: Get invite link for organization - summary: Invite people - tags: - - Invites - security: - - Token: [] + operationId: api_invite_retrieve responses: '200': description: No response body + security: + - Token: [] + summary: Invite people + tags: + - Invites /api/invite/reset-token: post: + description: Reset the token used in the invitation link to invite someone to an organization. operationId: api_invite_reset_token_create - description: Reset the token used in the invitation link to invite someone to - an organization. - summary: Reset organization token - tags: - - Invites - security: - - Token: [] responses: '200': content: @@ -4129,17 +3809,19 @@ paths: schema: $ref: '#/components/schemas/OrganizationInvite' description: '' + security: + - Token: [] + summary: Reset organization token + tags: + - Invites + x-fern-audiences: + - public x-fern-sdk-group-name: organizations x-fern-sdk-method-name: reset_token - x-fern-audiences: - - public /api/invite/revoke: post: - operationId: api_invite_revoke_create description: Revoke invite - summary: Revoke invite - tags: - - Invites + operationId: api_invite_revoke_create requestBody: content: application/json: @@ -4152,18 +3834,18 @@ paths: schema: $ref: '#/components/schemas/RevokeInviteRequest' required: true - security: - - Token: [] responses: '200': description: No response body + security: + - Token: [] + summary: Revoke invite + tags: + - Invites /api/invite/send-email: post: - operationId: api_invite_send_email_create description: Send email with invite to organization - summary: Send email with invite - tags: - - Invites + operationId: api_invite_send_email_create requestBody: content: application/json: @@ -4176,20 +3858,18 @@ paths: schema: $ref: '#/components/schemas/SendInviteRequest' required: true - security: - - Token: [] responses: '200': description: No response body + security: + - Token: [] + summary: Send email with invite + tags: + - Invites /api/jwt/settings: get: - operationId: api_jwt_settings_retrieve description: Retrieve JWT settings for the currently active organization. - summary: Retrieve JWT Settings - tags: - - JWT - security: - - Token: [] + operationId: api_jwt_settings_retrieve responses: '200': content: @@ -4197,16 +3877,18 @@ paths: schema: $ref: '#/components/schemas/LSEJWTSettings' description: '' + security: + - Token: [] + summary: Retrieve JWT Settings + tags: + - JWT + x-fern-audiences: + - public x-fern-sdk-group-name: jwt_settings x-fern-sdk-method-name: get - x-fern-audiences: - - public post: - operationId: api_jwt_settings_create description: Update JWT settings for the currently active organization. - summary: Update JWT Settings - tags: - - JWT + operationId: api_jwt_settings_create requestBody: content: application/json: @@ -4218,8 +3900,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/LSEJWTSettingsRequest' - security: - - Token: [] responses: '201': content: @@ -4227,26 +3907,26 @@ paths: schema: $ref: '#/components/schemas/LSEJWTSettings' description: '' + security: + - Token: [] + summary: Update JWT Settings + tags: + - JWT + x-fern-audiences: + - public x-fern-sdk-group-name: jwt_settings x-fern-sdk-method-name: update - x-fern-audiences: - - public /api/label_links/: get: - operationId: api_label_links_list description: List label links for a specific label and project. - summary: List label links + operationId: api_label_links_list parameters: - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - tags: - - Labels - security: - - Token: [] + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer responses: '200': content: @@ -4254,19 +3934,20 @@ paths: schema: $ref: '#/components/schemas/PaginatedLabelLinkList' description: '' + security: + - Token: [] + summary: List label links + tags: + - Labels + x-fern-audiences: + - internal x-fern-sdk-group-name: - - projects - - labels + - projects + - labels x-fern-sdk-method-name: list - x-fern-audiences: - - internal post: + description: Create label links to link new custom labels to your project labeling configuration. operationId: api_label_links_create - description: Create label links to link new custom labels to your project labeling - configuration. - summary: Create label links - tags: - - Labels requestBody: content: application/json: @@ -4279,8 +3960,6 @@ paths: schema: $ref: '#/components/schemas/LabelLinkRequest' required: true - security: - - Token: [] responses: '201': content: @@ -4288,27 +3967,50 @@ paths: schema: $ref: '#/components/schemas/LabelLink' description: '' + security: + - Token: [] + summary: Create label links + tags: + - Labels + x-fern-audiences: + - internal x-fern-sdk-group-name: - - projects - - labels + - projects + - labels x-fern-sdk-method-name: create - x-fern-audiences: - - internal /api/label_links/{id}/: + delete: + description: "\n Remove a label link that links custom labels to your project labeling configuration. If you remove a label link,\n the label stops being available for the project it was linked to. You can add a new label link at any time. \n " + operationId: api_label_links_destroy + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No response body + security: + - Token: [] + summary: Remove label link + tags: + - Labels + x-fern-audiences: + - internal + x-fern-sdk-group-name: + - projects + - labels + x-fern-sdk-method-name: delete get: - operationId: api_label_links_retrieve description: 'Get label links for a specific project configuration. ' - summary: Get label link + operationId: api_label_links_retrieve parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Labels - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: string responses: '200': content: @@ -4316,27 +4018,26 @@ paths: schema: $ref: '#/components/schemas/LabelLink' description: '' + security: + - Token: [] + summary: Get label link + tags: + - Labels + x-fern-audiences: + - internal x-fern-sdk-group-name: - - projects - - labels + - projects + - labels x-fern-sdk-method-name: get - x-fern-audiences: - - internal patch: + description: "\n Update a label link that links custom labels to a project labeling configuration, for example if the fromName, \n toName, or name parameters for a tag in the labeling configuration change. \n " operationId: api_label_links_partial_update - description: "\n Update a label link that links custom labels to a project\ - \ labeling configuration, for example if the fromName, \n toName,\ - \ or name parameters for a tag in the labeling configuration change. \n \ - \ " - summary: Update label link parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Labels + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: @@ -4348,8 +4049,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedLabelLinkRequest' - security: - - Token: [] responses: '200': content: @@ -4357,61 +4056,34 @@ paths: schema: $ref: '#/components/schemas/LabelLink' description: '' - x-fern-sdk-group-name: - - projects - - labels - x-fern-sdk-method-name: update - x-fern-audiences: - - internal - delete: - operationId: api_label_links_destroy - description: "\n Remove a label link that links custom labels to your\ - \ project labeling configuration. If you remove a label link,\n the\ - \ label stops being available for the project it was linked to. You can add\ - \ a new label link at any time. \n " - summary: Remove label link - parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Labels security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - projects - - labels - x-fern-sdk-method-name: delete + - Token: [] + summary: Update label link + tags: + - Labels x-fern-audiences: - - internal + - internal + x-fern-sdk-group-name: + - projects + - labels + x-fern-sdk-method-name: update /api/labels/: get: + description: List all custom labels added to your project separately from the labeling configuration. operationId: api_labels_list - description: List all custom labels added to your project separately from the - labeling configuration. - summary: List labels parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - tags: - - Labels - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer responses: '200': content: @@ -4419,49 +4091,49 @@ paths: schema: $ref: '#/components/schemas/PaginatedLabelList' description: '' + security: + - Token: [] + summary: List labels + tags: + - Labels + x-fern-audiences: + - internal x-fern-sdk-group-name: labels x-fern-sdk-method-name: list - x-fern-audiences: - - internal post: - operationId: api_labels_create description: Add labels to your project without updating the labeling configuration. - summary: Create labels + operationId: api_labels_create parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - tags: - - Labels + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer requestBody: content: application/json: schema: - type: array items: $ref: '#/components/schemas/LabelCreateRequest' + type: array application/x-www-form-urlencoded: schema: - type: array items: $ref: '#/components/schemas/LabelCreateRequest' + type: array multipart/form-data: schema: - type: array items: $ref: '#/components/schemas/LabelCreateRequest' + type: array required: true - security: - - Token: [] responses: '201': content: @@ -4469,26 +4141,64 @@ paths: schema: $ref: '#/components/schemas/PaginatedLabelCreateList' description: '' + security: + - Token: [] + summary: Create labels + tags: + - Labels + x-fern-audiences: + - internal x-fern-sdk-group-name: labels x-fern-sdk-method-name: create + /api/labels/bulk: + post: + description: "\n If you want to update the labels in saved annotations, use this endpoint.\n " + operationId: api_labels_bulk_create + responses: + '200': + description: No response body + security: + - Token: [] + summary: Bulk update labels + tags: + - Labels x-fern-audiences: - - internal + - internal + x-fern-sdk-group-name: + - projects + - labels + x-fern-sdk-method-name: update_many /api/labels/{id}/: + delete: + description: Remove labels from your project without updating the labeling configuration. + operationId: api_labels_destroy + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No response body + security: + - Token: [] + summary: Remove labels + tags: + - Labels + x-fern-audiences: + - internal + x-fern-sdk-group-name: labels + x-fern-sdk-method-name: delete get: + description: "\n Retrieve a specific custom label used for your project by its ID.\n " operationId: api_labels_retrieve - description: "\n Retrieve a specific custom label used for your project\ - \ by its ID.\n " - summary: Get label parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Labels - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: string responses: '200': content: @@ -4496,23 +4206,24 @@ paths: schema: $ref: '#/components/schemas/Label' description: '' + security: + - Token: [] + summary: Get label + tags: + - Labels + x-fern-audiences: + - internal x-fern-sdk-group-name: labels x-fern-sdk-method-name: get - x-fern-audiences: - - internal patch: + description: Update labels used for your project without updating the labeling configuration. operationId: api_labels_partial_update - description: Update labels used for your project without updating the labeling - configuration. - summary: Update labels parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Labels + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: @@ -4524,8 +4235,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedLabelRequest' - security: - - Token: [] responses: '200': content: @@ -4533,132 +4242,86 @@ paths: schema: $ref: '#/components/schemas/Label' description: '' - x-fern-sdk-group-name: labels - x-fern-sdk-method-name: update - x-fern-audiences: - - internal - delete: - operationId: api_labels_destroy - description: Remove labels from your project without updating the labeling configuration. - summary: Remove labels - parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Labels security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: labels - x-fern-sdk-method-name: delete - x-fern-audiences: - - internal - /api/labels/bulk: - post: - operationId: api_labels_bulk_create - description: "\n If you want to update the labels in saved annotations,\ - \ use this endpoint.\n " - summary: Bulk update labels + - Token: [] + summary: Update labels tags: - - Labels - security: - - Token: [] - responses: - '200': - description: No response body - x-fern-sdk-group-name: - - projects - - labels - x-fern-sdk-method-name: update_many + - Labels x-fern-audiences: - - internal + - internal + x-fern-sdk-group-name: labels + x-fern-sdk-method-name: update /api/ml/: get: + description: "\n List all configured ML backends for a specific project by ID.\n Use the following cURL command:\n ```bash\n curl http://localhost:8000/api/ml?project={project_id} -H 'Authorization: Token abc123'\n " operationId: api_ml_list - description: "\n List all configured ML backends for a specific project by\ - \ ID.\n Use the following cURL command:\n ```bash\n curl http://localhost:8000/api/ml?project={project_id}\ - \ -H 'Authorization: Token abc123'\n " - summary: List ML backends parameters: - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - Machine Learning - security: - - Token: [] + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/MLBackend' + type: array description: '' + security: + - Token: [] + summary: List ML backends + tags: + - Machine Learning + x-fern-audiences: + - public x-fern-sdk-group-name: ml x-fern-sdk-method-name: list - x-fern-audiences: - - public post: + description: "\n Add an ML backend to a project using the Label Studio UI or by sending a POST request using the following cURL \n command:\n ```bash\n curl -X POST -H 'Content-type: application/json' http://localhost:8000/api/ml -H 'Authorization: Token abc123'\\\n --data '{\"url\": \"http://localhost:9090\", \"project\": {project_id}}' \n " operationId: api_ml_create - description: "\n Add an ML backend to a project using the Label Studio UI\ - \ or by sending a POST request using the following cURL \n command:\n \ - \ ```bash\n curl -X POST -H 'Content-type: application/json' http://localhost:8000/api/ml\ - \ -H 'Authorization: Token abc123'\\\n --data '{\"url\": \"http://localhost:9090\"\ - , \"project\": {project_id}}' \n " - summary: Add ML Backend - tags: - - Machine Learning requestBody: content: application/json: schema: - type: object properties: - url: - type: string - description: ML backend URL - project: - type: integer - description: Project ID - is_interactive: - type: boolean - description: Is interactive - title: - type: string - description: Title - description: - type: string - description: Description auth_method: - type: string description: Auth method enum: - - NONE - - BASIC_AUTH - basic_auth_user: + - NONE + - BASIC_AUTH type: string - description: Basic auth user basic_auth_pass: - type: string description: Basic auth password + type: string + basic_auth_user: + description: Basic auth user + type: string + description: + description: Description + type: string extra_params: - type: object description: Extra parameters - timeout: + type: object + is_interactive: + description: Is interactive + type: boolean + project: + description: Project ID type: integer + timeout: description: Response model timeout + type: integer + title: + description: Title + type: string + url: + description: ML backend URL + type: string required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -4666,28 +4329,46 @@ paths: schema: $ref: '#/components/schemas/MLBackend' description: '' + security: + - Token: [] + summary: Add ML Backend + tags: + - Machine Learning + x-fern-audiences: + - public x-fern-sdk-group-name: ml x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/ml/{id}: + delete: + description: "\n Remove an existing ML backend connection by ID. For example, use the\n following cURL command:\n ```bash\n curl -X DELETE http://localhost:8000/api/ml/{ml_backend_ID} -H 'Authorization: Token abc123'\n " + operationId: api_ml_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Remove ML Backend + tags: + - Machine Learning + x-fern-audiences: + - public + x-fern-sdk-group-name: ml + x-fern-sdk-method-name: delete get: + description: "\n Get details about a specific ML backend connection by ID. For example, make a GET request using the\n following cURL command:\n ```bash\n curl http://localhost:8000/api/ml/{ml_backend_ID} -H 'Authorization: Token abc123'\n " operationId: api_ml_retrieve - description: "\n Get details about a specific ML backend connection by ID.\ - \ For example, make a GET request using the\n following cURL command:\n\ - \ ```bash\n curl http://localhost:8000/api/ml/{ml_backend_ID} -H 'Authorization:\ - \ Token abc123'\n " - summary: Get ML Backend parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Machine Learning - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -4695,68 +4376,64 @@ paths: schema: $ref: '#/components/schemas/MLBackend' description: '' + security: + - Token: [] + summary: Get ML Backend + tags: + - Machine Learning + x-fern-audiences: + - public x-fern-sdk-group-name: ml x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: + description: "\n Update ML backend parameters using the Label Studio UI or by sending a PATCH request using the following cURL command:\n ```bash\n curl -X PATCH -H 'Content-type: application/json' http://localhost:8000/api/ml/{ml_backend_ID} -H 'Authorization: Token abc123'\\\n --data '{\"url\": \"http://localhost:9091\"}' \n " operationId: api_ml_partial_update - description: "\n Update ML backend parameters using the Label Studio UI or\ - \ by sending a PATCH request using the following cURL command:\n ```bash\n\ - \ curl -X PATCH -H 'Content-type: application/json' http://localhost:8000/api/ml/{ml_backend_ID}\ - \ -H 'Authorization: Token abc123'\\\n --data '{\"url\": \"http://localhost:9091\"\ - }' \n " - summary: Update ML Backend parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Machine Learning + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - url: - type: string - description: ML backend URL - project: - type: integer - description: Project ID - is_interactive: - type: boolean - description: Is interactive - title: - type: string - description: Title - description: - type: string - description: Description auth_method: - type: string description: Auth method enum: - - NONE - - BASIC_AUTH - basic_auth_user: + - NONE + - BASIC_AUTH type: string - description: Basic auth user basic_auth_pass: - type: string description: Basic auth password + type: string + basic_auth_user: + description: Basic auth user + type: string + description: + description: Description + type: string extra_params: - type: object description: Extra parameters - timeout: + type: object + is_interactive: + description: Is interactive + type: boolean + project: + description: Project ID type: integer + timeout: description: Response model timeout + type: integer + title: + description: Title + type: string + url: + description: ML backend URL + type: string required: [] - security: - - Token: [] + type: object responses: '200': content: @@ -4764,50 +4441,26 @@ paths: schema: $ref: '#/components/schemas/MLBackend' description: '' - x-fern-sdk-group-name: ml - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_ml_destroy - description: "\n Remove an existing ML backend connection by ID. For example,\ - \ use the\n following cURL command:\n ```bash\n curl -X DELETE http://localhost:8000/api/ml/{ml_backend_ID}\ - \ -H 'Authorization: Token abc123'\n " - summary: Remove ML Backend - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Machine Learning security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: ml - x-fern-sdk-method-name: delete + - Token: [] + summary: Update ML Backend + tags: + - Machine Learning x-fern-audiences: - - public + - public + x-fern-sdk-group-name: ml + x-fern-sdk-method-name: update /api/ml/{id}/interactive-annotating: post: + description: "\n Send a request to the machine learning backend set up to be used for interactive preannotations to retrieve a\n predicted region based on annotator input. \n See [set up machine learning](https://labelstud.io/guide/ml.html#Get-interactive-preannotations) for more.\n " operationId: api_ml_interactive_annotating_create - description: "\n Send a request to the machine learning backend set up\ - \ to be used for interactive preannotations to retrieve a\n predicted\ - \ region based on annotator input. \n See [set up machine learning](https://labelstud.io/guide/ml.html#Get-interactive-preannotations)\ - \ for more.\n " - summary: Request Interactive Annotation parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this ML backend. - required: true - tags: - - Machine Learning + - description: A unique integer value identifying this ML backend. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -4820,64 +4473,53 @@ paths: schema: $ref: '#/components/schemas/MLInteractiveAnnotatingRequestRequest' required: true - security: - - Token: [] responses: '200': description: Interactive annotation has succeeded. + security: + - Token: [] + summary: Request Interactive Annotation + tags: + - Machine Learning + x-fern-audiences: + - public x-fern-sdk-group-name: ml x-fern-sdk-method-name: predict_interactive - x-fern-audiences: - - public /api/ml/{id}/predict: post: + description: "\n Create predictions for all tasks using a specific ML backend so that you can set up an active learning strategy\n based on the confidence or uncertainty scores associated with the predictions. Creating predictions requires \n a Label Studio ML backend set up and configured for your project. \n\n See [Set up machine learning](https://labelstud.io/guide/ml.html) for more details \n about a Label Studio ML backend.\n\n Reference the ML backend ID in the path of this API call. Get the ML backend ID by \n [listing the ML backends for a project](https://labelstud.io/api/#operation/api_ml_list).\n " operationId: api_ml_predict_create - description: "\n Create predictions for all tasks using a specific ML\ - \ backend so that you can set up an active learning strategy\n based\ - \ on the confidence or uncertainty scores associated with the predictions.\ - \ Creating predictions requires \n a Label Studio ML backend set up\ - \ and configured for your project. \n\n See [Set up machine learning](https://labelstud.io/guide/ml.html)\ - \ for more details \n about a Label Studio ML backend.\n\n Reference\ - \ the ML backend ID in the path of this API call. Get the ML backend ID by\ - \ \n [listing the ML backends for a project](https://labelstud.io/api/#operation/api_ml_list).\n\ - \ " - summary: Create predictions parameters: - - in: query - name: batch_size - schema: - type: integer - description: Computed number of tasks without predictions that the ML backend - needs to predict. - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this ML backend. - required: true - tags: - - Machine Learning - security: - - Token: [] + - description: Computed number of tasks without predictions that the ML backend needs to predict. + in: query + name: batch_size + schema: + type: integer + - description: A unique integer value identifying this ML backend. + in: path + name: id + required: true + schema: + type: integer responses: '200': description: Predictions have successfully started. + security: + - Token: [] + summary: Create predictions + tags: + - Machine Learning /api/ml/{id}/predict/test: post: + description: "\n After you add an ML backend, call this API with the ML backend ID to run a test prediction on specific task data \n " operationId: api_ml_predict_test_create - description: "\n After you add an ML backend, call this API with the\ - \ ML backend ID to run a test prediction on specific task data \ - \ \n " - summary: Test prediction parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this ML backend. - required: true - tags: - - Machine Learning + - description: A unique integer value identifying this ML backend. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -4890,8 +4532,6 @@ paths: schema: $ref: '#/components/schemas/MLBackendRequest' required: true - security: - - Token: [] responses: '200': description: Predicting has successfully started. @@ -4900,41 +4540,38 @@ paths: application/json: schema: description: Error message - type: string example: Server responded with an error. + type: string description: Predicting error + security: + - Token: [] + summary: Test prediction + tags: + - Machine Learning + x-fern-audiences: + - internal x-fern-sdk-group-name: ml x-fern-sdk-method-name: test_predict - x-fern-audiences: - - internal /api/ml/{id}/train: post: + description: "\n After you add an ML backend, call this API with the ML backend ID to start training with \n already-labeled tasks. \n \n Get the ML backend ID by [listing the ML backends for a project](https://labelstud.io/api/#operation/api_ml_list).\n " operationId: api_ml_train_create - description: "\n After you add an ML backend, call this API with the\ - \ ML backend ID to start training with \n already-labeled tasks. \n\ - \ \n Get the ML backend ID by [listing the ML backends for a\ - \ project](https://labelstud.io/api/#operation/api_ml_list).\n " - summary: Train parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this ML backend. - required: true - tags: - - Machine Learning + - description: A unique integer value identifying this ML backend. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: use_ground_truth: - type: boolean description: Whether to include ground truth annotations in training - security: - - Token: [] + type: boolean + type: object responses: '200': description: Training has successfully started. @@ -4943,81 +4580,83 @@ paths: application/json: schema: description: Error message - type: string example: Server responded with an error. + type: string description: Training error + security: + - Token: [] + summary: Train + tags: + - Machine Learning + x-fern-audiences: + - public x-fern-sdk-group-name: ml x-fern-sdk-method-name: train - x-fern-audiences: - - public /api/ml/{id}/versions: get: - operationId: api_ml_versions_retrieve description: Get available versions of the model. - summary: Get model versions + operationId: api_ml_versions_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Machine Learning - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: + message: + type: string versions: - type: array items: type: string - message: - type: string + type: array + type: object description: List of available versions. + security: + - Token: [] + summary: Get model versions + tags: + - Machine Learning + x-fern-audiences: + - public x-fern-sdk-group-name: ml x-fern-sdk-method-name: list_model_versions - x-fern-audiences: - - public /api/model-provider-connections/: get: - operationId: api_model_provider_connections_list description: List all model provider connections. - summary: List model provider connections + operationId: api_model_provider_connections_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Model Provider Connection - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/ModelProviderConnection' + type: array description: '' + security: + - Token: [] + summary: List model provider connections + tags: + - Model Provider Connection + x-fern-audiences: + - public x-fern-sdk-group-name: model_providers x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_model_provider_connections_create description: Create a new model provider connection. - summary: Create model provider connection - tags: - - Model Provider Connection + operationId: api_model_provider_connections_create requestBody: content: application/json: @@ -5029,8 +4668,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/ModelProviderConnectionRequest' - security: - - Token: [] responses: '201': content: @@ -5038,25 +4675,71 @@ paths: schema: $ref: '#/components/schemas/ModelProviderConnection' description: '' + security: + - Token: [] + summary: Create model provider connection + tags: + - Model Provider Connection + x-fern-audiences: + - public x-fern-sdk-group-name: model_providers x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/model-provider-connections/{id}/: + /api/model-provider-connections/provider-choices: get: - operationId: api_model_provider_connections_retrieve - description: Retrieve a specific model provider connection. - summary: Get model provider connection - parameters: - - in: path - name: id - schema: - type: string - required: true + description: List all possible model provider choices + operationId: api_model_provider_connections_provider_choices_retrieve + responses: + '200': + content: + application/json: + schema: + properties: + provider_choices: + items: + type: string + type: array + type: object + description: List of model provider choices + security: + - Token: [] + summary: List model provider choices tags: - - Model Provider Connection + - Model Provider Connection + x-fern-audiences: + - public + x-fern-sdk-group-name: model_providers + x-fern-sdk-method-name: list_model_provider_choices + /api/model-provider-connections/{id}/: + delete: + description: Delete a model provider connection by ID + operationId: api_model_provider_connections_destroy + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No response body security: - - Token: [] + - Token: [] + summary: Delete model provider connection + tags: + - Model Provider Connection + x-fern-audiences: + - public + x-fern-sdk-group-name: model_providers + x-fern-sdk-method-name: delete + get: + description: Retrieve a specific model provider connection. + operationId: api_model_provider_connections_retrieve + parameters: + - in: path + name: id + required: true + schema: + type: string responses: '200': content: @@ -5064,35 +4747,35 @@ paths: schema: $ref: '#/components/schemas/ModelProviderConnection' description: '' + security: + - Token: [] + summary: Get model provider connection + tags: + - Model Provider Connection + x-fern-audiences: + - public x-fern-sdk-group-name: model_providers x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_model_provider_connections_update - description: Overwrite a specific model provider connection by ID. - summary: Put model provider connection + patch: + description: Update a specific model provider connection by ID. + operationId: api_model_provider_connections_partial_update parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Model Provider Connection + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/ModelProviderConnectionRequest' + $ref: '#/components/schemas/PatchedModelProviderConnectionRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ModelProviderConnectionRequest' + $ref: '#/components/schemas/PatchedModelProviderConnectionRequest' multipart/form-data: schema: - $ref: '#/components/schemas/ModelProviderConnectionRequest' - security: - - Token: [] + $ref: '#/components/schemas/PatchedModelProviderConnectionRequest' responses: '200': content: @@ -5100,33 +4783,35 @@ paths: schema: $ref: '#/components/schemas/ModelProviderConnection' description: '' - x-fern-audiences: - - internal - patch: - operationId: api_model_provider_connections_partial_update - description: Update a specific model provider connection by ID. + security: + - Token: [] summary: Update model provider connection - parameters: - - in: path - name: id - schema: - type: string - required: true tags: - - Model Provider Connection + - Model Provider Connection + x-fern-audiences: + - public + x-fern-sdk-group-name: model_providers + x-fern-sdk-method-name: update + put: + description: Overwrite a specific model provider connection by ID. + operationId: api_model_provider_connections_update + parameters: + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedModelProviderConnectionRequest' + $ref: '#/components/schemas/ModelProviderConnectionRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedModelProviderConnectionRequest' + $ref: '#/components/schemas/ModelProviderConnectionRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedModelProviderConnectionRequest' - security: - - Token: [] + $ref: '#/components/schemas/ModelProviderConnectionRequest' responses: '200': content: @@ -5134,70 +4819,23 @@ paths: schema: $ref: '#/components/schemas/ModelProviderConnection' description: '' - x-fern-sdk-group-name: model_providers - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_model_provider_connections_destroy - description: Delete a model provider connection by ID - summary: Delete model provider connection - parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Model Provider Connection security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: model_providers - x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/model-provider-connections/provider-choices: - get: - operationId: api_model_provider_connections_provider_choices_retrieve - description: List all possible model provider choices - summary: List model provider choices + - Token: [] + summary: Put model provider connection tags: - - Model Provider Connection - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - type: object - properties: - provider_choices: - type: array - items: - type: string - description: List of model provider choices - x-fern-sdk-group-name: model_providers - x-fern-sdk-method-name: list_model_provider_choices + - Model Provider Connection x-fern-audiences: - - public + - internal /api/model-run/batch-failed-predictions: post: - operationId: api_model_run_batch_failed_predictions_create description: Create a new batch of failed predictions. - summary: Create batch of failed predictions + operationId: api_model_run_batch_failed_predictions_create parameters: - - in: query - name: num_failed_predictions - schema: - type: integer - description: Number of failed predictions being sent (for telemetry only, - has no effect) - tags: - - Prompts + - description: Number of failed predictions being sent (for telemetry only, has no effect) + in: query + name: num_failed_predictions + schema: + type: integer requestBody: content: application/json: @@ -5210,8 +4848,6 @@ paths: schema: $ref: '#/components/schemas/BatchFailedPredictionsRequestRequest' required: true - security: - - Token: [] responses: '201': content: @@ -5219,24 +4855,25 @@ paths: schema: $ref: '#/components/schemas/BatchFailedPredictions' description: '' + security: + - Token: [] + summary: Create batch of failed predictions + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: prompts x-fern-sdk-method-name: batch_failed_predictions - x-fern-audiences: - - public /api/model-run/batch-predictions: post: - operationId: api_model_run_batch_predictions_create description: Create a new batch prediction. - summary: Create batch predictions + operationId: api_model_run_batch_predictions_create parameters: - - in: query - name: num_predictions - schema: - type: integer - description: Number of predictions being sent (for telemetry only, has no - effect) - tags: - - Prompts + - description: Number of predictions being sent (for telemetry only, has no effect) + in: query + name: num_predictions + schema: + type: integer requestBody: content: application/json: @@ -5249,8 +4886,6 @@ paths: schema: $ref: '#/components/schemas/BatchPredictionsRequestRequest' required: true - security: - - Token: [] responses: '201': content: @@ -5258,55 +4893,54 @@ paths: schema: $ref: '#/components/schemas/BatchPredictions' description: '' + security: + - Token: [] + summary: Create batch predictions + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: prompts x-fern-sdk-method-name: batch_predictions - x-fern-audiences: - - public /api/organizations/: get: + description: "\n Return a list of the organizations you've created or that you have access to.\n " operationId: api_organizations_list - description: "\n Return a list of the organizations you've created or\ - \ that you have access to.\n " - summary: List your organizations parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Organizations - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/OrganizationId' + type: array description: '' + security: + - Token: [] + summary: List your organizations + tags: + - Organizations + x-fern-audiences: + - public x-fern-sdk-group-name: organizations x-fern-sdk-method-name: list - x-fern-audiences: - - public /api/organizations/{id}: get: - operationId: api_organizations_retrieve description: Retrieve the settings for a specific organization by ID. - summary: Get organization settings + operationId: api_organizations_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Organizations - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -5314,23 +4948,24 @@ paths: schema: $ref: '#/components/schemas/LseOrganization' description: '' + security: + - Token: [] + summary: Get organization settings + tags: + - Organizations + x-fern-audiences: + - public x-fern-sdk-group-name: organizations x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: + description: Update organization details including title, embed domains, and custom scripts settings. operationId: api_organizations_partial_update - description: Update organization details including title, embed domains, and - custom scripts settings. - summary: Update organization parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Organizations + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -5342,8 +4977,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedLseOrganizationSerializerUpdateRequest' - security: - - Token: [] responses: '200': content: @@ -5357,58 +4990,56 @@ paths: description: Permission Denied '404': description: Not Found + security: + - Token: [] + summary: Update organization + tags: + - Organizations /api/organizations/{id}/memberships: get: - operationId: api_organizations_memberships_list description: Retrieve a list of all users and roles in a specific organization. - summary: Get organization members/roles + operationId: api_organizations_memberships_list parameters: - - in: query - name: exclude_project_id - schema: - type: integer - description: Project ID to exclude users who are already associated with this - project (direct members, workspace members, or implicit admin/owner access). - - in: query - name: exclude_workspace_id - schema: - type: integer - description: Workspace ID to exclude users who are already associated with - this workspace (direct workspace members or implicit admin/owner access). - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this organization. - required: true - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: search - required: false - in: query - description: A search term. - schema: - type: string - tags: - - Organizations - security: - - Token: [] + - description: Project ID to exclude users who are already associated with this project (direct members, workspace members, or implicit admin/owner access). + in: query + name: exclude_project_id + schema: + type: integer + - description: Workspace ID to exclude users who are already associated with this workspace (direct workspace members or implicit admin/owner access). + in: query + name: exclude_workspace_id + schema: + type: integer + - description: A unique integer value identifying this organization. + in: path + name: id + required: true + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer + - description: A search term. + in: query + name: search + required: false + schema: + type: string responses: '200': content: @@ -5416,14 +5047,18 @@ paths: schema: $ref: '#/components/schemas/PaginatedLseOrganizationMemberListList' description: '' + security: + - Token: [] + summary: Get organization members/roles + tags: + - Organizations + x-fern-audiences: + - public x-fern-sdk-group-name: - - organizations - - members + - organizations + - members x-fern-sdk-method-name: list - x-fern-audiences: - - public patch: - operationId: api_organizations_memberships_partial_update description: |+ Update organization membership or role for a specific user ID. @@ -5439,16 +5074,14 @@ paths: * **Avoid Overloading the API Endpoint**: Design your integration to batch or schedule updates where possible, and implement backoff strategies if the API indicates rate limiting. This helps prevent service disruptions and ensures a smooth operation. - summary: Update organization member/role + operationId: api_organizations_memberships_partial_update parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this organization. - required: true - tags: - - Organizations + - description: A unique integer value identifying this organization. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -5460,8 +5093,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedOrganizationMemberCreateUpdateRequest' - security: - - Token: [] responses: '200': content: @@ -5469,34 +5100,68 @@ paths: schema: $ref: '#/components/schemas/LseOrganizationMemberList' description: '' + security: + - Token: [] + summary: Update organization member/role + tags: + - Organizations + x-fern-audiences: + - public x-fern-sdk-group-name: - - organizations - - members + - organizations + - members x-fern-sdk-method-name: update - x-fern-audiences: - - public /api/organizations/{id}/memberships/{user_pk}/: + delete: + description: Soft delete a member from the organization. + operationId: api_organizations_memberships_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying the user to be deleted from the organization. + in: path + name: user_pk + required: true + schema: + type: integer + responses: + '204': + description: Member deleted successfully. + '403': + description: You can delete members only for your current active organization + '404': + description: Member not found + '405': + description: User cannot soft delete self. + security: + - Token: [] + summary: Soft delete an organization member + tags: + - Organizations + x-fern-audiences: + - public + x-fern-sdk-group-name: + - organizations + - members + x-fern-sdk-method-name: delete get: - operationId: api_organizations_memberships_retrieve description: Get organization member details by user ID. - summary: Get organization member details + operationId: api_organizations_memberships_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - description: A unique integer value identifying the user to get organization - details for. - required: true - tags: - - Organizations - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying the user to get organization details for. + in: path + name: user_pk + required: true + schema: + type: integer responses: '200': content: @@ -5504,61 +5169,27 @@ paths: schema: $ref: '#/components/schemas/OrganizationMember' description: '' - x-fern-sdk-group-name: - - organizations - - members - x-fern-sdk-method-name: get - x-fern-audiences: - - public - delete: - operationId: api_organizations_memberships_destroy - description: Soft delete a member from the organization. - summary: Soft delete an organization member - parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - description: A unique integer value identifying the user to be deleted from - the organization. - required: true - tags: - - Organizations security: - - Token: [] - responses: - '204': - description: Member deleted successfully. - '405': - description: User cannot soft delete self. - '404': - description: Member not found - '403': - description: You can delete members only for your current active organization - x-fern-sdk-group-name: - - organizations - - members - x-fern-sdk-method-name: delete + - Token: [] + summary: Get organization member details + tags: + - Organizations x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - organizations + - members + x-fern-sdk-method-name: get /api/organizations/{id}/set-default-role: patch: - operationId: api_organizations_set_default_role_partial_update description: Update the default role for members of a specific organization. - summary: Update default role + operationId: api_organizations_set_default_role_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Organizations + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -5570,8 +5201,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedDefaultRoleRequest' - security: - - Token: [] responses: '200': content: @@ -5579,494 +5208,481 @@ paths: schema: $ref: '#/components/schemas/DefaultRole' description: '' + security: + - Token: [] + summary: Update default role + tags: + - Organizations /api/predictions/: get: - operationId: api_predictions_list description: List all predictions and their IDs. - summary: List predictions + operationId: api_predictions_list parameters: - - in: query - name: project - schema: - type: integer - description: Filter predictions by project ID - - in: query - name: task - schema: - type: integer - description: Filter predictions by task ID - tags: - - Predictions - security: - - Token: [] + - description: Filter predictions by project ID + in: query + name: project + schema: + type: integer + - description: Filter predictions by task ID + in: query + name: task + schema: + type: integer responses: '200': content: application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Prediction' examples: Response: - value: - - - id: 1 - task: 1 - result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person - score: 0.95 - model_version: yolo-v8 summary: response + value: + - - id: 1 + model_version: yolo-v8 + result: + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 + score: 0.95 + task: 1 + schema: + items: + $ref: '#/components/schemas/Prediction' + type: array description: Predictions list + security: + - Token: [] + summary: List predictions + tags: + - Predictions + x-fern-audiences: + - public x-fern-sdk-group-name: predictions x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_predictions_create description: Create a prediction for a specific task. - summary: Create prediction - tags: - - Predictions + operationId: api_predictions_create requestBody: content: application/json: schema: - type: object - properties: - task: - type: integer - description: Task ID for which the prediction is created + example: + model_version: yolo-v8 result: - type: array - items: - type: object - description: Prediction result in JSON format. Read more about the - format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) - example: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - y: 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - - Person - score: - type: number - description: Prediction score. Can be used in Data Manager to sort - task by model confidence. Task with the lowest score will be shown - first. - example: 0.95 + - Person + width: 50 + x: 20 + y: 30 + score: 0.95 + properties: model_version: - type: string - description: Model version - tag for predictions that can be used - to filter tasks in Data Manager, as well as select specific model - version for showing preannotations in the labeling interface + description: Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface example: yolo-v8 - example: + type: string result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person - score: 0.95 - model_version: yolo-v8 - security: - - Token: [] + description: Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) + example: + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 + items: + type: object + type: array + score: + description: Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. + example: 0.95 + type: number + task: + description: Task ID for which the prediction is created + type: integer + type: object responses: '201': content: application/json: - schema: - $ref: '#/components/schemas/Prediction' examples: Response: + summary: response value: id: 1 - task: 1 + model_version: yolo-v8 result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 score: 0.95 - model_version: yolo-v8 - summary: response + task: 1 + schema: + $ref: '#/components/schemas/Prediction' description: Created prediction + security: + - Token: [] + summary: Create prediction + tags: + - Predictions + x-fern-audiences: + - public x-fern-sdk-group-name: predictions x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/predictions/{id}/: + delete: + description: Delete a prediction by prediction ID. + operationId: api_predictions_destroy + parameters: + - description: Prediction ID + in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete prediction + tags: + - Predictions + x-fern-audiences: + - public + x-fern-sdk-group-name: predictions + x-fern-sdk-method-name: delete get: - operationId: api_predictions_retrieve description: Get details about a specific prediction by its ID. - summary: Get prediction details + operationId: api_predictions_retrieve parameters: - - in: path - name: id - schema: - type: integer - description: Prediction ID - required: true - tags: - - Predictions - security: - - Token: [] + - description: Prediction ID + in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: - schema: - $ref: '#/components/schemas/Prediction' examples: Response: + summary: response value: id: 1 - task: 1 + model_version: yolo-v8 result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 score: 0.95 - model_version: yolo-v8 - summary: response + task: 1 + schema: + $ref: '#/components/schemas/Prediction' description: Prediction details + security: + - Token: [] + summary: Get prediction details + tags: + - Predictions + x-fern-audiences: + - public x-fern-sdk-group-name: predictions x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_predictions_update - description: Overwrite prediction data by prediction ID. - summary: Put prediction + patch: + description: Update prediction data by prediction ID. + operationId: api_predictions_partial_update parameters: - - in: path - name: id - schema: - type: integer - description: Prediction ID - required: true - tags: - - Predictions + - description: Prediction ID + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object - properties: - task: - type: integer - description: Task ID for which the prediction is created - result: - type: array - items: - type: object - description: Prediction result in JSON format. Read more about the - format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) - example: - - original_width: 1920 - original_height: 1080 + example: + model_version: yolo-v8 + result: + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - y: 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - - Person - score: - type: number - description: Prediction score. Can be used in Data Manager to sort - task by model confidence. Task with the lowest score will be shown - first. - example: 0.95 + - Person + width: 50 + x: 20 + y: 30 + score: 0.95 + properties: model_version: - type: string - description: Model version - tag for predictions that can be used - to filter tasks in Data Manager, as well as select specific model - version for showing preannotations in the labeling interface + description: Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface example: yolo-v8 - example: + type: string result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person - score: 0.95 - model_version: yolo-v8 - security: - - Token: [] + description: Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) + example: + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 + items: + type: object + type: array + score: + description: Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. + example: 0.95 + type: number + task: + description: Task ID for which the prediction is created + type: integer + type: object responses: '200': content: application/json: - schema: - $ref: '#/components/schemas/Prediction' examples: Response: + summary: response value: id: 1 - task: 1 + model_version: yolo-v8 result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 score: 0.95 - model_version: yolo-v8 - summary: response + task: 1 + schema: + $ref: '#/components/schemas/Prediction' description: Updated prediction - x-fern-audiences: - - internal - patch: - operationId: api_predictions_partial_update - description: Update prediction data by prediction ID. + security: + - Token: [] summary: Update prediction - parameters: - - in: path - name: id - schema: - type: integer - description: Prediction ID - required: true tags: - - Predictions + - Predictions + x-fern-audiences: + - public + x-fern-sdk-group-name: predictions + x-fern-sdk-method-name: update + put: + description: Overwrite prediction data by prediction ID. + operationId: api_predictions_update + parameters: + - description: Prediction ID + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object - properties: - task: - type: integer - description: Task ID for which the prediction is created + example: + model_version: yolo-v8 result: - type: array - items: - type: object - description: Prediction result in JSON format. Read more about the - format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) - example: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - y: 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - - Person - score: - type: number - description: Prediction score. Can be used in Data Manager to sort - task by model confidence. Task with the lowest score will be shown - first. - example: 0.95 + - Person + width: 50 + x: 20 + y: 30 + score: 0.95 + properties: model_version: - type: string - description: Model version - tag for predictions that can be used - to filter tasks in Data Manager, as well as select specific model - version for showing preannotations in the labeling interface + description: Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface example: yolo-v8 - example: + type: string result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person - score: 0.95 - model_version: yolo-v8 - security: - - Token: [] + description: Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) + example: + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 + items: + type: object + type: array + score: + description: Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. + example: 0.95 + type: number + task: + description: Task ID for which the prediction is created + type: integer + type: object responses: '200': content: application/json: - schema: - $ref: '#/components/schemas/Prediction' examples: Response: + summary: response value: id: 1 - task: 1 + model_version: yolo-v8 result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 score: 0.95 - model_version: yolo-v8 - summary: response + task: 1 + schema: + $ref: '#/components/schemas/Prediction' description: Updated prediction - x-fern-sdk-group-name: predictions - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_predictions_destroy - description: Delete a prediction by prediction ID. - summary: Delete prediction - parameters: - - in: path - name: id - schema: - type: integer - description: Prediction ID - required: true - tags: - - Predictions security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: predictions - x-fern-sdk-method-name: delete + - Token: [] + summary: Put prediction + tags: + - Predictions x-fern-audiences: - - public + - internal /api/project-templates/: get: - operationId: api_project_templates_list description: Get a list of all project templates for an organization. - summary: Get project templates + operationId: api_project_templates_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Project Templates - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/ProjectTemplate' + type: array description: '' + security: + - Token: [] + summary: Get project templates + tags: + - Project Templates post: - operationId: api_project_templates_create description: Create a project template for an organization. - summary: Create project template - tags: - - Project Templates + operationId: api_project_templates_create requestBody: content: application/json: @@ -6079,8 +5695,6 @@ paths: schema: $ref: '#/components/schemas/ProjectTemplateRequest' required: true - security: - - Token: [] responses: '201': content: @@ -6088,21 +5702,38 @@ paths: schema: $ref: '#/components/schemas/ProjectTemplate' description: '' + security: + - Token: [] + summary: Create project template + tags: + - Project Templates /api/project-templates/{id}: + delete: + description: Delete a specific project template by ID for an organization. + operationId: api_project_templates_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete a project template + tags: + - Project Templates get: - operationId: api_project_templates_retrieve description: Get a specific project template by ID for an organization. - summary: Get a project template + operationId: api_project_templates_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Project Templates - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -6110,32 +5741,31 @@ paths: schema: $ref: '#/components/schemas/ProjectTemplate' description: '' - put: - operationId: api_project_templates_update - description: Overwrite a specific project template by ID for an organization. - summary: Overwrite a project template - parameters: - - in: path - name: id - schema: - type: integer - required: true + security: + - Token: [] + summary: Get a project template tags: - - Project Templates + - Project Templates + patch: + description: Update the details of a specific project template by ID for an organization. + operationId: api_project_templates_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/ProjectTemplateRequest' + $ref: '#/components/schemas/PatchedProjectTemplateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ProjectTemplateRequest' + $ref: '#/components/schemas/PatchedProjectTemplateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/ProjectTemplateRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedProjectTemplateRequest' responses: '200': content: @@ -6143,32 +5773,32 @@ paths: schema: $ref: '#/components/schemas/ProjectTemplate' description: '' - patch: - operationId: api_project_templates_partial_update - description: Update the details of a specific project template by ID for an - organization. + security: + - Token: [] summary: Update a project template - parameters: - - in: path - name: id - schema: - type: integer - required: true tags: - - Project Templates + - Project Templates + put: + description: Overwrite a specific project template by ID for an organization. + operationId: api_project_templates_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedProjectTemplateRequest' + $ref: '#/components/schemas/ProjectTemplateRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedProjectTemplateRequest' + $ref: '#/components/schemas/ProjectTemplateRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedProjectTemplateRequest' - security: - - Token: [] + $ref: '#/components/schemas/ProjectTemplateRequest' + required: true responses: '200': content: @@ -6176,58 +5806,39 @@ paths: schema: $ref: '#/components/schemas/ProjectTemplate' description: '' - delete: - operationId: api_project_templates_destroy - description: Delete a specific project template by ID for an organization. - summary: Delete a project template - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Project Templates security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Overwrite a project template + tags: + - Project Templates /api/project-templates/{id}/create-project: post: + description: Create a project from a specific project template by ID for an organization. operationId: api_project_templates_create_project_create - description: Create a project from a specific project template by ID for an - organization. - summary: Create project from template parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Project Templates + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - title: + description: + description: A description for the project. type: string + title: description: The title of the project to be created from the template. - description: type: string - description: A description for the project. workspace_id: + description: A unique integer value identifying the workspace in which to create the project. type: integer - description: A unique integer value identifying the workspace in - which to create the project. required: - - title - - workspace_id - security: - - Token: [] + - title + - workspace_id + type: object responses: '201': content: @@ -6235,74 +5846,68 @@ paths: schema: $ref: '#/components/schemas/LseProject' description: Project created successfully + security: + - Token: [] + summary: Create project from template + tags: + - Project Templates /api/projects/: get: - operationId: api_projects_list description: Retrieve a list of projects. - summary: List projects + operationId: api_projects_list parameters: - - in: query - name: filter - schema: - type: string - enum: - - all - - exclude_pinned - - pinned_only - description: Filter projects by pinned status. Use 'pinned_only' to return - only pinned projects, 'exclude_pinned' to return only non-pinned projects, - or 'all' to return all projects. - - in: query - name: ids - schema: - type: string - description: ids - - in: query - name: include - schema: - type: string - description: 'Comma-separated list of count fields to include in the response - to optimize performance. Available fields: task_number, finished_task_number, - total_predictions_number, total_annotations_number, num_tasks_with_annotations, - useful_annotation_number, ground_truth_number, skipped_annotations_number. - If not specified, all count fields are included.' - - in: query - name: members_limit - schema: - type: integer - default: 10 - description: Maximum number of members to return. - - in: query - name: ordering - schema: - type: string - description: Which field to use when ordering the results. - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: title - schema: - type: string - description: title - - in: query - name: workspaces - schema: - type: integer - description: workspaces - tags: - - Projects - security: - - Token: [] + - description: Filter projects by pinned status. Use 'pinned_only' to return only pinned projects, 'exclude_pinned' to return only non-pinned projects, or 'all' to return all projects. + in: query + name: filter + schema: + enum: + - all + - exclude_pinned + - pinned_only + type: string + - description: ids + in: query + name: ids + schema: + type: string + - description: 'Comma-separated list of count fields to include in the response to optimize performance. Available fields: task_number, finished_task_number, total_predictions_number, total_annotations_number, num_tasks_with_annotations, useful_annotation_number, ground_truth_number, skipped_annotations_number. If not specified, all count fields are included.' + in: query + name: include + schema: + type: string + - description: Maximum number of members to return. + in: query + name: members_limit + schema: + default: 10 + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + schema: + type: string + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer + - description: title + in: query + name: title + schema: + type: string + - description: workspaces + in: query + name: workspaces + schema: + type: integer responses: '200': content: @@ -6310,19 +5915,21 @@ paths: schema: $ref: '#/components/schemas/PaginatedAllRolesProjectListList' description: '' - x-fern-sdk-group-name: projects - x-fern-sdk-method-name: list + security: + - Token: [] + summary: List projects + tags: + - Projects x-fern-audiences: - - public + - public x-fern-pagination: offset: $request.page results: $response.results + x-fern-sdk-group-name: projects + x-fern-sdk-method-name: list post: - operationId: api_projects_create description: Create a project for a specific organization. - summary: Create a project - tags: - - Projects + operationId: api_projects_create requestBody: content: application/json: @@ -6334,8 +5941,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/LseProjectCreateRequest' - security: - - Token: [] responses: '201': content: @@ -6343,406 +5948,534 @@ paths: schema: $ref: '#/components/schemas/LseProjectCreate' description: '' + security: + - Token: [] + summary: Create a project + tags: + - Projects + x-fern-audiences: + - public x-fern-sdk-group-name: projects x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/projects/{id}/: + /api/projects/counts/: get: - operationId: api_projects_retrieve - description: Retrieve information about a project by project ID. - summary: Get project by ID + description: Returns a list of projects with their counts. For example, task_number which is the total task number in project + operationId: api_projects_counts_list parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Projects - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Project' - examples: - Response: - value: - id: 1 - title: My project - description: My first project - label_config: [...] - expert_instruction: Label all cats - show_instruction: true - show_skip_button: true - enable_empty_annotation: true - show_annotation_history: true - organization: 1 - color: '#FF0000' - maximum_annotations: 1 - is_published: true - model_version: 1.0.0 - is_draft: false - created_by: - id: 1 - first_name: Jo - last_name: Doe - email: manager@humansignal.com - created_at: '2023-08-24T14:15:22Z' - min_annotations_to_start_training: 0 - start_training_on_annotation_update: true - show_collab_predictions: true - num_tasks_with_annotations: 10 - task_number: 100 - useful_annotation_number: 10 - ground_truth_number: 5 - skipped_annotations_number: 0 - total_annotations_number: 10 - total_predictions_number: 0 - sampling: Sequential sampling - show_ground_truth_first: true - show_overlap_first: true - overlap_cohort_percentage: 100 - task_data_login: user - task_data_password: secret - control_weights: {} - parsed_label_config: '{"tag": {...}}' - evaluate_predictions_automatically: false - config_has_control_tags: true - skip_queue: REQUEUE_FOR_ME - reveal_preannotations_interactively: true - pinned_at: '2023-08-24T14:15:22Z' - finished_task_number: 10 - queue_total: 10 - queue_done: 100 - summary: response - description: Project information - x-fern-sdk-group-name: projects - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_projects_partial_update - description: Update the details of a specific project. - summary: Update project details + $ref: '#/components/schemas/PaginatedLseProjectCountsList' + description: '' + security: + - Token: [] + summary: List project's counts + tags: + - Projects + /api/projects/roles/: + get: + description: "\n List project roles for requested IDs for the current user\n " + operationId: api_projects_roles_list parameters: - - in: path - name: id - schema: - type: integer - required: true + - in: query + name: ids + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ProjectRole' + type: array + description: '' + security: + - Token: [] + summary: List project roles for current user tags: - - Projects + - Project Roles + post: + description: "\n Create project role for user allowing the user the same access level provided by organization role.\n " + operationId: api_projects_roles_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedLseProjectUpdateRequest' + $ref: '#/components/schemas/ProjectRoleRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedLseProjectUpdateRequest' + $ref: '#/components/schemas/ProjectRoleRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedLseProjectUpdateRequest' - security: - - Token: [] + $ref: '#/components/schemas/ProjectRoleRequest' + required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/LseProjectUpdate' + $ref: '#/components/schemas/ProjectRole' description: '' - x-fern-sdk-group-name: projects - x-fern-sdk-method-name: update - x-fern-audiences: - - public + security: + - Token: [] + summary: Create project role for user + tags: + - Project Roles + /api/projects/roles/{id}/: delete: - operationId: api_projects_destroy - description: Delete a project by specified project ID. - summary: Delete project + description: "\n Remove project role for user allowing the user the same access level provided by organization role.\n " + operationId: api_projects_roles_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Projects - security: - - Token: [] + - description: A unique integer value identifying this project role. + in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body - x-fern-sdk-group-name: projects - x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/projects/{id}/annotation-history/: - get: - operationId: api_projects_annotation_history_list - description: List all annotation history items for the project with pagination. - summary: List annotation history items for project - parameters: - - in: path - name: id - schema: - type: integer - required: true - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - Annotation History security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAnnotationHistoryList' - description: '' - /api/projects/{id}/aws-custom-function-logs: - get: - operationId: api_projects_aws_custom_function_logs_retrieve - description: Get AWS lambda logs for project, including filtering by start and - end dates - summary: Get AWS lambda logs for project - parameters: - - in: query - name: end_date - schema: - type: string - description: End date for AWS logs filtering - - in: path - name: id - schema: - type: integer + - Token: [] + summary: Remove project role for user + tags: + - Project Roles + /api/projects/validate/: + post: + description: Validate an arbitrary labeling configuration. + operationId: api_projects_validate_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLabelConfigRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProjectLabelConfigRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ProjectLabelConfigRequest' required: true - - in: query - name: limit - schema: - type: integer - default: 100 - description: Limit the number of logs to return - - in: query - name: start_date - schema: - type: string - description: Start date for AWS logs filtering + responses: + '204': + description: Validation success + '400': + description: Validation failed + security: + - Token: [] + - {} + summary: Validate label config tags: - - AWS + - Projects + x-fern-audiences: + - internal + /api/projects/{id}/: + delete: + description: Delete a project by specified project ID. + operationId: api_projects_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body security: - - Token: [] + - Token: [] + summary: Delete project + tags: + - Projects + x-fern-audiences: + - public + x-fern-sdk-group-name: projects + x-fern-sdk-method-name: delete + get: + description: Retrieve information about a project by project ID. + operationId: api_projects_retrieve + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + examples: + Response: + summary: response + value: + color: '#FF0000' + config_has_control_tags: true + control_weights: {} + created_at: '2023-08-24T14:15:22Z' + created_by: + email: manager@humansignal.com + first_name: Jo + id: 1 + last_name: Doe + description: My first project + enable_empty_annotation: true + evaluate_predictions_automatically: false + expert_instruction: Label all cats + finished_task_number: 10 + ground_truth_number: 5 + id: 1 + is_draft: false + is_published: true + label_config: [...] + maximum_annotations: 1 + min_annotations_to_start_training: 0 + model_version: 1.0.0 + num_tasks_with_annotations: 10 + organization: 1 + overlap_cohort_percentage: 100 + parsed_label_config: '{"tag": {...}}' + pinned_at: '2023-08-24T14:15:22Z' + queue_done: 100 + queue_total: 10 + reveal_preannotations_interactively: true + sampling: Sequential sampling + show_annotation_history: true + show_collab_predictions: true + show_ground_truth_first: true + show_instruction: true + show_overlap_first: true + show_skip_button: true + skip_queue: REQUEUE_FOR_ME + skipped_annotations_number: 0 + start_training_on_annotation_update: true + task_data_login: user + task_data_password: secret + task_number: 100 + title: My project + total_annotations_number: 10 + total_predictions_number: 0 + useful_annotation_number: 10 + schema: + $ref: '#/components/schemas/Project' + description: Project information + security: + - Token: [] + summary: Get project by ID + tags: + - Projects + x-fern-audiences: + - public + x-fern-sdk-group-name: projects + x-fern-sdk-method-name: get + patch: + description: Update the details of a specific project. + operationId: api_projects_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedLseProjectUpdateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedLseProjectUpdateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedLseProjectUpdateRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LseProjectUpdate' + description: '' + security: + - Token: [] + summary: Update project details + tags: + - Projects + x-fern-audiences: + - public + x-fern-sdk-group-name: projects + x-fern-sdk-method-name: update + /api/projects/{id}/annotation-history/: + get: + description: List all annotation history items for the project with pagination. + operationId: api_projects_annotation_history_list + parameters: + - in: path + name: id + required: true + schema: + type: integer + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAnnotationHistoryList' + description: '' + security: + - Token: [] + summary: List annotation history items for project + tags: + - Annotation History + /api/projects/{id}/aws-custom-function-logs: + get: + description: Get AWS lambda logs for project, including filtering by start and end dates + operationId: api_projects_aws_custom_function_logs_retrieve + parameters: + - description: End date for AWS logs filtering + in: query + name: end_date + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - description: Limit the number of logs to return + in: query + name: limit + schema: + default: 100 + type: integer + - description: Start date for AWS logs filtering + in: query + name: start_date + schema: + type: string responses: '200': content: application/json: schema: - title: List of AWS lambda logs description: List of AWS lambda logs + title: List of AWS lambda logs type: object description: Successful response returns list of AWS lambda logs + security: + - Token: [] + summary: Get AWS lambda logs for project + tags: + - AWS /api/projects/{id}/dashboard: get: + deprecated: true + description: Get dashboard data for project, including annotations and tasks stats. operationId: api_projects_dashboard_retrieve - description: Get dashboard data for project, including annotations and tasks - stats. - summary: Get dashboard data for project parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Dashboard - security: - - Token: [] - deprecated: true + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: - tasks: - title: tasks + annotated_tasks: + description: Number of annotated (completed) tasks + title: annotated_tasks type: integer - description: Total number of tasks annotations: - title: annotations - type: integer description: Total number of annotations - annotated_tasks: - title: annotated_tasks + title: annotations type: integer - description: Number of annotated (completed) tasks - skipped_tasks: - title: skipped_tasks + remaining_tasks: + description: Total number of uncompleted tasks + title: remaining_tasks type: integer - description: Number of tasks that have been skipped by at least - one annotator reviewed_tasks: + description: Number of tasks that have been reviewed by at least one reviewer title: reviewed_tasks type: integer - description: Number of tasks that have been reviewed by at least - one reviewer - remaining_tasks: - title: remaining_tasks + skipped_tasks: + description: Number of tasks that have been skipped by at least one annotator + title: skipped_tasks type: integer - description: Total number of uncompleted tasks + tasks: + description: Total number of tasks + title: tasks + type: integer + type: object description: Successful response returns project-related annotation statistics + security: + - Token: [] + summary: Get dashboard data for project + tags: + - Dashboard /api/projects/{id}/dashboard-members: get: + deprecated: true + description: Get dashboard for members, including similarity matrix, user statistics and users list. operationId: api_projects_dashboard_members_retrieve - description: Get dashboard for members, including similarity matrix, user statistics - and users list. - summary: Get dashboard data for members parameters: - - in: query - name: action - schema: - type: string - description: All data objects will be filtered by updated_at or created_at - field - - in: query - name: end_date - schema: - type: string - description: End date for dashboard stats calculation. UTC timezone by default. - Use iso format (yyyy-mm-dd-hh-mm) to specify timezone. - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: per_label - schema: - type: boolean - description: Per label calculation - - in: query - name: start_date - schema: - type: string - description: Start date for dashboard stats calculation. UTC timezone by default. - Use iso format (yyyy-mm-dd-hh-mm) to specify timezone. - - in: query - name: updated_by - schema: - type: string - description: All task objects will be filtered by updated_by field. Only tasks - that were updated by concrete user will be taken in account. - - in: query - name: use_kappa - schema: - type: boolean - description: Use kappa statistics for calculation - tags: - - Dashboard - security: - - Token: [] - deprecated: true + - description: All data objects will be filtered by updated_at or created_at field + in: query + name: action + schema: + type: string + - description: End date for dashboard stats calculation. UTC timezone by default. Use iso format (yyyy-mm-dd-hh-mm) to specify timezone. + in: query + name: end_date + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - description: Per label calculation + in: query + name: per_label + schema: + type: boolean + - description: Start date for dashboard stats calculation. UTC timezone by default. Use iso format (yyyy-mm-dd-hh-mm) to specify timezone. + in: query + name: start_date + schema: + type: string + - description: All task objects will be filtered by updated_by field. Only tasks that were updated by concrete user will be taken in account. + in: query + name: updated_by + schema: + type: string + - description: Use kappa statistics for calculation + in: query + name: use_kappa + schema: + type: boolean responses: '200': content: application/json: schema: - title: Task creation response description: Task creation response - type: object properties: - users: - type: array - description: List of users - items: - title: User data - type: object similarity: - type: array description: Consensus statistics between different users items: title: Similarities, common tasks type: object - stats: type: array + stats: description: Number of annotated (completed) tasks items: - title: User statistics description: User statistics - type: object properties: - finished: - title: Finished tasks - type: integer - skipped: - title: Skipped tasks - type: integer accepted: + description: Number of annotations marked as "Accepted" by reviewer title: Accepted tasks type: integer - description: Number of annotations marked as "Accepted" - by reviewer - rejected: - title: Rejected tasks - type: integer - description: Number of annotations marked as "Rejected" - by reviewer - progress: - title: Annotation progress + finished: + title: Finished tasks type: integer - description: Fraction of annotation work done so far + gt: + description: Average agreement with Ground Truth annotations + title: Ground Truth score + type: number mean_time: + description: Average mean time spent on annotation title: Mean time type: number - description: Average mean time spent on annotation median_time: - title: Median time - type: number description: Average median time spent on annotation - gt: - title: Ground Truth score + title: Median time type: number - description: Average agreement with Ground Truth annotations predictions: + description: Average agreement with predictions title: Predictions score type: number - description: Average agreement with predictions + progress: + description: Fraction of annotation work done so far + title: Annotation progress + type: integer + rejected: + description: Number of annotations marked as "Rejected" by reviewer + title: Rejected tasks + type: integer review_score: + description: Average reviewing score, when calling with "per_label=true", returns dictionary with labels to score breakdown title: Review score type: number - description: Average reviewing score, when calling with - "per_label=true", returns dictionary with labels to score - breakdown + skipped: + title: Skipped tasks + type: integer + title: User statistics + type: object + type: array + users: + description: List of users + items: + title: User data + type: object + type: array + title: Task creation response + type: object description: Successful response returns project-related annotation statistics + security: + - Token: [] + summary: Get dashboard data for members + tags: + - Dashboard /api/projects/{id}/duplicate/: post: - operationId: api_projects_duplicate_create description: Make a copy of project. - summary: Duplicate project + operationId: api_projects_duplicate_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Projects + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -6755,182 +6488,163 @@ paths: schema: $ref: '#/components/schemas/ProjectDuplicateRequest' required: true - security: - - Token: [] responses: '201': content: application/json: schema: - type: object properties: id: - type: integer description: The ID of the duplicated project. + type: integer required: - - id + - id + type: object description: Project duplicated + security: + - Token: [] + summary: Duplicate project + tags: + - Projects + x-fern-audiences: + - public x-fern-sdk-group-name: projects x-fern-sdk-method-name: duplicate - x-fern-audiences: - - public /api/projects/{id}/export: get: + description: "\n Note: if you have a large project it's recommended to use\n export snapshots, this easy export endpoint might have timeouts.

    \n Export annotated tasks as a file in a specific format.\n For example, to export JSON annotations for a project to a file called `annotations.json`,\n run the following from the command line:\n ```bash\n curl -X GET http://localhost:8000/api/projects/{id}/export?exportType=JSON -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n To export all tasks, including skipped tasks and others without annotations, run the following from the command line:\n ```bash\n curl -X GET http://localhost:8000/api/projects/{id}/export?exportType=JSON&download_all_tasks=true -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n To export specific tasks with IDs of 123 and 345, run the following from the command line:\n ```bash\n curl -X GET 'http://localhost:8000/api/projects/{id}/export?ids[]=123&ids[]=345' -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n " operationId: api_projects_export_retrieve - description: "\n Note: if you have a large project it's recommended\ - \ to use\n export snapshots, this easy export endpoint might have timeouts.

    \n\ - \ Export annotated tasks as a file in a specific format.\n For\ - \ example, to export JSON annotations for a project to a file called `annotations.json`,\n\ - \ run the following from the command line:\n ```bash\n \ - \ curl -X GET http://localhost:8000/api/projects/{id}/export?exportType=JSON\ - \ -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n\ - \ To export all tasks, including skipped tasks and others without annotations,\ - \ run the following from the command line:\n ```bash\n curl\ - \ -X GET http://localhost:8000/api/projects/{id}/export?exportType=JSON&download_all_tasks=true\ - \ -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n\ - \ To export specific tasks with IDs of 123 and 345, run the following\ - \ from the command line:\n ```bash\n curl -X GET 'http://localhost:8000/api/projects/{id}/export?ids[]=123&ids[]=345'\ - \ -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n\ - \ " - summary: Easy export of tasks and annotations parameters: - - in: query - name: download_all_tasks - schema: - type: boolean - description: If true, download all tasks regardless of status. If false, download - only annotated tasks. - - in: query - name: download_resources - schema: - type: boolean - description: If true, download all resource files such as images, audio, and - others relevant to the tasks. - - in: query - name: export_type - schema: - type: string - description: Selected export format (JSON by default) - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - in: query - name: ids - schema: - type: array - items: + - description: If true, download all tasks regardless of status. If false, download only annotated tasks. + in: query + name: download_all_tasks + schema: + type: boolean + - description: If true, download all resource files such as images, audio, and others relevant to the tasks. + in: query + name: download_resources + schema: + type: boolean + - description: Selected export format (JSON by default) + in: query + name: export_type + schema: type: string - description: Specify a list of task IDs to retrieve only the details for those - tasks. - tags: - - Export - security: - - Token: [] + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: Specify a list of task IDs to retrieve only the details for those tasks. + in: query + name: ids + schema: + items: + type: string + type: array responses: '200': content: application/json: schema: - title: Export file description: Export file with results - type: string format: binary + title: Export file + type: string description: Exported data + security: + - Token: [] + summary: Easy export of tasks and annotations + tags: + - Export + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - exports + - projects + - exports x-fern-sdk-method-name: download_sync - x-fern-audiences: - - public /api/projects/{id}/export/formats: get: + description: Retrieve the available export formats for the current project by ID. operationId: api_projects_export_formats_retrieve - description: Retrieve the available export formats for the current project by - ID. - summary: Get export formats parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Export - security: - - Token: [] + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: array + description: List of available formats items: - type: string title: Export format - description: List of available formats + type: string title: Format list + type: array description: Export formats + security: + - Token: [] + summary: Get export formats + tags: + - Export + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - exports + - projects + - exports x-fern-sdk-method-name: list_formats - x-fern-audiences: - - public /api/projects/{id}/exports/: get: - operationId: api_projects_exports_list description: Returns a list of exported files for a specific project by ID. - summary: List all export snapshots + operationId: api_projects_exports_list parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Export - security: - - Token: [] + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/Export' + type: array description: '' + security: + - Token: [] + summary: List all export snapshots + tags: + - Export + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - exports + - projects + - exports x-fern-sdk-method-name: list - x-fern-audiences: - - public post: + description: Create a new export request to start a background task and generate an export file for a specific project by ID. operationId: api_projects_exports_create - description: Create a new export request to start a background task and generate - an export file for a specific project by ID. - summary: Create new export snapshot parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Export + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -6942,8 +6656,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/LseExportCreateRequest' - security: - - Token: [] responses: '201': content: @@ -6951,35 +6663,64 @@ paths: schema: $ref: '#/components/schemas/LseExportCreate' description: '' + security: + - Token: [] + summary: Create new export snapshot + tags: + - Export + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - exports + - projects + - exports x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/projects/{id}/exports/{export_pk}: + delete: + description: Delete an export file by specified export ID. + operationId: api_projects_exports_destroy + parameters: + - description: Primary key identifying the export file. + in: path + name: export_pk + required: true + schema: + type: integer + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete export snapshot + tags: + - Export + x-fern-audiences: + - public + x-fern-sdk-group-name: + - projects + - exports + x-fern-sdk-method-name: delete get: + description: Retrieve information about an export file by export ID for a specific project. operationId: api_projects_exports_retrieve - description: Retrieve information about an export file by export ID for a specific - project. - summary: Get export snapshot by ID parameters: - - in: path - name: export_pk - schema: - type: integer - description: Primary key identifying the export file. - required: true - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Export - security: - - Token: [] + - description: Primary key identifying the export file. + in: path + name: export_pk + required: true + schema: + type: integer + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -6987,62 +6728,34 @@ paths: schema: $ref: '#/components/schemas/Export' description: '' - x-fern-sdk-group-name: - - projects - - exports - x-fern-sdk-method-name: get - x-fern-audiences: - - public - delete: - operationId: api_projects_exports_destroy - description: Delete an export file by specified export ID. - summary: Delete export snapshot - parameters: - - in: path - name: export_pk - schema: - type: integer - description: Primary key identifying the export file. - required: true - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Export security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - projects - - exports - x-fern-sdk-method-name: delete + - Token: [] + summary: Get export snapshot by ID + tags: + - Export x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - projects + - exports + x-fern-sdk-method-name: get /api/projects/{id}/exports/{export_pk}/convert: post: - operationId: api_projects_exports_convert_create description: Convert export snapshot to selected format - summary: Export conversion + operationId: api_projects_exports_convert_create parameters: - - in: path - name: export_pk - schema: - type: integer - description: Primary key identifying the export file. - required: true - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Export + - description: Primary key identifying the export file. + in: path + name: export_pk + required: true + schema: + type: integer + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -7055,320 +6768,271 @@ paths: schema: $ref: '#/components/schemas/ExportConvertRequest' required: true - security: - - Token: [] responses: '200': content: application/json: schema: - type: object properties: - export_type: - type: string converted_format: type: integer + export_type: + type: string + type: object description: '' + security: + - Token: [] + summary: Export conversion + tags: + - Export + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - exports + - projects + - exports x-fern-sdk-method-name: convert - x-fern-audiences: - - public /api/projects/{id}/exports/{export_pk}/download: get: + description: "\n Download an export file in the specified format for a specific project. Specify the project ID with the `id`\n parameter in the path and the ID of the export file you want to download using the `export_pk` parameter\n in the path.\n\n Get the `export_pk` from the response of the request to [Create new export](/api#operation/api_projects_exports_create)\n or after [listing export files](/api#operation/api_projects_exports_list).\n " operationId: api_projects_exports_download_retrieve - description: "\n Download an export file in the specified format for\ - \ a specific project. Specify the project ID with the `id`\n parameter\ - \ in the path and the ID of the export file you want to download using the\ - \ `export_pk` parameter\n in the path.\n\n Get the `export_pk`\ - \ from the response of the request to [Create new export](/api#operation/api_projects_exports_create)\n\ - \ or after [listing export files](/api#operation/api_projects_exports_list).\n\ - \ " - summary: Download export snapshot as file in specified format parameters: - - in: query - name: exportType - schema: - type: string - description: Selected export format - - in: path - name: export_pk - schema: - type: integer - description: Primary key identifying the export file. - required: true - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Export - security: - - Token: [] + - description: Selected export format + in: query + name: exportType + schema: + type: string + - description: Primary key identifying the export file. + in: path + name: export_pk + required: true + schema: + type: integer + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/*: schema: - type: string format: binary + type: string description: Export file + security: + - Token: [] + summary: Download export snapshot as file in specified format + tags: + - Export + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - exports + - projects + - exports x-fern-sdk-method-name: download - x-fern-audiences: - - public /api/projects/{id}/file-uploads: + delete: + description: "\n Delete uploaded files for a specific project.\n " + operationId: api_projects_file_uploads_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete files + tags: + - Import + x-fern-audiences: + - public + x-fern-sdk-group-name: + - files + x-fern-sdk-method-name: delete_many get: + description: "\n Retrieve the list of uploaded files used to create labeling tasks for a specific project.\n " operationId: api_projects_file_uploads_list - description: "\n Retrieve the list of uploaded files used to create labeling\ - \ tasks for a specific project.\n " - summary: Get files list parameters: - - in: query - name: all - schema: - type: boolean - description: Set to "true" if you want to retrieve all file uploads - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: ids - schema: - type: array - items: + - description: Set to "true" if you want to retrieve all file uploads + in: query + name: all + schema: + type: boolean + - in: path + name: id + required: true + schema: + type: integer + - description: Specify the list of file upload IDs to retrieve, e.g. ids=[1,2,3] + in: query + name: ids + schema: + items: + type: string + type: array + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: type: string - description: Specify the list of file upload IDs to retrieve, e.g. ids=[1,2,3] - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Import - security: - - Token: [] responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/FileUpload' + type: array description: '' + security: + - Token: [] + summary: Get files list + tags: + - Import + x-fern-audiences: + - public x-fern-sdk-group-name: - - files + - files x-fern-sdk-method-name: list - x-fern-audiences: - - public - delete: - operationId: api_projects_file_uploads_destroy - description: "\n Delete uploaded files for a specific project.\n \ - \ " - summary: Delete files + /api/projects/{id}/import: + post: + description: "\n Import data as labeling tasks in bulk using this API endpoint. You can use this API endpoint to import multiple tasks.\n One POST request is limited at 250K tasks and 200 MB.\n\n **Note:** Imported data is verified against a project *label_config* and must\n include all variables that were used in the *label_config*. For example,\n if the label configuration has a *$text* variable, then each item in a data object\n must include a \"text\" field.\n
    \n\n ## POST requests\n
    \n\n There are three possible ways to import tasks with this endpoint:\n\n ### 1. **POST with data**\n Send JSON tasks as POST data. Only JSON is supported for POSTing files directly.\n Update this example to specify your authorization token and Label Studio instance host, then run the following from\n the command line.\n\n ```bash\n curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' \\\n -X POST 'http://localhost:8000/api/projects/1/import' --data '[{\"text\": \"Some text 1\"}, {\"text\": \"Some text 2\"}]'\n ```\n\n ### 2. **POST with files**\n Send tasks as files. You can attach multiple files with different names.\n\n - **JSON**: text files in JavaScript object notation format\n - **CSV**: text files with tables in Comma Separated Values format\n - **TSV**: text files with tables in Tab Separated Value format\n - **TXT**: simple text files are similar to CSV with one column and no header, supported for projects with one source only\n\n Update this example to specify your authorization token, Label Studio instance host, and file name and path,\n then run the following from the command line:\n\n ```bash\n curl -H 'Authorization: Token abc123' \\\n -X POST 'http://localhost:8000/api/projects/1/import' -F 'file=@path/to/my_file.csv'\n ```\n\n ### 3. **POST with URL**\n You can also provide a URL to a file with labeling tasks. Supported file formats are the same as in option 2.\n\n ```bash\n curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' \\\n -X POST 'http://localhost:8000/api/projects/1/import' \\\n --data '[{\"url\": \"http://example.com/test1.csv\"}, {\"url\": \"http://example.com/test2.csv\"}]'\n ```\n\n
    \n " + operationId: api_projects_import_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Import - security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - files - x-fern-sdk-method-name: delete_many - x-fern-audiences: - - public - /api/projects/{id}/import: - post: - operationId: api_projects_import_create - description: "\n Import data as labeling tasks in bulk using this\ - \ API endpoint. You can use this API endpoint to import multiple tasks.\n\ - \ One POST request is limited at 250K tasks and 200 MB.\n\n \ - \ **Note:** Imported data is verified against a project *label_config*\ - \ and must\n include all variables that were used in the *label_config*.\ - \ For example,\n if the label configuration has a *$text* variable,\ - \ then each item in a data object\n must include a \"text\" field.\n\ - \
    \n\n ## POST requests\n
    \n\n There are three possible ways to import tasks\ - \ with this endpoint:\n\n ### 1. **POST with data**\n \ - \ Send JSON tasks as POST data. Only JSON is supported for POSTing files\ - \ directly.\n Update this example to specify your authorization\ - \ token and Label Studio instance host, then run the following from\n \ - \ the command line.\n\n ```bash\n curl -H 'Content-Type:\ - \ application/json' -H 'Authorization: Token abc123' \\\n -X POST\ - \ 'http://localhost:8000/api/projects/1/import' --data '[{\"text\": \"Some\ - \ text 1\"}, {\"text\": \"Some text 2\"}]'\n ```\n\n \ - \ ### 2. **POST with files**\n Send tasks as files. You can attach\ - \ multiple files with different names.\n\n - **JSON**: text files\ - \ in JavaScript object notation format\n - **CSV**: text files\ - \ with tables in Comma Separated Values format\n - **TSV**: text\ - \ files with tables in Tab Separated Value format\n - **TXT**:\ - \ simple text files are similar to CSV with one column and no header, supported\ - \ for projects with one source only\n\n Update this example to\ - \ specify your authorization token, Label Studio instance host, and file name\ - \ and path,\n then run the following from the command line:\n\n\ - \ ```bash\n curl -H 'Authorization: Token abc123' \\\ - \n -X POST 'http://localhost:8000/api/projects/1/import' -F 'file=@path/to/my_file.csv'\n\ - \ ```\n\n ### 3. **POST with URL**\n You\ - \ can also provide a URL to a file with labeling tasks. Supported file formats\ - \ are the same as in option 2.\n\n ```bash\n curl -H\ - \ 'Content-Type: application/json' -H 'Authorization: Token abc123' \\\n \ - \ -X POST 'http://localhost:8000/api/projects/1/import' \\\n \ - \ --data '[{\"url\": \"http://example.com/test1.csv\"}, {\"url\":\ - \ \"http://example.com/test2.csv\"}]'\n ```\n\n
    \n\ - \ " - summary: Import tasks - parameters: - - in: query - name: commit_to_project - schema: - type: boolean - default: true - description: Set to "true" to immediately commit tasks to the project. - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - in: query - name: preannotated_from_fields - schema: - type: array - items: - type: string - description: 'List of fields to preannotate from the task data. For example, - if you provide a list of `{"text": "text", "prediction": "label"}` items - in the request, the system will create a task with the `text` field and - a prediction with the `label` field when `preannoted_from_fields=["prediction"]`.' - - in: query - name: return_task_ids - schema: - type: boolean - default: false - description: Set to "true" to return task IDs in the response. - tags: - - Import + - description: Set to "true" to immediately commit tasks to the project. + in: query + name: commit_to_project + schema: + default: true + type: boolean + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: 'List of fields to preannotate from the task data. For example, if you provide a list of `{"text": "text", "prediction": "label"}` items in the request, the system will create a task with the `text` field and a prediction with the `label` field when `preannoted_from_fields=["prediction"]`.' + in: query + name: preannotated_from_fields + schema: + items: + type: string + type: array + - description: Set to "true" to return task IDs in the response. + in: query + name: return_task_ids + schema: + default: false + type: boolean requestBody: content: application/json: schema: - type: array items: $ref: '#/components/schemas/ImportApiRequest' - multipart/form-data: - schema: type: array - items: - $ref: '#/components/schemas/ImportApiRequest' application/x-www-form-urlencoded: schema: + items: + $ref: '#/components/schemas/ImportApiRequest' type: array + multipart/form-data: + schema: items: $ref: '#/components/schemas/ImportApiRequest' + type: array required: true - security: - - Token: [] responses: '201': content: application/json: schema: - title: Task creation response description: Task creation response - type: object properties: - task_count: - title: task_count - description: Number of tasks added - type: integer annotation_count: - title: annotation_count description: Number of annotations added + title: annotation_count type: integer - predictions_count: - title: predictions_count - description: Number of predictions added - type: integer + could_be_tasks_list: + description: Whether uploaded files can contain lists of tasks, like CSV/TSV files + title: could_be_tasks_list + type: boolean + data_columns: + description: The list of found data columns + items: + title: Data column name + type: string + title: data_columns + type: array duration: - title: duration description: Time in seconds to create + title: duration type: number file_upload_ids: - title: file_upload_ids description: Database IDs of uploaded files - type: array items: title: File Upload IDs type: integer - could_be_tasks_list: - title: could_be_tasks_list - description: Whether uploaded files can contain lists of tasks, - like CSV/TSV files - type: boolean + title: file_upload_ids + type: array found_formats: - title: found_formats description: The list of found file formats - type: array items: title: File format type: string - data_columns: - title: data_columns - description: The list of found data columns + title: found_formats type: array - items: - title: Data column name - type: string + predictions_count: + description: Number of predictions added + title: predictions_count + type: integer + task_count: + description: Number of tasks added + title: task_count + type: integer + title: Task creation response + type: object description: Tasks successfully imported '400': content: application/json: schema: - title: Incorrect task data description: String with error description + title: Incorrect task data type: string description: Bad Request + security: + - Token: [] + summary: Import tasks + tags: + - Import + x-fern-audiences: + - public x-fern-sdk-group-name: projects x-fern-sdk-method-name: import_tasks - x-fern-audiences: - - public /api/projects/{id}/imports/{import_pk}/: get: - operationId: api_projects_imports_retrieve description: Return data related to async project import operation - summary: Get project import info + operationId: api_projects_imports_retrieve parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project import. - required: true - - in: path - name: import_pk - schema: - type: integer - required: true - tags: - - Projects - security: - - Token: [] + - description: A unique integer value identifying this project import. + in: path + name: id + required: true + schema: + type: integer + - in: path + name: import_pk + required: true + schema: + type: integer responses: '200': content: @@ -7376,25 +7040,47 @@ paths: schema: $ref: '#/components/schemas/ProjectImport' description: '' + security: + - Token: [] + summary: Get project import info + tags: + - Projects + x-fern-audiences: + - public x-fern-sdk-group-name: tasks x-fern-sdk-method-name: create_many_status - x-fern-audiences: - - public /api/projects/{id}/members/: + delete: + description: Remove a member from a specific project. + operationId: api_projects_members_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying this project member. + in: query + name: project_member + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Remove member from project + tags: + - Projects get: - operationId: api_projects_members_retrieve description: Retrieve the members for a specific project. - summary: Get project members + operationId: api_projects_members_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Projects - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -7402,18 +7088,20 @@ paths: schema: $ref: '#/components/schemas/ProjectMember' description: '' + security: + - Token: [] + summary: Get project members + tags: + - Projects post: - operationId: api_projects_members_create description: Add a member to a specific project. - summary: Add project member + operationId: api_projects_members_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Projects + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -7426,8 +7114,6 @@ paths: schema: $ref: '#/components/schemas/ProjectMemberRequest' required: true - security: - - Token: [] responses: '201': content: @@ -7435,82 +7121,59 @@ paths: schema: $ref: '#/components/schemas/ProjectMember' description: '' - delete: - operationId: api_projects_members_destroy - description: Remove a member from a specific project. - summary: Remove member from project - parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: project_member - schema: - type: integer - description: A unique integer value identifying this project member. - tags: - - Projects security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Add project member + tags: + - Projects /api/projects/{id}/project-extra-params/: get: + description: Retrieve the annotator weights for statistics and Cohen's Kappa for a specific project. operationId: api_projects_project_extra_params_retrieve - description: Retrieve the annotator weights for statistics and Cohen's Kappa - for a specific project. - summary: Get annotator weights parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Projects - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - title: Change annotator weights for statistics description: Create or change annotator weights for statistics - type: object properties: annotator_params: - title: annotator_params description: Dict of users with weights - type: array items: - title: User_id and weight description: '{user_id: weight}' + title: User_id and weight type: object + title: annotator_params + type: array use_kappa: - title: use_kappa description: If project uses Cohen's Kappa in calculation + title: use_kappa type: boolean + title: Change annotator weights for statistics + type: object description: Annotator weights retrieved '204': description: No annotator weights found + security: + - Token: [] + summary: Get annotator weights + tags: + - Projects post: + description: Create annotator weights to be used in the annotation statistics for a project, such as when calculating kappa metrics for inter-annotator agreement. operationId: api_projects_project_extra_params_create - description: Create annotator weights to be used in the annotation statistics - for a project, such as when calculating kappa metrics for inter-annotator - agreement. - summary: Create annotator weights for statistics parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Projects + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -7522,51 +7185,49 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/LseProjectParamsRequest' - security: - - Token: [] responses: '200': content: application/json: schema: - title: Change annotator weights for statistics description: Create or change annotator weights for statistics - type: object properties: annotator_params: - title: annotator_params description: Dict of users with weights - type: array items: - title: User_id and weight description: '{user_id: weight}' + title: User_id and weight type: object + title: annotator_params + type: array use_kappa: - title: use_kappa description: If project uses Cohen's Kappa in calculation + title: use_kappa type: boolean + title: Change annotator weights for statistics + type: object description: Annotator weights created/updated + security: + - Token: [] + summary: Create annotator weights for statistics + tags: + - Projects /api/projects/{id}/reimports/{reimport_pk}/: get: - operationId: api_projects_reimports_retrieve description: Return data related to async project reimport operation - summary: Get project reimport info + operationId: api_projects_reimports_retrieve parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project reimport. - required: true - - in: path - name: reimport_pk - schema: - type: integer - required: true - tags: - - Projects - security: - - Token: [] + - description: A unique integer value identifying this project reimport. + in: path + name: id + required: true + schema: + type: integer + - in: path + name: reimport_pk + required: true + schema: + type: integer responses: '200': content: @@ -7574,25 +7235,23 @@ paths: schema: $ref: '#/components/schemas/ProjectReimport' description: '' + security: + - Token: [] + summary: Get project reimport info + tags: + - Projects x-fern-audiences: - - internal + - internal /api/projects/{id}/roles: get: + description: "\n List users and their project level roles for a given project.\n If user is not listed here and is a member of the project then they would behave as assigned role in organization.\n " operationId: api_projects_roles_retrieve - description: "\n List users and their project level roles for a given\ - \ project.\n If user is not listed here and is a member of the project\ - \ then they would behave as assigned role in organization.\n " - summary: List project roles parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Project Roles - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -7600,409 +7259,376 @@ paths: schema: $ref: '#/components/schemas/ProjectRole' description: '' + security: + - Token: [] + summary: List project roles + tags: + - Project Roles /api/projects/{id}/stats/IAA: get: + description: Get Inter-Annotator Agreement (IAA) matrix for a project, showing agreement between all annotators. operationId: api_projects_stats_IAA_retrieve - description: Get Inter-Annotator Agreement (IAA) matrix for a project, showing - agreement between all annotators. - summary: Get Inter-Annotator Agreement matrix parameters: - - in: query - name: expand - schema: - type: string - description: Comma-separated list of fields to expand - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: per_label - schema: - type: boolean - default: false - description: Calculate IAA per label - - in: query - name: std - schema: - type: boolean - default: false - description: Include standard deviation in results - - in: query - name: task - schema: - type: string - description: Comma-separated list of task IDs to filter by - tags: - - Stats - security: - - Token: [] + - description: Comma-separated list of fields to expand + in: query + name: expand + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - description: Calculate IAA per label + in: query + name: per_label + schema: + default: false + type: boolean + - description: Include standard deviation in results + in: query + name: std + schema: + default: false + type: boolean + - description: Comma-separated list of task IDs to filter by + in: query + name: task + schema: + type: string responses: '200': content: application/json: - schema: - type: object - properties: - IAA: - oneOf: - - type: array - items: - type: array - items: - type: number - description: Inter-Annotator Agreement matrix (2D array) when - per_label=false - - type: object - additionalProperties: - type: array - items: - type: array - items: - type: number - description: Inter-Annotator Agreement matrix per label when - per_label=true - description: Inter-Annotator Agreement matrix - 2D array when - per_label=false, object with label keys when per_label=true - users: - type: array - items: - type: object - description: List of users in the matrix - std: - oneOf: - - type: number - - type: object - additionalProperties: - type: number - description: Standard deviation per label when per_label=true - description: Standard deviation - number when per_label=false, - object with label keys when per_label=true - common_tasks: - oneOf: - - type: array - items: - type: array - items: - type: number - description: Number of common tasks between annotators (2D array) - when per_label=false - - type: object - additionalProperties: - type: array - items: - type: array - items: - type: number - description: Number of common tasks per label when per_label=true - description: Common tasks matrix - 2D array when per_label=false, - object with label keys when per_label=true examples: Inter-AnnotatorAgreementMatrix(perLabel=false): + description: Example of Inter-Annotator Agreement matrix when per_label=false + summary: Inter-Annotator Agreement Matrix (per_label=false) value: IAA: - - - 1.0 - - 0.5 - - - 0.5 - - 1.0 - users: - - id: 1 - email: user1@example.com - - id: 2 - email: user2@example.com + - - 1.0 + - 0.5 + - - 0.5 + - 1.0 common_tasks: - - - 0.0 - - 1.0 - - - 1.0 - - 0.0 - summary: Inter-Annotator Agreement Matrix (per_label=false) - description: Example of Inter-Annotator Agreement matrix when per_label=false + - - 0.0 + - 1.0 + - - 1.0 + - 0.0 + users: + - email: user1@example.com + id: 1 + - email: user2@example.com + id: 2 Inter-AnnotatorAgreementMatrix(perLabel=true): + description: Example of Inter-Annotator Agreement matrix when per_label=true + summary: Inter-Annotator Agreement Matrix (per_label=true) value: IAA: neg: - - - null - - 0.0 - - - 0.0 - - null + - - null + - 0.0 + - - 0.0 + - null pos: - - - null - - 0.5 - - - 0.5 - - null - users: - - id: 1 - email: user1@example.com - - id: 2 - email: user2@example.com + - - null + - 0.5 + - - 0.5 + - null common_tasks: neg: - - - 0.0 - - 2.0 - - - 2.0 - - 0.0 + - - 0.0 + - 2.0 + - - 2.0 + - 0.0 pos: - - - 0.0 - - 4.0 - - - 4.0 - - 0.0 + - - 0.0 + - 4.0 + - - 4.0 + - 0.0 std: neg: 0.1 pos: 0.2 - summary: Inter-Annotator Agreement Matrix (per_label=true) - description: Example of Inter-Annotator Agreement matrix when per_label=true + users: + - email: user1@example.com + id: 1 + - email: user2@example.com + id: 2 + schema: + properties: + IAA: + description: Inter-Annotator Agreement matrix - 2D array when per_label=false, object with label keys when per_label=true + oneOf: + - description: Inter-Annotator Agreement matrix (2D array) when per_label=false + items: + items: + type: number + type: array + type: array + - additionalProperties: + items: + items: + type: number + type: array + type: array + description: Inter-Annotator Agreement matrix per label when per_label=true + type: object + common_tasks: + description: Common tasks matrix - 2D array when per_label=false, object with label keys when per_label=true + oneOf: + - description: Number of common tasks between annotators (2D array) when per_label=false + items: + items: + type: number + type: array + type: array + - additionalProperties: + items: + items: + type: number + type: array + type: array + description: Number of common tasks per label when per_label=true + type: object + std: + description: Standard deviation - number when per_label=false, object with label keys when per_label=true + oneOf: + - type: number + - additionalProperties: + type: number + description: Standard deviation per label when per_label=true + type: object + users: + description: List of users in the matrix + items: + type: object + type: array + type: object description: Inter-Annotator Agreement matrix + security: + - Token: [] + summary: Get Inter-Annotator Agreement matrix + tags: + - Stats + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - stats + - projects + - stats x-fern-sdk-method-name: iaa - x-fern-audiences: - - public /api/projects/{id}/stats/agreement_annotator/{user_id}: get: - operationId: api_projects_stats_agreement_annotator_retrieve description: Get agreement statistics for a specific annotator within a project. - summary: Get individual annotator agreement stats + operationId: api_projects_stats_agreement_annotator_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: per_label - schema: - type: boolean - default: false - description: Calculate agreement per label - - in: path - name: user_id - schema: - type: integer - required: true - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - description: Calculate agreement per label + in: query + name: per_label + schema: + default: false + type: boolean + - in: path + name: user_id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: Agreement_per_annotator: - type: number description: Agreement score for the annotator (0-1) + type: number + type: object description: Individual annotator agreement statistics + security: + - Token: [] + summary: Get individual annotator agreement stats + tags: + - Stats /api/projects/{id}/stats/data_filter: get: + description: Get statistics about user data filters and their usage within a project. operationId: api_projects_stats_data_filter_retrieve - description: Get statistics about user data filters and their usage within a - project. - summary: Get user data filter statistics parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: filters: - type: object description: Data filter statistics by user + type: object + type: object description: User data filter statistics + security: + - Token: [] + summary: Get user data filter statistics + tags: + - Stats /api/projects/{id}/stats/finished: get: - operationId: api_projects_stats_finished_retrieve description: Get statistics about finished tasks for a project. - summary: Get finished tasks statistics + operationId: api_projects_stats_finished_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: user_pk - schema: - type: integer - description: User ID to filter statistics by (optional) - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - description: User ID to filter statistics by (optional) + in: query + name: user_pk + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: finished_tasks: - type: integer description: Number of finished tasks + type: integer progress: - type: number description: Progress percentage (0-100) + type: number + type: object description: Finished tasks statistics + security: + - Token: [] + summary: Get finished tasks statistics + tags: + - Stats /api/projects/{id}/stats/lead_time: get: + description: Get lead time statistics across the project, including average annotation time. operationId: api_projects_stats_lead_time_retrieve - description: Get lead time statistics across the project, including average - annotation time. - summary: Get lead time statistics parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: lead_time: + description: Lead time statistics including mean, median, and distribution type: object - description: Lead time statistics including mean, median, and - distribution + type: object description: Lead time statistics - /api/projects/{id}/tasks/: - get: - operationId: api_projects_tasks_list - description: "\n Retrieve a paginated list of tasks for a specific\ - \ project. For example, use the following cURL command:\n ```bash\n\ - \ curl -X GET http://localhost:8000/api/projects/{id}/tasks/?page=1&page_size=10\ - \ -H 'Authorization: Token abc123'\n ```\n " - summary: List project tasks - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: page - schema: - type: integer - description: '[or "start"] current page' - - in: query - name: page_size - schema: - type: integer - description: '[or "length"] tasks per page, use -1 to obtain all tasks (in - this case "page" has no effect and this operation might be slow)' - tags: - - Projects security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TaskSimple' - description: '' - x-fern-audiences: - - internal + - Token: [] + summary: Get lead time statistics + tags: + - Stats + /api/projects/{id}/tasks/: delete: - operationId: api_projects_tasks_destroy description: Delete all tasks from a specific project. - summary: Delete all tasks + operationId: api_projects_tasks_destroy parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Projects - security: - - Token: [] + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete all tasks + tags: + - Projects + x-fern-audiences: + - public x-fern-sdk-group-name: tasks x-fern-sdk-method-name: delete_all_tasks - x-fern-audiences: - - public - /api/projects/{id}/tasks/{task_pk}/assignees: get: - operationId: api_projects_tasks_assignees_retrieve - description: Retrieve a list of tasks and assignees for those tasks for a specific - project. - summary: Get assigned tasks and assignees + description: "\n Retrieve a paginated list of tasks for a specific project. For example, use the following cURL command:\n ```bash\n curl -X GET http://localhost:8000/api/projects/{id}/tasks/?page=1&page_size=10 -H 'Authorization: Token abc123'\n ```\n " + operationId: api_projects_tasks_list parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - in: path - name: task_pk - schema: - type: integer - description: A unique integer value identifying this task. - required: true - tags: - - Tasks - security: - - Token: [] + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: '[or "start"] current page' + in: query + name: page + schema: + type: integer + - description: '[or "length"] tasks per page, use -1 to obtain all tasks (in this case "page" has no effect and this operation might be slow)' + in: query + name: page_size + schema: + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/TaskAssignment' + items: + $ref: '#/components/schemas/TaskSimple' + type: array description: '' + security: + - Token: [] + summary: List project tasks + tags: + - Projects + x-fern-audiences: + - internal + /api/projects/{id}/tasks/assignees: post: - operationId: api_projects_tasks_assignees_create_2 - description: Assign a user to a task in a specific project. - summary: Create task assignee + description: Assign multiple tasks to a specific user for a specific project. + operationId: api_projects_tasks_assignees_create parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - in: path - name: task_pk - schema: - type: integer - description: A unique integer value identifying this task. - required: true - tags: - - Tasks + - in: path + name: id + required: true + schema: + type: integer + - description: Selected items + in: query + name: selected_items + schema: + type: boolean + - description: Assignment type + in: query + name: type + schema: + type: string + - description: Assignees + in: query + name: users + schema: + type: string requestBody: content: application/json: @@ -8015,8 +7641,66 @@ paths: schema: $ref: '#/components/schemas/TaskAssignmentRequest' required: true + responses: + '201': + content: + application/json: + schema: + properties: + assignments: + items: + type: object + type: array + type: object + description: Success + '400': + description: Can't assign tasks + security: + - Token: [] + summary: Bulk assign tasks + tags: + - Tasks + /api/projects/{id}/tasks/{task_pk}/assignees: + delete: + description: Remove the assignee for a task for a specific project. + operationId: api_projects_tasks_assignees_destroy + parameters: + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying this task. + in: path + name: task_pk + required: true + schema: + type: integer + responses: + '204': + description: No response body security: - - Token: [] + - Token: [] + summary: Delete task assignee + tags: + - Tasks + get: + description: Retrieve a list of tasks and assignees for those tasks for a specific project. + operationId: api_projects_tasks_assignees_retrieve + parameters: + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying this task. + in: path + name: task_pk + required: true + schema: + type: integer responses: '200': content: @@ -8024,25 +7708,27 @@ paths: schema: $ref: '#/components/schemas/TaskAssignment' description: '' + security: + - Token: [] + summary: Get assigned tasks and assignees + tags: + - Tasks patch: - operationId: api_projects_tasks_assignees_partial_update description: Update the assignee for a task in a specific project. - summary: Update task assignee + operationId: api_projects_tasks_assignees_partial_update parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - in: path - name: task_pk - schema: - type: integer - description: A unique integer value identifying this task. - required: true - tags: - - Tasks + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying this task. + in: path + name: task_pk + required: true + schema: + type: integer requestBody: content: application/json: @@ -8054,8 +7740,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedTaskAssignmentRequest' - security: - - Token: [] responses: '200': content: @@ -8063,58 +7747,27 @@ paths: schema: $ref: '#/components/schemas/TaskAssignment' description: '' - delete: - operationId: api_projects_tasks_assignees_destroy - description: Remove the assignee for a task for a specific project. - summary: Delete task assignee - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - - in: path - name: task_pk - schema: - type: integer - description: A unique integer value identifying this task. - required: true - tags: - - Tasks security: - - Token: [] - responses: - '204': - description: No response body - /api/projects/{id}/tasks/assignees: + - Token: [] + summary: Update task assignee + tags: + - Tasks post: - operationId: api_projects_tasks_assignees_create - description: Assign multiple tasks to a specific user for a specific project. - summary: Bulk assign tasks + description: Assign a user to a task in a specific project. + operationId: api_projects_tasks_assignees_create_2 parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: selected_items - schema: - type: boolean - description: Selected items - - in: query - name: type - schema: - type: string - description: Assignment type - - in: query - name: users - schema: - type: string - description: Assignees - tags: - - Tasks + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer + - description: A unique integer value identifying this task. + in: path + name: task_pk + required: true + schema: + type: integer requestBody: content: application/json: @@ -8127,161 +7780,151 @@ paths: schema: $ref: '#/components/schemas/TaskAssignmentRequest' required: true - security: - - Token: [] responses: - '201': + '200': content: application/json: schema: - type: object - properties: - assignments: - type: array - items: - type: object - description: Success - '400': - description: Can't assign tasks + $ref: '#/components/schemas/TaskAssignment' + description: '' + security: + - Token: [] + summary: Create task assignee + tags: + - Tasks /api/projects/{id}/update-stats: get: - operationId: api_projects_update_stats_retrieve description: Start stats recalculation for given project - summary: Start stats recalculation + operationId: api_projects_update_stats_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: query - name: stat_type - schema: - type: string - description: 'Stat type to recalculate. Possible values: label, stats' - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - description: 'Stat type to recalculate. Possible values: label, stats' + in: query + name: stat_type + schema: + type: string responses: '200': content: application/json: schema: - title: Stat recalculation job description: Stat recalculation job + title: Stat recalculation job type: object description: Successful response returns job id + security: + - Token: [] + summary: Start stats recalculation + tags: + - Stats /api/projects/{id}/user-stats/{user_pk}/prediction: get: + description: Get prediction agreement statistics for a specific user within a project. operationId: api_projects_user_stats_prediction_retrieve - description: Get prediction agreement statistics for a specific user within - a project. - summary: Get individual user prediction agreement parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: average_prediction_agreement_per_user: - type: number description: Average prediction agreement score for the user (0-1) + type: number + type: object description: Individual user prediction agreement statistics + security: + - Token: [] + summary: Get individual user prediction agreement + tags: + - Stats /api/projects/{id}/user-stats/{user_pk}/review_score: get: - operationId: api_projects_user_stats_review_score_retrieve description: Get review score statistics for a specific user within a project. - summary: Get individual user review scores + operationId: api_projects_user_stats_review_score_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: review_score: - type: number description: Average review score for the user + type: number + type: object description: Individual user review score statistics + security: + - Token: [] + summary: Get individual user review scores + tags: + - Stats /api/projects/{id}/users/{user_pk}/stats/agreement-groundtruth: get: + description: Get ground truth agreement statistics for a specific user within a project. operationId: api_projects_users_stats_agreement_groundtruth_retrieve - description: Get ground truth agreement statistics for a specific user within - a project. - summary: Get individual user ground truth agreement parameters: - - in: path - name: id - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Stats - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: object properties: agreement: - type: number description: Ground truth agreement score for the user (0-1) + type: number + type: object description: Individual user ground truth agreement statistics + security: + - Token: [] + summary: Get individual user ground truth agreement + tags: + - Stats /api/projects/{id}/validate/: post: + description: Determine whether the label configuration for a specific project is valid. operationId: api_projects_validate_label_config - description: Determine whether the label configuration for a specific project - is valid. - summary: Validate project label config parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project. - required: true - tags: - - Projects + - description: A unique integer value identifying this project. + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -8294,8 +7937,6 @@ paths: schema: $ref: '#/components/schemas/ProjectLabelConfigRequest' required: true - security: - - Token: [] responses: '200': content: @@ -8303,73 +7944,75 @@ paths: schema: $ref: '#/components/schemas/ProjectLabelConfig' description: '' + security: + - Token: [] + summary: Validate project label config + tags: + - Projects + x-fern-audiences: + - public x-fern-sdk-group-name: projects x-fern-sdk-method-name: validate_label_config - x-fern-audiences: - - public /api/projects/{project_pk}/members/{user_pk}/pauses/: get: - operationId: api_projects_members_pauses_list description: Retrieve a list of all pauses. - summary: List pauses + operationId: api_projects_members_pauses_list parameters: - - in: query - name: include_deleted - schema: - type: boolean - description: Include deleted pauses. - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: path - name: project_pk - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Pauses - security: - - Token: [] + - description: Include deleted pauses. + in: query + name: include_deleted + schema: + type: boolean + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - in: path + name: project_pk + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/Pause' + type: array description: '' + security: + - Token: [] + summary: List pauses + tags: + - Pauses + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - pauses + - projects + - pauses x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_projects_members_pauses_create description: Create a new pause entry. - summary: Create pause + operationId: api_projects_members_pauses_create parameters: - - in: path - name: project_pk - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Pauses + - in: path + name: project_pk + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer requestBody: content: application/json: @@ -8382,8 +8025,6 @@ paths: schema: $ref: '#/components/schemas/PauseRequest' required: true - security: - - Token: [] responses: '201': content: @@ -8391,37 +8032,70 @@ paths: schema: $ref: '#/components/schemas/Pause' description: '' + security: + - Token: [] + summary: Create pause + tags: + - Pauses + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - pauses + - projects + - pauses x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/projects/{project_pk}/members/{user_pk}/pauses/{id}/: + delete: + description: Delete a specific pause by ID. + operationId: api_projects_members_pauses_destroy + parameters: + - in: path + name: id + required: true + schema: + type: string + - in: path + name: project_pk + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete pause + tags: + - Pauses + x-fern-audiences: + - public + x-fern-sdk-group-name: + - projects + - pauses + x-fern-sdk-method-name: delete get: - operationId: api_projects_members_pauses_retrieve description: Retrieve a specific pause by ID. - summary: Get pause + operationId: api_projects_members_pauses_retrieve parameters: - - in: path - name: id - schema: - type: string - required: true - - in: path - name: project_pk - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Pauses - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: string + - in: path + name: project_pk + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer responses: '200': content: @@ -8429,48 +8103,47 @@ paths: schema: $ref: '#/components/schemas/Pause' description: '' + security: + - Token: [] + summary: Get pause + tags: + - Pauses + x-fern-audiences: + - public x-fern-sdk-group-name: - - projects - - pauses + - projects + - pauses x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_projects_members_pauses_update - description: Overwrite a pause entry by ID. - summary: Put pause + patch: + description: Partially update a pause entry by ID. + operationId: api_projects_members_pauses_partial_update parameters: - - in: path - name: id - schema: - type: string - required: true - - in: path - name: project_pk - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Pauses + - in: path + name: id + required: true + schema: + type: string + - in: path + name: project_pk + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/PauseRequest' + $ref: '#/components/schemas/PatchedPauseRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PauseRequest' + $ref: '#/components/schemas/PatchedPauseRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PauseRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedPauseRequest' responses: '200': content: @@ -8478,43 +8151,48 @@ paths: schema: $ref: '#/components/schemas/Pause' description: '' - x-fern-audiences: - - internal - patch: - operationId: api_projects_members_pauses_partial_update - description: Partially update a pause entry by ID. + security: + - Token: [] summary: Update pause - parameters: - - in: path - name: id - schema: - type: string - required: true - - in: path - name: project_pk - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true tags: - - Pauses + - Pauses + x-fern-audiences: + - public + x-fern-sdk-group-name: + - projects + - pauses + x-fern-sdk-method-name: update + put: + description: Overwrite a pause entry by ID. + operationId: api_projects_members_pauses_update + parameters: + - in: path + name: id + required: true + schema: + type: string + - in: path + name: project_pk + required: true + schema: + type: integer + - in: path + name: user_pk + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedPauseRequest' + $ref: '#/components/schemas/PauseRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedPauseRequest' + $ref: '#/components/schemas/PauseRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedPauseRequest' - security: - - Token: [] + $ref: '#/components/schemas/PauseRequest' + required: true responses: '200': content: @@ -8522,292 +8200,111 @@ paths: schema: $ref: '#/components/schemas/Pause' description: '' - x-fern-sdk-group-name: - - projects - - pauses - x-fern-sdk-method-name: update + security: + - Token: [] + summary: Put pause + tags: + - Pauses x-fern-audiences: - - public - delete: - operationId: api_projects_members_pauses_destroy - description: Delete a specific pause by ID. - summary: Delete pause + - internal + /api/projects/{project_pk}/subset-tasks: + get: + description: "\n Provides list of tasks, based on project subset. Includes predictions for tasks. For the 'HasGT' subset, accuracy metrics will also be provided.\n " + operationId: api_projects_subset_tasks_list parameters: - - in: path - name: id - schema: - type: string - required: true - - in: path - name: project_pk - schema: - type: integer - required: true - - in: path - name: user_pk - schema: - type: integer - required: true - tags: - - Pauses - security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - projects - - pauses - x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/projects/{project_pk}/subset-tasks: - get: - operationId: api_projects_subset_tasks_list - description: "\n Provides list of tasks, based on project subset. Includes\ - \ predictions for tasks. For the 'HasGT' subset, accuracy metrics will also\ - \ be provided.\n " - summary: Get Project Subset Task List with Predictions and Accuracy details - parameters: - - in: query - name: model_run - schema: - type: integer - description: A unique ID of a ModelRun - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: path - name: project_pk - schema: - type: integer - required: true - - in: query - name: project_subset - schema: - type: string - description: The project subset to retrieve tasks for - tags: - - Projects - security: - - Token: [] + - description: A unique ID of a ModelRun + in: query + name: model_run + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer + - in: path + name: project_pk + required: true + schema: + type: integer + - description: The project subset to retrieve tasks for + in: query + name: project_subset + schema: + type: string responses: '200': description: Project subset task list '400': description: Bad request - missing parent_model + security: + - Token: [] + summary: Get Project Subset Task List with Predictions and Accuracy details + tags: + - Projects /api/projects/{project_pk}/subsets: get: + description: "\n Provides list of available subsets for a project along with count of tasks in each subset\n " operationId: api_projects_subsets_retrieve - description: "\n Provides list of available subsets for a project along\ - \ with count of tasks in each subset\n " - summary: Get available subsets of a project (for prompts usage) parameters: - - in: path - name: project_pk - schema: - type: integer - required: true - tags: - - Projects - security: - - Token: [] + - in: path + name: project_pk + required: true + schema: + type: integer responses: '200': description: No response body - /api/projects/counts/: - get: - operationId: api_projects_counts_list - description: Returns a list of projects with their counts. For example, task_number - which is the total task number in project - summary: List project's counts - parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - tags: - - Projects - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedLseProjectCountsList' - description: '' - /api/projects/roles/: - get: - operationId: api_projects_roles_list - description: "\n List project roles for requested IDs for the current\ - \ user\n " - summary: List project roles for current user - parameters: - - in: query - name: ids - schema: - type: integer - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Project Roles - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ProjectRole' - description: '' - post: - operationId: api_projects_roles_create - description: "\n Create project role for user allowing the user the same\ - \ access level provided by organization role.\n " - summary: Create project role for user - tags: - - Project Roles - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectRoleRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ProjectRoleRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ProjectRoleRequest' - required: true - security: - - Token: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectRole' - description: '' - /api/projects/roles/{id}/: - delete: - operationId: api_projects_roles_destroy - description: "\n Remove project role for user allowing the user the same\ - \ access level provided by organization role.\n " - summary: Remove project role for user - parameters: - - in: path - name: id - schema: - type: integer - description: A unique integer value identifying this project role. - required: true - tags: - - Project Roles security: - - Token: [] - responses: - '204': - description: No response body - /api/projects/validate/: - post: - operationId: api_projects_validate_create - description: Validate an arbitrary labeling configuration. - summary: Validate label config + - Token: [] + summary: Get available subsets of a project (for prompts usage) tags: - - Projects - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectLabelConfigRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ProjectLabelConfigRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ProjectLabelConfigRequest' - required: true - security: - - Token: [] - - {} - responses: - '204': - description: Validation success - '400': - description: Validation failed - x-fern-audiences: - - internal + - Projects /api/prompts/: get: - operationId: api_prompts_list description: List all prompts. - summary: List prompts + operationId: api_prompts_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Prompts - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/ModelInterfaceSerializerGET' + type: array description: '' + security: + - Token: [] + summary: List prompts + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: prompts x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_prompts_create description: Create a new prompt. - summary: Create prompt - tags: - - Prompts + operationId: api_prompts_create requestBody: content: application/json: @@ -8820,8 +8317,6 @@ paths: schema: $ref: '#/components/schemas/ModelInterfaceRequest' required: true - security: - - Token: [] responses: '201': content: @@ -8829,25 +8324,94 @@ paths: schema: $ref: '#/components/schemas/ModelInterface' description: '' + security: + - Token: [] + summary: Create prompt + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: prompts x-fern-sdk-method-name: create + /api/prompts/compatible-projects: + get: + description: Retrieve a list of compatible project for prompt. + operationId: api_prompts_compatible_projects_list + parameters: + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer + - description: Skill to filter by + in: query + name: project_type + schema: + default: TextClassification + enum: + - NamedEntityRecognition + - TextClassification + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAllRolesProjectListList' + description: '' + security: + - Token: [] + summary: List projects compatible with prompt + tags: + - Prompts x-fern-audiences: - - public + - public + x-fern-sdk-group-name: prompts + x-fern-sdk-method-name: compatible_projects /api/prompts/{id}/: + delete: + description: Delete a prompt by ID + operationId: api_prompts_destroy + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete prompt + tags: + - Prompts + x-fern-audiences: + - public + x-fern-sdk-group-name: prompts + x-fern-sdk-method-name: delete get: - operationId: api_prompts_retrieve description: Retrieve a specific prompt. - summary: Get prompt + operationId: api_prompts_retrieve parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: string responses: '200': content: @@ -8855,36 +8419,35 @@ paths: schema: $ref: '#/components/schemas/ModelInterfaceSerializerGET' description: '' + security: + - Token: [] + summary: Get prompt + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: prompts x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_prompts_update - description: Overwrite a specific prompt by ID. - summary: Put prompt + patch: + description: Update a specific prompt by ID. + operationId: api_prompts_partial_update parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Prompts + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/ModelInterfaceRequest' + $ref: '#/components/schemas/PatchedModelInterfaceRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ModelInterfaceRequest' + $ref: '#/components/schemas/PatchedModelInterfaceRequest' multipart/form-data: schema: - $ref: '#/components/schemas/ModelInterfaceRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedModelInterfaceRequest' responses: '200': content: @@ -8892,33 +8455,36 @@ paths: schema: $ref: '#/components/schemas/ModelInterface' description: '' - x-fern-audiences: - - internal - patch: - operationId: api_prompts_partial_update - description: Update a specific prompt by ID. + security: + - Token: [] summary: Update prompt - parameters: - - in: path - name: id - schema: - type: string - required: true tags: - - Prompts + - Prompts + x-fern-audiences: + - public + x-fern-sdk-group-name: prompts + x-fern-sdk-method-name: update + put: + description: Overwrite a specific prompt by ID. + operationId: api_prompts_update + parameters: + - in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedModelInterfaceRequest' + $ref: '#/components/schemas/ModelInterfaceRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedModelInterfaceRequest' + $ref: '#/components/schemas/ModelInterfaceRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedModelInterfaceRequest' - security: - - Token: [] + $ref: '#/components/schemas/ModelInterfaceRequest' + required: true responses: '200': content: @@ -8926,110 +8492,88 @@ paths: schema: $ref: '#/components/schemas/ModelInterface' description: '' - x-fern-sdk-group-name: prompts - x-fern-sdk-method-name: update + security: + - Token: [] + summary: Put prompt + tags: + - Prompts x-fern-audiences: - - public - delete: - operationId: api_prompts_destroy - description: Delete a prompt by ID - summary: Delete prompt - parameters: - - in: path - name: id - schema: - type: string - required: true - tags: - - Prompts - security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: prompts - x-fern-sdk-method-name: delete - x-fern-audiences: - - public + - internal /api/prompts/{id}/get-default-version-name: get: - operationId: api_prompts_get_default_version_name_retrieve description: Get default prompt version name - summary: Get default prompt version name + operationId: api_prompts_get_default_version_name_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': description: No response body + security: + - Token: [] + summary: Get default prompt version name + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - versions + - prompts + - versions x-fern-sdk-method-name: get_default_version_name - x-fern-audiences: - - public /api/prompts/{prompt_id}/versions: get: - operationId: api_prompts_versions_list description: List all versions of a prompt. - summary: List prompt versions + operationId: api_prompts_versions_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: query - name: prompt_id - schema: - type: integer - description: A unique integer value identifying the model ID to list versions - for. - required: true - tags: - - Prompts - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - in: path + name: prompt_id + required: true + schema: + type: integer + - description: A unique integer value identifying the model ID to list versions for. + in: query + name: prompt_id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/ThirdPartyModelVersion' + type: array description: '' + security: + - Token: [] + summary: List prompt versions + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - versions + - prompts + - versions x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_prompts_versions_create description: Create a new version of a prompt. - summary: Create prompt version + operationId: api_prompts_versions_create parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - tags: - - Prompts + - in: path + name: prompt_id + required: true + schema: + type: integer requestBody: content: application/json: @@ -9042,8 +8586,6 @@ paths: schema: $ref: '#/components/schemas/ThirdPartyModelVersionRequest' required: true - security: - - Token: [] responses: '201': content: @@ -9051,32 +8593,60 @@ paths: schema: $ref: '#/components/schemas/ThirdPartyModelVersion' description: '' + security: + - Token: [] + summary: Create prompt version + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - versions + - prompts + - versions x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/prompts/{prompt_id}/versions/{version_id}: + delete: + description: Delete a prompt version by ID + operationId: api_prompts_versions_destroy + parameters: + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete prompt version + tags: + - Prompts + x-fern-audiences: + - public + x-fern-sdk-group-name: + - prompts + - versions + x-fern-sdk-method-name: delete get: - operationId: api_prompts_versions_retrieve description: Retrieve a specific prompt of a model. - summary: Get prompt version + operationId: api_prompts_versions_retrieve parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer responses: '200': content: @@ -9084,43 +8654,42 @@ paths: schema: $ref: '#/components/schemas/ThirdPartyModelVersion' description: '' + security: + - Token: [] + summary: Get prompt version + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - versions + - prompts + - versions x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_prompts_versions_update - description: Overwrite a specific prompt version by ID. - summary: Put prompt version + patch: + description: Update a specific prompt version by ID. + operationId: api_prompts_versions_partial_update parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/ThirdPartyModelVersionRequest' + $ref: '#/components/schemas/PatchedThirdPartyModelVersionRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ThirdPartyModelVersionRequest' + $ref: '#/components/schemas/PatchedThirdPartyModelVersionRequest' multipart/form-data: schema: - $ref: '#/components/schemas/ThirdPartyModelVersionRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedThirdPartyModelVersionRequest' responses: '200': content: @@ -9128,38 +8697,43 @@ paths: schema: $ref: '#/components/schemas/ThirdPartyModelVersion' description: '' - x-fern-audiences: - - internal - patch: - operationId: api_prompts_versions_partial_update - description: Update a specific prompt version by ID. + security: + - Token: [] summary: Update prompt version - parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true tags: - - Prompts + - Prompts + x-fern-audiences: + - public + x-fern-sdk-group-name: + - prompts + - versions + x-fern-sdk-method-name: update + put: + description: Overwrite a specific prompt version by ID. + operationId: api_prompts_versions_update + parameters: + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedThirdPartyModelVersionRequest' + $ref: '#/components/schemas/ThirdPartyModelVersionRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedThirdPartyModelVersionRequest' + $ref: '#/components/schemas/ThirdPartyModelVersionRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedThirdPartyModelVersionRequest' - security: - - Token: [] + $ref: '#/components/schemas/ThirdPartyModelVersionRequest' + required: true responses: '200': content: @@ -9167,61 +8741,28 @@ paths: schema: $ref: '#/components/schemas/ThirdPartyModelVersion' description: '' - x-fern-sdk-group-name: - - prompts - - versions - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_prompts_versions_destroy - description: Delete a prompt version by ID - summary: Delete prompt version - parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - prompts - - versions - x-fern-sdk-method-name: delete + - Token: [] + summary: Put prompt version + tags: + - Prompts x-fern-audiences: - - public + - internal /api/prompts/{prompt_id}/versions/{version_id}/cost-estimate: get: + description: Get an estimate of the cost for making an inference run on the selected Prompt Version and Project/ProjectSubset operationId: api_prompts_versions_cost_estimate_retrieve - description: Get an estimate of the cost for making an inference run on the - selected Prompt Version and Project/ProjectSubset - summary: Get cost estimate for running a prompt version on a particular project/subset parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer responses: '200': content: @@ -9229,91 +8770,91 @@ paths: schema: $ref: '#/components/schemas/InferenceRunCostEstimate' description: Cost estimate response + security: + - Token: [] + summary: Get cost estimate for running a prompt version on a particular project/subset + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - versions + - prompts + - versions x-fern-sdk-method-name: cost_estimate - x-fern-audiences: - - public /api/prompts/{prompt_id}/versions/{version_id}/inference-runs: get: + description: Get information (status, metadata, etc) about an existing inference run operationId: api_prompts_versions_inference_runs_list - description: Get information (status, metadata, etc) about an existing inference - run - summary: Get inference run info parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: parent_model - schema: - type: integer - description: The ID of the parent model for this Inference Run - - in: query - name: project - schema: - type: integer - description: The ID of the project this Inference Run makes predictions on - - in: query - name: project_subset - schema: - type: string - enum: - - All - - HasGT - - Sample - description: Defines which tasks are operated on (e.g. HasGT will only operate - on tasks with a ground truth annotation, but All will operate on all records) - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: The ID of the parent model for this Inference Run + in: query + name: parent_model + schema: + type: integer + - description: The ID of the project this Inference Run makes predictions on + in: query + name: project + schema: + type: integer + - description: Defines which tasks are operated on (e.g. HasGT will only operate on tasks with a ground truth annotation, but All will operate on all records) + in: query + name: project_subset + schema: + enum: + - All + - HasGT + - Sample + type: string + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/ModelRun' + type: array description: '' + security: + - Token: [] + summary: Get inference run info + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - runs + - prompts + - runs x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_prompts_versions_inference_runs_create description: Run a prompt inference. - summary: Run prompt inference + operationId: api_prompts_versions_inference_runs_create parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer requestBody: content: application/json: @@ -9326,8 +8867,6 @@ paths: schema: $ref: '#/components/schemas/ModelRunRequest' required: true - security: - - Token: [] responses: '201': content: @@ -9335,66 +8874,65 @@ paths: schema: $ref: '#/components/schemas/ModelRun' description: '' + security: + - Token: [] + summary: Run prompt inference + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - runs + - prompts + - runs x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/prompts/{prompt_id}/versions/{version_id}/inference-runs/{inference_run_id}/cancel: post: - operationId: api_prompts_versions_inference_runs_cancel_create description: Cancel the inference run for the given api - summary: Cancel Inference Run API + operationId: api_prompts_versions_inference_runs_cancel_create parameters: - - in: path - name: inference_run_id - schema: - type: integer - required: true - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: inference_run_id + required: true + schema: + type: integer + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer responses: '201': description: No response body + security: + - Token: [] + summary: Cancel Inference Run API + tags: + - Prompts /api/prompts/{prompt_id}/versions/{version_id}/refine: get: - operationId: api_prompts_versions_refine_retrieve description: Get the refined prompt based on the `refinement_job_id`. - summary: Get refined prompt + operationId: api_prompts_versions_refine_retrieve parameters: - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: query - name: refinement_job_id - schema: - type: string - description: Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` - endpoint - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts - security: - - Token: [] + - in: path + name: prompt_id + required: true + schema: + type: integer + - description: Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint + in: query + name: refinement_job_id + schema: + type: string + - in: path + name: version_id + required: true + schema: + type: integer responses: '200': content: @@ -9408,35 +8946,36 @@ paths: schema: $ref: '#/components/schemas/RefinedPromptResponse' description: Refinement job status + security: + - Token: [] + summary: Get refined prompt + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - versions + - prompts + - versions x-fern-sdk-method-name: get_refined_prompt - x-fern-audiences: - - public post: + description: Refine a prompt version using a teacher model and save the refined prompt as a new version. operationId: api_prompts_versions_refine_create - description: Refine a prompt version using a teacher model and save the refined - prompt as a new version. - summary: Refine a prompt version parameters: - - in: query - name: async - schema: - type: boolean - description: Whether to run the refinement asynchronously - - in: path - name: prompt_id - schema: - type: integer - required: true - - in: path - name: version_id - schema: - type: integer - required: true - tags: - - Prompts + - description: Whether to run the refinement asynchronously + in: query + name: async + schema: + type: boolean + - in: path + name: prompt_id + required: true + schema: + type: integer + - in: path + name: version_id + required: true + schema: + type: integer requestBody: content: application/json: @@ -9449,8 +8988,6 @@ paths: schema: $ref: '#/components/schemas/RefinePromptRequestRequest' required: true - security: - - Token: [] responses: '201': content: @@ -9458,69 +8995,21 @@ paths: schema: $ref: '#/components/schemas/RefinedPromptResponse' description: Refined prompt response + security: + - Token: [] + summary: Refine a prompt version + tags: + - Prompts + x-fern-audiences: + - public x-fern-sdk-group-name: - - prompts - - versions + - prompts + - versions x-fern-sdk-method-name: refine_prompt - x-fern-audiences: - - public - /api/prompts/compatible-projects: - get: - operationId: api_prompts_compatible_projects_list - description: Retrieve a list of compatible project for prompt. - summary: List projects compatible with prompt - parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: project_type - schema: - type: string - enum: - - NamedEntityRecognition - - TextClassification - default: TextClassification - description: Skill to filter by - tags: - - Prompts - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedAllRolesProjectListList' - description: '' - x-fern-sdk-group-name: prompts - x-fern-sdk-method-name: compatible_projects - x-fern-audiences: - - public /api/saml/settings: get: - operationId: api_saml_settings_retrieve description: Retrieve SAML2 settings for the currently active organization. - summary: Retrieve SAML2 Settings - tags: - - SSO - security: - - Token: [] + operationId: api_saml_settings_retrieve responses: '200': content: @@ -9528,12 +9017,14 @@ paths: schema: $ref: '#/components/schemas/SamlSettings' description: '' + security: + - Token: [] + summary: Retrieve SAML2 Settings + tags: + - SSO post: - operationId: api_saml_settings_create description: Update SAML2 settings for the currently active organization. - summary: Update SAML2 Settings - tags: - - SSO + operationId: api_saml_settings_create requestBody: content: application/json: @@ -9545,8 +9036,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/SamlSettingsUpdateRequest' - security: - - Token: [] responses: '201': content: @@ -9554,15 +9043,15 @@ paths: schema: $ref: '#/components/schemas/SamlSettingsUpdate' description: '' + security: + - Token: [] + summary: Update SAML2 Settings + tags: + - SSO /api/scim/settings: get: - operationId: api_scim_settings_retrieve description: Retrieve SCIM settings for the currently active organization. - summary: Retrieve SCIM Settings - tags: - - SSO - security: - - Token: [] + operationId: api_scim_settings_retrieve responses: '200': content: @@ -9570,12 +9059,14 @@ paths: schema: $ref: '#/components/schemas/ScimSettings' description: '' + security: + - Token: [] + summary: Retrieve SCIM Settings + tags: + - SSO post: - operationId: api_scim_settings_create description: Update SCIM settings for the currently active organization. - summary: Update SCIM Settings - tags: - - SSO + operationId: api_scim_settings_create requestBody: content: application/json: @@ -9587,8 +9078,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/ScimSettingsUpdateRequest' - security: - - Token: [] responses: '201': content: @@ -9596,15 +9085,15 @@ paths: schema: $ref: '#/components/schemas/ScimSettingsUpdate' description: '' + security: + - Token: [] + summary: Update SCIM Settings + tags: + - SSO /api/session-policy/: get: - operationId: api_session_policy_retrieve description: Retrieve session timeout policy for the currently active organization. - summary: Retrieve Session Policy - tags: - - Session Policy - security: - - Token: [] + operationId: api_session_policy_retrieve responses: '200': content: @@ -9612,12 +9101,14 @@ paths: schema: $ref: '#/components/schemas/SessionTimeoutPolicy' description: '' + security: + - Token: [] + summary: Retrieve Session Policy + tags: + - Session Policy patch: - operationId: api_session_policy_partial_update description: Update session timeout policy for the currently active organization. - summary: Update Session Policy - tags: - - Session Policy + operationId: api_session_policy_partial_update requestBody: content: application/json: @@ -9629,8 +9120,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedSessionTimeoutPolicyRequest' - security: - - Token: [] responses: '200': content: @@ -9638,131 +9127,126 @@ paths: schema: $ref: '#/components/schemas/SessionTimeoutPolicy' description: '' + security: + - Token: [] + summary: Update Session Policy + tags: + - Session Policy /api/storages/: get: + description: Retrieve a list of the import storages of all types with their IDs. operationId: api_storages_list - description: Retrieve a list of the import storages of all types with their - IDs. - summary: List all import storages from the project parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Storage - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: - type: object additionalProperties: {} description: Unspecified response body + type: object + type: array description: '' + security: + - Token: [] + summary: List all import storages from the project + tags: + - Storage + x-fern-audiences: + - internal x-fern-sdk-group-name: - - import_storage + - import_storage x-fern-sdk-method-name: list - x-fern-audiences: - - internal /api/storages/azure/: get: - operationId: api_storages_azure_list description: Get list of all Azure import storage connections. - summary: Get all import storage + operationId: api_storages_azure_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: Azure' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/AzureBlobImportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all import storage + tags: + - 'Storage: Azure' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - azure + - import_storage + - azure x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_azure_create description: Create new Azure import storage - summary: Create new storage - tags: - - 'Storage: Azure' + operationId: api_storages_azure_create requestBody: content: application/json: schema: - type: object properties: - regex_filter: + account_key: + description: Azure Blob account key type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: boolean - description: Presign URLs for direct download - default: true - presign_ttl: - type: integer - description: Presign TTL in minutes - default: 1 - title: + account_name: + description: Azure Blob account name type: string - description: Storage title - maxLength: 2048 - description: + container: + description: Azure blob container type: string + description: description: Storage description - project: - type: integer - description: Project ID - container: type: string - description: Azure blob container prefix: - type: string description: Azure blob prefix name - account_name: type: string - description: Azure Blob account name - account_key: + presign: + default: true + description: Presign URLs for direct download + type: boolean + presign_ttl: + default: 1 + description: Presign TTL in minutes + type: integer + project: + description: Project ID + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. type: string - description: Azure Blob account key + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -9770,27 +9254,115 @@ paths: schema: $ref: '#/components/schemas/AzureBlobImportStorage' description: '' + security: + - Token: [] + summary: Create new storage + tags: + - 'Storage: Azure' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - azure + - import_storage + - azure x-fern-sdk-method-name: create + /api/storages/azure/validate: + post: + description: Validate a specific Azure import storage connection. + operationId: api_storages_azure_validate_create + requestBody: + content: + application/json: + schema: + properties: + account_key: + description: Azure Blob account key + type: string + account_name: + description: Azure Blob account name + type: string + container: + description: Azure blob container + type: string + description: + description: Storage description + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer + prefix: + description: Azure blob prefix name + type: string + presign: + default: true + description: Presign URLs for direct download + type: boolean + presign_ttl: + default: 1 + description: Presign TTL in minutes + type: integer + project: + description: Project ID + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + type: string + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean + required: [] + type: object + responses: + '200': + description: Validation successful + security: + - Token: [] + summary: Validate import storage + tags: + - 'Storage: Azure' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - azure + x-fern-sdk-method-name: validate /api/storages/azure/{id}: + delete: + description: Delete a specific Azure import storage connection. + operationId: api_storages_azure_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Storage: Azure' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - azure + x-fern-sdk-method-name: delete get: - operationId: api_storages_azure_retrieve description: Get a specific Azure import storage connection. - summary: Get import storage + operationId: api_storages_azure_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -9798,74 +9370,70 @@ paths: schema: $ref: '#/components/schemas/AzureBlobImportStorage' description: '' + security: + - Token: [] + summary: Get import storage + tags: + - 'Storage: Azure' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - azure + - import_storage + - azure x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: - operationId: api_storages_azure_partial_update description: Update a specific Azure import storage connection. - summary: Update import storage + operationId: api_storages_azure_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - regex_filter: + account_key: + description: Azure Blob account key type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: boolean - description: Presign URLs for direct download - default: true - presign_ttl: - type: integer - description: Presign TTL in minutes - default: 1 - title: + account_name: + description: Azure Blob account name type: string - description: Storage title - maxLength: 2048 - description: + container: + description: Azure blob container type: string + description: description: Storage description - project: - type: integer - description: Project ID - container: type: string - description: Azure blob container prefix: - type: string description: Azure blob prefix name - account_name: type: string - description: Azure Blob account name - account_key: + presign: + default: true + description: Presign URLs for direct download + type: boolean + presign_ttl: + default: 1 + description: Presign TTL in minutes + type: integer + project: + description: Project ID + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. type: string - description: Azure Blob account key + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': content: @@ -9873,51 +9441,28 @@ paths: schema: $ref: '#/components/schemas/AzureBlobImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - azure - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_storages_azure_destroy - description: Delete a specific Azure import storage connection. - summary: Delete import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure' security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - import_storage - - azure - x-fern-sdk-method-name: delete + - Token: [] + summary: Update import storage + tags: + - 'Storage: Azure' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - azure + x-fern-sdk-method-name: update /api/storages/azure/{id}/sync: post: - operationId: api_storages_azure_sync_create description: Sync tasks from an Azure import storage connection. - summary: Sync import storage + operationId: api_storages_azure_sync_create parameters: - - in: path - name: id - schema: - type: integer - description: Storage ID - required: true - tags: - - 'Storage: Azure' - security: - - Token: [] + - description: Storage ID + in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -9925,114 +9470,73 @@ paths: schema: $ref: '#/components/schemas/AzureBlobImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - azure - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/azure/validate: - post: - operationId: api_storages_azure_validate_create - description: Validate a specific Azure import storage connection. - summary: Validate import storage - tags: - - 'Storage: Azure' - requestBody: - content: - application/json: - schema: - type: object - properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - regex_filter: - type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: boolean - description: Presign URLs for direct download - default: true - presign_ttl: - type: integer - description: Presign TTL in minutes - default: 1 - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: - type: integer - description: Project ID - container: - type: string - description: Azure blob container - prefix: - type: string - description: Azure blob prefix name - account_name: - type: string - description: Azure Blob account name - account_key: - type: string - description: Azure Blob account key - required: [] security: - - Token: [] - responses: - '200': - description: Validation successful - x-fern-sdk-group-name: - - import_storage - - azure - x-fern-sdk-method-name: validate + - Token: [] + summary: Sync import storage + tags: + - 'Storage: Azure' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - azure + x-fern-sdk-method-name: sync /api/storages/azure_spi/: get: + description: Get list of all Azure import storage connections set up with Service Principal authentication. operationId: api_storages_azure_spi_list - description: Get list of all Azure import storage connections set up with Service - Principal authentication. - summary: Get Azure SPI import storage parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - 'Storage: Azure SPI' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/AzureServicePrincipalImportStorage' + type: array description: '' + security: + - Token: [] + summary: Get Azure SPI import storage + tags: + - 'Storage: Azure SPI' post: - operationId: api_storages_azure_spi_create description: Create Azure import storage with Service Principal authentication. + operationId: api_storages_azure_spi_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureServicePrincipalImportStorage' + description: '' + security: + - Token: [] summary: Create Azure import storage with SPI tags: - - 'Storage: Azure SPI' + - 'Storage: Azure SPI' + /api/storages/azure_spi/validate: + post: + description: Validate a specific Azure import storage connection that was set up with Service Principal authentication. + operationId: api_storages_azure_spi_validate_create requestBody: content: application/json: @@ -10045,8 +9549,6 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' required: true - security: - - Token: [] responses: '201': content: @@ -10054,22 +9556,38 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalImportStorage' description: '' + security: + - Token: [] + summary: Validate Azure SPI import storage + tags: + - 'Storage: Azure SPI' /api/storages/azure_spi/{id}: + delete: + description: Delete a specific Azure import storage connection that was set up with Service Principal authentication. + operationId: api_storages_azure_spi_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete Azure SPI import storage + tags: + - 'Storage: Azure SPI' get: + description: Get a specific Azure import storage connection that was set up with Service Principal authentication. operationId: api_storages_azure_spi_retrieve - description: Get a specific Azure import storage connection that was set up - with Service Principal authentication. - summary: Get Azure SPI import storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -10077,19 +9595,20 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalImportStorage' description: '' + security: + - Token: [] + summary: Get Azure SPI import storage + tags: + - 'Storage: Azure SPI' patch: + description: Update a specific Azure import storage connection that was set up with Service Principal authentication. operationId: api_storages_azure_spi_partial_update - description: Update a specific Azure import storage connection that was set - up with Service Principal authentication. - summary: Update Azure SPI import storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -10101,8 +9620,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedAzureServicePrincipalImportStorageRequest' - security: - - Token: [] responses: '200': content: @@ -10110,38 +9627,21 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalImportStorage' description: '' - delete: - operationId: api_storages_azure_spi_destroy - description: Delete a specific Azure import storage connection that was set - up with Service Principal authentication. - summary: Delete Azure SPI import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Update Azure SPI import storage + tags: + - 'Storage: Azure SPI' /api/storages/azure_spi/{id}/sync: post: + description: Sync tasks from an Azure import storage connection that was set up with Service Principal authentication. operationId: api_storages_azure_spi_sync_create - description: Sync tasks from an Azure import storage connection that was set - up with Service Principal authentication. - summary: Sync Azure SPI import storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -10154,8 +9654,6 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' required: true - security: - - Token: [] responses: '200': content: @@ -10163,145 +9661,115 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalImportStorage' description: '' - /api/storages/azure_spi/validate: - post: - operationId: api_storages_azure_spi_validate_create - description: Validate a specific Azure import storage connection that was set - up with Service Principal authentication. - summary: Validate Azure SPI import storage - tags: - - 'Storage: Azure SPI' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/AzureServicePrincipalImportStorageRequest' - required: true security: - - Token: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureServicePrincipalImportStorage' - description: '' + - Token: [] + summary: Sync Azure SPI import storage + tags: + - 'Storage: Azure SPI' /api/storages/export: get: + description: Retrieve a list of the export storages of all types with their IDs. operationId: api_storages_export_list - description: Retrieve a list of the export storages of all types with their - IDs. - summary: List all export storages from the project parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Storage - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: - type: object additionalProperties: {} description: Unspecified response body + type: object + type: array description: '' + security: + - Token: [] + summary: List all export storages from the project + tags: + - Storage + x-fern-audiences: + - internal x-fern-sdk-group-name: - - export_storage + - export_storage x-fern-sdk-method-name: list - x-fern-audiences: - - internal /api/storages/export/azure: get: - operationId: api_storages_export_azure_list description: Get a list of all Azure export storage connections. - summary: Get all export storage + operationId: api_storages_export_azure_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: Azure' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/AzureBlobExportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all export storage + tags: + - 'Storage: Azure' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - azure + - export_storage + - azure x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_export_azure_create description: Create a new Azure export storage connection to store annotations. - summary: Create export storage - tags: - - 'Storage: Azure' + operationId: api_storages_export_azure_create requestBody: content: application/json: schema: - type: object properties: + account_key: + description: Azure Blob account key + type: string + account_name: + description: Azure Blob account name + type: string can_delete_objects: - type: boolean - description: Deletion from storage enabled default: false - title: + description: Deletion from storage enabled + type: boolean + container: + description: Azure blob container type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: - type: integer - description: Project ID - container: type: string - description: Azure blob container prefix: - type: string description: Azure blob prefix name - account_name: type: string - description: Azure Blob account name - account_key: + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 type: string - description: Azure Blob account key required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -10309,138 +9777,104 @@ paths: schema: $ref: '#/components/schemas/AzureBlobExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - azure - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/storages/export/azure/{id}: - get: - operationId: api_storages_export_azure_retrieve - description: Get a specific Azure export storage connection. - summary: Get export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureBlobExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - azure - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_storages_export_azure_partial_update - description: Update a specific Azure export storage connection. - summary: Update export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create export storage tags: - - 'Storage: Azure' + - 'Storage: Azure' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - azure + x-fern-sdk-method-name: create + /api/storages/export/azure/validate: + post: + description: Validate a specific Azure export storage connection. + operationId: api_storages_export_azure_validate_create requestBody: content: application/json: schema: - type: object properties: + account_key: + description: Azure Blob account key + type: string + account_name: + description: Azure Blob account name + type: string can_delete_objects: - type: boolean - description: Deletion from storage enabled default: false - title: + description: Deletion from storage enabled + type: boolean + container: + description: Azure blob container type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: - type: integer - description: Project ID - container: type: string - description: Azure blob container + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer prefix: - type: string description: Azure blob prefix name - account_name: type: string - description: Azure Blob account name - account_key: + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 type: string - description: Azure Blob account key required: [] - security: - - Token: [] + type: object responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureBlobExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - azure - x-fern-sdk-method-name: update + description: Validation successful + security: + - Token: [] + summary: Validate export storage + tags: + - 'Storage: Azure' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - azure + x-fern-sdk-method-name: validate + /api/storages/export/azure/{id}: delete: - operationId: api_storages_export_azure_destroy description: Delete a specific Azure export storage connection. - summary: Delete export storage + operationId: api_storages_export_azure_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete export storage + tags: + - 'Storage: Azure' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - azure + - export_storage + - azure x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/export/azure/{id}/sync: - post: - operationId: api_storages_export_azure_sync_create - description: Sync tasks from an Azure export storage connection. - summary: Sync export storage + get: + description: Get a specific Azure export storage connection. + operationId: api_storages_export_azure_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -10448,100 +9882,161 @@ paths: schema: $ref: '#/components/schemas/AzureBlobExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - azure - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/export/azure/validate: - post: - operationId: api_storages_export_azure_validate_create - description: Validate a specific Azure export storage connection. - summary: Validate export storage + security: + - Token: [] + summary: Get export storage tags: - - 'Storage: Azure' + - 'Storage: Azure' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - azure + x-fern-sdk-method-name: get + patch: + description: Update a specific Azure export storage connection. + operationId: api_storages_export_azure_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated + account_key: + description: Azure Blob account key + type: string + account_name: + description: Azure Blob account name + type: string can_delete_objects: - type: boolean - description: Deletion from storage enabled default: false - title: + description: Deletion from storage enabled + type: boolean + container: + description: Azure blob container type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: - type: integer - description: Project ID - container: type: string - description: Azure blob container prefix: - type: string description: Azure blob prefix name - account_name: type: string - description: Azure Blob account name - account_key: + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 type: string - description: Azure Blob account key required: [] - security: - - Token: [] + type: object responses: '200': - description: Validation successful - x-fern-sdk-group-name: - - export_storage - - azure - x-fern-sdk-method-name: validate + content: + application/json: + schema: + $ref: '#/components/schemas/AzureBlobExportStorage' + description: '' + security: + - Token: [] + summary: Update export storage + tags: + - 'Storage: Azure' x-fern-audiences: - - public - /api/storages/export/azure_spi: - get: - operationId: api_storages_export_azure_spi_list - description: Get a list of all Azure export storage connections that were set - up with Service Principal authentication. - summary: Get all Azure SPI export storage + - public + x-fern-sdk-group-name: + - export_storage + - azure + x-fern-sdk-method-name: update + /api/storages/export/azure/{id}/sync: + post: + description: Sync tasks from an Azure export storage connection. + operationId: api_storages_export_azure_sync_create parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - 'Storage: Azure SPI' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: array - items: + $ref: '#/components/schemas/AzureBlobExportStorage' + description: '' + security: + - Token: [] + summary: Sync export storage + tags: + - 'Storage: Azure' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - azure + x-fern-sdk-method-name: sync + /api/storages/export/azure_spi: + get: + description: Get a list of all Azure export storage connections that were set up with Service Principal authentication. + operationId: api_storages_export_azure_spi_list + parameters: + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: $ref: '#/components/schemas/AzureServicePrincipalExportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all Azure SPI export storage + tags: + - 'Storage: Azure SPI' post: + description: Create an Azure export storage connection with Service Principal authentication to store annotations. operationId: api_storages_export_azure_spi_create - description: Create an Azure export storage connection with Service Principal - authentication to store annotations. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureServicePrincipalExportStorage' + description: '' + security: + - Token: [] summary: Create Azure export storage with SPI authentication tags: - - 'Storage: Azure SPI' + - 'Storage: Azure SPI' + /api/storages/export/azure_spi/validate: + post: + description: Validate a specific Azure export storage connection that was set up with Service Principal authentication. + operationId: api_storages_export_azure_spi_validate_create requestBody: content: application/json: @@ -10554,8 +10049,6 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' required: true - security: - - Token: [] responses: '201': content: @@ -10563,22 +10056,38 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalExportStorage' description: '' + security: + - Token: [] + summary: Validate Azure SPI export storage + tags: + - 'Storage: Azure SPI' /api/storages/export/azure_spi/{id}: + delete: + description: Delete a specific Azure export storage connection that was set up with Service Principal authentication. + operationId: api_storages_export_azure_spi_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete Azure SPI export storage + tags: + - 'Storage: Azure SPI' get: + description: Get a specific Azure export storage connection that was set up with Service Principal authentication. operationId: api_storages_export_azure_spi_retrieve - description: Get a specific Azure export storage connection that was set up - with Service Principal authentication. - summary: Get Azure SPI export storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -10586,19 +10095,20 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalExportStorage' description: '' + security: + - Token: [] + summary: Get Azure SPI export storage + tags: + - 'Storage: Azure SPI' patch: + description: Update a specific Azure export storage connection that was set up with Service Principal authentication. operationId: api_storages_export_azure_spi_partial_update - description: Update a specific Azure export storage connection that was set - up with Service Principal authentication. - summary: Update Azure SPI export storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -10610,8 +10120,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedAzureServicePrincipalExportStorageRequest' - security: - - Token: [] responses: '200': content: @@ -10619,37 +10127,21 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalExportStorage' description: '' - delete: - operationId: api_storages_export_azure_spi_destroy - description: Delete a specific Azure export storage connection that was set - up with Service Principal authentication. - summary: Delete Azure SPI export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Update Azure SPI export storage + tags: + - 'Storage: Azure SPI' /api/storages/export/azure_spi/{id}/sync: post: - operationId: api_storages_export_azure_spi_sync_create description: Sync tasks from an Azure SPI export storage. - summary: Sync Azure SPI export storage + operationId: api_storages_export_azure_spi_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Azure SPI' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -10662,8 +10154,6 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' required: true - security: - - Token: [] responses: '200': content: @@ -10671,114 +10161,83 @@ paths: schema: $ref: '#/components/schemas/AzureServicePrincipalExportStorage' description: '' - /api/storages/export/azure_spi/validate: - post: - operationId: api_storages_export_azure_spi_validate_create - description: Validate a specific Azure export storage connection that was set - up with Service Principal authentication. - summary: Validate Azure SPI export storage - tags: - - 'Storage: Azure SPI' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/AzureServicePrincipalExportStorageRequest' - required: true security: - - Token: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureServicePrincipalExportStorage' - description: '' + - Token: [] + summary: Sync Azure SPI export storage + tags: + - 'Storage: Azure SPI' /api/storages/export/gcs: get: - operationId: api_storages_export_gcs_list description: Get a list of all GCS export storage connections. - summary: Get all export storage + operationId: api_storages_export_gcs_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: GCS' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/GCSExportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all export storage + tags: + - 'Storage: GCS' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - gcs + - export_storage + - gcs x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_export_gcs_create description: Create a new GCS export storage connection to store annotations. - summary: Create export storage - tags: - - 'Storage: GCS' + operationId: api_storages_export_gcs_create requestBody: content: application/json: schema: - type: object properties: + bucket: + description: GCS bucket name + type: string can_delete_objects: - type: boolean - description: Deletion from storage enabled. default: false - title: - type: string - description: Storage title - maxLength: 2048 + description: Deletion from storage enabled. + type: boolean description: - type: string description: Storage description - project: - type: integer - description: Project ID - bucket: - type: string - description: GCS bucket name - prefix: type: string - description: GCS bucket prefix google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. type: string - description: The content of GOOGLE_APPLICATION_CREDENTIALS json - file. Check official Google Cloud Authentication documentation - for more details. google_project_id: - type: string description: Google project ID + type: string + prefix: + description: GCS bucket prefix + type: string + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -10786,140 +10245,104 @@ paths: schema: $ref: '#/components/schemas/GCSExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - gcs - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/storages/export/gcs/{id}: - get: - operationId: api_storages_export_gcs_retrieve - description: Get a specific GCS export storage connection. - summary: Get export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GCSExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - gcs - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_storages_export_gcs_partial_update - description: Update a specific GCS export storage connection. - summary: Update export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create export storage tags: - - 'Storage: GCS' + - 'Storage: GCS' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - gcs + x-fern-sdk-method-name: create + /api/storages/export/gcs/validate: + post: + description: Validate a specific GCS export storage connection. + operationId: api_storages_export_gcs_validate_create requestBody: content: application/json: schema: - type: object properties: + bucket: + description: GCS bucket name + type: string can_delete_objects: - type: boolean - description: Deletion from storage enabled. default: false - title: - type: string - description: Storage title - maxLength: 2048 + description: Deletion from storage enabled. + type: boolean description: - type: string description: Storage description - project: - type: integer - description: Project ID - bucket: - type: string - description: GCS bucket name - prefix: type: string - description: GCS bucket prefix google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. type: string - description: The content of GOOGLE_APPLICATION_CREDENTIALS json - file. Check official Google Cloud Authentication documentation - for more details. google_project_id: - type: string description: Google project ID + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer + prefix: + description: GCS bucket prefix + type: string + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GCSExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - gcs - x-fern-sdk-method-name: update + description: Validation successful + security: + - Token: [] + summary: Validate export storage + tags: + - 'Storage: GCS' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - gcs + x-fern-sdk-method-name: validate + /api/storages/export/gcs/{id}: delete: - operationId: api_storages_export_gcs_destroy description: Delete a specific GCS export storage connection. - summary: Delete export storage + operationId: api_storages_export_gcs_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete export storage + tags: + - 'Storage: GCS' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - gcs + - export_storage + - gcs x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/export/gcs/{id}/sync: - post: - operationId: api_storages_export_gcs_sync_create - description: Sync tasks from an GCS export storage connection. - summary: Sync export storage + get: + description: Get a specific GCS export storage connection. + operationId: api_storages_export_gcs_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -10927,102 +10350,161 @@ paths: schema: $ref: '#/components/schemas/GCSExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - gcs - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/export/gcs/validate: - post: - operationId: api_storages_export_gcs_validate_create - description: Validate a specific GCS export storage connection. - summary: Validate export storage + security: + - Token: [] + summary: Get export storage tags: - - 'Storage: GCS' + - 'Storage: GCS' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - gcs + x-fern-sdk-method-name: get + patch: + description: Update a specific GCS export storage connection. + operationId: api_storages_export_gcs_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated + bucket: + description: GCS bucket name + type: string can_delete_objects: - type: boolean - description: Deletion from storage enabled. default: false - title: - type: string - description: Storage title - maxLength: 2048 + description: Deletion from storage enabled. + type: boolean description: - type: string description: Storage description - project: - type: integer - description: Project ID - bucket: - type: string - description: GCS bucket name - prefix: type: string - description: GCS bucket prefix google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. type: string - description: The content of GOOGLE_APPLICATION_CREDENTIALS json - file. Check official Google Cloud Authentication documentation - for more details. google_project_id: - type: string description: Google project ID + type: string + prefix: + description: GCS bucket prefix + type: string + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '200': - description: Validation successful + content: + application/json: + schema: + $ref: '#/components/schemas/GCSExportStorage' + description: '' + security: + - Token: [] + summary: Update export storage + tags: + - 'Storage: GCS' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - gcs - x-fern-sdk-method-name: validate + - export_storage + - gcs + x-fern-sdk-method-name: update + /api/storages/export/gcs/{id}/sync: + post: + description: Sync tasks from an GCS export storage connection. + operationId: api_storages_export_gcs_sync_create + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GCSExportStorage' + description: '' + security: + - Token: [] + summary: Sync export storage + tags: + - 'Storage: GCS' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - gcs + x-fern-sdk-method-name: sync /api/storages/export/gcswif: get: + description: Get a list of all GCS export storage connections that were set up with WIF authentication. operationId: api_storages_export_gcswif_list - description: Get a list of all GCS export storage connections that were set - up with WIF authentication. - summary: Get all GCS WIF export storage parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - 'Storage: GCS WIF' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/GCSWIFExportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all GCS WIF export storage + tags: + - 'Storage: GCS WIF' post: + description: Create an GCS export storage connection with WIF authentication to store annotations. operationId: api_storages_export_gcswif_create - description: Create an GCS export storage connection with WIF authentication - to store annotations. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GCSWIFExportStorageRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GCSWIFExportStorageRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GCSWIFExportStorageRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/GCSWIFExportStorage' + description: '' + security: + - Token: [] summary: Create GCS export storage with WIF authentication tags: - - 'Storage: GCS WIF' + - 'Storage: GCS WIF' + /api/storages/export/gcswif/validate: + post: + description: Validate a specific GCS export storage connection that was set up with WIF authentication. + operationId: api_storages_export_gcswif_validate_create requestBody: content: application/json: @@ -11035,8 +10517,6 @@ paths: schema: $ref: '#/components/schemas/GCSWIFExportStorageRequest' required: true - security: - - Token: [] responses: '201': content: @@ -11044,22 +10524,38 @@ paths: schema: $ref: '#/components/schemas/GCSWIFExportStorage' description: '' + security: + - Token: [] + summary: Validate GCS WIF export storage + tags: + - 'Storage: GCS WIF' /api/storages/export/gcswif/{id}: + delete: + description: Delete a specific GCS export storage connection that was set up with WIF authentication. + operationId: api_storages_export_gcswif_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete GCS WIF export storage + tags: + - 'Storage: GCS WIF' get: + description: Get a specific GCS export storage connection that was set up with WIF authentication. operationId: api_storages_export_gcswif_retrieve - description: Get a specific GCS export storage connection that was set up with - WIF authentication. - summary: Get GCS WIF export storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS WIF' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -11067,19 +10563,20 @@ paths: schema: $ref: '#/components/schemas/GCSWIFExportStorage' description: '' + security: + - Token: [] + summary: Get GCS WIF export storage + tags: + - 'Storage: GCS WIF' patch: + description: Update a specific GCS export storage connection that was set up with WIF authentication. operationId: api_storages_export_gcswif_partial_update - description: Update a specific GCS export storage connection that was set up - with WIF authentication. - summary: Update GCS WIF export storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS WIF' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -11091,8 +10588,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedGCSWIFExportStorageRequest' - security: - - Token: [] responses: '200': content: @@ -11100,37 +10595,21 @@ paths: schema: $ref: '#/components/schemas/GCSWIFExportStorage' description: '' - delete: - operationId: api_storages_export_gcswif_destroy - description: Delete a specific GCS export storage connection that was set up - with WIF authentication. - summary: Delete GCS WIF export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS WIF' security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Update GCS WIF export storage + tags: + - 'Storage: GCS WIF' /api/storages/export/gcswif/{id}/sync: post: - operationId: api_storages_export_gcswif_sync_create description: Sync tasks from an GCS WIF export storage. - summary: Sync GCS WIF export storage + operationId: api_storages_export_gcswif_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS WIF' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -11143,8 +10622,6 @@ paths: schema: $ref: '#/components/schemas/GCSWIFExportStorageRequest' required: true - security: - - Token: [] responses: '200': content: @@ -11152,109 +10629,77 @@ paths: schema: $ref: '#/components/schemas/GCSWIFExportStorage' description: '' - /api/storages/export/gcswif/validate: - post: - operationId: api_storages_export_gcswif_validate_create - description: Validate a specific GCS export storage connection that was set - up with WIF authentication. - summary: Validate GCS WIF export storage - tags: - - 'Storage: GCS WIF' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GCSWIFExportStorageRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/GCSWIFExportStorageRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/GCSWIFExportStorageRequest' - required: true security: - - Token: [] - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/GCSWIFExportStorage' - description: '' + - Token: [] + summary: Sync GCS WIF export storage + tags: + - 'Storage: GCS WIF' /api/storages/export/localfiles: get: - operationId: api_storages_export_localfiles_list description: Get a list of all local file export storage connections. - summary: Get all export storage + operationId: api_storages_export_localfiles_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: Local' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/LocalFilesExportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all export storage + tags: + - 'Storage: Local' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - local + - export_storage + - local x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_export_localfiles_create description: Create a new local file export storage connection to store annotations. - summary: Create export storage - tags: - - 'Storage: Local' + operationId: api_storages_export_localfiles_create requestBody: content: application/json: schema: - type: object properties: - title: - type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: - type: integer - description: Project ID - path: type: string + path: description: Path to local directory - regex_filter: type: string + project: + description: Project ID + type: integer + regex_filter: description: Regex for filtering objects + type: string + title: + description: Storage title + maxLength: 2048 + type: string use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -11262,135 +10707,98 @@ paths: schema: $ref: '#/components/schemas/LocalFilesExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - local - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/storages/export/localfiles/{id}: - get: - operationId: api_storages_export_localfiles_retrieve - description: Get a specific local file export storage connection. - summary: Get export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Local' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LocalFilesExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - local - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_storages_export_localfiles_partial_update - description: Update a specific local file export storage connection. - summary: Update export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create export storage tags: - - 'Storage: Local' + - 'Storage: Local' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - local + x-fern-sdk-method-name: create + /api/storages/export/localfiles/validate: + post: + description: Validate a specific local file export storage connection. + operationId: api_storages_export_localfiles_validate_create requestBody: content: application/json: schema: - type: object properties: - title: - type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated type: integer - description: Project ID path: - type: string description: Path to local directory - regex_filter: type: string + project: + description: Project ID + type: integer + regex_filter: description: Regex for filtering objects + type: string + title: + description: Storage title + maxLength: 2048 + type: string use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LocalFilesExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - local - x-fern-sdk-method-name: update + description: Validation successful + security: + - Token: [] + summary: Validate export storage + tags: + - 'Storage: Local' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - local + x-fern-sdk-method-name: validate + /api/storages/export/localfiles/{id}: delete: - operationId: api_storages_export_localfiles_destroy description: Delete a specific local file export storage connection. - summary: Delete export storage + operationId: api_storages_export_localfiles_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Local' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete export storage + tags: + - 'Storage: Local' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - local + - export_storage + - local x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/export/localfiles/{id}/sync: - post: - operationId: api_storages_export_localfiles_sync_create - description: Sync tasks from a local file export storage connection. - summary: Sync export storage + get: + description: Get a specific local file export storage connection. + operationId: api_storages_export_localfiles_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Local' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -11398,144 +10806,174 @@ paths: schema: $ref: '#/components/schemas/LocalFilesExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - local - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/export/localfiles/validate: - post: - operationId: api_storages_export_localfiles_validate_create - description: Validate a specific local file export storage connection. - summary: Validate export storage + security: + - Token: [] + summary: Get export storage tags: - - 'Storage: Local' + - 'Storage: Local' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - local + x-fern-sdk-method-name: get + patch: + description: Update a specific local file export storage connection. + operationId: api_storages_export_localfiles_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - title: - type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: - type: integer - description: Project ID - path: type: string + path: description: Path to local directory - regex_filter: type: string + project: + description: Project ID + type: integer + regex_filter: description: Regex for filtering objects + type: string + title: + description: Storage title + maxLength: 2048 + type: string use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': - description: Validation successful + content: + application/json: + schema: + $ref: '#/components/schemas/LocalFilesExportStorage' + description: '' + security: + - Token: [] + summary: Update export storage + tags: + - 'Storage: Local' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - local - x-fern-sdk-method-name: validate + - export_storage + - local + x-fern-sdk-method-name: update + /api/storages/export/localfiles/{id}/sync: + post: + description: Sync tasks from a local file export storage connection. + operationId: api_storages_export_localfiles_sync_create + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LocalFilesExportStorage' + description: '' + security: + - Token: [] + summary: Sync export storage + tags: + - 'Storage: Local' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - local + x-fern-sdk-method-name: sync /api/storages/export/redis: get: - operationId: api_storages_export_redis_list description: Get a list of all Redis export storage connections. - summary: Get all export storage + operationId: api_storages_export_redis_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: Redis' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/RedisExportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all export storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - redis + - export_storage + - redis x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_export_redis_create description: Create a new Redis export storage connection to store annotations. - summary: Create export storage - tags: - - 'Storage: Redis' + operationId: api_storages_export_redis_create requestBody: content: application/json: schema: - type: object properties: - db: - type: integer - description: Database ID of database to use can_delete_objects: - type: boolean - description: Deletion from storage enabled. default: false - title: - type: string - description: Storage title - maxLength: 2048 + description: Deletion from storage enabled. + type: boolean + db: + description: Database ID of database to use + type: integer description: - type: string description: Storage description - project: - type: integer - description: Project ID - path: type: string - description: Storage prefix (optional) host: - type: string description: Server Host IP (optional) - port: type: string - description: Server Port (optional) password: - type: string description: Server Password (optional) + type: string + path: + description: Storage prefix (optional) + type: string + port: + description: Server Port (optional) + type: string + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -11543,141 +10981,107 @@ paths: schema: $ref: '#/components/schemas/RedisExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - redis - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/storages/export/redis/{id}: - get: - operationId: api_storages_export_redis_retrieve - description: Get a specific Redis export storage connection. - summary: Get export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Redis' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RedisExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - redis - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_storages_export_redis_partial_update - description: Update a specific Redis export storage connection. - summary: Update export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create export storage tags: - - 'Storage: Redis' + - 'Storage: Redis' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - redis + x-fern-sdk-method-name: create + /api/storages/export/redis/validate: + post: + description: Validate a specific Redis export storage connection. + operationId: api_storages_export_redis_validate_create requestBody: content: application/json: schema: - type: object properties: - db: - type: integer - description: Database ID of database to use can_delete_objects: - type: boolean - description: Deletion from storage enabled. default: false - title: - type: string - description: Storage title - maxLength: 2048 + description: Deletion from storage enabled. + type: boolean + db: + description: Database ID of database to use + type: integer description: - type: string description: Storage description - project: + type: string + host: + description: Server Host IP (optional) + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated type: integer - description: Project ID - path: + password: + description: Server Password (optional) type: string + path: description: Storage prefix (optional) - host: type: string - description: Server Host IP (optional) port: - type: string description: Server Port (optional) - password: type: string - description: Server Password (optional) + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/RedisExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - redis - x-fern-sdk-method-name: update + description: Validation successful + security: + - Token: [] + summary: Validate export storage + tags: + - 'Storage: Redis' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - redis + x-fern-sdk-method-name: validate + /api/storages/export/redis/{id}: delete: - operationId: api_storages_export_redis_destroy description: Delete a specific Redis export storage connection. - summary: Delete export storage + operationId: api_storages_export_redis_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Redis' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete export storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - redis + - export_storage + - redis x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/export/redis/{id}/sync: - post: - operationId: api_storages_export_redis_sync_create - description: Sync tasks from a Redis export storage connection. - summary: Sync export storage + get: + description: Get a specific Redis export storage connection. + operationId: api_storages_export_redis_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Redis' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -11685,159 +11089,192 @@ paths: schema: $ref: '#/components/schemas/RedisExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - redis - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/export/redis/validate: - post: - operationId: api_storages_export_redis_validate_create - description: Validate a specific Redis export storage connection. - summary: Validate export storage + security: + - Token: [] + summary: Get export storage tags: - - 'Storage: Redis' + - 'Storage: Redis' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - redis + x-fern-sdk-method-name: get + patch: + description: Update a specific Redis export storage connection. + operationId: api_storages_export_redis_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - db: - type: integer - description: Database ID of database to use can_delete_objects: - type: boolean - description: Deletion from storage enabled. default: false - title: - type: string - description: Storage title - maxLength: 2048 + description: Deletion from storage enabled. + type: boolean + db: + description: Database ID of database to use + type: integer description: - type: string description: Storage description - project: - type: integer - description: Project ID - path: type: string - description: Storage prefix (optional) host: - type: string description: Server Host IP (optional) - port: type: string - description: Server Port (optional) password: - type: string description: Server Password (optional) + type: string + path: + description: Storage prefix (optional) + type: string + port: + description: Server Port (optional) + type: string + project: + description: Project ID + type: integer + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '200': - description: Validation successful + content: + application/json: + schema: + $ref: '#/components/schemas/RedisExportStorage' + description: '' + security: + - Token: [] + summary: Update export storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - redis - x-fern-sdk-method-name: validate + - export_storage + - redis + x-fern-sdk-method-name: update + /api/storages/export/redis/{id}/sync: + post: + description: Sync tasks from a Redis export storage connection. + operationId: api_storages_export_redis_sync_create + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RedisExportStorage' + description: '' + security: + - Token: [] + summary: Sync export storage + tags: + - 'Storage: Redis' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - redis + x-fern-sdk-method-name: sync /api/storages/export/s3: get: - operationId: api_storages_export_s3_list description: Get a list of all S3 export storage connections. - summary: Get all export storage + operationId: api_storages_export_s3_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: S3' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/S3ExportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all export storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - s3 + - export_storage + - s3 x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_export_s3_create description: Create a new S3 export storage connection to store annotations. - summary: Create export storage - tags: - - 'Storage: S3' + operationId: api_storages_export_s3_create requestBody: content: application/json: schema: - type: object properties: - can_delete_objects: - type: boolean - description: Deletion from storage enabled. - default: false - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: - type: integer - description: Project ID - bucket: - type: string - description: S3 bucket name - prefix: - type: string - description: S3 bucket prefix aws_access_key_id: - type: string description: AWS_ACCESS_KEY_ID - aws_secret_access_key: type: string + aws_secret_access_key: description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_session_token: description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_sse_kms_key_id: description: AWS SSE KMS Key ID - region_name: type: string + bucket: + description: S3 bucket name + type: string + can_delete_objects: + default: false + description: Deletion from storage enabled. + type: boolean + description: + description: Storage description + type: string + prefix: + description: S3 bucket prefix + type: string + project: + description: Project ID + type: integer + region_name: description: AWS Region - s3_endpoint: type: string + s3_endpoint: description: S3 Endpoint + type: string + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -11845,27 +11282,116 @@ paths: schema: $ref: '#/components/schemas/S3ExportStorage' description: '' + security: + - Token: [] + summary: Create export storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - s3 + - export_storage + - s3 x-fern-sdk-method-name: create + /api/storages/export/s3/validate: + post: + description: Validate a specific S3 export storage connection. + operationId: api_storages_export_s3_validate_create + requestBody: + content: + application/json: + schema: + properties: + aws_access_key_id: + description: AWS_ACCESS_KEY_ID + type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY + type: string + aws_session_token: + description: AWS_SESSION_TOKEN + type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID + type: string + bucket: + description: S3 bucket name + type: string + can_delete_objects: + default: false + description: Deletion from storage enabled. + type: boolean + description: + description: Storage description + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer + prefix: + description: S3 bucket prefix + type: string + project: + description: Project ID + type: integer + region_name: + description: AWS Region + type: string + s3_endpoint: + description: S3 Endpoint + type: string + title: + description: Storage title + maxLength: 2048 + type: string + required: [] + type: object + responses: + '200': + description: Validation successful + security: + - Token: [] + summary: Validate export storage + tags: + - 'Storage: S3' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - s3 + x-fern-sdk-method-name: validate /api/storages/export/s3/{id}: + delete: + description: Delete a specific S3 export storage connection. + operationId: api_storages_export_s3_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete export storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - s3 + x-fern-sdk-method-name: delete get: - operationId: api_storages_export_s3_retrieve description: Get a specific S3 export storage connection. - summary: Get export storage + operationId: api_storages_export_s3_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -11873,71 +11399,71 @@ paths: schema: $ref: '#/components/schemas/S3ExportStorage' description: '' + security: + - Token: [] + summary: Get export storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - s3 + - export_storage + - s3 x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: - operationId: api_storages_export_s3_partial_update description: Update a specific S3 export storage connection. - summary: Update export storage + operationId: api_storages_export_s3_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - can_delete_objects: - type: boolean - description: Deletion from storage enabled. - default: false - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: - type: integer - description: Project ID - bucket: - type: string - description: S3 bucket name - prefix: - type: string - description: S3 bucket prefix aws_access_key_id: - type: string description: AWS_ACCESS_KEY_ID - aws_secret_access_key: type: string + aws_secret_access_key: description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_session_token: description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_sse_kms_key_id: description: AWS SSE KMS Key ID - region_name: type: string + bucket: + description: S3 bucket name + type: string + can_delete_objects: + default: false + description: Deletion from storage enabled. + type: boolean + description: + description: Storage description + type: string + prefix: + description: S3 bucket prefix + type: string + project: + description: Project ID + type: integer + region_name: description: AWS Region - s3_endpoint: type: string + s3_endpoint: description: S3 Endpoint + type: string + title: + description: Storage title + maxLength: 2048 + type: string required: [] - security: - - Token: [] + type: object responses: '200': content: @@ -11945,50 +11471,27 @@ paths: schema: $ref: '#/components/schemas/S3ExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - s3 - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_storages_export_s3_destroy - description: Delete a specific S3 export storage connection. - summary: Delete export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3' security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - export_storage - - s3 - x-fern-sdk-method-name: delete + - Token: [] + summary: Update export storage + tags: + - 'Storage: S3' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - s3 + x-fern-sdk-method-name: update /api/storages/export/s3/{id}/sync: post: - operationId: api_storages_export_s3_sync_create description: Sync tasks from an S3 export storage connection. - summary: Sync export storage + operationId: api_storages_export_s3_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -11996,122 +11499,89 @@ paths: schema: $ref: '#/components/schemas/S3ExportStorage' description: '' + security: + - Token: [] + summary: Sync export storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - s3 + - export_storage + - s3 x-fern-sdk-method-name: sync + /api/storages/export/s3s: + get: + description: Get a list of all S3 export storage connections that were set up with IAM role access. + operationId: api_storages_export_s3s_list + parameters: + - description: Which field to use when ordering the results. + in: query + name: ordering + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + items: + $ref: '#/components/schemas/LseS3ExportStorage' + type: array + description: '' + security: + - Token: [] + summary: List S3s export storage + tags: + - 'Storage: S3 Roles' x-fern-audiences: - - public - /api/storages/export/s3/validate: + - public + x-fern-sdk-group-name: + - export_storage + - s3s + x-fern-sdk-method-name: list post: - operationId: api_storages_export_s3_validate_create - description: Validate a specific S3 export storage connection. - summary: Validate export storage - tags: - - 'Storage: S3' + description: Create an S3 export storage connection with IAM role access to store annotations. + operationId: api_storages_export_s3s_create requestBody: content: application/json: schema: - type: object - properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - can_delete_objects: - type: boolean - description: Deletion from storage enabled. - default: false - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: - type: integer - description: Project ID - bucket: - type: string - description: S3 bucket name - prefix: - type: string - description: S3 bucket prefix - aws_access_key_id: - type: string - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string - description: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: string - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: string - description: AWS SSE KMS Key ID - region_name: - type: string - description: AWS Region - s3_endpoint: - type: string - description: S3 Endpoint - required: [] - security: - - Token: [] - responses: - '200': - description: Validation successful - x-fern-sdk-group-name: - - export_storage - - s3 - x-fern-sdk-method-name: validate - x-fern-audiences: - - public - /api/storages/export/s3s: - get: - operationId: api_storages_export_s3s_list - description: Get a list of all S3 export storage connections that were set up - with IAM role access. - summary: List S3s export storage - parameters: - - in: query - name: ordering - schema: - type: string - description: Which field to use when ordering the results. - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: S3 Roles' - security: - - Token: [] + $ref: '#/components/schemas/LseS3ExportStorageRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LseS3ExportStorageRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LseS3ExportStorageRequest' + required: true responses: - '200': + '201': content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/LseS3ExportStorage' + $ref: '#/components/schemas/LseS3ExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - s3s - x-fern-sdk-method-name: list - x-fern-audiences: - - public - post: - operationId: api_storages_export_s3s_create - description: Create an S3 export storage connection with IAM role access to - store annotations. + security: + - Token: [] summary: Create export storage tags: - - 'Storage: S3 Roles' + - 'Storage: S3 Roles' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - s3s + x-fern-sdk-method-name: create + /api/storages/export/s3s/validate: + post: + description: Validate a specific S3 export storage connection that was set up with IAM role access. + operationId: api_storages_export_s3s_validate_create requestBody: content: application/json: @@ -12124,37 +11594,53 @@ paths: schema: $ref: '#/components/schemas/LseS3ExportStorageRequest' required: true - security: - - Token: [] responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/LseS3ExportStorage' - description: '' - x-fern-sdk-group-name: - - export_storage - - s3s - x-fern-sdk-method-name: create + '200': + description: Validation successful + security: + - Token: [] + summary: Validate export storage + tags: + - 'Storage: S3 Roles' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - s3s + x-fern-sdk-method-name: validate /api/storages/export/s3s/{id}: + delete: + description: Delete a specific S3 export storage connection that was set up with IAM role access. + operationId: api_storages_export_s3s_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete export storage + tags: + - 'Storage: S3 Roles' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - export_storage + - s3s + x-fern-sdk-method-name: delete get: + description: Get a specific S3 export storage connection that was set up with IAM role access. operationId: api_storages_export_s3s_retrieve - description: Get a specific S3 export storage connection that was set up with - IAM role access. - summary: Get export storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3 Roles' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -12162,25 +11648,26 @@ paths: schema: $ref: '#/components/schemas/LseS3ExportStorage' description: '' + security: + - Token: [] + summary: Get export storage + tags: + - 'Storage: S3 Roles' + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage - - s3s + - export_storage + - s3s x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: + description: Update a specific S3 export storage connection that was set up with IAM role access. operationId: api_storages_export_s3s_partial_update - description: Update a specific S3 export storage connection that was set up - with IAM role access. - summary: Update export storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3 Roles' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -12192,8 +11679,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedLseS3ExportStorageRequest' - security: - - Token: [] responses: '200': content: @@ -12201,51 +11686,27 @@ paths: schema: $ref: '#/components/schemas/LseS3ExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - s3s - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_storages_export_s3s_destroy - description: Delete a specific S3 export storage connection that was set up - with IAM role access. - summary: Delete export storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3 Roles' security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - export_storage - - s3s - x-fern-sdk-method-name: delete + - Token: [] + summary: Update export storage + tags: + - 'Storage: S3 Roles' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - s3s + x-fern-sdk-method-name: update /api/storages/export/s3s/{id}/sync: post: - operationId: api_storages_export_s3s_sync_create description: Sync tasks from an S3 export storage. - summary: Sync export storage + operationId: api_storages_export_s3s_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3 Roles' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -12253,165 +11714,128 @@ paths: schema: $ref: '#/components/schemas/LseS3ExportStorage' description: '' - x-fern-sdk-group-name: - - export_storage - - s3s - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/export/s3s/validate: - post: - operationId: api_storages_export_s3s_validate_create - description: Validate a specific S3 export storage connection that was set up - with IAM role access. - summary: Validate export storage - tags: - - 'Storage: S3 Roles' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LseS3ExportStorageRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/LseS3ExportStorageRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/LseS3ExportStorageRequest' - required: true security: - - Token: [] - responses: - '200': - description: Validation successful - x-fern-sdk-group-name: - - export_storage - - s3s - x-fern-sdk-method-name: validate + - Token: [] + summary: Sync export storage + tags: + - 'Storage: S3 Roles' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - export_storage + - s3s + x-fern-sdk-method-name: sync /api/storages/export/types: get: - operationId: api_storages_export_types_retrieve description: Retrieve a list of the export storages types. - summary: List all export storages types - tags: - - Storage - security: - - Token: [] + operationId: api_storages_export_types_retrieve responses: '200': content: application/json: schema: - type: array items: - type: object properties: name: type: string title: type: string + type: object + type: array description: List of export storage types + security: + - Token: [] + summary: List all export storages types + tags: + - Storage + x-fern-audiences: + - public x-fern-sdk-group-name: - - export_storage + - export_storage x-fern-sdk-method-name: list_types - x-fern-audiences: - - public /api/storages/gcs/: get: - operationId: api_storages_gcs_list description: Get a list of all GCS import storage connections. - summary: Get all import storage + operationId: api_storages_gcs_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: GCS' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/GCSImportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all import storage + tags: + - 'Storage: GCS' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - gcs + - import_storage + - gcs x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_gcs_create description: Create a new GCS import storage connection. - summary: Create import storage - tags: - - 'Storage: GCS' + operationId: api_storages_gcs_create requestBody: content: application/json: schema: - type: object properties: - regex_filter: + bucket: + description: GCS bucket name + type: string + description: + description: Storage description + type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + type: string + google_project_id: + description: Google project ID + type: string + prefix: + description: GCS bucket prefix type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false presign: - type: boolean - description: Presign URLs for direct download default: true + description: Presign URLs for direct download + type: boolean presign_ttl: - type: integer - description: Presign TTL in minutes default: 1 - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: + description: Presign TTL in minutes type: integer + project: description: Project ID - bucket: - type: string - description: GCS bucket name - prefix: - type: string - description: GCS bucket prefix - google_application_credentials: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. type: string - description: The content of GOOGLE_APPLICATION_CREDENTIALS json - file. Check official Google Cloud Authentication documentation - for more details. - google_project_id: + title: + description: Storage title + maxLength: 2048 type: string - description: Google project ID + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -12419,156 +11843,115 @@ paths: schema: $ref: '#/components/schemas/GCSImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - gcs - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/storages/gcs/{id}: - get: - operationId: api_storages_gcs_retrieve - description: Get a specific GCS import storage connection. - summary: Get import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GCSImportStorage' - description: '' - x-fern-sdk-group-name: - - import_storage - - gcs - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_storages_gcs_partial_update - description: Update a specific GCS import storage connection. - summary: Update import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create import storage tags: - - 'Storage: GCS' + - 'Storage: GCS' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - gcs + x-fern-sdk-method-name: create + /api/storages/gcs/validate: + post: + description: Validate a specific GCS import storage connection. + operationId: api_storages_gcs_validate_create requestBody: content: application/json: schema: - type: object properties: - regex_filter: + bucket: + description: GCS bucket name + type: string + description: + description: Storage description + type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + type: string + google_project_id: + description: Google project ID + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer + prefix: + description: GCS bucket prefix type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false presign: - type: boolean - description: Presign URLs for direct download default: true + description: Presign URLs for direct download + type: boolean presign_ttl: - type: integer - description: Presign TTL in minutes default: 1 - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: + description: Presign TTL in minutes type: integer + project: description: Project ID - bucket: - type: string - description: GCS bucket name - prefix: - type: string - description: GCS bucket prefix - google_application_credentials: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. type: string - description: The content of GOOGLE_APPLICATION_CREDENTIALS json - file. Check official Google Cloud Authentication documentation - for more details. - google_project_id: + title: + description: Storage title + maxLength: 2048 type: string - description: Google project ID + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GCSImportStorage' - description: '' - x-fern-sdk-group-name: - - import_storage - - gcs - x-fern-sdk-method-name: update + description: Validation successful + security: + - Token: [] + summary: Validate import storage + tags: + - 'Storage: GCS' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - gcs + x-fern-sdk-method-name: validate + /api/storages/gcs/{id}: delete: - operationId: api_storages_gcs_destroy description: Delete a specific GCS import storage connection. - summary: Delete import storage + operationId: api_storages_gcs_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Storage: GCS' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - gcs + - import_storage + - gcs x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/gcs/{id}/sync: - post: - operationId: api_storages_gcs_sync_create - description: Sync tasks from a GCS import storage connection. - summary: Sync import storage + get: + description: Get a specific GCS import storage connection. + operationId: api_storages_gcs_retrieve parameters: - - in: path - name: id - schema: - type: integer - description: Storage ID - required: true - tags: - - 'Storage: GCS' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -12576,116 +11959,145 @@ paths: schema: $ref: '#/components/schemas/GCSImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - gcs - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/gcs/validate: - post: - operationId: api_storages_gcs_validate_create - description: Validate a specific GCS import storage connection. - summary: Validate import storage + security: + - Token: [] + summary: Get import storage tags: - - 'Storage: GCS' + - 'Storage: GCS' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - gcs + x-fern-sdk-method-name: get + patch: + description: Update a specific GCS import storage connection. + operationId: api_storages_gcs_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - regex_filter: + bucket: + description: GCS bucket name + type: string + description: + description: Storage description + type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + type: string + google_project_id: + description: Google project ID + type: string + prefix: + description: GCS bucket prefix type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false presign: - type: boolean - description: Presign URLs for direct download default: true + description: Presign URLs for direct download + type: boolean presign_ttl: - type: integer - description: Presign TTL in minutes default: 1 - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: + description: Presign TTL in minutes type: integer + project: description: Project ID - bucket: - type: string - description: GCS bucket name - prefix: - type: string - description: GCS bucket prefix - google_application_credentials: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. type: string - description: The content of GOOGLE_APPLICATION_CREDENTIALS json - file. Check official Google Cloud Authentication documentation - for more details. - google_project_id: + title: + description: Storage title + maxLength: 2048 type: string - description: Google project ID + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': - description: Validation successful + content: + application/json: + schema: + $ref: '#/components/schemas/GCSImportStorage' + description: '' + security: + - Token: [] + summary: Update import storage + tags: + - 'Storage: GCS' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - gcs - x-fern-sdk-method-name: validate + - import_storage + - gcs + x-fern-sdk-method-name: update + /api/storages/gcs/{id}/sync: + post: + description: Sync tasks from a GCS import storage connection. + operationId: api_storages_gcs_sync_create + parameters: + - description: Storage ID + in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GCSImportStorage' + description: '' + security: + - Token: [] + summary: Sync import storage + tags: + - 'Storage: GCS' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - gcs + x-fern-sdk-method-name: sync /api/storages/gcswif/: get: + description: Get list of all GCS import storage connections set up with WIF authentication. operationId: api_storages_gcswif_list - description: Get list of all GCS import storage connections set up with WIF - authentication. - summary: Get GCS WIF import storage parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - 'Storage: GCS WIF' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/GCSWIFImportStorage' + type: array description: '' + security: + - Token: [] + summary: Get GCS WIF import storage + tags: + - 'Storage: GCS WIF' post: - operationId: api_storages_gcswif_create description: Create GCS import storage with WIF. - summary: Create GCS import storage with WIF - tags: - - 'Storage: GCS WIF' + operationId: api_storages_gcswif_create requestBody: content: application/json: @@ -12698,8 +12110,6 @@ paths: schema: $ref: '#/components/schemas/GCSWIFImportStorageRequest' required: true - security: - - Token: [] responses: '201': content: @@ -12707,108 +12117,98 @@ paths: schema: $ref: '#/components/schemas/GCSWIFImportStorage' description: '' - /api/storages/gcswif/{id}: - get: - operationId: api_storages_gcswif_retrieve - description: Get a specific GCS import storage connection that was set up with - WIF. - summary: Get GCS WIF import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS WIF' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GCSWIFImportStorage' - description: '' - patch: - operationId: api_storages_gcswif_partial_update - description: Update a specific GCS import storage connection that was set up - with WIF authentication. - summary: Update GCS WIF import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create GCS import storage with WIF tags: - - 'Storage: GCS WIF' + - 'Storage: GCS WIF' + /api/storages/gcswif/validate: + post: + description: Validate a specific GCS import storage connection that was set up with WIF authentication. + operationId: api_storages_gcswif_validate_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedGCSWIFImportStorageRequest' + $ref: '#/components/schemas/GCSWIFImportStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedGCSWIFImportStorageRequest' + $ref: '#/components/schemas/GCSWIFImportStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedGCSWIFImportStorageRequest' - security: - - Token: [] + $ref: '#/components/schemas/GCSWIFImportStorageRequest' + required: true responses: - '200': + '201': content: application/json: schema: $ref: '#/components/schemas/GCSWIFImportStorage' description: '' + security: + - Token: [] + summary: Validate GCS WIF import storage + tags: + - 'Storage: GCS WIF' + /api/storages/gcswif/{id}: delete: + description: Delete a specific GCS import storage connection that was set up with WIF authentication. operationId: api_storages_gcswif_destroy - description: Delete a specific GCS import storage connection that was set up - with WIF authentication. - summary: Delete GCS WIF import storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: GCS WIF' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body - /api/storages/gcswif/{id}/sync: - post: - operationId: api_storages_gcswif_sync_create - description: Sync tasks from an GCS import storage connection that was set up - with WIF authentication. - summary: Sync GCS WIF import storage + security: + - Token: [] + summary: Delete GCS WIF import storage + tags: + - 'Storage: GCS WIF' + get: + description: Get a specific GCS import storage connection that was set up with WIF. + operationId: api_storages_gcswif_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GCSWIFImportStorage' + description: '' + security: + - Token: [] + summary: Get GCS WIF import storage tags: - - 'Storage: GCS WIF' + - 'Storage: GCS WIF' + patch: + description: Update a specific GCS import storage connection that was set up with WIF authentication. + operationId: api_storages_gcswif_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/GCSWIFImportStorageRequest' + $ref: '#/components/schemas/PatchedGCSWIFImportStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/GCSWIFImportStorageRequest' + $ref: '#/components/schemas/PatchedGCSWIFImportStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/GCSWIFImportStorageRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedGCSWIFImportStorageRequest' responses: '200': content: @@ -12816,14 +12216,21 @@ paths: schema: $ref: '#/components/schemas/GCSWIFImportStorage' description: '' - /api/storages/gcswif/validate: - post: - operationId: api_storages_gcswif_validate_create - description: Validate a specific GCS import storage connection that was set - up with WIF authentication. - summary: Validate GCS WIF import storage + security: + - Token: [] + summary: Update GCS WIF import storage tags: - - 'Storage: GCS WIF' + - 'Storage: GCS WIF' + /api/storages/gcswif/{id}/sync: + post: + description: Sync tasks from an GCS import storage connection that was set up with WIF authentication. + operationId: api_storages_gcswif_sync_create + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -12836,89 +12243,84 @@ paths: schema: $ref: '#/components/schemas/GCSWIFImportStorageRequest' required: true - security: - - Token: [] responses: - '201': + '200': content: application/json: schema: $ref: '#/components/schemas/GCSWIFImportStorage' description: '' + security: + - Token: [] + summary: Sync GCS WIF import storage + tags: + - 'Storage: GCS WIF' /api/storages/localfiles/: get: - operationId: api_storages_localfiles_list description: Get a list of all local file import storage connections. - summary: Get all import storage + operationId: api_storages_localfiles_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: Local' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/LocalFilesImportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all import storage + tags: + - 'Storage: Local' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - local + - import_storage + - local x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_localfiles_create description: Create a new local file import storage connection. - summary: Create import storage - tags: - - 'Storage: Local' + operationId: api_storages_localfiles_create requestBody: content: application/json: schema: - type: object properties: - title: - type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: - type: integer - description: Project ID - path: type: string + path: description: Path to local directory - regex_filter: type: string + project: + description: Project ID + type: integer + regex_filter: description: Regex for filtering objects + type: string + title: + description: Storage title + maxLength: 2048 + type: string use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -12926,27 +12328,98 @@ paths: schema: $ref: '#/components/schemas/LocalFilesImportStorage' description: '' + security: + - Token: [] + summary: Create import storage + tags: + - 'Storage: Local' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - local + - import_storage + - local x-fern-sdk-method-name: create + /api/storages/localfiles/validate: + post: + description: Validate a specific local file import storage connection. + operationId: api_storages_localfiles_validate_create + requestBody: + content: + application/json: + schema: + properties: + description: + description: Storage description + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer + path: + description: Path to local directory + type: string + project: + description: Project ID + type: integer + regex_filter: + description: Regex for filtering objects + type: string + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean + required: [] + type: object + responses: + '200': + description: Validation successful + security: + - Token: [] + summary: Validate import storage + tags: + - 'Storage: Local' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - local + x-fern-sdk-method-name: validate /api/storages/localfiles/{id}: + delete: + description: Delete a specific local file import storage connection. + operationId: api_storages_localfiles_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Storage: Local' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - local + x-fern-sdk-method-name: delete get: - operationId: api_storages_localfiles_retrieve description: Get a specific local file import storage connection. - summary: Get import storage + operationId: api_storages_localfiles_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Local' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -12954,56 +12427,53 @@ paths: schema: $ref: '#/components/schemas/LocalFilesImportStorage' description: '' + security: + - Token: [] + summary: Get import storage + tags: + - 'Storage: Local' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - local + - import_storage + - local x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: - operationId: api_storages_localfiles_partial_update description: Update a specific local file import storage connection. - summary: Update import storage + operationId: api_storages_localfiles_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Local' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - title: - type: string - description: Storage title - maxLength: 2048 description: - type: string description: Storage description - project: - type: integer - description: Project ID - path: type: string + path: description: Path to local directory - regex_filter: type: string + project: + description: Project ID + type: integer + regex_filter: description: Regex for filtering objects + type: string + title: + description: Storage title + maxLength: 2048 + type: string use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': content: @@ -13011,51 +12481,28 @@ paths: schema: $ref: '#/components/schemas/LocalFilesImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - local - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_storages_localfiles_destroy - description: Delete a specific local file import storage connection. - summary: Delete import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Local' security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - import_storage - - local - x-fern-sdk-method-name: delete + - Token: [] + summary: Update import storage + tags: + - 'Storage: Local' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - local + x-fern-sdk-method-name: update /api/storages/localfiles/{id}/sync: post: - operationId: api_storages_localfiles_sync_create description: Sync tasks from a local file import storage connection. - summary: Sync import storage + operationId: api_storages_localfiles_sync_create parameters: - - in: path - name: id - schema: - type: integer - description: Storage ID - required: true - tags: - - 'Storage: Local' - security: - - Token: [] + - description: Storage ID + in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -13063,148 +12510,92 @@ paths: schema: $ref: '#/components/schemas/LocalFilesImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - local - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/localfiles/validate: - post: - operationId: api_storages_localfiles_validate_create - description: Validate a specific local file import storage connection. - summary: Validate import storage - tags: - - 'Storage: Local' - requestBody: - content: - application/json: - schema: - type: object - properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: - type: integer - description: Project ID - path: - type: string - description: Path to local directory - regex_filter: - type: string - description: Regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your directory contains images, you can use this option to - generate URLs for these images. If set to False, it will read - the content of the file and load it into Label Studio. - default: false - required: [] security: - - Token: [] - responses: - '200': - description: Validation successful - x-fern-sdk-group-name: - - import_storage - - local - x-fern-sdk-method-name: validate + - Token: [] + summary: Sync import storage + tags: + - 'Storage: Local' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - local + x-fern-sdk-method-name: sync /api/storages/redis/: get: - operationId: api_storages_redis_list description: Get a list of all Redis import storage connections. - summary: Get all import storage + operationId: api_storages_redis_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: Redis' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/RedisImportStorage' + type: array description: '' + security: + - Token: [] + summary: Get all import storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - redis + - import_storage + - redis x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_redis_create description: Create a new Redis import storage connection. - summary: Create import storage - tags: - - 'Storage: Redis' + operationId: api_storages_redis_create requestBody: content: application/json: schema: - type: object properties: - regex_filter: + description: + description: Storage description type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - title: + host: + description: Server Host IP (optional) type: string - description: Storage title - maxLength: 2048 - description: + password: + description: Server Password (optional) type: string - description: Storage description - project: - type: integer - description: Project ID path: - type: string description: Storage prefix (optional) - host: type: string - description: Server Host IP (optional) port: - type: string description: Server Port (optional) - password: type: string - description: Server Password (optional) + project: + description: Project ID + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + type: string + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -13212,27 +12603,107 @@ paths: schema: $ref: '#/components/schemas/RedisImportStorage' description: '' + security: + - Token: [] + summary: Create import storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - redis + - import_storage + - redis x-fern-sdk-method-name: create + /api/storages/redis/validate: + post: + description: Validate a specific Redis import storage connection. + operationId: api_storages_redis_validate_create + requestBody: + content: + application/json: + schema: + properties: + description: + description: Storage description + type: string + host: + description: Server Host IP (optional) + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer + password: + description: Server Password (optional) + type: string + path: + description: Storage prefix (optional) + type: string + port: + description: Server Port (optional) + type: string + project: + description: Project ID + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + type: string + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean + required: [] + type: object + responses: + '200': + description: Validation successful + security: + - Token: [] + summary: Validate import storage + tags: + - 'Storage: Redis' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - redis + x-fern-sdk-method-name: validate /api/storages/redis/{id}: + delete: + description: Delete a specific Redis import storage connection. + operationId: api_storages_redis_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - redis + x-fern-sdk-method-name: delete get: - operationId: api_storages_redis_retrieve description: Get a specific Redis import storage connection. - summary: Get import storage + operationId: api_storages_redis_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Redis' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -13240,66 +12711,62 @@ paths: schema: $ref: '#/components/schemas/RedisImportStorage' description: '' + security: + - Token: [] + summary: Get import storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - redis + - import_storage + - redis x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: - operationId: api_storages_redis_partial_update description: Update a specific Redis import storage connection. - summary: Update import storage + operationId: api_storages_redis_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Redis' + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - regex_filter: + description: + description: Storage description type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - title: + host: + description: Server Host IP (optional) type: string - description: Storage title - maxLength: 2048 - description: + password: + description: Server Password (optional) type: string - description: Storage description - project: - type: integer - description: Project ID path: - type: string description: Storage prefix (optional) - host: type: string - description: Server Host IP (optional) port: - type: string description: Server Port (optional) - password: type: string - description: Server Password (optional) + project: + description: Project ID + type: integer + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + type: string + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': content: @@ -13307,51 +12774,28 @@ paths: schema: $ref: '#/components/schemas/RedisImportStorage' description: '' + security: + - Token: [] + summary: Update import storage + tags: + - 'Storage: Redis' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - redis + - import_storage + - redis x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_storages_redis_destroy - description: Delete a specific Redis import storage connection. - summary: Delete import storage + /api/storages/redis/{id}/sync: + post: + description: Sync tasks from a Redis import storage connection. + operationId: api_storages_redis_sync_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: Redis' - security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: - - import_storage - - redis - x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/redis/{id}/sync: - post: - operationId: api_storages_redis_sync_create - description: Sync tasks from a Redis import storage connection. - summary: Sync import storage - parameters: - - in: path - name: id - schema: - type: integer - description: Storage ID - required: true - tags: - - 'Storage: Redis' - security: - - Token: [] + - description: Storage ID + in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -13359,181 +12803,115 @@ paths: schema: $ref: '#/components/schemas/RedisImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - redis - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/redis/validate: - post: - operationId: api_storages_redis_validate_create - description: Validate a specific Redis import storage connection. - summary: Validate import storage - tags: - - 'Storage: Redis' - requestBody: - content: - application/json: - schema: - type: object - properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - regex_filter: - type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - title: - type: string - description: Storage title - maxLength: 2048 - description: - type: string - description: Storage description - project: - type: integer - description: Project ID - path: - type: string - description: Storage prefix (optional) - host: - type: string - description: Server Host IP (optional) - port: - type: string - description: Server Port (optional) - password: - type: string - description: Server Password (optional) - required: [] security: - - Token: [] - responses: - '200': - description: Validation successful - x-fern-sdk-group-name: - - import_storage - - redis - x-fern-sdk-method-name: validate + - Token: [] + summary: Sync import storage + tags: + - 'Storage: Redis' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - redis + x-fern-sdk-method-name: sync /api/storages/s3/: get: - operationId: api_storages_s3_list description: Get a list of all S3 import storage connections. - summary: List S3 import storage + operationId: api_storages_s3_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: S3' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/S3ImportStorage' + type: array description: '' + security: + - Token: [] + summary: List S3 import storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - s3 + - import_storage + - s3 x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_s3_create description: Create new S3 import storage - summary: Create new S3 storage - tags: - - 'Storage: S3' + operationId: api_storages_s3_create requestBody: content: application/json: schema: - type: object properties: - regex_filter: + aws_access_key_id: + description: AWS_ACCESS_KEY_ID type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: boolean - description: Presign URLs for download - default: true - presign_ttl: - type: integer - description: Presign TTL in minutes - default: 1 - recursive_scan: - type: boolean - description: Scan recursively - title: + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY type: string - description: Storage title - maxLength: 2048 - description: + aws_session_token: + description: AWS_SESSION_TOKEN type: string - description: Storage description - project: - type: integer - description: Project ID - bucket: + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID type: string + bucket: description: S3 bucket name - prefix: type: string - description: S3 bucket prefix - aws_access_key_id: - type: string - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: + description: + description: Storage description type: string - description: AWS_SECRET_ACCESS_KEY - aws_session_token: + prefix: + description: S3 bucket prefix type: string - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: + presign: + default: true + description: Presign URLs for download + type: boolean + presign_ttl: + default: 1 + description: Presign TTL in minutes + type: integer + project: + description: Project ID + type: integer + recursive_scan: + description: Scan recursively + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. type: string - description: AWS SSE KMS Key ID region_name: - type: string description: AWS Region - s3_endpoint: type: string + s3_endpoint: description: S3 Endpoint + type: string + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '201': content: @@ -13541,169 +12919,130 @@ paths: schema: $ref: '#/components/schemas/S3ImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - s3 - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/storages/s3/{id}: - get: - operationId: api_storages_s3_retrieve - description: Get a specific S3 import storage connection. - summary: Get import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/S3ImportStorage' - description: '' - x-fern-sdk-group-name: - - import_storage - - s3 - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_storages_s3_partial_update - description: Update a specific S3 import storage connection. - summary: Update import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create new S3 storage tags: - - 'Storage: S3' + - 'Storage: S3' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - s3 + x-fern-sdk-method-name: create + /api/storages/s3/validate: + post: + description: Validate a specific S3 import storage connection. + operationId: api_storages_s3_validate_create requestBody: content: application/json: schema: - type: object properties: - regex_filter: + aws_access_key_id: + description: AWS_ACCESS_KEY_ID + type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY + type: string + aws_session_token: + description: AWS_SESSION_TOKEN + type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID + type: string + bucket: + description: S3 bucket name + type: string + description: + description: Storage description + type: string + id: + description: Storage ID. If set, storage with specified ID will be updated + type: integer + prefix: + description: S3 bucket prefix type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false presign: - type: boolean - description: Presign URLs for download default: true + description: Presign URLs for download + type: boolean presign_ttl: - type: integer - description: Presign TTL in minutes default: 1 + description: Presign TTL in minutes + type: integer + project: + description: Project ID + type: integer recursive_scan: - type: boolean description: Scan recursively - title: + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + type: string + region_name: + description: AWS Region type: string + s3_endpoint: + description: S3 Endpoint + type: string + title: description: Storage title maxLength: 2048 - description: type: string - description: Storage description - project: - type: integer - description: Project ID - bucket: - type: string - description: S3 bucket name - prefix: - type: string - description: S3 bucket prefix - aws_access_key_id: - type: string - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string - description: AWS_SECRET_ACCESS_KEY - aws_session_token: - type: string - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: - type: string - description: AWS SSE KMS Key ID - region_name: - type: string - description: AWS Region - s3_endpoint: - type: string - description: S3 Endpoint + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/S3ImportStorage' - description: '' - x-fern-sdk-group-name: - - import_storage - - s3 - x-fern-sdk-method-name: update + description: Validation successful + security: + - Token: [] + summary: Validate import storage + tags: + - 'Storage: S3' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - s3 + x-fern-sdk-method-name: validate + /api/storages/s3/{id}: delete: - operationId: api_storages_s3_destroy description: Delete a specific S3 import storage connection. - summary: Delete import storage + operationId: api_storages_s3_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - s3 + - import_storage + - s3 x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/s3/{id}/sync: - post: - operationId: api_storages_s3_sync_create - description: Sync tasks from an S3 import storage connection. - summary: Sync import storage + get: + description: Get a specific S3 import storage connection. + operationId: api_storages_s3_retrieve parameters: - - in: path - name: id - schema: - type: integer - description: Storage ID - required: true - tags: - - 'Storage: S3' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -13711,139 +13050,170 @@ paths: schema: $ref: '#/components/schemas/S3ImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - s3 - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/s3/validate: - post: - operationId: api_storages_s3_validate_create - description: Validate a specific S3 import storage connection. - summary: Validate import storage + security: + - Token: [] + summary: Get import storage tags: - - 'Storage: S3' + - 'Storage: S3' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - s3 + x-fern-sdk-method-name: get + patch: + description: Update a specific S3 import storage connection. + operationId: api_storages_s3_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: Storage ID. If set, storage with specified ID will - be updated - regex_filter: + aws_access_key_id: + description: AWS_ACCESS_KEY_ID type: string - description: Cloud storage regex for filtering objects. You must - specify it otherwise no objects will be imported. - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs. For example, - if your bucket contains images, you can use this option to generate - URLs for these images. If set to False, it will read the content - of the file and load it into Label Studio. - default: false - presign: - type: boolean - description: Presign URLs for download - default: true - presign_ttl: - type: integer - description: Presign TTL in minutes - default: 1 - recursive_scan: - type: boolean - description: Scan recursively - title: + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY type: string - description: Storage title - maxLength: 2048 - description: + aws_session_token: + description: AWS_SESSION_TOKEN type: string - description: Storage description - project: - type: integer - description: Project ID - bucket: + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID type: string + bucket: description: S3 bucket name - prefix: - type: string - description: S3 bucket prefix - aws_access_key_id: type: string - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: + description: + description: Storage description type: string - description: AWS_SECRET_ACCESS_KEY - aws_session_token: + prefix: + description: S3 bucket prefix type: string - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: + presign: + default: true + description: Presign URLs for download + type: boolean + presign_ttl: + default: 1 + description: Presign TTL in minutes + type: integer + project: + description: Project ID + type: integer + recursive_scan: + description: Scan recursively + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. type: string - description: AWS SSE KMS Key ID region_name: - type: string description: AWS Region - s3_endpoint: type: string + s3_endpoint: description: S3 Endpoint + type: string + title: + description: Storage title + maxLength: 2048 + type: string + use_blob_urls: + default: false + description: Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + type: boolean required: [] - security: - - Token: [] + type: object responses: '200': - description: Validation successful + content: + application/json: + schema: + $ref: '#/components/schemas/S3ImportStorage' + description: '' + security: + - Token: [] + summary: Update import storage + tags: + - 'Storage: S3' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - s3 - x-fern-sdk-method-name: validate + - import_storage + - s3 + x-fern-sdk-method-name: update + /api/storages/s3/{id}/sync: + post: + description: Sync tasks from an S3 import storage connection. + operationId: api_storages_s3_sync_create + parameters: + - description: Storage ID + in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/S3ImportStorage' + description: '' + security: + - Token: [] + summary: Sync import storage + tags: + - 'Storage: S3' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - s3 + x-fern-sdk-method-name: sync /api/storages/s3s/: get: + description: Get list of all S3 import storage connections set up with IAM role access. operationId: api_storages_s3s_list - description: Get list of all S3 import storage connections set up with IAM role - access. - summary: List S3s import storage parameters: - - in: query - name: ordering - schema: - type: string - description: Which field to use when ordering the results. - - in: query - name: project - schema: - type: integer - description: Project ID - tags: - - 'Storage: S3 Roles' - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + schema: + type: string + - description: Project ID + in: query + name: project + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/LseS3ImportStorage' + type: array description: '' + security: + - Token: [] + summary: List S3s import storage + tags: + - 'Storage: S3 Roles' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - s3s + - import_storage + - s3s x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_storages_s3s_create description: Create S3 import storage with IAM role access. - summary: Create import storage - tags: - - 'Storage: S3 Roles' + operationId: api_storages_s3s_create requestBody: content: application/json: @@ -13856,8 +13226,6 @@ paths: schema: $ref: '#/components/schemas/LseS3ImportStorageRequest' required: true - security: - - Token: [] responses: '201': content: @@ -13865,120 +13233,80 @@ paths: schema: $ref: '#/components/schemas/LseS3ImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - s3s - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/storages/s3s/{id}: - get: - operationId: api_storages_s3s_retrieve - description: Get a specific S3 import storage connection that was set up with - IAM role access. - summary: Get import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3 Roles' security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LseS3ImportStorage' - description: '' - x-fern-sdk-group-name: - - import_storage - - s3s - x-fern-sdk-method-name: get - x-fern-audiences: - - public - patch: - operationId: api_storages_s3s_partial_update - description: Update a specific S3 import storage connection that was set up - with IAM role access. - summary: Update import storage - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create import storage tags: - - 'Storage: S3 Roles' + - 'Storage: S3 Roles' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - s3s + x-fern-sdk-method-name: create + /api/storages/s3s/validate: + post: + description: Validate a specific S3 import storage connection that was set up with IAM role access. + operationId: api_storages_s3s_validate_create requestBody: content: application/json: schema: - $ref: '#/components/schemas/PatchedLseS3ImportStorageRequest' + $ref: '#/components/schemas/LseS3ImportStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/PatchedLseS3ImportStorageRequest' + $ref: '#/components/schemas/LseS3ImportStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/PatchedLseS3ImportStorageRequest' - security: - - Token: [] + $ref: '#/components/schemas/LseS3ImportStorageRequest' + required: true responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LseS3ImportStorage' - description: '' - x-fern-sdk-group-name: - - import_storage - - s3s - x-fern-sdk-method-name: update + description: Validation successful + security: + - Token: [] + summary: Validate import storage + tags: + - 'Storage: S3 Roles' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - s3s + x-fern-sdk-method-name: validate + /api/storages/s3s/{id}: delete: + description: Delete a specific S3 import storage connection that was set up with IAM role access. operationId: api_storages_s3s_destroy - description: Delete a specific S3 import storage connection that was set up - with IAM role access. - summary: Delete import storage parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3 Roles' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body + security: + - Token: [] + summary: Delete import storage + tags: + - 'Storage: S3 Roles' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - s3s + - import_storage + - s3s x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/storages/s3s/{id}/sync: - post: - operationId: api_storages_s3s_sync_create - description: Sync tasks from an S3 import storage connection that was set up - with IAM role access. - summary: Sync import storage + get: + description: Get a specific S3 import storage connection that was set up with IAM role access. + operationId: api_storages_s3s_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - 'Storage: S3 Roles' - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -13986,154 +13314,188 @@ paths: schema: $ref: '#/components/schemas/LseS3ImportStorage' description: '' - x-fern-sdk-group-name: - - import_storage - - s3s - x-fern-sdk-method-name: sync - x-fern-audiences: - - public - /api/storages/s3s/validate: - post: - operationId: api_storages_s3s_validate_create - description: Validate a specific S3 import storage connection that was set up - with IAM role access. - summary: Validate import storage + security: + - Token: [] + summary: Get import storage tags: - - 'Storage: S3 Roles' + - 'Storage: S3 Roles' + x-fern-audiences: + - public + x-fern-sdk-group-name: + - import_storage + - s3s + x-fern-sdk-method-name: get + patch: + description: Update a specific S3 import storage connection that was set up with IAM role access. + operationId: api_storages_s3s_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/LseS3ImportStorageRequest' + $ref: '#/components/schemas/PatchedLseS3ImportStorageRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/LseS3ImportStorageRequest' + $ref: '#/components/schemas/PatchedLseS3ImportStorageRequest' multipart/form-data: schema: - $ref: '#/components/schemas/LseS3ImportStorageRequest' - required: true - security: - - Token: [] + $ref: '#/components/schemas/PatchedLseS3ImportStorageRequest' responses: '200': - description: Validation successful + content: + application/json: + schema: + $ref: '#/components/schemas/LseS3ImportStorage' + description: '' + security: + - Token: [] + summary: Update import storage + tags: + - 'Storage: S3 Roles' + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage - - s3s - x-fern-sdk-method-name: validate + - import_storage + - s3s + x-fern-sdk-method-name: update + /api/storages/s3s/{id}/sync: + post: + description: Sync tasks from an S3 import storage connection that was set up with IAM role access. + operationId: api_storages_s3s_sync_create + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LseS3ImportStorage' + description: '' + security: + - Token: [] + summary: Sync import storage + tags: + - 'Storage: S3 Roles' x-fern-audiences: - - public + - public + x-fern-sdk-group-name: + - import_storage + - s3s + x-fern-sdk-method-name: sync /api/storages/types: get: - operationId: api_storages_types_retrieve description: Retrieve a list of the import storages types. - summary: List all import storages types - tags: - - Storage - security: - - Token: [] + operationId: api_storages_types_retrieve responses: '200': content: application/json: schema: - type: array items: - type: object properties: name: type: string title: type: string + type: object + type: array description: List of import storage types + security: + - Token: [] + summary: List all import storages types + tags: + - Storage + x-fern-audiences: + - public x-fern-sdk-group-name: - - import_storage + - import_storage x-fern-sdk-method-name: list_types - x-fern-audiences: - - public /api/tasks/: get: - operationId: api_tasks_list description: |- Retrieve a paginated list of tasks. The response format varies based on the user's role in the organization: - **Admin/Owner**: Full task details with all annotations, reviews, and metadata - **Reviewer**: Task details optimized for review workflow - **Annotator**: Task details filtered to show only user's own annotations and assignments - summary: List tasks + operationId: api_tasks_list parameters: - - in: query - name: fields - schema: - type: string - enum: - - all - - task_only - description: Set to "all" if you want to include annotations and predictions - in the response. Defaults to task_only - - in: query - name: include - schema: - type: string - description: Specify which fields to include in the response - - in: query - name: only_annotated - schema: - type: boolean - description: Filter to show only tasks that have annotations - - name: page - required: false - in: query - description: A page number within the paginated result set. - schema: - type: integer - - name: page_size - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: project - schema: - type: integer - description: Project ID - - in: query - name: query - schema: - type: string - description: |- - Additional query to filter tasks. It must be JSON encoded string of dict containing one of the following parameters: {"filters": ..., "selectedItems": ..., "ordering": ...}. Check Data Manager > Create View > see data field for more details about filters, selectedItems and ordering. + - description: Set to "all" if you want to include annotations and predictions in the response. Defaults to task_only + in: query + name: fields + schema: + enum: + - all + - task_only + type: string + - description: Specify which fields to include in the response + in: query + name: include + schema: + type: string + - description: Filter to show only tasks that have annotations + in: query + name: only_annotated + schema: + type: boolean + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer + - description: Project ID + in: query + name: project + schema: + type: integer + - description: |- + Additional query to filter tasks. It must be JSON encoded string of dict containing one of the following parameters: {"filters": ..., "selectedItems": ..., "ordering": ...}. Check Data Manager > Create View > see data field for more details about filters, selectedItems and ordering. - filters: dict with "conjunction" string ("or" or "and") and list of filters in "items" array. Each filter is a dictionary with keys: "filter", "operator", "type", "value". Read more about available filters - Example: {"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]} - selectedItems: dictionary with keys: "all", "included", "excluded". If "all" is false, "included" must be used. If "all" is true, "excluded" must be used. - Examples: {"all": false, "included": [1, 2, 3]} or {"all": true, "excluded": [4, 5]} - ordering: list of fields to order by. Currently, ordering is supported by only one parameter. - Example: ["completed_at"] - - in: query - name: resolve_uri - schema: - type: boolean - description: Resolve task data URIs using Cloud Storage - - in: query - name: review - schema: - type: boolean - description: Get tasks for review - - in: query - name: selectedItems - schema: - type: string - description: JSON string of selected task IDs for review workflow - - in: query - name: view - schema: - type: integer - description: View ID - tags: - - Tasks - security: - - Token: [] + filters: dict with "conjunction" string ("or" or "and") and list of filters in "items" array. Each filter is a dictionary with keys: "filter", "operator", "type", "value". Read more about available filters + Example: {"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]} + selectedItems: dictionary with keys: "all", "included", "excluded". If "all" is false, "included" must be used. If "all" is true, "excluded" must be used. + Examples: {"all": false, "included": [1, 2, 3]} or {"all": true, "excluded": [4, 5]} + ordering: list of fields to order by. Currently, ordering is supported by only one parameter. + Example: ["completed_at"] + in: query + name: query + schema: + type: string + - description: Resolve task data URIs using Cloud Storage + in: query + name: resolve_uri + schema: + type: boolean + - description: Get tasks for review + in: query + name: review + schema: + type: boolean + - description: JSON string of selected task IDs for review workflow + in: query + name: selectedItems + schema: + type: string + - description: View ID + in: query + name: view + schema: + type: integer responses: '200': content: @@ -14147,19 +13509,21 @@ paths: description: Unauthorized - authentication required '403': description: Forbidden - insufficient permissions - x-fern-sdk-group-name: tasks - x-fern-sdk-method-name: list + security: + - Token: [] + summary: List tasks + tags: + - Tasks x-fern-audiences: - - public + - public x-fern-pagination: offset: $request.page results: $response.tasks + x-fern-sdk-group-name: tasks + x-fern-sdk-method-name: list post: - operationId: api_tasks_create description: Create a new task - summary: Create a new task - tags: - - Tasks + operationId: api_tasks_create requestBody: content: application/json: @@ -14172,8 +13536,6 @@ paths: schema: $ref: '#/components/schemas/LseTaskRequest' required: true - security: - - Token: [] responses: '201': content: @@ -14181,27 +13543,48 @@ paths: schema: $ref: '#/components/schemas/LseTask' description: '' + security: + - Token: [] + summary: Create a new task + tags: + - Tasks + x-fern-audiences: + - public x-fern-sdk-group-name: tasks x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/tasks/{id}/: + delete: + description: Delete a task in Label Studio. This action cannot be undone! + operationId: api_tasks_destroy + parameters: + - description: Task ID + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: Task deleted successfully + security: + - Token: [] + summary: Delete task + tags: + - Tasks + x-fern-audiences: + - public + x-fern-sdk-group-name: tasks + x-fern-sdk-method-name: delete get: + description: Get task data, metadata, annotations and other attributes for a specific labeling task by task ID. operationId: api_tasks_retrieve - description: Get task data, metadata, annotations and other attributes for a - specific labeling task by task ID. - summary: Get task parameters: - - in: path - name: id - schema: - type: string - description: Task ID - required: true - tags: - - Tasks - security: - - Token: [] + - description: Task ID + in: path + name: id + required: true + schema: + type: string responses: '200': content: @@ -14209,23 +13592,25 @@ paths: schema: $ref: '#/components/schemas/RoleBasedTask' description: '' + security: + - Token: [] + summary: Get task + tags: + - Tasks + x-fern-audiences: + - public x-fern-sdk-group-name: tasks x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: - operationId: api_tasks_partial_update description: Update the attributes of an existing labeling task. - summary: Update task + operationId: api_tasks_partial_update parameters: - - in: path - name: id - schema: - type: string - description: Task ID - required: true - tags: - - Tasks + - description: Task ID + in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: @@ -14237,8 +13622,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedLseTaskRequest' - security: - - Token: [] responses: '200': content: @@ -14246,263 +13629,233 @@ paths: schema: $ref: '#/components/schemas/RoleBasedTask' description: '' - x-fern-sdk-group-name: tasks - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_tasks_destroy - description: Delete a task in Label Studio. This action cannot be undone! - summary: Delete task - parameters: - - in: path - name: id - schema: - type: string - description: Task ID - required: true - tags: - - Tasks security: - - Token: [] - responses: - '204': - description: Task deleted successfully - x-fern-sdk-group-name: tasks - x-fern-sdk-method-name: delete + - Token: [] + summary: Update task + tags: + - Tasks x-fern-audiences: - - public + - public + x-fern-sdk-group-name: tasks + x-fern-sdk-method-name: update /api/tasks/{id}/annotations/: get: - operationId: api_tasks_annotations_list description: List all annotations for a task. - summary: Get all task annotations + operationId: api_tasks_annotations_list parameters: - - in: path - name: id - schema: - type: integer - description: Task ID - required: true - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Annotations - security: - - Token: [] + - description: Task ID + in: path + name: id + required: true + schema: + type: integer + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Annotation' examples: Response: - value: - - - id: 1 - result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person - task: 1 - project: 1 - completed_by: 1 - updated_by: 1 - was_cancelled: false - ground_truth: false - lead_time: 10 summary: response + value: + - - completed_by: 1 + ground_truth: false + id: 1 + lead_time: 10 + project: 1 + result: + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 + task: 1 + updated_by: 1 + was_cancelled: false + schema: + items: + $ref: '#/components/schemas/Annotation' + type: array description: Annotation + security: + - Token: [] + summary: Get all task annotations + tags: + - Annotations + x-fern-audiences: + - public x-fern-sdk-group-name: annotations x-fern-sdk-method-name: list - x-fern-audiences: - - public post: + description: "\n Add annotations to a task like an annotator does. The content of the result field depends on your \n labeling configuration. For example, send the following data as part of your POST \n request to send an empty annotation with the ID of the user who completed the task:\n \n ```json\n {\n \"result\": {},\n \"was_cancelled\": true,\n \"ground_truth\": true,\n \"lead_time\": 0,\n \"task\": 0\n \"completed_by\": 123\n } \n ```\n " operationId: api_tasks_annotations_create - description: "\n Add annotations to a task like an annotator does. The\ - \ content of the result field depends on your \n labeling configuration.\ - \ For example, send the following data as part of your POST \n request\ - \ to send an empty annotation with the ID of the user who completed the task:\n\ - \ \n ```json\n {\n \"result\": {},\n \"\ - was_cancelled\": true,\n \"ground_truth\": true,\n \"lead_time\"\ - : 0,\n \"task\": 0\n \"completed_by\": 123\n } \n \ - \ ```\n " - summary: Create annotation parameters: - - in: path - name: id - schema: - type: integer - description: Task ID - required: true - tags: - - Annotations + - description: Task ID + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object - properties: + example: + ground_truth: true result: - type: array - items: - type: object - description: Labeling result in JSON format. Read more about the - format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) - example: - - original_width: 1920 - original_height: 1080 + - from_name: bboxes image_rotation: 0 - from_name: bboxes + original_height: 1080 + original_width: 1920 to_name: image type: rectanglelabels value: - x: 20 - y: 30 - width: 50 height: 60 rotation: 0 values: rectanglelabels: - - Person - task: - type: integer - description: Corresponding task for this annotation - project: - type: integer - description: Project ID for this annotation - completed_by: - type: integer + - Person + width: 50 + x: 20 + y: 30 + was_cancelled: false + properties: + completed_by: description: User ID of the person who created this annotation - updated_by: type: integer - description: Last user who updated this annotation - was_cancelled: - type: boolean - description: User skipped the task ground_truth: - type: boolean description: This annotation is a Ground Truth + type: boolean lead_time: - type: number description: How much time it took to annotate the task (in seconds) example: 100.5 - required: [] - example: + type: number + project: + description: Project ID for this annotation + type: integer result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person - was_cancelled: false - ground_truth: true - security: - - Token: [] + description: Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + example: + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 + items: + type: object + type: array + task: + description: Corresponding task for this annotation + type: integer + updated_by: + description: Last user who updated this annotation + type: integer + was_cancelled: + description: User skipped the task + type: boolean + required: [] + type: object responses: '201': content: application/json: - schema: - $ref: '#/components/schemas/Annotation' examples: Response: + summary: response value: + completed_by: 1 + ground_truth: false id: 1 + lead_time: 10 + project: 1 result: - - original_width: 1920 - original_height: 1080 - image_rotation: 0 - from_name: bboxes - to_name: image - type: rectanglelabels - value: - x: 20 - y: 30 - width: 50 - height: 60 - rotation: 0 - values: - rectanglelabels: - - Person + - from_name: bboxes + image_rotation: 0 + original_height: 1080 + original_width: 1920 + to_name: image + type: rectanglelabels + value: + height: 60 + rotation: 0 + values: + rectanglelabels: + - Person + width: 50 + x: 20 + y: 30 task: 1 - project: 1 - completed_by: 1 updated_by: 1 was_cancelled: false - ground_truth: false - lead_time: 10 - summary: response + schema: + $ref: '#/components/schemas/Annotation' description: Created annotation + security: + - Token: [] + summary: Create annotation + tags: + - Annotations + x-fern-audiences: + - public x-fern-sdk-group-name: annotations x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/token/: get: - operationId: api_token_list description: List all API tokens for the current user. - summary: List API tokens + operationId: api_token_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - JWT - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/LSEAPITokenList' + type: array description: '' + security: + - Token: [] + summary: List API tokens + tags: + - JWT + x-fern-audiences: + - public x-fern-sdk-group-name: tokens x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_token_create description: Create a new API token for the current user. - summary: Create API token - tags: - - JWT - security: - - Token: [] + operationId: api_token_create responses: '201': content: @@ -14510,18 +13863,19 @@ paths: schema: $ref: '#/components/schemas/LSEAPITokenCreate' description: '' + security: + - Token: [] + summary: Create API token + tags: + - JWT + x-fern-audiences: + - public x-fern-sdk-group-name: tokens x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/token/blacklist/: post: + description: Adds a JWT refresh token to the blacklist, preventing it from being used to obtain new access tokens. operationId: api_token_blacklist_create - description: Adds a JWT refresh token to the blacklist, preventing it from being - used to obtain new access tokens. - summary: Blacklist a JWT refresh token - tags: - - JWT requestBody: content: application/json: @@ -14539,29 +13893,29 @@ paths: content: application/json: schema: - type: object additionalProperties: {} description: Unspecified response body + type: object description: '' '404': content: application/json: schema: - type: object additionalProperties: {} description: Unspecified response body + type: object description: '' + summary: Blacklist a JWT refresh token + tags: + - JWT + x-fern-audiences: + - public x-fern-sdk-group-name: tokens x-fern-sdk-method-name: blacklist - x-fern-audiences: - - public /api/token/refresh/: post: - operationId: api_token_refresh_create description: Get a new access token, using a refresh token. - summary: Refresh JWT token - tags: - - JWT + operationId: api_token_refresh_create requestBody: content: application/json: @@ -14581,17 +13935,17 @@ paths: schema: $ref: '#/components/schemas/TokenRefreshResponse' description: '' + summary: Refresh JWT token + tags: + - JWT + x-fern-audiences: + - public x-fern-sdk-group-name: tokens x-fern-sdk-method-name: refresh - x-fern-audiences: - - public /api/token/rotate/: post: - operationId: api_token_rotate_create description: Creates a new JWT refresh token and blacklists the current one. - summary: Rotate JWT refresh token - tags: - - JWT + operationId: api_token_rotate_create requestBody: content: application/json: @@ -14604,8 +13958,6 @@ paths: schema: $ref: '#/components/schemas/LSAPITokenRotateRequest' required: true - security: - - Token: [] responses: '200': content: @@ -14617,84 +13969,84 @@ paths: content: application/json: schema: - type: object additionalProperties: {} description: Unspecified response body + type: object description: '' + security: + - Token: [] + summary: Rotate JWT refresh token + tags: + - JWT + x-fern-audiences: + - public x-fern-sdk-group-name: tokens x-fern-sdk-method-name: rotate - x-fern-audiences: - - public /api/users/: get: - operationId: api_users_list description: List the users that exist on the Label Studio server. - summary: List users + operationId: api_users_list parameters: - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string - tags: - - Users - security: - - Token: [] + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/LseUserAPI' + type: array description: '' + security: + - Token: [] + summary: List users + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_users_create description: Create a user in Label Studio. - summary: Create new user - tags: - - Users + operationId: api_users_create requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: User ID - first_name: - type: string - description: First name of the user - last_name: - type: string - description: Last name of the user - username: + allow_newsletters: + description: Whether the user allows newsletters + type: boolean + avatar: + description: Avatar URL of the user type: string - description: Username of the user email: - type: string description: Email of the user - avatar: type: string - description: Avatar URL of the user - initials: + first_name: + description: First name of the user type: string + id: + description: User ID + type: integer + initials: description: Initials of the user - phone: type: string + last_name: + description: Last name of the user + type: string + phone: description: Phone number of the user - allow_newsletters: - type: boolean - description: Whether the user allows newsletters - security: - - Token: [] + type: string + username: + description: Username of the user + type: string + type: object responses: '201': content: @@ -14702,27 +14054,51 @@ paths: schema: $ref: '#/components/schemas/LseUser' description: '' + security: + - Token: [] + summary: Create new user + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/users/{id}/: + delete: + description: |- + Delete a specific Label Studio user. Only available in community edition. + + Use caution when deleting a user, as this can cause issues such as breaking the "Annotated by" filter or leaving orphaned records. + operationId: api_users_destroy + parameters: + - description: User ID + in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete user + tags: + - Users + x-fern-audiences: + - public + x-fern-sdk-group-name: users + x-fern-sdk-method-name: delete get: + description: Get info about a specific Label Studio user, based on the user ID. operationId: api_users_retrieve - description: Get info about a specific Label Studio user, based on the user - ID. - summary: Get user info parameters: - - in: path - name: id - schema: - type: integer - description: User ID - required: true - tags: - - Users - security: - - Token: [] + - description: User ID + in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -14730,59 +14106,58 @@ paths: schema: $ref: '#/components/schemas/LseUser' description: '' + security: + - Token: [] + summary: Get user info + tags: + - Users + x-fern-audiences: + - public x-fern-sdk-group-name: users x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: + description: "\n Update details for a specific user, such as their name or contact information, in Label Studio.\n " operationId: api_users_partial_update - description: "\n Update details for a specific user, such as their name\ - \ or contact information, in Label Studio.\n " - summary: Update user details parameters: - - in: path - name: id - schema: - type: integer - description: User ID - required: true - tags: - - Users + - description: User ID + in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: schema: - type: object properties: - id: - type: integer - description: User ID - first_name: - type: string - description: First name of the user - last_name: - type: string - description: Last name of the user - username: + allow_newsletters: + description: Whether the user allows newsletters + type: boolean + avatar: + description: Avatar URL of the user type: string - description: Username of the user email: - type: string description: Email of the user - avatar: type: string - description: Avatar URL of the user - initials: + first_name: + description: First name of the user type: string + id: + description: User ID + type: integer + initials: description: Initials of the user - phone: type: string + last_name: + description: Last name of the user + type: string + phone: description: Phone number of the user - allow_newsletters: - type: boolean - description: Whether the user allows newsletters - security: - - Token: [] + type: string + username: + description: Username of the user + type: string + type: object responses: '200': content: @@ -14790,45 +14165,19 @@ paths: schema: $ref: '#/components/schemas/LseUser' description: '' - x-fern-sdk-group-name: users - x-fern-sdk-method-name: update - x-fern-audiences: - - public - delete: - operationId: api_users_destroy - description: |- - Delete a specific Label Studio user. Only available in community edition. - - Use caution when deleting a user, as this can cause issues such as breaking the "Annotated by" filter or leaving orphaned records. - summary: Delete user - parameters: - - in: path - name: id - schema: - type: integer - description: User ID - required: true - tags: - - Users security: - - Token: [] - responses: - '204': - description: No response body - x-fern-sdk-group-name: users - x-fern-sdk-method-name: delete + - Token: [] + summary: Update user details + tags: + - Users x-fern-audiences: - - public + - public + x-fern-sdk-group-name: users + x-fern-sdk-method-name: update /api/version/: get: - operationId: api_version_retrieve description: Get version information about the Label Studio instance. - summary: Get version information - tags: - - Versions - security: - - Token: [] - - {} + operationId: api_version_retrieve responses: '200': content: @@ -14836,44 +14185,47 @@ paths: schema: $ref: '#/components/schemas/VersionResponse' description: '' + security: + - Token: [] + - {} + summary: Get version information + tags: + - Versions + x-fern-audiences: + - public x-fern-sdk-group-name: versions x-fern-sdk-method-name: get - x-fern-audiences: - - public /api/webhooks/: get: - operationId: api_webhooks_list description: List all webhooks set up for your organization. - summary: List all webhooks + operationId: api_webhooks_list parameters: - - in: query - name: project - schema: - type: string - description: Project ID - tags: - - Webhooks - security: - - Token: [] + - description: Project ID + in: query + name: project + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/Webhook' + type: array description: '' + security: + - Token: [] + summary: List all webhooks + tags: + - Webhooks + x-fern-audiences: + - public x-fern-sdk-group-name: webhooks x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_webhooks_create description: Create a webhook for your organization. - summary: Create a webhook - tags: - - Webhooks + operationId: api_webhooks_create requestBody: content: application/json: @@ -14886,8 +14238,6 @@ paths: schema: $ref: '#/components/schemas/WebhookRequest' required: true - security: - - Token: [] responses: '201': content: @@ -14895,438 +14245,434 @@ paths: schema: $ref: '#/components/schemas/Webhook' description: '' - x-fern-sdk-group-name: webhooks - x-fern-sdk-method-name: create - x-fern-audiences: - - public - /api/webhooks/{id}/: - get: - operationId: api_webhooks_retrieve - summary: Get webhook info - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Webhooks - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Webhook' - description: '' - x-fern-sdk-group-name: webhooks - x-fern-sdk-method-name: get - x-fern-audiences: - - public - put: - operationId: api_webhooks_update - summary: Save webhook info - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Webhooks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookSerializerForUpdateRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/WebhookSerializerForUpdateRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/WebhookSerializerForUpdateRequest' - required: true security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookSerializerForUpdate' - description: '' - x-fern-audiences: - - internal - patch: - operationId: api_webhooks_partial_update - summary: Update webhook info - parameters: - - in: path - name: id - schema: - type: integer - required: true + - Token: [] + summary: Create a webhook tags: - - Webhooks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedWebhookSerializerForUpdateRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/PatchedWebhookSerializerForUpdateRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/PatchedWebhookSerializerForUpdateRequest' - security: - - Token: [] - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookSerializerForUpdate' - description: '' - x-fern-sdk-group-name: webhooks - x-fern-sdk-method-name: update + - Webhooks x-fern-audiences: - - public - delete: - operationId: api_webhooks_destroy - summary: Delete webhook info - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Webhooks - security: - - Token: [] - responses: - '204': - description: No response body + - public x-fern-sdk-group-name: webhooks - x-fern-sdk-method-name: delete - x-fern-audiences: - - public + x-fern-sdk-method-name: create /api/webhooks/info/: get: - operationId: api_webhooks_info_retrieve description: Get descriptions of all available webhook actions to set up webhooks. - summary: Get all webhook actions + operationId: api_webhooks_info_retrieve parameters: - - in: query - name: organization-only - schema: - type: boolean - description: organization-only or not - tags: - - Webhooks - security: - - Token: [] - - {} + - description: organization-only or not + in: query + name: organization-only + schema: + type: boolean responses: '200': content: application/json: schema: - type: object properties: - PROJECT_CREATED: - type: object + ANNOTATIONS_CREATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - PROJECT_UPDATED: + - name + - description + - key + - organization-only type: object + ANNOTATIONS_DELETED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - PROJECT_DELETED: + - name + - description + - key + - organization-only type: object + ANNOTATION_CREATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - TASKS_CREATED: + - name + - description + - key + - organization-only type: object + ANNOTATION_UPDATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - TASKS_DELETED: + - name + - description + - key + - organization-only type: object + LABEL_LINK_CREATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - ANNOTATION_CREATED: + - name + - description + - key + - organization-only type: object + LABEL_LINK_DELETED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - ANNOTATIONS_CREATED: + - name + - description + - key + - organization-only type: object + LABEL_LINK_UPDATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - ANNOTATION_UPDATED: + - name + - description + - key + - organization-only type: object + PROJECT_CREATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - ANNOTATIONS_DELETED: + - name + - description + - key + - organization-only type: object + PROJECT_DELETED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - LABEL_LINK_CREATED: + - name + - description + - key + - organization-only type: object + PROJECT_UPDATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - LABEL_LINK_UPDATED: + - name + - description + - key + - organization-only type: object + REVIEWS_DELETED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - LABEL_LINK_DELETED: + - name + - description + - key + - organization-only type: object + REVIEW_CREATED: properties: - name: - type: string description: type: string key: type: string - organization-only: + name: + type: string + organization-only: type: boolean required: - - name - - description - - key - - organization-only - REVIEW_CREATED: + - name + - description + - key + - organization-only type: object + REVIEW_UPDATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - REVIEW_UPDATED: + - name + - description + - key + - organization-only type: object + TASKS_CREATED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only - REVIEWS_DELETED: + - name + - description + - key + - organization-only type: object + TASKS_DELETED: properties: - name: - type: string description: type: string key: type: string + name: + type: string organization-only: type: boolean required: - - name - - description - - key - - organization-only + - name + - description + - key + - organization-only + type: object + type: object description: Object with webhook action descriptions. + security: + - Token: [] + - {} + summary: Get all webhook actions + tags: + - Webhooks + x-fern-audiences: + - public x-fern-sdk-group-name: webhooks x-fern-sdk-method-name: info + /api/webhooks/{id}/: + delete: + operationId: api_webhooks_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete webhook info + tags: + - Webhooks x-fern-audiences: - - public - /api/workspaces/: + - public + x-fern-sdk-group-name: webhooks + x-fern-sdk-method-name: delete get: - operationId: api_workspaces_list - description: List all workspaces for your organization. Workspaces in Label - Studio let you organize your projects and users into separate spaces. This - is useful for managing different teams, departments, or projects within your - organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces). - summary: List workspaces + operationId: api_webhooks_retrieve parameters: - - in: query - name: is_personal - schema: - type: boolean - description: Workspace is a personal user workspace. - - name: ordering - required: false - in: query - description: Which field to use when ordering the results. - schema: - type: string + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + description: '' + security: + - Token: [] + summary: Get webhook info + tags: + - Webhooks + x-fern-audiences: + - public + x-fern-sdk-group-name: webhooks + x-fern-sdk-method-name: get + patch: + operationId: api_webhooks_partial_update + parameters: + - in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedWebhookSerializerForUpdateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedWebhookSerializerForUpdateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedWebhookSerializerForUpdateRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookSerializerForUpdate' + description: '' + security: + - Token: [] + summary: Update webhook info tags: - - Workspaces + - Webhooks + x-fern-audiences: + - public + x-fern-sdk-group-name: webhooks + x-fern-sdk-method-name: update + put: + operationId: api_webhooks_update + parameters: + - in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookSerializerForUpdateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/WebhookSerializerForUpdateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WebhookSerializerForUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookSerializerForUpdate' + description: '' security: - - Token: [] + - Token: [] + summary: Save webhook info + tags: + - Webhooks + x-fern-audiences: + - internal + /api/workspaces/: + get: + description: List all workspaces for your organization. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces). + operationId: api_workspaces_list + parameters: + - description: Workspace is a personal user workspace. + in: query + name: is_personal + schema: + type: boolean + - description: Which field to use when ordering the results. + in: query + name: ordering + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/Workspace' + type: array description: '' + security: + - Token: [] + summary: List workspaces + tags: + - Workspaces + x-fern-audiences: + - public x-fern-sdk-group-name: workspaces x-fern-sdk-method-name: list - x-fern-audiences: - - public post: + description: Create a new workspace. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces). operationId: api_workspaces_create - description: Create a new workspace. Workspaces in Label Studio let you organize - your projects and users into separate spaces. This is useful for managing - different teams, departments, or projects within your organization. For more - information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces). - summary: Create workspace - tags: - - Workspaces requestBody: content: application/json: @@ -15339,8 +14685,6 @@ paths: schema: $ref: '#/components/schemas/WorkspaceRequest' required: true - security: - - Token: [] responses: '201': content: @@ -15348,25 +14692,46 @@ paths: schema: $ref: '#/components/schemas/Workspace' description: '' + security: + - Token: [] + summary: Create workspace + tags: + - Workspaces + x-fern-audiences: + - public x-fern-sdk-group-name: workspaces x-fern-sdk-method-name: create - x-fern-audiences: - - public /api/workspaces/{id}/: + delete: + description: Delete a specific workspace by ID. + operationId: api_workspaces_destroy + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '204': + description: No response body + security: + - Token: [] + summary: Delete workspace + tags: + - Workspaces + x-fern-audiences: + - public + x-fern-sdk-group-name: workspaces + x-fern-sdk-method-name: delete get: - operationId: api_workspaces_retrieve description: Retrieve details for a specific workspace by ID. - summary: Get workspace + operationId: api_workspaces_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -15374,22 +14739,24 @@ paths: schema: $ref: '#/components/schemas/Workspace' description: '' + security: + - Token: [] + summary: Get workspace + tags: + - Workspaces + x-fern-audiences: + - public x-fern-sdk-group-name: workspaces x-fern-sdk-method-name: get - x-fern-audiences: - - public patch: - operationId: api_workspaces_partial_update description: Update settings for a specific workspace by ID. - summary: Update workspace + operationId: api_workspaces_partial_update parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -15401,8 +14768,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PatchedWorkspaceRequest' - security: - - Token: [] responses: '200': content: @@ -15410,73 +14775,77 @@ paths: schema: $ref: '#/components/schemas/Workspace' description: '' + security: + - Token: [] + summary: Update workspace + tags: + - Workspaces + x-fern-audiences: + - public x-fern-sdk-group-name: workspaces x-fern-sdk-method-name: update - x-fern-audiences: - - public + /api/workspaces/{id}/memberships/: delete: - operationId: api_workspaces_destroy - description: Delete a specific workspace by ID. - summary: Delete workspace + description: 'Remove a specific member by ID from a workspace. This endpoint expects an object like `{"user_id": 123}`.' + operationId: api_workspaces_memberships_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body - x-fern-sdk-group-name: workspaces - x-fern-sdk-method-name: delete + security: + - Token: [] + summary: Delete workspace membership + tags: + - Workspaces x-fern-audiences: - - public - /api/workspaces/{id}/memberships/: + - public + x-fern-sdk-group-name: + - workspaces + - members + x-fern-sdk-method-name: delete get: - operationId: api_workspaces_memberships_retrieve description: Get a list of all members in a specific workspace. - summary: List workspace memberships + operationId: api_workspaces_memberships_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: application/json: schema: - type: array items: $ref: '#/components/schemas/WorkspaceMemberList' + type: array description: A list of workspace memberships + security: + - Token: [] + summary: List workspace memberships + tags: + - Workspaces + x-fern-audiences: + - public x-fern-sdk-group-name: - - workspaces - - members + - workspaces + - members x-fern-sdk-method-name: list - x-fern-audiences: - - public post: - operationId: api_workspaces_memberships_create description: Add a new workspace member by user ID. - summary: Create workspace membership + operationId: api_workspaces_memberships_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -15489,8 +14858,6 @@ paths: schema: $ref: '#/components/schemas/WorkspaceMemberCreateRequest' required: true - security: - - Token: [] responses: '200': content: @@ -15498,51 +14865,44 @@ paths: schema: $ref: '#/components/schemas/WorkspaceMemberCreate' description: '' + security: + - Token: [] + summary: Create workspace membership + tags: + - Workspaces + x-fern-audiences: + - public x-fern-sdk-group-name: - - workspaces - - members + - workspaces + - members x-fern-sdk-method-name: create - x-fern-audiences: - - public + /api/workspaces/{id}/projects/: delete: - operationId: api_workspaces_memberships_destroy - description: 'Remove a specific member by ID from a workspace. This endpoint - expects an object like `{"user_id": 123}`.' - summary: Delete workspace membership + description: Delete projects from a specific workspace. + operationId: api_workspaces_projects_destroy parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '204': description: No response body - x-fern-sdk-group-name: - - workspaces - - members - x-fern-sdk-method-name: delete - x-fern-audiences: - - public - /api/workspaces/{id}/projects/: + security: + - Token: [] + summary: Remove workspace projects + tags: + - Workspaces get: - operationId: api_workspaces_projects_retrieve description: Retrieve a list of all projects in a specific workspace. - summary: List workspace projects + operationId: api_workspaces_projects_retrieve parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces - security: - - Token: [] + - in: path + name: id + required: true + schema: + type: integer responses: '200': content: @@ -15550,18 +14910,20 @@ paths: schema: $ref: '#/components/schemas/Project' description: '' + security: + - Token: [] + summary: List workspace projects + tags: + - Workspaces post: - operationId: api_workspaces_projects_create description: Create a project in a specific workspace. - summary: Create workspace project + operationId: api_workspaces_projects_create parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces + - in: path + name: id + required: true + schema: + type: integer requestBody: content: application/json: @@ -15573,8 +14935,6 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/ProjectRequest' - security: - - Token: [] responses: '200': content: @@ -15582,61 +14942,37 @@ paths: schema: $ref: '#/components/schemas/Project' description: '' - delete: - operationId: api_workspaces_projects_destroy - description: Delete projects from a specific workspace. - summary: Remove workspace projects - parameters: - - in: path - name: id - schema: - type: integer - required: true - tags: - - Workspaces security: - - Token: [] - responses: - '204': - description: No response body + - Token: [] + summary: Create workspace project + tags: + - Workspaces /data/upload/{filename}: get: - operationId: data_upload_retrieve description: Download a specific uploaded file. - summary: Download file + operationId: data_upload_retrieve parameters: - - in: path - name: filename - schema: - type: string - required: true - tags: - - Import - security: - - Token: [] + - in: path + name: filename + required: true + schema: + type: string responses: '200': description: File downloaded successfully + security: + - Token: [] + summary: Download file + tags: + - Import + x-fern-audiences: + - public x-fern-sdk-group-name: - - files + - files x-fern-sdk-method-name: download - x-fern-audiences: - - public components: schemas: ActionEnum: - enum: - - prediction - - propagated_annotation - - imported - - submitted - - updated - - skipped - - accepted - - rejected - - fixed_and_accepted - - deleted_review - type: string description: |- * `prediction` - Created from prediction * `propagated_annotation` - Created from another annotation @@ -15648,24 +14984,19 @@ components: * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review - ActionsEnum: enum: - - PROJECT_CREATED - - PROJECT_UPDATED - - PROJECT_DELETED - - TASKS_CREATED - - TASKS_DELETED - - ANNOTATION_CREATED - - ANNOTATIONS_CREATED - - ANNOTATION_UPDATED - - ANNOTATIONS_DELETED - - LABEL_LINK_CREATED - - LABEL_LINK_UPDATED - - LABEL_LINK_DELETED - - REVIEW_CREATED - - REVIEW_UPDATED - - REVIEWS_DELETED + - prediction + - propagated_annotation + - imported + - submitted + - updated + - skipped + - accepted + - rejected + - fixed_and_accepted + - deleted_review type: string + ActionsEnum: description: |- * `PROJECT_CREATED` - PROJECT_CREATED * `PROJECT_UPDATED` - PROJECT_UPDATED @@ -15682,467 +15013,452 @@ components: * `REVIEW_CREATED` - REVIEW_CREATED * `REVIEW_UPDATED` - REVIEW_UPDATED * `REVIEWS_DELETED` - REVIEWS_DELETED + enum: + - PROJECT_CREATED + - PROJECT_UPDATED + - PROJECT_DELETED + - TASKS_CREATED + - TASKS_DELETED + - ANNOTATION_CREATED + - ANNOTATIONS_CREATED + - ANNOTATION_UPDATED + - ANNOTATIONS_DELETED + - LABEL_LINK_CREATED + - LABEL_LINK_UPDATED + - LABEL_LINK_DELETED + - REVIEW_CREATED + - REVIEW_UPDATED + - REVIEWS_DELETED + type: string ActivityLog: - type: object properties: - id: - type: integer + datetime: + format: date-time readOnly: true - user_id: - type: integer + type: string + duration: + description: Duration of response generation in ms maximum: 2147483647 minimum: -2147483648 + nullable: true + type: integer email: - type: string maxLength: 256 - user_agent: type: string - maxLength: 1024 + extra_data: + nullable: true http_referer: - type: string maxLength: 1024 - request_url: - type: string - title: Url - maxLength: 256 - request_method: - type: string - title: Http method - maxLength: 10 - response_code: - type: string - maxLength: 3 - datetime: type: string - format: date-time + id: readOnly: true + type: integer ip_address: - type: string nullable: true title: IP - extra_data: - nullable: true - duration: - type: integer + type: string + organization_id: + description: Organization id maximum: 2147483647 minimum: -2147483648 nullable: true - description: Duration of response generation in ms - project_id: + title: Active organization id type: integer + project_id: + description: Project id if request has it maximum: 2147483647 minimum: -2147483648 nullable: true - description: Project id if request has it - workspace_owner_id: type: integer + request_method: + maxLength: 10 + title: Http method + type: string + request_url: + maxLength: 256 + title: Url + type: string + response_code: + maxLength: 3 + type: string + user_agent: + maxLength: 1024 + type: string + user_id: maximum: 2147483647 minimum: -2147483648 - nullable: true - description: Owner id of workspace where action performed - organization_id: type: integer + workspace_owner_id: + description: Owner id of workspace where action performed maximum: 2147483647 minimum: -2147483648 nullable: true - title: Active organization id - description: Organization id + type: integer required: - - datetime - - email - - id - - request_method - - request_url - - response_code - - user_id - ActivityLogResponse: + - datetime + - email + - id + - request_method + - request_url + - response_code + - user_id type: object + ActivityLogResponse: description: Serializer for ActivityLogAPI response. properties: data: - type: array items: $ref: '#/components/schemas/ActivityLog' - recordsTotal: - type: integer + type: array recordsFiltered: type: integer + recordsTotal: + type: integer required: - - data - - recordsFiltered - - recordsTotal - AllRolesProjectList: + - data + - recordsFiltered + - recordsTotal type: object + AllRolesProjectList: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - control_weights: - nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' - start_training_on_annotation_update: - type: boolean - readOnly: true - description: Start model training after any annotations are submitted or - updated - id: - type: integer + allow_stream: readOnly: true - ground_truth_number: + type: string + annotation_limit_count: + minimum: 1 + nullable: true type: integer - readOnly: true - description: Honeypot annotation number in project - config_has_control_tags: - type: boolean - readOnly: true - description: Flag to detect is project ready for labeling annotation_limit_percent: + format: decimal + nullable: true + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ type: string + annotator_evaluation_minimum_score: + default: '95.00' format: decimal + nullable: true pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + type: string + annotator_evaluation_minimum_tasks: + default: 10 + minimum: 0 nullable: true - duplication_done: - type: boolean - default: false - finished_task_number: type: integer + assignment_settings: + $ref: '#/components/schemas/AssignmentSettings' + blueprints: + items: + $ref: '#/components/schemas/BlueprintList' readOnly: true - members: + type: array + color: + maxLength: 16 + nullable: true type: string - readOnly: true - total_annotations_number: + comment_classification_config: type: string + config_has_control_tags: + description: Flag to detect is project ready for labeling readOnly: true - members_count: - type: integer - readOnly: true - enable_empty_annotation: type: boolean - description: Allow annotators to submit empty annotations config_suitable_for_bulk_annotation: - type: boolean - readOnly: true description: Flag to detect is project ready for bulk annotation - task_number: - type: integer readOnly: true - description: Total task number in project - workspace_title: - type: string + type: boolean + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' + nullable: true + created_at: + format: date-time readOnly: true - total_predictions_number: + type: string + created_by: + allOf: + - $ref: '#/components/schemas/UserSimple' + description: Project owner + custom_script: + type: string + custom_task_lock_ttl: + description: TTL in seconds for task reservations, on new and existing tasks + maximum: 86400 + minimum: 1 + nullable: true type: integer + data_types: + nullable: true readOnly: true - is_published: - type: boolean - title: Published - description: Whether or not the project is published to annotators - is_draft: - type: boolean - description: Whether or not the project is in the middle of being created description: - type: string - nullable: true description: Project description - rejected: + nullable: true type: string + description_short: readOnly: true - custom_script: type: string - workspace: + duplication_done: + default: false + type: boolean + duplication_status: type: string - readOnly: true - show_ground_truth_first: + enable_empty_annotation: + description: Allow annotators to submit empty annotations + type: boolean + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task type: boolean expert_instruction: - type: string - nullable: true description: Labeling instructions in HTML format - allow_stream: - type: string - readOnly: true - reviewer_queue_total: + nullable: true type: string + finished_task_number: readOnly: true - created_at: - type: string - format: date-time + type: integer + ground_truth_number: + description: Honeypot annotation number in project readOnly: true - annotator_evaluation_minimum_tasks: type: integer - minimum: 0 - nullable: true - default: 10 - review_total_tasks: + has_blueprints: + readOnly: true type: string + id: readOnly: true - min_annotations_to_start_training: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started + is_draft: + description: Whether or not the project is in the middle of being created + type: boolean + is_published: + description: Whether or not the project is published to annotators + title: Published + type: boolean label_config: - type: string - nullable: true description: Label config in XML format. See more about it in documentation - created_by: - allOf: - - $ref: '#/components/schemas/UserSimple' - description: Project owner + nullable: true + type: string maximum_annotations: - type: integer + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) maximum: 2147483647 minimum: -2147483648 title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - annotator_evaluation_minimum_score: + type: integer + members: + readOnly: true type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - nullable: true - default: '95.00' + members_count: + readOnly: true + type: integer + min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started + maximum: 2147483647 + minimum: -2147483648 + type: integer model_version: - type: string - nullable: true description: Machine learning model version - useful_annotation_number: + nullable: true type: string + num_tasks_with_annotations: readOnly: true - has_blueprints: type: string + organization: + nullable: true + type: integer + overlap_cohort_percentage: + maximum: 2147483647 + minimum: -2147483648 + type: integer + parsed_label_config: + description: JSON-formatted labeling configuration readOnly: true pause_on_failed_annotator_evaluation: - type: boolean - nullable: true default: false - show_instruction: + nullable: true type: boolean - description: Show instructions to the annotator before they start + pinned_at: + description: Pinned date and time + format: date-time + nullable: true + type: string + prompts: + readOnly: true + type: string + queue_done: + readOnly: true + type: string queue_left: + readOnly: true type: string + queue_total: readOnly: true - custom_task_lock_ttl: - type: integer - maximum: 86400 - minimum: 1 - nullable: true - description: TTL in seconds for task reservations, on new and existing tasks - pinned_at: type: string - format: date-time - nullable: true - description: Pinned date and time ready: - type: string readOnly: true - description_short: type: string + rejected: readOnly: true - show_overlap_first: + type: string + require_comment_on_skip: + default: false type: boolean reveal_preannotations_interactively: - type: boolean description: Reveal pre-annotations interactively - comment_classification_config: - type: string - show_skip_button: type: boolean - description: Show a skip button in interface and allow annotators to skip - the task - data_types: + review_settings: + $ref: '#/components/schemas/ReviewSettings' + review_total_tasks: readOnly: true - nullable: true - organization: - type: integer - nullable: true - show_collab_predictions: - type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions - reviewed_number: type: string + reviewed_number: readOnly: true - prompts: type: string + reviewer_queue_total: readOnly: true - overlap_cohort_percentage: - type: integer - maximum: 2147483647 - minimum: -2147483648 - duplication_status: - type: string - skipped_annotations_number: type: string - readOnly: true - blueprints: - type: array - items: - $ref: '#/components/schemas/BlueprintList' - readOnly: true sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' - color: - type: string - nullable: true - maxLength: 16 - title: - type: string - nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator + type: boolean + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator + type: boolean + show_ground_truth_first: + type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean + show_overlap_first: + type: boolean + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean skip_queue: nullable: true oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - review_settings: - $ref: '#/components/schemas/ReviewSettings' - num_tasks_with_annotations: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + skipped_annotations_number: + readOnly: true type: string + start_training_on_annotation_update: + description: Start model training after any annotations are submitted or updated readOnly: true - assignment_settings: - $ref: '#/components/schemas/AssignmentSettings' - require_comment_on_skip: type: boolean - default: false - annotation_limit_count: + task_number: + description: Total task number in project + readOnly: true type: integer - minimum: 1 + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 nullable: true - queue_done: type: string + total_annotations_number: readOnly: true - show_annotation_history: - type: boolean - description: Show annotation history to annotator - queue_total: type: string + total_predictions_number: readOnly: true - parsed_label_config: + type: integer + useful_annotation_number: readOnly: true - description: JSON-formatted labeling configuration + type: string + workspace: + readOnly: true + type: string + workspace_title: + readOnly: true + type: string required: - - allow_stream - - assignment_settings - - blueprints - - config_has_control_tags - - config_suitable_for_bulk_annotation - - created_at - - data_types - - description_short - - finished_task_number - - ground_truth_number - - has_blueprints - - id - - members - - members_count - - num_tasks_with_annotations - - parsed_label_config - - prompts - - queue_done - - queue_left - - queue_total - - ready - - rejected - - review_settings - - review_total_tasks - - reviewed_number - - reviewer_queue_total - - skipped_annotations_number - - start_training_on_annotation_update - - task_number - - total_annotations_number - - total_predictions_number - - useful_annotation_number - - workspace - - workspace_title + - allow_stream + - assignment_settings + - blueprints + - config_has_control_tags + - config_suitable_for_bulk_annotation + - created_at + - data_types + - description_short + - finished_task_number + - ground_truth_number + - has_blueprints + - id + - members + - members_count + - num_tasks_with_annotations + - parsed_label_config + - prompts + - queue_done + - queue_left + - queue_total + - ready + - rejected + - review_settings + - review_total_tasks + - reviewed_number + - reviewer_queue_total + - skipped_annotations_number + - start_training_on_annotation_update + - task_number + - total_annotations_number + - total_predictions_number + - useful_annotation_number + - workspace + - workspace_title + type: object AnnotatedEnum: - enum: - - only - - exclude description: |- * `only` - only * `exclude` - exclude * `None` - None + enum: + - only + - exclude Annotation: - type: object properties: - id: + bulk_created: + description: Annotation was created in bulk mode + nullable: true + type: boolean + completed_by: type: integer - readOnly: true - result: - type: array - title: Annotation result list - description: List of annotation results for the task - items: - type: object - title: Annotation result items (regions) - description: List of annotated regions for the task - created_username: - type: string - readOnly: true - default: '' - description: Username string created_ago: - type: string - readOnly: true default: '' description: Time delta from creation time - completed_by: - type: integer - was_cancelled: - type: boolean - description: User skipped the task - ground_truth: - type: boolean - description: This annotation is a Ground Truth (ground_truth) - created_at: + readOnly: true type: string + created_at: + description: Creation time format: date-time readOnly: true - description: Creation time - updated_at: type: string - format: date-time + created_username: + default: '' + description: Username string readOnly: true - description: Last updated time - draft_created_at: type: string - format: date-time - nullable: true + draft_created_at: description: Draft creation time - lead_time: - type: number - format: double + format: date-time nullable: true - description: How much time it took to annotate the task - import_id: + type: string + ground_truth: + description: This annotation is a Ground Truth (ground_truth) + type: boolean + id: + readOnly: true type: integer + import_id: + description: Original annotation ID that was at the import step or NULL if this annotation wasn't imported + format: int64 maximum: 9223372036854775807 minimum: -9223372036854775808 - format: int64 nullable: true - description: Original annotation ID that was at the import step or NULL - if this annotation wasn't imported + type: integer last_action: - nullable: true description: |- Action which was performed in the last annotation history item @@ -16156,95 +15472,86 @@ components: * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review + nullable: true oneOf: - - $ref: '#/components/schemas/LastActionEnum' - - $ref: '#/components/schemas/NullEnum' - bulk_created: - type: boolean + - $ref: '#/components/schemas/LastActionEnum' + - $ref: '#/components/schemas/NullEnum' + last_created_by: + description: User who created the last annotation history item nullable: true - description: Annotation was created in bulk mode - task: type: integer + lead_time: + description: How much time it took to annotate the task + format: double nullable: true - description: Corresponding task for this annotation - project: - type: integer + type: number + parent_annotation: + description: Points to the parent annotation from which this annotation was created nullable: true - description: Project ID for this annotation - updated_by: type: integer - nullable: true - description: Last user who updated this annotation parent_prediction: - type: integer - nullable: true description: Points to the prediction from which this annotation was created - parent_annotation: - type: integer nullable: true - description: Points to the parent annotation from which this annotation - was created - last_created_by: type: integer + project: + description: Project ID for this annotation nullable: true - description: User who created the last annotation history item - required: - - created_ago - - created_at - - created_username - - id - - updated_at - AnnotationBulkSerializerWithSelectedItemsRequest: - type: object - properties: + type: integer result: - type: array - title: Annotation result list description: List of annotation results for the task items: - type: object - title: Annotation result items (regions) description: List of annotated regions for the task - completed_by: + title: Annotation result items (regions) + type: object + title: Annotation result list + type: array + task: + description: Corresponding task for this annotation + nullable: true type: integer - unique_id: + updated_at: + description: Last updated time + format: date-time + readOnly: true type: string - writeOnly: true - minLength: 1 - tasks: - type: array - items: - type: integer - selected_items: - allOf: - - $ref: '#/components/schemas/SelectedItemsRequest' + updated_by: + description: Last user who updated this annotation nullable: true + type: integer was_cancelled: - type: boolean description: User skipped the task - ground_truth: type: boolean - description: This annotation is a Ground Truth (ground_truth) - draft_created_at: - type: string - format: date-time + required: + - created_ago + - created_at + - created_username + - id + - updated_at + type: object + AnnotationBulkSerializerWithSelectedItemsRequest: + properties: + bulk_created: + description: Annotation was created in bulk mode nullable: true + type: boolean + completed_by: + type: integer + draft_created_at: description: Draft creation time - lead_time: - type: number - format: double + format: date-time nullable: true - description: How much time it took to annotate the task + type: string + ground_truth: + description: This annotation is a Ground Truth (ground_truth) + type: boolean import_id: - type: integer + description: Original annotation ID that was at the import step or NULL if this annotation wasn't imported + format: int64 maximum: 9223372036854775807 minimum: -9223372036854775808 - format: int64 nullable: true - description: Original annotation ID that was at the import step or NULL - if this annotation wasn't imported + type: integer last_action: - nullable: true description: |- Action which was performed in the last annotation history item @@ -16258,171 +15565,176 @@ components: * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review + nullable: true oneOf: - - $ref: '#/components/schemas/LastActionEnum' - - $ref: '#/components/schemas/NullEnum' - bulk_created: - type: boolean + - $ref: '#/components/schemas/LastActionEnum' + - $ref: '#/components/schemas/NullEnum' + last_created_by: + description: User who created the last annotation history item nullable: true - description: Annotation was created in bulk mode - task: type: integer + lead_time: + description: How much time it took to annotate the task + format: double nullable: true - description: Corresponding task for this annotation - project: - type: integer + type: number + parent_annotation: + description: Points to the parent annotation from which this annotation was created nullable: true - description: Project ID for this annotation - updated_by: type: integer - nullable: true - description: Last user who updated this annotation parent_prediction: + description: Points to the prediction from which this annotation was created + nullable: true type: integer + project: + description: Project ID for this annotation nullable: true - description: Points to the prediction from which this annotation was created - parent_annotation: type: integer + result: + description: List of annotation results for the task + items: + description: List of annotated regions for the task + title: Annotation result items (regions) + type: object + title: Annotation result list + type: array + selected_items: + allOf: + - $ref: '#/components/schemas/SelectedItemsRequest' + nullable: true + task: + description: Corresponding task for this annotation nullable: true - description: Points to the parent annotation from which this annotation - was created - last_created_by: type: integer + tasks: + items: + type: integer + type: array + unique_id: + minLength: 1 + type: string + writeOnly: true + updated_by: + description: Last user who updated this annotation nullable: true - description: User who created the last annotation history item - AnnotationHistory: + type: integer + was_cancelled: + description: User skipped the task + type: boolean type: object + AnnotationHistory: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: - type: integer - readOnly: true - comment: - type: string - readOnly: true + action: nullable: true - organization_id: - type: integer + oneOf: + - $ref: '#/components/schemas/ActionEnum' + - $ref: '#/components/schemas/NullEnum' + annotation_id: + description: Corresponding annotation for this historical annotation maximum: 2147483647 minimum: -2147483648 nullable: true - description: Organization for this annotation history - project_id: type: integer + comment: + nullable: true + readOnly: true + type: string + comment_id: + description: Comment id sent with result maximum: 2147483647 minimum: -2147483648 nullable: true - description: Project for this annotation history - annotation_id: type: integer + created_at: + format: date-time + readOnly: true + type: string + created_by: + description: Created by user id maximum: 2147483647 minimum: -2147483648 nullable: true - description: Corresponding annotation for this historical annotation - draft_id: type: integer + draft_id: + description: Corresponding draft for this historical annotation maximum: 2147483647 minimum: -2147483648 nullable: true - description: Corresponding draft for this historical annotation - review_id: type: integer + id: + readOnly: true + type: integer + lead_time: + description: How much time it took to annotate the task + format: double + nullable: true + type: number + organization_id: + description: Organization for this annotation history maximum: 2147483647 minimum: -2147483648 nullable: true - description: AnnotationReview ID, using with review field - task_id: type: integer + project_id: + description: Project for this annotation history maximum: 2147483647 minimum: -2147483648 nullable: true - description: Task id + type: integer result: - nullable: true description: Labeling result - lead_time: - type: number - format: double nullable: true - description: How much time it took to annotate the task - action: + review_id: + description: AnnotationReview ID, using with review field + maximum: 2147483647 + minimum: -2147483648 nullable: true - oneOf: - - $ref: '#/components/schemas/ActionEnum' - - $ref: '#/components/schemas/NullEnum' + type: integer started_at: - type: string + description: The time that a user started working on this revision of the annotation format: date-time nullable: true - description: The time that a user started working on this revision of the - annotation - created_at: type: string - format: date-time - readOnly: true - created_by: - type: integer + task_id: + description: Task id maximum: 2147483647 minimum: -2147483648 nullable: true - description: Created by user id - comment_id: type: integer - maximum: 2147483647 - minimum: -2147483648 - nullable: true - description: Comment id sent with result required: - - comment - - created_at - - id - AnnotationRequest: + - comment + - created_at + - id type: object + AnnotationRequest: properties: - result: - type: array - title: Annotation result list - description: List of annotation results for the task - items: - type: object - title: Annotation result items (regions) - description: List of annotated regions for the task + bulk_created: + description: Annotation was created in bulk mode + nullable: true + type: boolean completed_by: type: integer - unique_id: - type: string - writeOnly: true - minLength: 1 - was_cancelled: - type: boolean - description: User skipped the task - ground_truth: - type: boolean - description: This annotation is a Ground Truth (ground_truth) draft_created_at: - type: string - format: date-time - nullable: true description: Draft creation time - lead_time: - type: number - format: double + format: date-time nullable: true - description: How much time it took to annotate the task + type: string + ground_truth: + description: This annotation is a Ground Truth (ground_truth) + type: boolean import_id: - type: integer + description: Original annotation ID that was at the import step or NULL if this annotation wasn't imported + format: int64 maximum: 9223372036854775807 minimum: -9223372036854775808 - format: int64 nullable: true - description: Original annotation ID that was at the import step or NULL - if this annotation wasn't imported + type: integer last_action: - nullable: true description: |- Action which was performed in the last annotation history item @@ -16436,95 +15748,111 @@ components: * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review + nullable: true oneOf: - - $ref: '#/components/schemas/LastActionEnum' - - $ref: '#/components/schemas/NullEnum' - bulk_created: - type: boolean + - $ref: '#/components/schemas/LastActionEnum' + - $ref: '#/components/schemas/NullEnum' + last_created_by: + description: User who created the last annotation history item nullable: true - description: Annotation was created in bulk mode - task: type: integer + lead_time: + description: How much time it took to annotate the task + format: double nullable: true - description: Corresponding task for this annotation - project: - type: integer + type: number + parent_annotation: + description: Points to the parent annotation from which this annotation was created nullable: true - description: Project ID for this annotation - updated_by: type: integer - nullable: true - description: Last user who updated this annotation parent_prediction: + description: Points to the prediction from which this annotation was created + nullable: true type: integer + project: + description: Project ID for this annotation nullable: true - description: Points to the prediction from which this annotation was created - parent_annotation: type: integer + result: + description: List of annotation results for the task + items: + description: List of annotated regions for the task + title: Annotation result items (regions) + type: object + title: Annotation result list + type: array + task: + description: Corresponding task for this annotation nullable: true - description: Points to the parent annotation from which this annotation - was created - last_created_by: type: integer + unique_id: + minLength: 1 + type: string + writeOnly: true + updated_by: + description: Last user who updated this annotation nullable: true - description: User who created the last annotation history item - AnnotationReview: + type: integer + was_cancelled: + description: User skipped the task + type: boolean type: object + AnnotationReview: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: + accepted: + description: Accepted or rejected (if false) flag + type: boolean + annotation: + description: Corresponding annotation type: integer + created_at: + description: Creation time + format: date-time readOnly: true + type: string created_by: - type: integer - readOnly: true description: User who made this review - created_at: - type: string - format: date-time readOnly: true - description: Creation time - accepted: - type: boolean - description: Accepted or rejected (if false) flag - result: - nullable: true - annotation: type: integer - description: Corresponding annotation fixed_annotation_history: - type: integer - readOnly: true - nullable: true description: Fixed annotation history item by the reviewer - previous_annotation_history: + nullable: true + readOnly: true type: integer + id: readOnly: true - nullable: true - description: Previous annotation history item by the annotator + type: integer last_annotation_history: + nullable: true type: integer + previous_annotation_history: + description: Previous annotation history item by the annotator nullable: true + readOnly: true + type: integer remove_from_queue: + nullable: true type: boolean + result: nullable: true started_at: - type: string format: date-time nullable: true + type: string required: - - annotation - - created_at - - created_by - - fixed_annotation_history - - id - - previous_annotation_history - AnnotationReviewRequest: + - annotation + - created_at + - created_by + - fixed_annotation_history + - id + - previous_annotation_history type: object + AnnotationReviewRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to @@ -16532,69 +15860,69 @@ components: values with complex, nested serializations properties: accepted: - type: boolean description: Accepted or rejected (if false) flag - result: - nullable: true + type: boolean annotation: - type: integer description: Corresponding annotation - last_annotation_history: type: integer - nullable: true comment: + minLength: 1 + nullable: true type: string writeOnly: true + last_annotation_history: nullable: true - minLength: 1 + type: integer remove_from_queue: + nullable: true type: boolean + result: nullable: true started_at: - type: string format: date-time nullable: true + type: string required: - - annotation - AssignmentSettings: + - annotation type: object + AssignmentSettings: properties: id: - type: integer readOnly: true + type: integer label_stream_task_distribution: - nullable: true description: |- Modes for distributing tasks to annotators * `auto_distribution` - Label Stream distributes tasks automatically to annotators * `assigned_only` - Label Stream shows tasks only to assigned users + nullable: true oneOf: - - $ref: '#/components/schemas/LabelStreamTaskDistributionEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/LabelStreamTaskDistributionEnum' + - $ref: '#/components/schemas/NullEnum' project: - type: integer nullable: true + type: integer required: - - id - AssignmentSettingsRequest: + - id type: object + AssignmentSettingsRequest: properties: label_stream_task_distribution: - nullable: true description: |- Modes for distributing tasks to annotators * `auto_distribution` - Label Stream distributes tasks automatically to annotators * `assigned_only` - Label Stream shows tasks only to assigned users + nullable: true oneOf: - - $ref: '#/components/schemas/LabelStreamTaskDistributionEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/LabelStreamTaskDistributionEnum' + - $ref: '#/components/schemas/NullEnum' project: - type: integer nullable: true - AssociatedProject: + type: integer type: object + AssociatedProject: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to @@ -16602,1340 +15930,1334 @@ components: values with complex, nested serializations properties: id: - type: integer readOnly: true + type: integer title: - type: string - nullable: true description: Project name. Must be between 3 and 50 characters long. maxLength: 50 minLength: 3 + nullable: true + type: string required: - - id + - id + type: object AuthMethodEnum: - enum: - - NONE - - BASIC_AUTH - type: string description: |- * `NONE` - None * `BASIC_AUTH` - Basic Auth + enum: + - NONE + - BASIC_AUTH + type: string AzureBlobExportStorage: - type: object properties: - id: - type: integer - readOnly: true - type: - type: string - readOnly: true - default: azure - synchronizable: - type: boolean - default: true - container: - type: string + account_key: + description: Azure Blob account key nullable: true - description: Azure blob container - prefix: type: string + account_name: + description: Azure Blob account name nullable: true - description: Azure blob prefix name - regex_filter: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: type: boolean - description: Interpret objects as BLOBs and generate URLs - account_name: - type: string + container: + description: Azure blob container nullable: true - description: Azure Blob account name - account_key: type: string + created_at: + description: Creation time + format: date-time + readOnly: true + type: string + description: + description: Cloud storage description nullable: true - description: Azure Blob account key - last_sync: type: string + id: + readOnly: true + type: integer + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - can_delete_objects: - type: boolean - nullable: true - description: Deletion from storage enabled project: - type: integer description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - AzureBlobImportStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true type: string - readOnly: true - default: azure + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - container: - type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob container - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Azure blob prefix name - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects + type: + default: azure + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - account_name: - type: string + type: boolean + required: + - created_at + - id + - project + - type + type: object + AzureBlobImportStorage: + properties: + account_key: + description: Azure Blob account key nullable: true + type: string + account_name: description: Azure Blob account name - account_key: + nullable: true type: string + container: + description: Azure blob container nullable: true - description: Azure Blob account key - last_sync: type: string + created_at: + description: Creation time format: date-time + readOnly: true + type: string + description: + description: Cloud storage description nullable: true - description: Last sync finished time - last_sync_count: + type: string + id: + readOnly: true type: integer + last_sync: + description: Last sync finished time + format: date-time + nullable: true + type: string + last_sync_count: + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - AzureDatasetStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true type: string - readOnly: true - default: azure + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - container: - type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob container - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Azure blob prefix name - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects + type: + default: azure + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - account_name: - type: string + type: boolean + required: + - created_at + - id + - project + - type + type: object + AzureDatasetStorage: + properties: + account_key: + description: Azure Blob account key nullable: true + type: string + account_name: description: Azure Blob account name - account_key: + nullable: true type: string + container: + description: Azure blob container nullable: true - description: Azure Blob account key - last_sync: type: string + created_at: + description: Creation time format: date-time + readOnly: true + type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description + nullable: true + type: string + glob_pattern: + description: Glob pattern for syncing from bucket + nullable: true + type: string + id: + readOnly: true + type: integer + job_id: nullable: true + readOnly: true + title: The Job ID for the GCP Dataproc job that will import the records of this dataset into the vector db + type: string + last_sync: description: Last sync finished time + format: date-time + nullable: true + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - glob_pattern: - type: string + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Glob pattern for syncing from bucket + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synced: - type: boolean description: Flag if dataset has been previously synced or not - job_id: - type: string - readOnly: true - nullable: true - title: The Job ID for the GCP Dataproc job that will import the records - of this dataset into the vector db - dataset: - type: integer - description: A unique integer value identifying this dataset. - required: - - created_at - - dataset - - id - - job_id - - type - AzureDatasetStorageRequest: - type: object - properties: - synchronizable: type: boolean + synchronizable: default: true - presign: type: boolean - default: true - container: - type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob container - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Azure blob prefix name - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects + type: + default: azure + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - created_at + - dataset + - id + - job_id + - type + type: object + AzureDatasetStorageRequest: + properties: + account_key: + description: Azure Blob account key + nullable: true + type: string account_name: + description: Azure Blob account name + nullable: true type: string + container: + description: Azure blob container nullable: true - description: Azure Blob account name - account_key: type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description nullable: true - description: Azure Blob account key - last_sync: type: string - format: date-time + glob_pattern: + description: Glob pattern for syncing from bucket nullable: true + type: string + last_sync: description: Last sync finished time + format: date-time + nullable: true + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - glob_pattern: - type: string - nullable: true - description: Glob pattern for syncing from bucket - synced: - type: boolean - description: Flag if dataset has been previously synced or not - dataset: - type: integer - description: A unique integer value identifying this dataset. - required: - - dataset - AzureServicePrincipalExportStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true type: string - readOnly: true - default: azure_spi - synchronizable: + status: + $ref: '#/components/schemas/StatusC5aEnum' + synced: + description: Flag if dataset has been previously synced or not type: boolean + synchronizable: default: true - prefix: - type: string + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob prefix name - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - dataset + type: object + AzureServicePrincipalExportStorage: + properties: account_name: - type: string - nullable: true description: Azure Blob account name - container: - type: string nullable: true - description: Azure blob container - tenant_id: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Azure Tenant ID + type: boolean client_id: - type: string - nullable: true description: Azure Blob Service Principal Client ID - client_secret: - type: string nullable: true + type: string + client_secret: description: Azure Blob Service Principal Client Secret - user_delegation_key: + nullable: true type: string + container: + description: Azure blob container nullable: true - description: User Delegation Key (Backend) - last_sync: type: string + created_at: + description: Creation time format: date-time + readOnly: true + type: string + description: + description: Cloud storage description nullable: true + type: string + id: + readOnly: true + type: integer + last_sync: description: Last sync finished time + format: date-time + nullable: true + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - can_delete_objects: - type: boolean - nullable: true - description: Deletion from storage enabled project: - type: integer description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - AzureServicePrincipalExportStorageRequest: - type: object - properties: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - prefix: + type: boolean + tenant_id: + description: Azure Tenant ID + nullable: true type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob prefix name - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string + type: + default: azure_spi + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - account_name: - type: string + type: boolean + user_delegation_key: + description: User Delegation Key (Backend) nullable: true - description: Azure Blob account name - container: type: string + required: + - created_at + - id + - project + - type + type: object + AzureServicePrincipalExportStorageRequest: + properties: + account_name: + description: Azure Blob account name nullable: true - description: Azure blob container - tenant_id: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Azure Tenant ID + type: boolean client_id: - type: string - nullable: true description: Azure Blob Service Principal Client ID + nullable: true + type: string client_secret: + description: Azure Blob Service Principal Client Secret + nullable: true type: string + container: + description: Azure blob container nullable: true - description: Azure Blob Service Principal Client Secret - user_delegation_key: type: string + description: + description: Cloud storage description nullable: true - description: User Delegation Key (Backend) - last_sync: type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string - nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string nullable: true - description: Cloud storage description - can_delete_objects: - type: boolean + prefix: + description: Azure blob prefix name nullable: true - description: Deletion from storage enabled + type: string project: - type: integer description: A unique integer value identifying this project. - required: - - project - AzureServicePrincipalImportStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true type: string - readOnly: true - default: azure_spi + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - prefix: + tenant_id: + description: Azure Tenant ID + nullable: true type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob prefix name - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - account_name: - type: string + type: boolean + user_delegation_key: + description: User Delegation Key (Backend) nullable: true - description: Azure Blob account name - container: type: string + required: + - project + type: object + AzureServicePrincipalImportStorage: + properties: + account_name: + description: Azure Blob account name nullable: true - description: Azure blob container - tenant_id: type: string - nullable: true - description: Azure Tenant ID client_id: - type: string - nullable: true description: Azure Blob Service Principal Client ID - client_secret: - type: string nullable: true + type: string + client_secret: description: Azure Blob Service Principal Client Secret - user_delegation_key: + nullable: true type: string + container: + description: Azure blob container nullable: true - description: User Delegation Key (Backend) - last_sync: type: string + created_at: + description: Creation time format: date-time + readOnly: true + type: string + description: + description: Cloud storage description nullable: true + type: string + id: + readOnly: true + type: integer + last_sync: description: Last sync finished time + format: date-time + nullable: true + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - AzureServicePrincipalImportStorageRequest: - type: object - properties: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - prefix: + tenant_id: + description: Azure Tenant ID + nullable: true type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob prefix name - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string + type: + default: azure_spi + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - account_name: - type: string + type: boolean + user_delegation_key: + description: User Delegation Key (Backend) nullable: true - description: Azure Blob account name - container: type: string + required: + - created_at + - id + - project + - type + type: object + AzureServicePrincipalImportStorageRequest: + properties: + account_name: + description: Azure Blob account name nullable: true - description: Azure blob container - tenant_id: type: string - nullable: true - description: Azure Tenant ID client_id: - type: string - nullable: true description: Azure Blob Service Principal Client ID + nullable: true + type: string client_secret: + description: Azure Blob Service Principal Client Secret + nullable: true type: string + container: + description: Azure blob container nullable: true - description: Azure Blob Service Principal Client Secret - user_delegation_key: type: string + description: + description: Cloud storage description nullable: true - description: User Delegation Key (Backend) - last_sync: type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + tenant_id: + description: Azure Tenant ID + nullable: true + type: string + title: + description: Cloud storage title + maxLength: 256 + nullable: true + type: string + traceback: + description: Traceback report for the last failed sync + nullable: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean + user_delegation_key: + description: User Delegation Key (Backend) + nullable: true + type: string required: - - project - BatchFailedPredictions: + - project type: object + BatchFailedPredictions: properties: - job_id: - type: string - maxLength: 255 failed_predictions: - type: array items: {} + type: array + job_id: + maxLength: 255 + type: string required: - - failed_predictions - - job_id - BatchFailedPredictionsRequestRequest: + - failed_predictions + - job_id type: object + BatchFailedPredictionsRequestRequest: properties: - job_id: - type: string - minLength: 1 - maxLength: 255 failed_predictions: - type: array items: {} + type: array + job_id: + maxLength: 255 + minLength: 1 + type: string modelrun_id: type: integer required: - - failed_predictions - - modelrun_id - BatchPredictions: + - failed_predictions + - modelrun_id type: object + BatchPredictions: properties: job_id: - type: string maxLength: 255 + type: string results: - type: array items: {} + type: array required: - - job_id - - results - BatchPredictionsRequestRequest: + - job_id + - results type: object + BatchPredictionsRequestRequest: properties: job_id: - type: string - minLength: 1 maxLength: 255 - results: - type: array - items: {} + minLength: 1 + type: string modelrun_id: type: integer + results: + items: {} + type: array required: - - modelrun_id - - results - BillingChecks: + - modelrun_id + - results type: object + BillingChecks: properties: - users: - $ref: '#/components/schemas/CountLimit' - projects: + export_storages: $ref: '#/components/schemas/CountLimit' - results: + import_storages: $ref: '#/components/schemas/CountLimit' - trial_days: - type: integer - organization_is_active: + is_license_expired: type: boolean - license_issued: - type: string + is_license_warning: + type: boolean + is_prompts_expire: + type: boolean + is_prompts_warning: + type: boolean + license_expires: format: date nullable: true - license_warning: type: string + license_issued: format: date nullable: true - is_license_warning: - type: boolean - license_expires: type: string + license_warning: format: date nullable: true - is_license_expired: + type: string + organization_is_active: + type: boolean + projects: + $ref: '#/components/schemas/CountLimit' + prompts_api_keys_enabled: type: boolean prompts_enabled: type: boolean + prompts_expire: + nullable: true + type: string prompts_status: $ref: '#/components/schemas/PromptsStatusEnum' prompts_warning: - type: string nullable: true - is_prompts_warning: - type: boolean - prompts_expire: type: string - nullable: true - is_prompts_expire: - type: boolean - prompts_api_keys_enabled: - type: boolean - import_storages: + results: $ref: '#/components/schemas/CountLimit' - export_storages: + trial_days: + type: integer + users: $ref: '#/components/schemas/CountLimit' required: - - export_storages - - import_storages - - is_license_expired - - is_license_warning - - is_prompts_expire - - is_prompts_warning - - license_expires - - license_issued - - license_warning - - organization_is_active - - projects - - prompts_api_keys_enabled - - prompts_enabled - - prompts_expire - - prompts_status - - prompts_warning - - results - - trial_days - - users - BillingFlags: + - export_storages + - import_storages + - is_license_expired + - is_license_warning + - is_prompts_expire + - is_prompts_warning + - license_expires + - license_issued + - license_warning + - organization_is_active + - projects + - prompts_api_keys_enabled + - prompts_enabled + - prompts_expire + - prompts_status + - prompts_warning + - results + - trial_days + - users type: object + BillingFlags: properties: activated_at: - type: string format: date-time nullable: true - cloud_instance: - type: boolean + type: string allow_activity_log: type: boolean - allow_invite_project_experts: + allow_ai: type: boolean - allow_sso: + allow_ask_ai: type: boolean - white_label_id: - type: string - nullable: true allow_data_credentials: type: boolean - allow_organization_webhooks: - type: boolean - disable_members_page: + allow_invite_people: type: boolean - secure_mode: + allow_invite_project_experts: type: boolean - manual_workspace_management: + allow_organization_webhooks: type: boolean - manual_role_management: + allow_sso: type: boolean - hide_storage_settings_for_manager: + allow_storage_proxy: type: boolean - disable_project_imports: + automax_enabled: type: boolean automax_token_exists: type: boolean - automax_enabled: + cloud_instance: type: boolean - storage_persistence: + disable_members_page: type: boolean - allow_ai: + disable_project_imports: type: boolean early_adopter: type: boolean - allow_ask_ai: - type: boolean - allow_invite_people: - type: boolean - allow_storage_proxy: - type: boolean - embed_enabled: - type: boolean embed_domains: - type: array items: - type: object additionalProperties: {} + type: object + type: array + embed_enabled: + type: boolean embed_settings: - type: object additionalProperties: {} + type: object + hide_storage_settings_for_manager: + type: boolean + manual_role_management: + type: boolean + manual_workspace_management: + type: boolean + secure_mode: + type: boolean + storage_persistence: + type: boolean + white_label_id: + nullable: true + type: string required: - - activated_at - - allow_activity_log - - allow_ai - - allow_ask_ai - - allow_data_credentials - - allow_invite_people - - allow_invite_project_experts - - allow_organization_webhooks - - allow_sso - - allow_storage_proxy - - automax_enabled - - automax_token_exists - - cloud_instance - - disable_members_page - - disable_project_imports - - early_adopter - - embed_enabled - - hide_storage_settings_for_manager - - manual_role_management - - manual_workspace_management - - secure_mode - - storage_persistence - - white_label_id - BillingInfoResponse: + - activated_at + - allow_activity_log + - allow_ai + - allow_ask_ai + - allow_data_credentials + - allow_invite_people + - allow_invite_project_experts + - allow_organization_webhooks + - allow_sso + - allow_storage_proxy + - automax_enabled + - automax_token_exists + - cloud_instance + - disable_members_page + - disable_project_imports + - early_adopter + - embed_enabled + - hide_storage_settings_for_manager + - manual_role_management + - manual_workspace_management + - secure_mode + - storage_persistence + - white_label_id type: object + BillingInfoResponse: properties: billing_checks: $ref: '#/components/schemas/BillingChecks' billing_flags: $ref: '#/components/schemas/BillingFlags' required: - - billing_checks - - billing_flags + - billing_checks + - billing_flags + type: object BlankEnum: enum: - - '' + - '' Blueprint: - type: object properties: - id: - type: integer + created_at: + format: date-time readOnly: true - share_id: type: string - readOnly: true - short_url: + created_by: + nullable: true + type: integer + description: + description: Project description + nullable: true type: string + id: readOnly: true - project: type: integer + label_config: + description: Labeling configuration in XML format + nullable: true + type: string + project: readOnly: true - created_by: type: integer - nullable: true - title: + share_id: + readOnly: true type: string - nullable: true + short_url: + readOnly: true + type: string + title: description: Blueprint name. Must be between 3 and 50 characters long. maxLength: 50 - description: - type: string nullable: true - description: Project description - label_config: - type: string - nullable: true - description: Labeling configuration in XML format - created_at: type: string - format: date-time - readOnly: true updated_at: - type: string format: date-time readOnly: true + type: string required: - - created_at - - id - - project - - share_id - - short_url - - updated_at - BlueprintList: + - created_at + - id + - project + - share_id + - short_url + - updated_at type: object + BlueprintList: properties: + created_at: + format: date-time + readOnly: true + type: string + description: + description: Project description + nullable: true + type: string id: - type: integer readOnly: true + type: integer share_id: - type: string readOnly: true - short_url: type: string + short_url: readOnly: true - title: type: string - nullable: true + title: description: Blueprint name. Must be between 3 and 50 characters long. maxLength: 50 - description: - type: string nullable: true - description: Project description - created_at: type: string - format: date-time - readOnly: true required: - - created_at - - id - - share_id - - short_url - BlueprintRequest: + - created_at + - id + - share_id + - short_url type: object + BlueprintRequest: properties: created_by: + nullable: true type: integer + description: + description: Project description nullable: true - title: type: string + label_config: + description: Labeling configuration in XML format nullable: true + type: string + title: description: Blueprint name. Must be between 3 and 50 characters long. maxLength: 50 - description: - type: string nullable: true - description: Project description - label_config: type: string - nullable: true - description: Labeling configuration in XML format + type: object BudgetResetPeriodEnum: - enum: - - Monthly - - Yearly - type: string description: |- * `Monthly` - Monthly * `Yearly` - Yearly + enum: + - Monthly + - Yearly + type: string ChildFilter: - type: object properties: + column: + description: Field name + maxLength: 1024 + type: string id: - type: integer readOnly: true - index: type: integer + index: + description: Display order among root filters only maximum: 2147483647 minimum: -2147483648 nullable: true - description: Display order among root filters only - column: - type: string - description: Field name + type: integer + operator: + description: Filter operator maxLength: 1024 - type: type: string + parent: + description: Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + nullable: true + type: integer + type: description: Field type maxLength: 1024 - operator: type: string - description: Filter operator - maxLength: 1024 value: - nullable: true description: Filter value - parent: - type: integer nullable: true - description: Optional parent filter to create one-level hierarchy (child - filters are AND-merged with parent) required: - - column - - id - - operator - - type - ChildFilterRequest: + - column + - id + - operator + - type type: object + ChildFilterRequest: properties: + column: + description: Field name + maxLength: 1024 + minLength: 1 + type: string index: - type: integer + description: Display order among root filters only maximum: 2147483647 minimum: -2147483648 nullable: true - description: Display order among root filters only - column: - type: string - minLength: 1 - description: Field name + type: integer + operator: + description: Filter operator maxLength: 1024 - type: - type: string minLength: 1 + type: string + parent: + description: Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + nullable: true + type: integer + type: description: Field type maxLength: 1024 - operator: - type: string minLength: 1 - description: Filter operator - maxLength: 1024 + type: string value: - nullable: true description: Filter value - parent: - type: integer nullable: true - description: Optional parent filter to create one-level hierarchy (child - filters are AND-merged with parent) required: - - column - - operator - - type - Comment: + - column + - operator + - type type: object + Comment: properties: - id: - type: integer - readOnly: true - region_ref: + annotation: nullable: true - description: Set if this comment is related to a specific part of the annotation. - Normally contains region ID and control name. + type: integer classifications: - nullable: true description: Classifications applied by a reviewer or annotator - text: - type: string nullable: true - description: Reviewer or annotator comment created_at: - type: string - format: date-time - readOnly: true description: Creation time - updated_at: - type: string format: date-time readOnly: true - description: Last updated time - is_resolved: - type: boolean - description: True if the comment is resolved - resolved_at: type: string - format: date-time + created_by: + description: User who made this comment readOnly: true - nullable: true - description: Resolving time - project: type: integer - readOnly: true + draft: nullable: true - task: type: integer + id: readOnly: true - nullable: true - draft: type: integer + is_resolved: + description: True if the comment is resolved + type: boolean + project: nullable: true - annotation: + readOnly: true type: integer + region_ref: + description: Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name. nullable: true - created_by: + resolved_at: + description: Resolving time + format: date-time + nullable: true + readOnly: true + type: string + task: + nullable: true + readOnly: true type: integer + text: + description: Reviewer or annotator comment + nullable: true + type: string + updated_at: + description: Last updated time + format: date-time readOnly: true - description: User who made this comment + type: string required: - - created_at - - created_by - - id - - project - - resolved_at - - task - - updated_at - CommentRequest: + - created_at + - created_by + - id + - project + - resolved_at + - task + - updated_at type: object + CommentRequest: properties: - region_ref: + annotation: nullable: true - description: Set if this comment is related to a specific part of the annotation. - Normally contains region ID and control name. + type: integer classifications: - nullable: true description: Classifications applied by a reviewer or annotator - text: - type: string nullable: true - description: Reviewer or annotator comment - is_resolved: - type: boolean - description: True if the comment is resolved draft: - type: integer nullable: true - annotation: type: integer + is_resolved: + description: True if the comment is resolved + type: boolean + region_ref: + description: Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name. nullable: true - CommentSerializerWithExpandedUser: + text: + description: Reviewer or annotator comment + nullable: true + type: string type: object + CommentSerializerWithExpandedUser: properties: - id: - type: integer - readOnly: true - created_by: - $ref: '#/components/schemas/LseUser' - region_ref: + annotation: nullable: true - description: Set if this comment is related to a specific part of the annotation. - Normally contains region ID and control name. + type: integer classifications: - nullable: true description: Classifications applied by a reviewer or annotator - text: - type: string nullable: true - description: Reviewer or annotator comment created_at: - type: string + description: Creation time format: date-time readOnly: true - description: Creation time - updated_at: type: string - format: date-time + created_by: + $ref: '#/components/schemas/LseUser' + draft: + nullable: true + type: integer + id: readOnly: true - description: Last updated time + type: integer is_resolved: - type: boolean description: True if the comment is resolved - resolved_at: - type: string - format: date-time + type: boolean + project: + nullable: true readOnly: true + type: integer + region_ref: + description: Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name. nullable: true + resolved_at: description: Resolving time - project: - type: integer - readOnly: true + format: date-time nullable: true - task: - type: integer readOnly: true + type: string + task: nullable: true - draft: - type: integer - nullable: true - annotation: + readOnly: true type: integer + text: + description: Reviewer or annotator comment nullable: true + type: string + updated_at: + description: Last updated time + format: date-time + readOnly: true + type: string required: - - created_at - - created_by - - id - - project - - resolved_at - - task - - updated_at - ConvertedFormat: + - created_at + - created_by + - id + - project + - resolved_at + - task + - updated_at type: object + ConvertedFormat: properties: + export_type: + maxLength: 64 + type: string id: - type: integer readOnly: true + type: integer status: $ref: '#/components/schemas/Status7bfEnum' - export_type: - type: string - maxLength: 64 traceback: - type: string - nullable: true description: Traceback report in case of errors + nullable: true + type: string required: - - export_type - - id - ConvertedFormatRequest: + - export_type + - id type: object + ConvertedFormatRequest: properties: - status: - $ref: '#/components/schemas/Status7bfEnum' export_type: - type: string - minLength: 1 maxLength: 64 - traceback: + minLength: 1 type: string - nullable: true + status: + $ref: '#/components/schemas/Status7bfEnum' + traceback: description: Traceback report in case of errors + nullable: true + type: string required: - - export_type - CountLimit: + - export_type type: object + CountLimit: properties: count: type: integer @@ -17946,188 +17268,203 @@ components: total: type: integer required: - - count - - limit - - reached + - count + - limit + - reached + type: object CustomScriptsEditableByEnum: - enum: - - AD - - MA - type: string description: |- * `AD` - Administrator * `MA` - Manager + enum: + - AD + - MA + type: string Dataset: - type: object properties: - id: - type: integer + columns: + description: All data columns found in Dataset tasks + nullable: true + created_at: + description: Creation time + format: date-time readOnly: true + type: string created_by: allOf: - - $ref: '#/components/schemas/UserSimple' + - $ref: '#/components/schemas/UserSimple' description: User who created Dataset - created_at: - type: string - format: date-time - readOnly: true - description: Creation time - updated_at: + description: + description: Dataset description + nullable: true type: string - format: date-time + id: readOnly: true - description: Last updated time + type: integer + organization: + nullable: true + type: integer title: - type: string description: Dataset title maxLength: 1000 - description: type: string - nullable: true - description: Dataset description - columns: - nullable: true - description: All data columns found in Dataset tasks total_entities: - type: integer maximum: 2147483647 minimum: -2147483648 nullable: true title: The number of entities in the dataset - vector_db_dataset_name: + type: integer + updated_at: + description: Last updated time + format: date-time + readOnly: true type: string + vector_db_dataset_name: description: Dataset name for weaviate schema maxLength: 37 - organization: - type: integer - nullable: true + type: string required: - - created_at - - id - - title - - updated_at - DatasetMember: + - created_at + - id + - title + - updated_at type: object + DatasetMember: properties: user: type: integer required: - - user - DatasetMemberRequest: + - user type: object + DatasetMemberRequest: properties: user: type: integer required: - - user - DatasetRequest: + - user type: object + DatasetRequest: properties: + columns: + description: All data columns found in Dataset tasks + nullable: true created_by: allOf: - - $ref: '#/components/schemas/UserSimpleRequest' + - $ref: '#/components/schemas/UserSimpleRequest' description: User who created Dataset - title: + description: + description: Dataset description + nullable: true type: string - minLength: 1 + organization: + nullable: true + type: integer + title: description: Dataset title maxLength: 1000 - description: + minLength: 1 type: string - nullable: true - description: Dataset description - columns: - nullable: true - description: All data columns found in Dataset tasks total_entities: - type: integer maximum: 2147483647 minimum: -2147483648 nullable: true title: The number of entities in the dataset + type: integer vector_db_dataset_name: - type: string - minLength: 1 description: Dataset name for weaviate schema maxLength: 37 - organization: - type: integer - nullable: true + minLength: 1 + type: string required: - - title - DatasetView: + - title type: object + DatasetView: properties: - id: - type: integer - readOnly: true - filter_group: - $ref: '#/components/schemas/FilterGroup' data: - nullable: true description: Custom view data - ordering: nullable: true - description: Ordering parameters - order: + dataset: + description: Dataset ID + type: integer + filter_group: + $ref: '#/components/schemas/FilterGroup' + id: + readOnly: true type: integer + order: + description: Position of the tab, starting at the left in data manager and increasing as the tabs go left to right maximum: 2147483647 minimum: -2147483648 nullable: true - description: Position of the tab, starting at the left in data manager and - increasing as the tabs go left to right - selected_items: + type: integer + ordering: + description: Ordering parameters nullable: true + selected_items: description: Selected items - user: - type: integer nullable: true + user: description: User who made this view - dataset: + nullable: true type: integer - description: Dataset ID required: - - dataset - - id - DatasetViewRequest: + - dataset + - id type: object + DatasetViewRequest: properties: - filter_group: - $ref: '#/components/schemas/FilterGroupRequest' data: - nullable: true description: Custom view data - ordering: nullable: true - description: Ordering parameters - order: + dataset: + description: Dataset ID type: integer + filter_group: + $ref: '#/components/schemas/FilterGroupRequest' + order: + description: Position of the tab, starting at the left in data manager and increasing as the tabs go left to right maximum: 2147483647 minimum: -2147483648 nullable: true - description: Position of the tab, starting at the left in data manager and - increasing as the tabs go left to right - selected_items: + type: integer + ordering: + description: Ordering parameters nullable: true + selected_items: description: Selected items - user: - type: integer nullable: true + user: description: User who made this view - dataset: + nullable: true type: integer - description: Dataset ID required: - - dataset - DefaultRole: + - dataset type: object + DefaultRole: properties: - organization: - type: integer - description: A unique integer value identifying this organization. + annotator_reviewer_firewall_enabled_at: + description: Set to current time to restrict data sharing between annotators and reviewers in the label stream, review stream, and notifications (which will be disabled). In these settings, information about annotator and reviewer identity is suppressed in the UI. + format: date-time + nullable: true + type: string + custom_scripts_editable_by: + description: |- + Set the minimum user role that can edit custom scripts in the UI. + + * `AD` - Administrator + * `MA` - Manager + nullable: true + oneOf: + - $ref: '#/components/schemas/CustomScriptsEditableByEnum' + - $ref: '#/components/schemas/NullEnum' + custom_scripts_enabled_at: + description: Set to current time to enabled custom scripts for this organization. Can only be enabled if no organization members are active members of any other organizations; otherwise an error will be raised. If this occurs, contact the LEAP team for assistance with enabling custom scripts. + format: date-time + nullable: true + type: string default_role: allOf: - - $ref: '#/components/schemas/DefaultRoleEnum' + - $ref: '#/components/schemas/DefaultRoleEnum' description: |- Default membership role for invited users @@ -18138,75 +17475,38 @@ components: * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated - external_id: - type: string + email_notification_settings: + description: 'Email notification settings for this organization. Controls which email notifications users can receive. Structure: {"notifications_allowed": {"notification_type": bool}}' nullable: true - description: External ID to uniquely identify this organization embed_domains: + description: 'List of objects: {"domain": "example.com"}. Used for CSP header on /embed routes.' nullable: true - description: 'List of objects: {"domain": "example.com"}. Used for CSP header - on /embed routes.' embed_settings: - nullable: true description: Embed settings for this organization - extra_data_on_activity_logs: - type: boolean - custom_scripts_enabled_at: - type: string - format: date-time nullable: true - description: Set to current time to enabled custom scripts for this organization. - Can only be enabled if no organization members are active members of any - other organizations; otherwise an error will be raised. If this occurs, - contact the LEAP team for assistance with enabling custom scripts. - custom_scripts_editable_by: + external_id: + description: External ID to uniquely identify this organization nullable: true - description: |- - Set the minimum user role that can edit custom scripts in the UI. - - * `AD` - Administrator - * `MA` - Manager - oneOf: - - $ref: '#/components/schemas/CustomScriptsEditableByEnum' - - $ref: '#/components/schemas/NullEnum' - annotator_reviewer_firewall_enabled_at: type: string + extra_data_on_activity_logs: + type: boolean + label_stream_navigation_disabled_at: + description: Set to current time to disable the label stream navigation for this organization. This will prevent users from going back in the label stream to view previous labels. format: date-time nullable: true - description: Set to current time to restrict data sharing between annotators - and reviewers in the label stream, review stream, and notifications (which - will be disabled). In these settings, information about annotator and - reviewer identity is suppressed in the UI. - read_only_quick_view_enabled_at: type: string + organization: + description: A unique integer value identifying this organization. + type: integer + read_only_quick_view_enabled_at: + description: Set to current time to prevent creating or editing annotations in quick view. format: date-time nullable: true - description: Set to current time to prevent creating or editing annotations - in quick view. - label_stream_navigation_disabled_at: type: string - format: date-time - nullable: true - description: Set to current time to disable the label stream navigation - for this organization. This will prevent users from going back in the - label stream to view previous labels. - email_notification_settings: - nullable: true - description: 'Email notification settings for this organization. Controls - which email notifications users can receive. Structure: {"notifications_allowed": - {"notification_type": bool}}' required: - - organization + - organization + type: object DefaultRoleEnum: - enum: - - OW - - AD - - MA - - RE - - AN - - DI - - 'NO' - type: string description: |- * `OW` - Owner * `AD` - Administrator @@ -18215,1150 +17515,1151 @@ components: * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated - EditionEnum: enum: - - Community - - Enterprise + - OW + - AD + - MA + - RE + - AN + - DI + - 'NO' type: string + EditionEnum: description: |- * `Community` - Community * `Enterprise` - Enterprise + enum: + - Community + - Enterprise + type: string Export: - type: object properties: - title: - type: string - maxLength: 2048 - id: - type: integer - readOnly: true - created_by: - $ref: '#/components/schemas/UserSimple' + converted_formats: + items: + $ref: '#/components/schemas/ConvertedFormat' + type: array + counters: + title: Exporting meta data created_at: - type: string + description: Creation time format: date-time readOnly: true - description: Creation time - finished_at: type: string + created_by: + $ref: '#/components/schemas/UserSimple' + finished_at: + description: Complete or fail time format: date-time nullable: true - description: Complete or fail time + type: string + id: + readOnly: true + type: integer + md5: + maxLength: 128 + title: Md5 of file + type: string status: allOf: - - $ref: '#/components/schemas/Status7bfEnum' + - $ref: '#/components/schemas/Status7bfEnum' title: Export status - md5: + title: + maxLength: 2048 type: string - title: Md5 of file - maxLength: 128 - counters: - title: Exporting meta data - converted_formats: - type: array - items: - $ref: '#/components/schemas/ConvertedFormat' required: - - created_at - - id - ExportConvertRequest: + - created_at + - id type: object + ExportConvertRequest: properties: - export_type: - type: string - minLength: 1 - description: Export file format. download_resources: - type: boolean description: Download resources in converter. + type: boolean + export_type: + description: Export file format. + minLength: 1 + type: string required: - - export_type - FileUpload: + - export_type type: object + FileUpload: properties: - id: - type: integer - readOnly: true file: type: string + id: + readOnly: true + type: integer required: - - file - - id - Filter: + - file + - id type: object + Filter: properties: - id: - type: integer - readOnly: true child_filter: $ref: '#/components/schemas/ChildFilter' - index: + column: + description: Field name + maxLength: 1024 + type: string + id: + readOnly: true type: integer + index: + description: Display order among root filters only maximum: 2147483647 minimum: -2147483648 nullable: true - description: Display order among root filters only - column: - type: string - description: Field name + type: integer + operator: + description: Filter operator maxLength: 1024 - type: type: string + parent: + description: Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + nullable: true + type: integer + type: description: Field type maxLength: 1024 - operator: type: string - description: Filter operator - maxLength: 1024 value: - nullable: true description: Filter value - parent: - type: integer nullable: true - description: Optional parent filter to create one-level hierarchy (child - filters are AND-merged with parent) required: - - column - - id - - operator - - type - FilterGroup: + - column + - id + - operator + - type type: object + FilterGroup: properties: - id: - type: integer - readOnly: true - filters: - type: array - items: - $ref: '#/components/schemas/Filter' conjunction: - type: string description: Type of conjunction maxLength: 1024 + type: string + filters: + items: + $ref: '#/components/schemas/Filter' + type: array + id: + readOnly: true + type: integer required: - - conjunction - - filters - - id - FilterGroupRequest: + - conjunction + - filters + - id type: object + FilterGroupRequest: properties: - filters: - type: array - items: - $ref: '#/components/schemas/FilterRequest' conjunction: - type: string - minLength: 1 description: Type of conjunction maxLength: 1024 + minLength: 1 + type: string + filters: + items: + $ref: '#/components/schemas/FilterRequest' + type: array required: - - conjunction - - filters - FilterRequest: + - conjunction + - filters type: object + FilterRequest: properties: child_filter: $ref: '#/components/schemas/ChildFilterRequest' + column: + description: Field name + maxLength: 1024 + minLength: 1 + type: string index: - type: integer + description: Display order among root filters only maximum: 2147483647 minimum: -2147483648 nullable: true - description: Display order among root filters only - column: - type: string - minLength: 1 - description: Field name + type: integer + operator: + description: Filter operator maxLength: 1024 - type: - type: string minLength: 1 + type: string + parent: + description: Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) + nullable: true + type: integer + type: description: Field type maxLength: 1024 - operator: - type: string minLength: 1 - description: Filter operator - maxLength: 1024 + type: string value: - nullable: true description: Filter value - parent: - type: integer nullable: true - description: Optional parent filter to create one-level hierarchy (child - filters are AND-merged with parent) required: - - column - - operator - - type + - column + - operator + - type + type: object FinishedEnum: - enum: - - only - - exclude description: |- * `only` - only * `exclude` - exclude * `None` - None + enum: + - only + - exclude GCSDatasetStorage: - type: object properties: - id: - type: integer - readOnly: true - type: + bucket: + description: GCS bucket name + nullable: true type: string + created_at: + description: Creation time + format: date-time readOnly: true - default: gcs - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true - bucket: type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description nullable: true - description: GCS bucket name - prefix: type: string + glob_pattern: + description: Glob pattern for syncing from bucket nullable: true - description: GCS bucket prefix - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs google_application_credentials: - type: string - nullable: true description: The content of GOOGLE_APPLICATION_CREDENTIALS json file + nullable: true + type: string google_project_id: + description: Google project ID + nullable: true type: string + id: + readOnly: true + type: integer + job_id: nullable: true - description: Google project ID - last_sync: + readOnly: true + title: The Job ID for the GCP Dataproc job that will import the records of this dataset into the vector db type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - glob_pattern: - type: string + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Glob pattern for syncing from bucket + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synced: - type: boolean description: Flag if dataset has been previously synced or not - job_id: + type: boolean + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 + nullable: true type: string - readOnly: true + traceback: + description: Traceback report for the last failed sync nullable: true - title: The Job ID for the GCP Dataproc job that will import the records - of this dataset into the vector db - dataset: - type: integer - description: A unique integer value identifying this dataset. + type: string + type: + default: gcs + readOnly: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean required: - - created_at - - dataset - - id - - job_id - - type - GCSDatasetStorageRequest: + - created_at + - dataset + - id + - job_id + - type type: object + GCSDatasetStorageRequest: properties: - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true bucket: - type: string - nullable: true description: GCS bucket name - prefix: - type: string nullable: true - description: GCS bucket prefix - regex_filter: type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - google_application_credentials: type: string + glob_pattern: + description: Glob pattern for syncing from bucket nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true + type: string + google_project_id: description: Google project ID - last_sync: + nullable: true type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - glob_pattern: - type: string + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Glob pattern for syncing from bucket + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synced: - type: boolean description: Flag if dataset has been previously synced or not - dataset: - type: integer - description: A unique integer value identifying this dataset. - required: - - dataset - GCSExportStorage: - type: object - properties: - id: - type: integer - readOnly: true - type: - type: string - readOnly: true - default: gcs - synchronizable: type: boolean + synchronizable: default: true - bucket: + type: boolean + title: + description: Cloud storage title + maxLength: 256 + nullable: true type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: GCS bucket name - prefix: type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - dataset + type: object + GCSExportStorage: + properties: + bucket: + description: GCS bucket name nullable: true - description: GCS bucket prefix - regex_filter: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: type: boolean - description: Interpret objects as BLOBs and generate URLs - google_application_credentials: + created_at: + description: Creation time + format: date-time + readOnly: true type: string + description: + description: Cloud storage description nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true + type: string + google_project_id: description: Google project ID - last_sync: + nullable: true type: string + id: + readOnly: true + type: integer + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - can_delete_objects: - type: boolean - nullable: true - description: Deletion from storage enabled project: - type: integer description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - GCSImportStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true type: string - readOnly: true - default: gcs + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - bucket: - type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: GCS bucket name - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: GCS bucket prefix - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects + type: + default: gcs + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - google_application_credentials: + type: boolean + required: + - created_at + - id + - project + - type + type: object + GCSImportStorage: + properties: + bucket: + description: GCS bucket name + nullable: true + type: string + created_at: + description: Creation time + format: date-time + readOnly: true type: string + description: + description: Cloud storage description nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true + type: string + google_project_id: description: Google project ID - last_sync: + nullable: true type: string + id: + readOnly: true + type: integer + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - GCSWIFExportStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true type: string - readOnly: true - default: gcswif + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - bucket: + type: boolean + title: + description: Cloud storage title + maxLength: 256 + nullable: true type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: GCS bucket name - prefix: type: string + type: + default: gcs + readOnly: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - created_at + - id + - project + - type + type: object + GCSWIFExportStorage: + properties: + bucket: + description: GCS bucket name nullable: true - description: GCS bucket prefix - regex_filter: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: type: boolean - description: Interpret objects as BLOBs and generate URLs - google_application_credentials: + created_at: + description: Creation time + format: date-time + readOnly: true type: string + description: + description: Cloud storage description nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true - description: Google project ID - google_project_number: type: string + google_project_id: + description: Google project ID nullable: true + type: string + google_project_number: description: Google project number - google_wif_pool_id: + nullable: true type: string + google_service_account_email: + description: Google service account email nullable: true + type: string + google_wif_pool_id: description: Google WIF pool ID - google_wif_provider_id: + nullable: true type: string + google_wif_provider_id: + description: Google WIF provider ID nullable: true title: Google wif provider - description: Google WIF provider ID - google_service_account_email: type: string - nullable: true - description: Google service account email + id: + readOnly: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: + nullable: true + prefix: + description: GCS bucket prefix + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: description: Cloud storage title maxLength: 256 - description: + nullable: true type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage description - created_at: type: string - format: date-time + type: + default: gcswif readOnly: true - description: Creation time - can_delete_objects: - type: boolean - nullable: true - description: Deletion from storage enabled - project: - type: integer - description: A unique integer value identifying this project. + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean required: - - created_at - - id - - project - - type - GCSWIFExportStorageRequest: + - created_at + - id + - project + - type type: object + GCSWIFExportStorageRequest: properties: - synchronizable: - type: boolean - default: true bucket: - type: string - nullable: true description: GCS bucket name - prefix: - type: string nullable: true - description: GCS bucket prefix - regex_filter: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: type: boolean - description: Interpret objects as BLOBs and generate URLs - google_application_credentials: - type: string + description: + description: Cloud storage description nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true - description: Google project ID - google_project_number: type: string + google_project_id: + description: Google project ID nullable: true + type: string + google_project_number: description: Google project number - google_wif_pool_id: + nullable: true type: string + google_service_account_email: + description: Google service account email nullable: true + type: string + google_wif_pool_id: description: Google WIF pool ID - google_wif_provider_id: + nullable: true type: string + google_wif_provider_id: + description: Google WIF provider ID nullable: true title: Google wif provider - description: Google WIF provider ID - google_service_account_email: type: string - nullable: true - description: Google service account email last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string - nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string nullable: true - description: Cloud storage description - can_delete_objects: - type: boolean + prefix: + description: GCS bucket prefix nullable: true - description: Deletion from storage enabled + type: string project: - type: integer description: A unique integer value identifying this project. - required: - - project - GCSWIFImportStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true type: string - readOnly: true - default: gcswif + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - bucket: - type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: GCS bucket name - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: GCS bucket prefix - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - google_application_credentials: + type: boolean + required: + - project + type: object + GCSWIFImportStorage: + properties: + bucket: + description: GCS bucket name + nullable: true + type: string + created_at: + description: Creation time + format: date-time + readOnly: true type: string + description: + description: Cloud storage description nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true - description: Google project ID - google_project_number: type: string + google_project_id: + description: Google project ID nullable: true + type: string + google_project_number: description: Google project number - google_wif_pool_id: + nullable: true type: string + google_service_account_email: + description: Google service account email nullable: true + type: string + google_wif_pool_id: description: Google WIF pool ID - google_wif_provider_id: + nullable: true type: string + google_wif_provider_id: + description: Google WIF provider ID nullable: true title: Google wif provider - description: Google WIF provider ID - google_service_account_email: type: string - nullable: true - description: Google service account email + id: + readOnly: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - GCSWIFImportStorageRequest: - type: object - properties: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - bucket: - type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: GCS bucket name - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: GCS bucket prefix - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects + type: + default: gcswif + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - google_application_credentials: - type: string + type: boolean + required: + - created_at + - id + - project + - type + type: object + GCSWIFImportStorageRequest: + properties: + bucket: + description: GCS bucket name nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + description: + description: Cloud storage description nullable: true - description: Google project ID - google_project_number: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true - description: Google project number - google_wif_pool_id: type: string + google_project_id: + description: Google project ID nullable: true - description: Google WIF pool ID - google_wif_provider_id: type: string + google_project_number: + description: Google project number nullable: true - title: Google wif provider - description: Google WIF provider ID - google_service_account_email: type: string - nullable: true + google_service_account_email: description: Google service account email - last_sync: + nullable: true type: string - format: date-time + google_wif_pool_id: + description: Google WIF pool ID + nullable: true + type: string + google_wif_provider_id: + description: Google WIF provider ID nullable: true + title: Google wif provider + type: string + last_sync: description: Last sync finished time + format: date-time + nullable: true + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 + nullable: true + type: string + traceback: + description: Traceback report for the last failed sync + nullable: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean required: - - project - Hotkeys: + - project type: object + Hotkeys: properties: custom_hotkeys: - type: object additionalProperties: {} + type: object required: - - custom_hotkeys - ImportApiRequest: + - custom_hotkeys type: object + ImportApiRequest: description: Tasks serializer for Import API (TaskBulkCreateAPI) properties: annotations: - type: array + default: [] items: $ref: '#/components/schemas/AnnotationRequest' - default: [] - predictions: type: array + cancelled_annotations: + description: Number of total cancelled annotations for the current task + maximum: 2147483647 + minimum: -2147483648 + type: integer + comment_authors: + description: Users who wrote comments items: - $ref: '#/components/schemas/PredictionRequest' - default: [] + type: integer + type: array + comment_count: + description: Number of comments in the task including all annotations + maximum: 2147483647 + minimum: -2147483648 + type: integer data: - description: User imported or uploaded data for a task. Data is formatted - according to the project label config. You can find examples of data for - your project on the Import page in the Label Studio Data Manager UI. - meta: + description: User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI. + file_upload: + description: Uploaded file used as data source for this task nullable: true - description: Meta is user imported (uploaded) data and can be useful as - input for an ML Backend for embeddings, advanced vectors, and other info. - It is passed to ML during training/predicting steps. - overlap: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of distinct annotators that processed the current task inner_id: - type: integer + description: Internal task ID in the project, starts with 1 + format: int64 maximum: 9223372036854775807 minimum: -9223372036854775808 - format: int64 nullable: true - description: Internal task ID in the project, starts with 1 - total_annotations: type: integer + last_comment_updated_at: + description: When the last comment was updated + format: date-time + nullable: true + type: string + meta: + description: Meta is user imported (uploaded) data and can be useful as input for an ML Backend for embeddings, advanced vectors, and other info. It is passed to ML during training/predicting steps. + nullable: true + overlap: + description: Number of distinct annotators that processed the current task maximum: 2147483647 minimum: -2147483648 - description: Number of total annotations for the current task except cancelled - annotations - cancelled_annotations: type: integer + predictions: + default: [] + items: + $ref: '#/components/schemas/PredictionRequest' + type: array + total_annotations: + description: Number of total annotations for the current task except cancelled annotations maximum: 2147483647 minimum: -2147483648 - description: Number of total cancelled annotations for the current task - total_predictions: type: integer - maximum: 2147483647 - minimum: -2147483648 + total_predictions: description: Number of total predictions for the current task - comment_count: - type: integer maximum: 2147483647 minimum: -2147483648 - description: Number of comments in the task including all annotations - unresolved_comment_count: type: integer + unresolved_comment_count: + description: Number of unresolved comments in the task including all annotations maximum: 2147483647 minimum: -2147483648 - description: Number of unresolved comments in the task including all annotations - last_comment_updated_at: - type: string - format: date-time - nullable: true - description: When the last comment was updated - updated_by: type: integer - nullable: true + updated_by: description: Last annotator or reviewer who updated this task - file_upload: - type: integer nullable: true - description: Uploaded file used as data source for this task - comment_authors: - type: array - items: - type: integer - description: Users who wrote comments + type: integer required: - - data - InferenceRunCostEstimate: + - data type: object + InferenceRunCostEstimate: properties: - prompt_cost_usd: - type: string - nullable: true - description: Cost of the prompt (in USD) completion_cost_usd: + description: Cost of the completion (in USD) + nullable: true type: string + error_message: + description: Error message details nullable: true - description: Cost of the completion (in USD) - total_cost_usd: type: string + error_type: + description: Type of error (e.g. "Timeout", "Rate Limit", etc) nullable: true - description: Total cost of the inference (in USD) + type: string is_error: + description: Whether an error occurred or not + nullable: true type: boolean + prompt_cost_usd: + description: Cost of the prompt (in USD) nullable: true - description: Whether an error occurred or not - error_type: type: string + total_cost_usd: + description: Total cost of the inference (in USD) nullable: true - description: Type of error (e.g. "Timeout", "Rate Limit", etc) - error_message: type: string - nullable: true - description: Error message details - LSAPITokenBlacklistRequest: type: object + LSAPITokenBlacklistRequest: properties: refresh: + minLength: 1 type: string writeOnly: true - minLength: 1 required: - - refresh - LSAPITokenRotateRequest: + - refresh type: object + LSAPITokenRotateRequest: properties: refresh: - type: string minLength: 1 + type: string required: - - refresh - LSEAPITokenCreate: + - refresh type: object + LSEAPITokenCreate: properties: - token: - type: string - readOnly: true created_at: - type: string readOnly: true + type: string expires_at: + readOnly: true type: string + token: readOnly: true + type: string required: - - created_at - - expires_at - - token - LSEAPITokenList: + - created_at + - expires_at + - token type: object + LSEAPITokenList: properties: - token: - type: string - readOnly: true created_at: - type: string readOnly: true + type: string expires_at: + readOnly: true type: string + token: readOnly: true + type: string required: - - created_at - - expires_at - - token - LSEJWTSettings: + - created_at + - expires_at + - token type: object + LSEJWTSettings: properties: - api_tokens_enabled: - type: boolean - title: JWT API tokens enabled - description: Enable JWT API token authentication for this organization - legacy_api_tokens_enabled: - type: boolean - description: Enable legacy API token authentication for this organization api_token_ttl_days: - type: integer + description: Number of days before JWT API tokens expire maximum: 2147483647 minimum: -2147483648 title: JWT API token time to live (days) - description: Number of days before JWT API tokens expire - LSEJWTSettingsRequest: - type: object - properties: + type: integer api_tokens_enabled: - type: boolean - title: JWT API tokens enabled description: Enable JWT API token authentication for this organization - legacy_api_tokens_enabled: + title: JWT API tokens enabled type: boolean + legacy_api_tokens_enabled: description: Enable legacy API token authentication for this organization + type: boolean + type: object + LSEJWTSettingsRequest: + properties: api_token_ttl_days: - type: integer + description: Number of days before JWT API tokens expire maximum: 2147483647 minimum: -2147483648 title: JWT API token time to live (days) - description: Number of days before JWT API tokens expire + type: integer + api_tokens_enabled: + description: Enable JWT API token authentication for this organization + title: JWT API tokens enabled + type: boolean + legacy_api_tokens_enabled: + description: Enable legacy API token authentication for this organization + type: boolean + type: object LSEKeyIndicatorValue: description: |- Key indicator value for Label Studio Enterprise. @@ -19377,194 +18678,193 @@ components: title: Values type: object required: - - title - - values + - title + - values title: LSEKeyIndicatorValue type: object Label: - type: object description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: + approved: + description: Status of label + type: boolean + approved_by: + description: User who approved this label + nullable: true type: integer - readOnly: true - links: - type: array - items: - type: integer - readOnly: true created_at: - type: string - format: date-time - readOnly: true description: Time of label creation - updated_at: - type: string format: date-time readOnly: true - description: Time of label modification - value: - description: Label value - title: - type: string - description: Label title - maxLength: 2048 - description: type: string - nullable: true - description: Label description - approved: - type: boolean - description: Status of label created_by: - type: integer description: User who made this label - approved_by: type: integer + description: + description: Label description nullable: true - description: User who approved this label + type: string + id: + readOnly: true + type: integer + links: + items: + type: integer + readOnly: true + type: array organization: type: integer projects: - type: array items: type: integer readOnly: true + type: array + title: + description: Label title + maxLength: 2048 + type: string + updated_at: + description: Time of label modification + format: date-time + readOnly: true + type: string + value: + description: Label value required: - - created_at - - created_by - - id - - links - - organization - - projects - - title - - updated_at - - value - LabelCreate: + - created_at + - created_by + - id + - links + - organization + - projects + - title + - updated_at + - value type: object + LabelCreate: properties: - id: + approved: + description: Status of label + type: boolean + approved_by: + description: User who approved this label + nullable: true type: integer + created_at: + description: Time of label creation + format: date-time readOnly: true + type: string created_by: + readOnly: true type: integer + description: + description: Label description + nullable: true + type: string + from_name: + type: string + id: readOnly: true - organization: type: integer + organization: readOnly: true + type: integer project: type: integer - from_name: - type: string - created_at: - type: string - format: date-time + projects: + items: + type: integer readOnly: true - description: Time of label creation - updated_at: + type: array + title: + description: Label title + maxLength: 2048 type: string + updated_at: + description: Time of label modification format: date-time readOnly: true - description: Time of label modification + type: string value: description: Label value - title: - type: string - description: Label title - maxLength: 2048 - description: - type: string - nullable: true - description: Label description + required: + - created_at + - created_by + - from_name + - id + - organization + - project + - projects + - title + - updated_at + - value + type: object + LabelCreateRequest: + properties: approved: - type: boolean description: Status of label + type: boolean approved_by: - type: integer - nullable: true description: User who approved this label - projects: - type: array - items: - type: integer - readOnly: true - required: - - created_at - - created_by - - from_name - - id - - organization - - project - - projects - - title - - updated_at - - value - LabelCreateRequest: - type: object - properties: - project: + nullable: true type: integer - from_name: + description: + description: Label description + nullable: true type: string + from_name: minLength: 1 - value: - description: Label value - title: type: string - minLength: 1 + project: + type: integer + title: description: Label title maxLength: 2048 - description: + minLength: 1 type: string - nullable: true - description: Label description - approved: - type: boolean - description: Status of label - approved_by: - type: integer - nullable: true - description: User who approved this label + value: + description: Label value required: - - from_name - - project - - title - - value - LabelLink: + - from_name + - project + - title + - value type: object + LabelLink: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: - type: integer - readOnly: true annotations_count: - type: integer readOnly: true + type: integer from_name: - type: string - title: Tag name description: Tag name maxLength: 2048 - project: + title: Tag name + type: string + id: + readOnly: true type: integer label: type: integer + project: + type: integer required: - - annotations_count - - from_name - - id - - label - - project - LabelLinkRequest: + - annotations_count + - from_name + - id + - label + - project type: object + LabelLinkRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to @@ -19572,40 +18872,29 @@ components: values with complex, nested serializations properties: from_name: - type: string - minLength: 1 - title: Tag name description: Tag name maxLength: 2048 - project: - type: integer + minLength: 1 + title: Tag name + type: string label: type: integer + project: + type: integer required: - - from_name - - label - - project + - from_name + - label + - project + type: object LabelStreamTaskDistributionEnum: - enum: - - auto_distribution - - assigned_only - type: string description: |- * `auto_distribution` - Label Stream distributes tasks automatically to annotators * `assigned_only` - Label Stream shows tasks only to assigned users - LastActionEnum: enum: - - prediction - - propagated_annotation - - imported - - submitted - - updated - - skipped - - accepted - - rejected - - fixed_and_accepted - - deleted_review + - auto_distribution + - assigned_only type: string + LastActionEnum: description: |- * `prediction` - Created from prediction * `propagated_annotation` - Created from another annotation @@ -19617,330 +18906,318 @@ components: * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review + enum: + - prediction + - propagated_annotation + - imported + - submitted + - updated + - skipped + - accepted + - rejected + - fixed_and_accepted + - deleted_review + type: string LocalFilesExportStorage: - type: object properties: - id: - type: integer - readOnly: true - type: - type: string - readOnly: true - default: localfiles - synchronizable: + can_delete_objects: + description: Deletion from storage enabled + nullable: true type: boolean - default: true - path: + created_at: + description: Creation time + format: date-time + readOnly: true type: string + description: + description: Cloud storage description nullable: true - description: Local path - regex_filter: type: string - nullable: true - description: Regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs + id: + readOnly: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: + nullable: true + path: + description: Local path + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Regex for filtering objects nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: description: Cloud storage title maxLength: 256 - description: + nullable: true type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage description - created_at: type: string - format: date-time + type: + default: localfiles readOnly: true - description: Creation time - can_delete_objects: - type: boolean - nullable: true - description: Deletion from storage enabled - project: - type: integer - description: A unique integer value identifying this project. + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean required: - - created_at - - id - - project - - type - LocalFilesImportStorage: + - created_at + - id + - project + - type type: object + LocalFilesImportStorage: properties: - id: - type: integer - readOnly: true - type: - type: string + created_at: + description: Creation time + format: date-time readOnly: true - default: localfiles - synchronizable: - type: boolean - default: true - path: type: string + description: + description: Cloud storage description nullable: true - description: Local path - regex_filter: type: string - nullable: true - description: Regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs + id: + readOnly: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: + nullable: true + path: + description: Local path + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Regex for filtering objects nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: description: Cloud storage title maxLength: 256 - description: + nullable: true type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage description - created_at: type: string - format: date-time + type: + default: localfiles readOnly: true - description: Creation time - project: - type: integer - description: A unique integer value identifying this project. + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean required: - - created_at - - id - - project - - type - LseAnnotationFilterOptions: + - created_at + - id + - project + - type type: object + LseAnnotationFilterOptions: properties: - usual: - type: boolean - nullable: true - default: true - description: Include not skipped and not ground truth annotations ground_truth: - type: boolean - nullable: true description: Include ground truth annotations - skipped: - type: boolean nullable: true - description: Include skipped annotations + type: boolean reviewed: - nullable: true description: |- `only` - include all tasks with at least one not reviewed annotation
    `exclude` - exclude with at least one not reviewed annotation * `only` - only * `exclude` - exclude * `None` - None + nullable: true oneOf: - - $ref: '#/components/schemas/ReviewedEnum' - - $ref: '#/components/schemas/NullEnum' - LseAnnotationFilterOptionsRequest: - type: object - properties: - usual: - type: boolean + - $ref: '#/components/schemas/ReviewedEnum' + - $ref: '#/components/schemas/NullEnum' + skipped: + description: Include skipped annotations nullable: true + type: boolean + usual: default: true description: Include not skipped and not ground truth annotations - ground_truth: - type: boolean nullable: true - description: Include ground truth annotations - skipped: type: boolean + type: object + LseAnnotationFilterOptionsRequest: + properties: + ground_truth: + description: Include ground truth annotations nullable: true - description: Include skipped annotations + type: boolean reviewed: - nullable: true description: |- `only` - include all tasks with at least one not reviewed annotation
    `exclude` - exclude with at least one not reviewed annotation * `only` - only * `exclude` - exclude * `None` - None + nullable: true oneOf: - - $ref: '#/components/schemas/ReviewedEnum' - - $ref: '#/components/schemas/NullEnum' - LseExportCreate: + - $ref: '#/components/schemas/ReviewedEnum' + - $ref: '#/components/schemas/NullEnum' + skipped: + description: Include skipped annotations + nullable: true + type: boolean + usual: + default: true + description: Include not skipped and not ground truth annotations + nullable: true + type: boolean type: object + LseExportCreate: properties: - title: - type: string - maxLength: 2048 - id: - type: integer - readOnly: true - created_by: - $ref: '#/components/schemas/UserSimple' + annotation_filter_options: + $ref: '#/components/schemas/LseAnnotationFilterOptions' + converted_formats: + items: + $ref: '#/components/schemas/ConvertedFormat' + type: array + counters: + title: Exporting meta data created_at: - type: string + description: Creation time format: date-time readOnly: true - description: Creation time - finished_at: type: string + created_by: + $ref: '#/components/schemas/UserSimple' + finished_at: + description: Complete or fail time format: date-time nullable: true - description: Complete or fail time + type: string + id: + readOnly: true + type: integer + md5: + maxLength: 128 + title: Md5 of file + type: string + serialization_options: + $ref: '#/components/schemas/SerializationOptions' status: allOf: - - $ref: '#/components/schemas/Status7bfEnum' + - $ref: '#/components/schemas/Status7bfEnum' title: Export status - md5: - type: string - title: Md5 of file - maxLength: 128 - counters: - title: Exporting meta data - converted_formats: - type: array - items: - $ref: '#/components/schemas/ConvertedFormat' task_filter_options: $ref: '#/components/schemas/LseTaskFilterOptions' - annotation_filter_options: - $ref: '#/components/schemas/LseAnnotationFilterOptions' - serialization_options: - $ref: '#/components/schemas/SerializationOptions' + title: + maxLength: 2048 + type: string required: - - created_at - - id - LseExportCreateRequest: + - created_at + - id type: object + LseExportCreateRequest: properties: - title: - type: string - maxLength: 2048 + annotation_filter_options: + $ref: '#/components/schemas/LseAnnotationFilterOptionsRequest' + converted_formats: + items: + $ref: '#/components/schemas/ConvertedFormatRequest' + type: array + counters: + title: Exporting meta data created_by: $ref: '#/components/schemas/UserSimpleRequest' finished_at: - type: string + description: Complete or fail time format: date-time nullable: true - description: Complete or fail time - status: - allOf: - - $ref: '#/components/schemas/Status7bfEnum' - title: Export status - md5: type: string + md5: + maxLength: 128 minLength: 1 title: Md5 of file - maxLength: 128 - counters: - title: Exporting meta data - converted_formats: - type: array - items: - $ref: '#/components/schemas/ConvertedFormatRequest' - task_filter_options: - $ref: '#/components/schemas/LseTaskFilterOptionsRequest' - annotation_filter_options: - $ref: '#/components/schemas/LseAnnotationFilterOptionsRequest' + type: string serialization_options: $ref: '#/components/schemas/SerializationOptionsRequest' - LseFields: + status: + allOf: + - $ref: '#/components/schemas/Status7bfEnum' + title: Export status + task_filter_options: + $ref: '#/components/schemas/LseTaskFilterOptionsRequest' + title: + maxLength: 2048 + type: string type: object + LseFields: properties: - invite_expired: + email_notification_settings: + readOnly: true type: string + invite_activated: + nullable: true + type: boolean + invite_expired: readOnly: true - invite_expired_at: type: string + invite_expired_at: readOnly: true - invited_at: type: string + invited_at: format: date-time nullable: true - invite_activated: - type: boolean - nullable: true - trial_company: - type: string - nullable: true - maxLength: 1000 - trial_role: - nullable: true - oneOf: - - $ref: '#/components/schemas/TrialRoleEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - trial_models_in_production: type: string + invited_by: nullable: true - maxLength: 1000 - trial_experience_labeling: - type: string - nullable: true - maxLength: 1000 - trial_license_enterprise: - type: boolean - nullable: true - social_auth_finished: - type: boolean - nullable: true - description: Is user finished social authentication - invited_by: type: integer - nullable: true onboarding_state: - nullable: true description: |- The current stage of user onboarding @@ -19950,57 +19227,54 @@ components: * `first_tutorial` - First Tutorial * `in_app_guidance` - In App Guidance * `complete` - Complete + nullable: true oneOf: - - $ref: '#/components/schemas/OnboardingStateEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - email_notification_settings: - type: string - readOnly: true - required: - - email_notification_settings - - invite_expired - - invite_expired_at - LseFieldsRequest: - type: object - properties: - invited_at: - type: string - format: date-time + - $ref: '#/components/schemas/OnboardingStateEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + social_auth_finished: + description: Is user finished social authentication nullable: true - invite_activated: type: boolean - nullable: true trial_company: - type: string + maxLength: 1000 nullable: true + type: string + trial_experience_labeling: maxLength: 1000 - trial_role: nullable: true - oneOf: - - $ref: '#/components/schemas/TrialRoleEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - trial_models_in_production: type: string + trial_license_enterprise: nullable: true + type: boolean + trial_models_in_production: maxLength: 1000 - trial_experience_labeling: + nullable: true type: string + trial_role: nullable: true - maxLength: 1000 - trial_license_enterprise: - type: boolean + oneOf: + - $ref: '#/components/schemas/TrialRoleEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + required: + - email_notification_settings + - invite_expired + - invite_expired_at + type: object + LseFieldsRequest: + properties: + invite_activated: nullable: true - social_auth_finished: type: boolean + invited_at: + format: date-time nullable: true - description: Is user finished social authentication + type: string invited_by: - type: integer nullable: true + type: integer onboarding_state: - nullable: true description: |- The current stage of user onboarding @@ -20010,29 +19284,61 @@ components: * `first_tutorial` - First Tutorial * `in_app_guidance` - In App Guidance * `complete` - Complete + nullable: true oneOf: - - $ref: '#/components/schemas/OnboardingStateEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - LseOrganization: + - $ref: '#/components/schemas/OnboardingStateEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + social_auth_finished: + description: Is user finished social authentication + nullable: true + type: boolean + trial_company: + maxLength: 1000 + nullable: true + type: string + trial_experience_labeling: + maxLength: 1000 + nullable: true + type: string + trial_license_enterprise: + nullable: true + type: boolean + trial_models_in_production: + maxLength: 1000 + nullable: true + type: string + trial_role: + nullable: true + oneOf: + - $ref: '#/components/schemas/TrialRoleEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' type: object + LseOrganization: properties: - id: - type: integer + billing: + $ref: '#/components/schemas/OrganizationBilling' + created_at: + format: date-time readOnly: true - external_id: type: string + custom_scripts_editable_by: + description: |- + Set the minimum user role that can edit custom scripts in the UI. + + * `AD` - Administrator + * `MA` - Manager nullable: true - description: External ID to uniquely identify this organization - title: - type: string + oneOf: + - $ref: '#/components/schemas/CustomScriptsEditableByEnum' + - $ref: '#/components/schemas/NullEnum' + custom_scripts_enabled: readOnly: true - token: type: string - readOnly: true default_role: allOf: - - $ref: '#/components/schemas/DefaultRoleEnum' + - $ref: '#/components/schemas/DefaultRoleEnum' description: |- Default membership role for invited users @@ -20043,3044 +19349,2937 @@ components: * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated - created_at: - type: string - format: date-time + email_notification_settings: readOnly: true - billing: - $ref: '#/components/schemas/OrganizationBilling' + type: string embed_domains: + description: 'List of objects: {"domain": "example.com"}. Used for CSP header on /embed routes.' nullable: true - description: 'List of objects: {"domain": "example.com"}. Used for CSP header - on /embed routes.' embed_settings: - nullable: true description: Embed settings for this organization - custom_scripts_enabled: + nullable: true + external_id: + description: External ID to uniquely identify this organization + nullable: true type: string + id: + readOnly: true + type: integer + title: readOnly: true - custom_scripts_editable_by: - nullable: true - description: |- - Set the minimum user role that can edit custom scripts in the UI. - - * `AD` - Administrator - * `MA` - Manager - oneOf: - - $ref: '#/components/schemas/CustomScriptsEditableByEnum' - - $ref: '#/components/schemas/NullEnum' - email_notification_settings: type: string + token: readOnly: true + type: string required: - - billing - - created_at - - custom_scripts_enabled - - email_notification_settings - - id - - title - - token - LseOrganizationMemberList: + - billing + - created_at + - custom_scripts_enabled + - email_notification_settings + - id + - title + - token type: object + LseOrganizationMemberList: description: |- A serializer mixin that takes an additional `fields` argument that controls which fields should be displayed. properties: id: - type: integer readOnly: true - organization: type: integer + organization: description: Organization ID - user: - $ref: '#/components/schemas/LseUserOrganizationMemberList' + type: integer role: - type: string readOnly: true + type: string + user: + $ref: '#/components/schemas/LseUserOrganizationMemberList' required: - - id - - organization - - role - - user - LseProject: + - id + - organization + - role + - user type: object + LseProject: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: + annotation_limit_count: + minimum: 1 + nullable: true type: integer - readOnly: true - title: - type: string + annotation_limit_percent: + format: decimal nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - description: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ type: string + annotator_evaluation_minimum_score: + default: '95.00' + format: decimal nullable: true - description: Project description - label_config: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ type: string + annotator_evaluation_minimum_tasks: + default: 10 + minimum: 0 nullable: true - description: Label config in XML format. See more about it in documentation - expert_instruction: - type: string + type: integer + assignment_settings: + $ref: '#/components/schemas/AssignmentSettings' + color: + maxLength: 16 nullable: true - description: Labeling instructions in HTML format - show_instruction: - type: boolean - description: Show instructions to the annotator before they start - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task - enable_empty_annotation: + type: string + comment_classification_config: + type: string + config_has_control_tags: + description: Flag to detect is project ready for labeling + readOnly: true type: boolean - description: Allow annotators to submit empty annotations - show_annotation_history: + config_suitable_for_bulk_annotation: + description: Flag to detect is project ready for bulk annotation + readOnly: true type: boolean - description: Show annotation history to annotator - organization: - type: integer + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' nullable: true - color: + created_at: + format: date-time + readOnly: true + type: string + created_by: + allOf: + - $ref: '#/components/schemas/UserSimple' + description: Project owner + custom_script: type: string + custom_task_lock_ttl: + description: TTL in seconds for task reservations, on new and existing tasks + maximum: 86400 + minimum: 1 nullable: true - maxLength: 16 - maximum_annotations: type: integer - maximum: 2147483647 - minimum: -2147483648 - title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - is_published: + data_types: + nullable: true + readOnly: true + description: + description: Project description + nullable: true + type: string + duplication_done: + default: false type: boolean - title: Published - description: Whether or not the project is published to annotators - model_version: + duplication_status: type: string - nullable: true - description: Machine learning model version - is_draft: + enable_empty_annotation: + description: Allow annotators to submit empty annotations type: boolean - description: Whether or not the project is in the middle of being created - created_by: - allOf: - - $ref: '#/components/schemas/UserSimple' - description: Project owner - created_at: + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task + type: boolean + expert_instruction: + description: Labeling instructions in HTML format + nullable: true type: string - format: date-time + finished_task_number: + description: Finished tasks readOnly: true - min_annotations_to_start_training: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started - start_training_on_annotation_update: - type: boolean + ground_truth_number: + description: Honeypot annotation number in project readOnly: true - description: Start model training after any annotations are submitted or - updated - show_collab_predictions: - type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions - num_tasks_with_annotations: type: integer + id: readOnly: true - description: Tasks with annotations count - task_number: type: integer - readOnly: true - description: Total task number in project - useful_annotation_number: + is_draft: + description: Whether or not the project is in the middle of being created + type: boolean + is_published: + description: Whether or not the project is published to annotators + title: Published + type: boolean + label_config: + description: Label config in XML format. See more about it in documentation + nullable: true + type: string + maximum_annotations: + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + maximum: 2147483647 + minimum: -2147483648 + title: Maximum annotation number type: integer + members: readOnly: true - description: Useful annotation number in project not including skipped_annotations_number - and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number - + ground_truth_number - ground_truth_number: - type: integer + type: string + members_count: readOnly: true - description: Honeypot annotation number in project - skipped_annotations_number: type: integer - readOnly: true - description: Skipped by collaborators annotation number in project - total_annotations_number: + min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started + maximum: 2147483647 + minimum: -2147483648 type: integer + model_version: + description: Machine learning model version + nullable: true + type: string + num_tasks_with_annotations: + description: Tasks with annotations count readOnly: true - description: Total annotations number in project including skipped_annotations_number - and ground_truth_number. - total_predictions_number: type: integer - readOnly: true - description: Total predictions number in project including skipped_annotations_number, - ground_truth_number, and useful_annotation_number. - sampling: + organization: nullable: true - oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' - show_ground_truth_first: - type: boolean - show_overlap_first: - type: boolean - overlap_cohort_percentage: type: integer + overlap_cohort_percentage: maximum: 2147483647 minimum: -2147483648 - task_data_login: - type: string - nullable: true - description: 'Task data credentials: login' - maxLength: 256 - task_data_password: - type: string - nullable: true - description: 'Task data credentials: password' - maxLength: 256 - control_weights: - nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' + type: integer parsed_label_config: - readOnly: true description: JSON-formatted labeling configuration - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean readOnly: true - description: Flag to detect is project ready for labeling - skip_queue: + pause_on_failed_annotator_evaluation: + default: false nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: type: boolean - description: Reveal pre-annotations interactively pinned_at: - type: string + description: Pinned date and time format: date-time nullable: true - description: Pinned date and time - finished_task_number: - type: integer - readOnly: true - description: Finished tasks - queue_total: type: string + prompts: readOnly: true - queue_done: type: string + queue_done: readOnly: true - config_suitable_for_bulk_annotation: - type: boolean + type: string + queue_left: readOnly: true - description: Flag to detect is project ready for bulk annotation - workspace: type: string + queue_total: readOnly: true + type: string + require_comment_on_skip: + default: false + type: boolean + reveal_preannotations_interactively: + description: Reveal pre-annotations interactively + type: boolean review_settings: $ref: '#/components/schemas/ReviewSettings' - assignment_settings: - $ref: '#/components/schemas/AssignmentSettings' - members: - type: string + reviewer_queue_total: readOnly: true - custom_script: type: string - comment_classification_config: - type: string - duplication_done: + sampling: + nullable: true + oneOf: + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator type: boolean - default: false - duplication_status: - type: string - require_comment_on_skip: + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator type: boolean - default: false - data_types: + show_ground_truth_first: + type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean + show_overlap_first: + type: boolean + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean + skip_queue: + nullable: true + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + skipped_annotations_number: + description: Skipped by collaborators annotation number in project + readOnly: true + type: integer + start_training_on_annotation_update: + description: Start model training after any annotations are submitted or updated readOnly: true + type: boolean + task_data_login: + description: 'Task data credentials: login' + maxLength: 256 + nullable: true + type: string + task_data_password: + description: 'Task data credentials: password' + maxLength: 256 nullable: true - reviewer_queue_total: type: string + task_number: + description: Total task number in project readOnly: true - queue_left: + type: integer + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 + nullable: true type: string + total_annotations_number: + description: Total annotations number in project including skipped_annotations_number and ground_truth_number. readOnly: true - members_count: type: integer + total_predictions_number: + description: Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. readOnly: true - custom_task_lock_ttl: type: integer - maximum: 86400 - minimum: 1 - nullable: true - description: TTL in seconds for task reservations, on new and existing tasks - prompts: - type: string + useful_annotation_number: + description: Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number readOnly: true - annotation_limit_count: type: integer - minimum: 1 - nullable: true - annotation_limit_percent: - type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - nullable: true - pause_on_failed_annotator_evaluation: - type: boolean - nullable: true - default: false - annotator_evaluation_minimum_score: + workspace: + readOnly: true type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - nullable: true - default: '95.00' - annotator_evaluation_minimum_tasks: - type: integer - minimum: 0 - nullable: true - default: 10 workspace_title: - type: string readOnly: true + type: string required: - - assignment_settings - - config_has_control_tags - - config_suitable_for_bulk_annotation - - created_at - - data_types - - finished_task_number - - ground_truth_number - - id - - members - - members_count - - num_tasks_with_annotations - - parsed_label_config - - prompts - - queue_done - - queue_left - - queue_total - - review_settings - - reviewer_queue_total - - skipped_annotations_number - - start_training_on_annotation_update - - task_number - - total_annotations_number - - total_predictions_number - - useful_annotation_number - - workspace - - workspace_title - LseProjectCounts: + - assignment_settings + - config_has_control_tags + - config_suitable_for_bulk_annotation + - created_at + - data_types + - finished_task_number + - ground_truth_number + - id + - members + - members_count + - num_tasks_with_annotations + - parsed_label_config + - prompts + - queue_done + - queue_left + - queue_total + - review_settings + - reviewer_queue_total + - skipped_annotations_number + - start_training_on_annotation_update + - task_number + - total_annotations_number + - total_predictions_number + - useful_annotation_number + - workspace + - workspace_title type: object + LseProjectCounts: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: - type: integer + finished_task_number: readOnly: true - task_number: type: integer + ground_truth_number: + description: Honeypot annotation number in project readOnly: true - description: Total task number in project - finished_task_number: type: integer + id: readOnly: true - total_predictions_number: type: integer + num_tasks_with_annotations: readOnly: true - total_annotations_number: type: string + queue_done: readOnly: true - num_tasks_with_annotations: type: string + queue_left: readOnly: true - useful_annotation_number: type: string + queue_total: readOnly: true - ground_truth_number: - type: integer - readOnly: true - description: Honeypot annotation number in project - skipped_annotations_number: type: string - readOnly: true rejected: - type: string readOnly: true - queue_total: type: string + review_total_tasks: readOnly: true - queue_done: type: string + reviewed_number: readOnly: true - queue_left: type: string + skipped_annotations_number: readOnly: true - reviewed_number: type: string + task_number: + description: Total task number in project + readOnly: true + type: integer + total_annotations_number: readOnly: true - review_total_tasks: type: string + total_predictions_number: + readOnly: true + type: integer + useful_annotation_number: readOnly: true + type: string required: - - finished_task_number - - ground_truth_number - - id - - num_tasks_with_annotations - - queue_done - - queue_left - - queue_total - - rejected - - review_total_tasks - - reviewed_number - - skipped_annotations_number - - task_number - - total_annotations_number - - total_predictions_number - - useful_annotation_number - LseProjectCreate: + - finished_task_number + - ground_truth_number + - id + - num_tasks_with_annotations + - queue_done + - queue_left + - queue_total + - rejected + - review_total_tasks + - reviewed_number + - skipped_annotations_number + - task_number + - total_annotations_number + - total_predictions_number + - useful_annotation_number type: object + LseProjectCreate: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: - type: integer - readOnly: true - title: - type: string + color: + maxLength: 16 nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - description: type: string + config_has_control_tags: + description: Flag to detect is project ready for labeling + readOnly: true + type: boolean + config_suitable_for_bulk_annotation: + description: Flag to detect is project ready for bulk annotation + readOnly: true + type: boolean + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' nullable: true - description: Project description - label_config: + created_at: + format: date-time + readOnly: true type: string + created_by: + allOf: + - $ref: '#/components/schemas/UserSimple' + description: Project owner + description: + description: Project description nullable: true - description: Label config in XML format. See more about it in documentation - expert_instruction: type: string - nullable: true - description: Labeling instructions in HTML format - show_instruction: - type: boolean - description: Show instructions to the annotator before they start - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task enable_empty_annotation: - type: boolean description: Allow annotators to submit empty annotations - show_annotation_history: type: boolean - description: Show annotation history to annotator - organization: - type: integer + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task + type: boolean + expert_instruction: + description: Labeling instructions in HTML format nullable: true - color: type: string - nullable: true - maxLength: 16 - maximum_annotations: + finished_task_number: + description: Finished tasks + readOnly: true type: integer - maximum: 2147483647 - minimum: -2147483648 - title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - is_published: + ground_truth_number: + description: Honeypot annotation number in project + readOnly: true + type: integer + id: + readOnly: true + type: integer + is_draft: + description: Whether or not the project is in the middle of being created type: boolean - title: Published + is_published: description: Whether or not the project is published to annotators - model_version: - type: string - nullable: true - description: Machine learning model version - is_draft: + title: Published type: boolean - description: Whether or not the project is in the middle of being created - created_by: - allOf: - - $ref: '#/components/schemas/UserSimple' - description: Project owner - created_at: + label_config: + description: Label config in XML format. See more about it in documentation + nullable: true type: string - format: date-time - readOnly: true - min_annotations_to_start_training: + maximum_annotations: + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + maximum: 2147483647 + minimum: -2147483648 + title: Maximum annotation number type: integer + min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started maximum: 2147483647 minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started - start_training_on_annotation_update: - type: boolean - readOnly: true - description: Start model training after any annotations are submitted or - updated - show_collab_predictions: - type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions - num_tasks_with_annotations: type: integer - readOnly: true + model_version: + description: Machine learning model version + nullable: true + type: string + num_tasks_with_annotations: description: Tasks with annotations count - task_number: - type: integer readOnly: true - description: Total task number in project - useful_annotation_number: type: integer - readOnly: true - description: Useful annotation number in project not including skipped_annotations_number - and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number - + ground_truth_number - ground_truth_number: + organization: + nullable: true type: integer - readOnly: true - description: Honeypot annotation number in project - skipped_annotations_number: + overlap_cohort_percentage: + maximum: 2147483647 + minimum: -2147483648 type: integer + parsed_label_config: + description: JSON-formatted labeling configuration readOnly: true - description: Skipped by collaborators annotation number in project - total_annotations_number: - type: integer + pinned_at: + description: Pinned date and time + format: date-time + nullable: true + type: string + queue_done: readOnly: true - description: Total annotations number in project including skipped_annotations_number - and ground_truth_number. - total_predictions_number: type: integer + queue_total: readOnly: true - description: Total predictions number in project including skipped_annotations_number, - ground_truth_number, and useful_annotation_number. + type: integer + reveal_preannotations_interactively: + description: Reveal pre-annotations interactively + type: boolean sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator + type: boolean + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator + type: boolean show_ground_truth_first: type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean show_overlap_first: type: boolean - overlap_cohort_percentage: + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean + skip_queue: + nullable: true + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + skipped_annotations_number: + description: Skipped by collaborators annotation number in project + readOnly: true type: integer - maximum: 2147483647 - minimum: -2147483648 + start_training_on_annotation_update: + description: Start model training after any annotations are submitted or updated + readOnly: true + type: boolean task_data_login: - type: string - nullable: true description: 'Task data credentials: login' maxLength: 256 - task_data_password: - type: string nullable: true + type: string + task_data_password: description: 'Task data credentials: password' maxLength: 256 - control_weights: nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' - parsed_label_config: - readOnly: true - description: JSON-formatted labeling configuration - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean + type: string + task_number: + description: Total task number in project readOnly: true - description: Flag to detect is project ready for labeling - skip_queue: + type: integer + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: - type: boolean - description: Reveal pre-annotations interactively - pinned_at: type: string - format: date-time - nullable: true - description: Pinned date and time - finished_task_number: - type: integer + total_annotations_number: + description: Total annotations number in project including skipped_annotations_number and ground_truth_number. readOnly: true - description: Finished tasks - queue_total: type: integer + total_predictions_number: + description: Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. readOnly: true - queue_done: type: integer + useful_annotation_number: + description: Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number readOnly: true - config_suitable_for_bulk_annotation: - type: boolean - readOnly: true - description: Flag to detect is project ready for bulk annotation + type: integer workspace: type: integer required: - - config_has_control_tags - - config_suitable_for_bulk_annotation - - created_at - - finished_task_number - - ground_truth_number - - id - - num_tasks_with_annotations - - parsed_label_config - - queue_done - - queue_total - - skipped_annotations_number - - start_training_on_annotation_update - - task_number - - total_annotations_number - - total_predictions_number - - useful_annotation_number - LseProjectCreateRequest: + - config_has_control_tags + - config_suitable_for_bulk_annotation + - created_at + - finished_task_number + - ground_truth_number + - id + - num_tasks_with_annotations + - parsed_label_config + - queue_done + - queue_total + - skipped_annotations_number + - start_training_on_annotation_update + - task_number + - total_annotations_number + - total_predictions_number + - useful_annotation_number type: object + LseProjectCreateRequest: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - title: - type: string + color: + maxLength: 16 nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - description: type: string + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' nullable: true + created_by: + allOf: + - $ref: '#/components/schemas/UserSimpleRequest' + description: Project owner + description: description: Project description - label_config: - type: string nullable: true - description: Label config in XML format. See more about it in documentation - expert_instruction: type: string - nullable: true - description: Labeling instructions in HTML format - show_instruction: - type: boolean - description: Show instructions to the annotator before they start - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task enable_empty_annotation: - type: boolean description: Allow annotators to submit empty annotations - show_annotation_history: type: boolean - description: Show annotation history to annotator - organization: - type: integer + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task + type: boolean + expert_instruction: + description: Labeling instructions in HTML format nullable: true - color: type: string + is_draft: + description: Whether or not the project is in the middle of being created + type: boolean + is_published: + description: Whether or not the project is published to annotators + title: Published + type: boolean + label_config: + description: Label config in XML format. See more about it in documentation nullable: true - maxLength: 16 + type: string maximum_annotations: - type: integer + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) maximum: 2147483647 minimum: -2147483648 title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - is_published: - type: boolean - title: Published - description: Whether or not the project is published to annotators - model_version: - type: string - nullable: true - description: Machine learning model version - is_draft: - type: boolean - description: Whether or not the project is in the middle of being created - created_by: - allOf: - - $ref: '#/components/schemas/UserSimpleRequest' - description: Project owner + type: integer min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started + maximum: 2147483647 + minimum: -2147483648 + type: integer + model_version: + description: Machine learning model version + nullable: true + type: string + organization: + nullable: true type: integer + overlap_cohort_percentage: maximum: 2147483647 minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started - show_collab_predictions: + type: integer + pinned_at: + description: Pinned date and time + format: date-time + nullable: true + type: string + reveal_preannotations_interactively: + description: Reveal pre-annotations interactively type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator + type: boolean + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator + type: boolean show_ground_truth_first: type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean show_overlap_first: type: boolean - overlap_cohort_percentage: - type: integer - maximum: 2147483647 - minimum: -2147483648 - task_data_login: - type: string + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean + skip_queue: nullable: true + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + task_data_login: description: 'Task data credentials: login' maxLength: 256 - task_data_password: - type: string nullable: true + type: string + task_data_password: description: 'Task data credentials: password' maxLength: 256 - control_weights: - nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - skip_queue: nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: - type: boolean - description: Reveal pre-annotations interactively - pinned_at: type: string - format: date-time + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 nullable: true - description: Pinned date and time + type: string workspace: type: integer - LseProjectParamsRequest: type: object + LseProjectParamsRequest: properties: - use_kappa: - type: boolean - description: If categorical variables are used in labeling (e.g. choices), - Cohen's Kappa statistic is computed to measure inter-rater reliability - instead of basic agreement annotator_params: + description: 'user ID and user weight in score calculation. Format {user_id[int]: weight[Float[0..1]]}' nullable: true - description: 'user ID and user weight in score calculation. Format {user_id[int]: - weight[Float[0..1]]}' - LseProjectUpdate: + use_kappa: + description: If categorical variables are used in labeling (e.g. choices), Cohen's Kappa statistic is computed to measure inter-rater reliability instead of basic agreement + type: boolean type: object + LseProjectUpdate: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: - type: integer - readOnly: true - title: - type: string + annotation_limit_count: + minimum: 1 nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - description: - type: string + type: integer + annotation_limit_percent: + format: decimal nullable: true - description: Project description - label_config: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ type: string + annotator_evaluation_minimum_score: + default: '95.00' + format: decimal nullable: true - description: Label config in XML format. See more about it in documentation - expert_instruction: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ type: string + annotator_evaluation_minimum_tasks: + default: 10 + minimum: 0 nullable: true - description: Labeling instructions in HTML format - show_instruction: - type: boolean - description: Show instructions to the annotator before they start - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task - enable_empty_annotation: - type: boolean - description: Allow annotators to submit empty annotations - show_annotation_history: - type: boolean - description: Show annotation history to annotator - organization: type: integer - nullable: true + assignment_settings: + $ref: '#/components/schemas/AssignmentSettings' color: - type: string - nullable: true maxLength: 16 - maximum_annotations: - type: integer - maximum: 2147483647 - minimum: -2147483648 - title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - is_published: - type: boolean - title: Published - description: Whether or not the project is published to annotators - model_version: - type: string nullable: true - description: Machine learning model version - is_draft: + type: string + comment_classification_config: + type: string + config_has_control_tags: + description: Flag to detect is project ready for labeling + readOnly: true type: boolean - description: Whether or not the project is in the middle of being created + config_suitable_for_bulk_annotation: + description: Flag to detect is project ready for bulk annotation + readOnly: true + type: boolean + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' + nullable: true + created_at: + format: date-time + readOnly: true + type: string created_by: allOf: - - $ref: '#/components/schemas/UserSimple' + - $ref: '#/components/schemas/UserSimple' description: Project owner - created_at: + custom_script: type: string - format: date-time - readOnly: true - min_annotations_to_start_training: + custom_task_lock_ttl: + description: TTL in seconds for task reservations, on new and existing tasks + maximum: 86400 + minimum: 1 + nullable: true type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started - start_training_on_annotation_update: + description: + description: Project description + nullable: true + type: string + enable_empty_annotation: + description: Allow annotators to submit empty annotations type: boolean - readOnly: true - description: Start model training after any annotations are submitted or - updated - show_collab_predictions: + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions - num_tasks_with_annotations: - type: integer - readOnly: true - description: Tasks with annotations count - task_number: - type: integer + expert_instruction: + description: Labeling instructions in HTML format + nullable: true + type: string + finished_task_number: + description: Finished tasks readOnly: true - description: Total task number in project - useful_annotation_number: type: integer - readOnly: true - description: Useful annotation number in project not including skipped_annotations_number - and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number - + ground_truth_number ground_truth_number: - type: integer - readOnly: true description: Honeypot annotation number in project - skipped_annotations_number: - type: integer readOnly: true - description: Skipped by collaborators annotation number in project - total_annotations_number: type: integer + id: readOnly: true - description: Total annotations number in project including skipped_annotations_number - and ground_truth_number. - total_predictions_number: type: integer - readOnly: true - description: Total predictions number in project including skipped_annotations_number, - ground_truth_number, and useful_annotation_number. - sampling: - nullable: true - oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' - show_ground_truth_first: + is_draft: + description: Whether or not the project is in the middle of being created type: boolean - show_overlap_first: + is_published: + description: Whether or not the project is published to annotators + title: Published type: boolean - overlap_cohort_percentage: + label_config: + description: Label config in XML format. See more about it in documentation + nullable: true + type: string + maximum_annotations: + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + maximum: 2147483647 + minimum: -2147483648 + title: Maximum annotation number type: integer + min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started maximum: 2147483647 minimum: -2147483648 - task_data_login: - type: string + type: integer + model_version: + description: Machine learning model version nullable: true - description: 'Task data credentials: login' - maxLength: 256 - task_data_password: type: string + num_tasks_with_annotations: + description: Tasks with annotations count + readOnly: true + type: integer + organization: nullable: true - description: 'Task data credentials: password' - maxLength: 256 - control_weights: - nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' + type: integer + overlap_cohort_percentage: + maximum: 2147483647 + minimum: -2147483648 + type: integer parsed_label_config: - readOnly: true description: JSON-formatted labeling configuration - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean readOnly: true - description: Flag to detect is project ready for labeling - skip_queue: + pause_on_failed_annotator_evaluation: + default: false nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: type: boolean - description: Reveal pre-annotations interactively pinned_at: - type: string + description: Pinned date and time format: date-time nullable: true - description: Pinned date and time - finished_task_number: - type: integer - readOnly: true - description: Finished tasks - queue_total: - type: integer + type: string + prompts: readOnly: true + type: string queue_done: - type: integer readOnly: true - config_suitable_for_bulk_annotation: - type: boolean + type: integer + queue_total: readOnly: true - description: Flag to detect is project ready for bulk annotation - workspace: type: integer + require_comment_on_skip: + default: false + type: boolean + reveal_preannotations_interactively: + description: Reveal pre-annotations interactively + type: boolean review_settings: $ref: '#/components/schemas/ReviewSettings' - assignment_settings: - $ref: '#/components/schemas/AssignmentSettings' - custom_script: - type: string - comment_classification_config: - type: string - require_comment_on_skip: + sampling: + nullable: true + oneOf: + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator type: boolean - default: false - custom_task_lock_ttl: - type: integer - maximum: 86400 - minimum: 1 + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator + type: boolean + show_ground_truth_first: + type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean + show_overlap_first: + type: boolean + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean + skip_queue: nullable: true - description: TTL in seconds for task reservations, on new and existing tasks - prompts: - type: string + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + skipped_annotations_number: + description: Skipped by collaborators annotation number in project readOnly: true - annotation_limit_count: type: integer - minimum: 1 - nullable: true - annotation_limit_percent: - type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - nullable: true - pause_on_failed_annotator_evaluation: + start_training_on_annotation_update: + description: Start model training after any annotations are submitted or updated + readOnly: true type: boolean + task_data_login: + description: 'Task data credentials: login' + maxLength: 256 nullable: true - default: false - annotator_evaluation_minimum_score: type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + task_data_password: + description: 'Task data credentials: password' + maxLength: 256 nullable: true - default: '95.00' - annotator_evaluation_minimum_tasks: + type: string + task_number: + description: Total task number in project + readOnly: true type: integer - minimum: 0 + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 nullable: true - default: 10 - workspace_title: type: string + total_annotations_number: + description: Total annotations number in project including skipped_annotations_number and ground_truth_number. + readOnly: true + type: integer + total_predictions_number: + description: Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. + readOnly: true + type: integer + useful_annotation_number: + description: Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number + readOnly: true + type: integer + workspace: + type: integer + workspace_title: readOnly: true + type: string required: - - assignment_settings - - config_has_control_tags - - config_suitable_for_bulk_annotation - - created_at - - finished_task_number - - ground_truth_number - - id - - num_tasks_with_annotations - - parsed_label_config - - prompts - - queue_done - - queue_total - - review_settings - - skipped_annotations_number - - start_training_on_annotation_update - - task_number - - total_annotations_number - - total_predictions_number - - useful_annotation_number - - workspace - - workspace_title - LseS3ExportStorage: + - assignment_settings + - config_has_control_tags + - config_suitable_for_bulk_annotation + - created_at + - finished_task_number + - ground_truth_number + - id + - num_tasks_with_annotations + - parsed_label_config + - prompts + - queue_done + - queue_total + - review_settings + - skipped_annotations_number + - start_training_on_annotation_update + - task_number + - total_annotations_number + - total_predictions_number + - useful_annotation_number + - workspace + - workspace_title type: object + LseS3ExportStorage: properties: - id: - type: integer + aws_access_key_id: + description: AWS_ACCESS_KEY_ID + nullable: true + type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY + nullable: true + type: string + aws_session_token: + description: AWS_SESSION_TOKEN + nullable: true + type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID + nullable: true + type: string + bucket: + description: S3 bucket name + nullable: true + type: string + can_delete_objects: + description: Deletion from storage enabled + nullable: true + type: boolean + created_at: + description: Creation time + format: date-time readOnly: true - type: type: string + description: + description: Cloud storage description + nullable: true + type: string + external_id: + description: AWS ExternalId + nullable: true + title: ExternalID + type: string + id: readOnly: true - default: s3s - synchronizable: - type: boolean - default: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: + nullable: true type: string + legacy_auth: nullable: true - description: Traceback report for the last failed sync + type: boolean meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: + prefix: + description: S3 bucket prefix + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - can_delete_objects: - type: boolean + region_name: + description: AWS Region nullable: true - description: Deletion from storage enabled - bucket: type: string + role_arn: + description: AWS RoleArn + type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: S3 bucket name - prefix: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: S3 bucket prefix - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string + type: + default: s3s + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - created_at + - id + - project + - role_arn + - type + type: object + LseS3ExportStorageRequest: + properties: aws_access_key_id: - type: string - nullable: true description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true - description: AWS SSE KMS Key ID - region_name: type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID nullable: true - description: AWS Region - s3_endpoint: type: string + bucket: + description: S3 bucket name nullable: true - description: S3 Endpoint - external_id: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - title: ExternalID - description: AWS ExternalId - role_arn: - type: string - description: AWS RoleArn - legacy_auth: type: boolean + description: + description: Cloud storage description nullable: true - project: - type: integer - description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - role_arn - - type - LseS3ExportStorageRequest: - type: object - properties: - synchronizable: - type: boolean - default: true - last_sync: type: string - format: date-time + external_id: + description: AWS ExternalId nullable: true + title: ExternalID + type: string + last_sync: description: Last sync finished time + format: date-time + nullable: true + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: + nullable: true type: string + legacy_auth: nullable: true - description: Traceback report for the last failed sync + type: boolean meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: + prefix: + description: S3 bucket prefix + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Cloud storage description - can_delete_objects: - type: boolean + type: string + region_name: + description: AWS Region nullable: true - description: Deletion from storage enabled - bucket: type: string + role_arn: + description: AWS RoleArn + minLength: 1 + type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: S3 bucket name - prefix: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: S3 bucket prefix - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - project + - role_arn + type: object + LseS3ImportStorage: + properties: aws_access_key_id: - type: string - nullable: true description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true + type: string + aws_sse_kms_key_id: description: AWS SSE KMS Key ID - region_name: + nullable: true type: string + bucket: + description: S3 bucket name nullable: true - description: AWS Region - s3_endpoint: type: string + created_at: + description: Creation time + format: date-time + readOnly: true + type: string + description: + description: Cloud storage description nullable: true - description: S3 Endpoint - external_id: type: string + external_id: + description: AWS ExternalId nullable: true title: ExternalID - description: AWS ExternalId - role_arn: type: string - minLength: 1 - description: AWS RoleArn - legacy_auth: - type: boolean - nullable: true - project: - type: integer - description: A unique integer value identifying this project. - required: - - project - - role_arn - LseS3ImportStorage: - type: object - properties: id: - type: integer - readOnly: true - type: - type: string readOnly: true - default: s3s - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: + nullable: true type: string + legacy_auth: nullable: true - description: Traceback report for the last failed sync + type: boolean meta: - nullable: true description: Meta and debug information about storage processes - title: + nullable: true + prefix: + description: S3 bucket prefix + nullable: true type: string + presign: + default: true + type: boolean + presign_ttl: + description: Presigned URLs TTL (in minutes) + maximum: 32767 + minimum: 0 + type: integer + project: + description: A unique integer value identifying this project. + type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Cloud storage title - maxLength: 256 - description: type: string + region_name: + description: AWS Region nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - bucket: + role_arn: + description: AWS RoleArn type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: S3 bucket name - prefix: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: S3 bucket prefix - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string + type: + default: s3s + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - created_at + - id + - project + - role_arn + - type + type: object + LseS3ImportStorageRequest: + properties: aws_access_key_id: - type: string - nullable: true description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true + type: string + aws_sse_kms_key_id: description: AWS SSE KMS Key ID - region_name: + nullable: true type: string + bucket: + description: S3 bucket name nullable: true - description: AWS Region - s3_endpoint: type: string + description: + description: Cloud storage description nullable: true - description: S3 Endpoint - external_id: type: string + external_id: + description: AWS ExternalId nullable: true title: ExternalID - description: AWS ExternalId - role_arn: type: string - description: AWS RoleArn - legacy_auth: - type: boolean - nullable: true - presign_ttl: - type: integer - maximum: 32767 - minimum: 0 - description: Presigned URLs TTL (in minutes) - recursive_scan: - type: boolean - description: Perform recursive scan over the bucket content - project: - type: integer - description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - role_arn - - type - LseS3ImportStorageRequest: - type: object - properties: - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: + nullable: true type: string + legacy_auth: nullable: true - description: Traceback report for the last failed sync + type: boolean meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string - nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string nullable: true - description: Cloud storage description - bucket: - type: string - nullable: true - description: S3 bucket name prefix: - type: string - nullable: true description: S3 bucket prefix - regex_filter: - type: string - nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: string nullable: true - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: type: string + presign: + default: true + type: boolean + presign_ttl: + description: Presigned URLs TTL (in minutes) + maximum: 32767 + minimum: 0 + type: integer + project: + description: A unique integer value identifying this project. + type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + region_name: + description: AWS Region nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string - nullable: true - description: AWS SSE KMS Key ID - region_name: + role_arn: + description: AWS RoleArn + minLength: 1 type: string - nullable: true - description: AWS Region s3_endpoint: - type: string - nullable: true description: S3 Endpoint - external_id: - type: string nullable: true - title: ExternalID - description: AWS ExternalId - role_arn: type: string - minLength: 1 - description: AWS RoleArn - legacy_auth: + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - presign_ttl: - type: integer - maximum: 32767 - minimum: 0 - description: Presigned URLs TTL (in minutes) - recursive_scan: + type: string + traceback: + description: Traceback report for the last failed sync + nullable: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs type: boolean - description: Perform recursive scan over the bucket content - project: - type: integer - description: A unique integer value identifying this project. required: - - project - - role_arn - LseTask: + - project + - role_arn type: object + LseTask: description: Task Serializer with project scheme configs validation properties: - id: - type: integer - readOnly: true agreement: + readOnly: true type: string + annotations: readOnly: true - predictions: + type: string + annotations_ids: + readOnly: true + type: string + annotations_results: + readOnly: true + type: string + annotators: + description: Annotators IDs who annotated this task + items: + title: User IDs + type: integer + readOnly: true + title: Annotators IDs type: array - title: Predictions - description: Predictions for this task + annotators_count: + description: The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. + readOnly: true + type: integer + avg_lead_time: + format: double + type: number + cancelled_annotations: + type: integer + comment_authors: items: + additionalProperties: {} type: object - title: Prediction object + readOnly: true + type: array + comment_authors_count: + readOnly: true + type: integer + comment_count: + description: Number of comments in the task including all annotations + maximum: 2147483647 + minimum: -2147483648 + type: integer + comments: + readOnly: true + type: string + completed_at: + format: date-time + type: string + created_at: + description: Time a task was created + format: date-time + readOnly: true + type: string + data: + description: User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI. + draft_exists: + type: boolean + drafts: + description: Drafts for this task + items: properties: - result: - type: array - title: Prediction result - items: - type: object - title: Prediction result item - score: - type: number - title: Prediction score - model_version: - type: string - title: Model version - model: - type: object - title: ML Backend instance - model_run: - type: object - title: Model Run instance - task: - type: integer - title: Task ID related to the prediction - project: - type: integer - title: Project ID related to the prediction created_at: - type: string format: date-time title: Creation time - updated_at: type: string + result: + items: + title: Draft result item + type: object + title: Draft result + type: array + updated_at: format: date-time title: Last update time + type: string + title: Draft object + type: object + readOnly: true + title: Annotation drafts + type: array + file_upload: readOnly: true - annotations: type: string + ground_truth: + type: boolean + id: readOnly: true - drafts: - type: array - title: Annotation drafts - description: Drafts for this task + type: integer + inner_id: + type: integer + is_labeled: + description: True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + type: boolean + last_comment_updated_at: + description: When the last comment was updated + format: date-time + nullable: true + type: string + meta: + description: Meta is user imported (uploaded) data and can be useful as input for an ML Backend for embeddings, advanced vectors, and other info. It is passed to ML during training/predicting steps. + nullable: true + overlap: + description: Number of distinct annotators that processed the current task + maximum: 2147483647 + minimum: -2147483648 + type: integer + predictions: + description: Predictions for this task items: - type: object - title: Draft object properties: - result: - type: array - title: Draft result - items: - type: object - title: Draft result item created_at: - type: string format: date-time title: Creation time + type: string + model: + title: ML Backend instance + type: object + model_run: + title: Model Run instance + type: object + model_version: + title: Model version + type: string + project: + title: Project ID related to the prediction + type: integer + result: + items: + title: Prediction result item + type: object + title: Prediction result + type: array + score: + title: Prediction score + type: number + task: + title: Task ID related to the prediction + type: integer updated_at: - type: string format: date-time title: Last update time + type: string + title: Prediction object + type: object readOnly: true - annotators: + title: Predictions type: array - title: Annotators IDs - description: Annotators IDs who annotated this task - items: - type: integer - title: User IDs + predictions_model_versions: readOnly: true - inner_id: - type: integer - cancelled_annotations: - type: integer - total_annotations: - type: integer - total_predictions: - type: integer - completed_at: - type: string - format: date-time - annotations_results: type: string - readOnly: true predictions_results: - type: string readOnly: true + type: string predictions_score: - type: number format: double - file_upload: - type: string - readOnly: true - storage_filename: - type: string - readOnly: true - annotations_ids: - type: string - readOnly: true - predictions_model_versions: - type: string - readOnly: true - avg_lead_time: type: number - format: double - draft_exists: + project: + description: Project ID for this task + nullable: true + type: integer + reviewed: type: boolean - updated_by: - type: array - title: User IDs - description: User IDs who updated this task - items: - type: object - title: User IDs - readOnly: true reviewers: - type: array items: - type: object additionalProperties: {} + type: object readOnly: true - comments: - type: string - readOnly: true - comment_authors: type: array - items: - type: object - additionalProperties: {} + reviewers_count: readOnly: true - reviewed: - type: boolean + type: integer reviews_accepted: type: integer reviews_rejected: type: integer - ground_truth: - type: boolean - annotators_count: - type: integer - description: The annotators_count is calculated as the number of users with - annotations (can be repeated, so same as the number of annotations) + - the number of assignees without annotations. - readOnly: true - reviewers_count: - type: integer - readOnly: true - comment_authors_count: - type: integer - readOnly: true - data: - description: User imported or uploaded data for a task. Data is formatted - according to the project label config. You can find examples of data for - your project on the Import page in the Label Studio Data Manager UI. - meta: - nullable: true - description: Meta is user imported (uploaded) data and can be useful as - input for an ML Backend for embeddings, advanced vectors, and other info. - It is passed to ML during training/predicting steps. - created_at: - type: string - format: date-time + storage_filename: readOnly: true - description: Time a task was created - updated_at: type: string - format: date-time - readOnly: true - description: Last time a task was updated - is_labeled: - type: boolean - description: True if the number of annotations for this task is greater - than or equal to the number of maximum_completions for the project - overlap: + total_annotations: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of distinct annotators that processed the current task - comment_count: + total_predictions: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of comments in the task including all annotations unresolved_comment_count: - type: integer + description: Number of unresolved comments in the task including all annotations maximum: 2147483647 minimum: -2147483648 - description: Number of unresolved comments in the task including all annotations - last_comment_updated_at: - type: string - format: date-time - nullable: true - description: When the last comment was updated - project: type: integer - nullable: true - description: Project ID for this task + updated_at: + description: Last time a task was updated + format: date-time + readOnly: true + type: string + updated_by: + description: User IDs who updated this task + items: + title: User IDs + type: object + readOnly: true + title: User IDs + type: array required: - - agreement - - annotations - - annotations_ids - - annotations_results - - annotators - - annotators_count - - comment_authors - - comment_authors_count - - comments - - created_at - - data - - drafts - - file_upload - - id - - predictions - - predictions_model_versions - - predictions_results - - reviewers - - reviewers_count - - storage_filename - - updated_at - - updated_by - LseTaskFilterOptions: + - agreement + - annotations + - annotations_ids + - annotations_results + - annotators + - annotators_count + - comment_authors + - comment_authors_count + - comments + - created_at + - data + - drafts + - file_upload + - id + - predictions + - predictions_model_versions + - predictions_results + - reviewers + - reviewers_count + - storage_filename + - updated_at + - updated_by type: object + LseTaskFilterOptions: properties: - view: - type: integer - description: Apply filters from the view ID (a tab from the Data Manager) - skipped: - nullable: true + annotated: description: |- - `only` - include all tasks with skipped annotations
    `exclude` - exclude all tasks with skipped annotations + `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation * `only` - only * `exclude` - exclude * `None` - None + nullable: true oneOf: - - $ref: '#/components/schemas/SkippedEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/AnnotatedEnum' + - $ref: '#/components/schemas/NullEnum' finished: - nullable: true description: |- `only` - include all finished tasks (is_labeled = true)
    `exclude` - exclude all finished tasks * `only` - only * `exclude` - exclude * `None` - None - oneOf: - - $ref: '#/components/schemas/FinishedEnum' - - $ref: '#/components/schemas/NullEnum' - annotated: nullable: true - description: |- - `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation - - * `only` - only - * `exclude` - exclude - * `None` - None oneOf: - - $ref: '#/components/schemas/AnnotatedEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/FinishedEnum' + - $ref: '#/components/schemas/NullEnum' only_with_annotations: - type: boolean default: false + type: boolean reviewed: - nullable: true description: |- `only` - include all reviewed tasks
    `exclude` - exclude all reviewed tasks * `only` - only * `exclude` - exclude * `None` - None + nullable: true oneOf: - - $ref: '#/components/schemas/ReviewedEnum' - - $ref: '#/components/schemas/NullEnum' - LseTaskFilterOptionsRequest: - type: object - properties: - view: - type: integer - description: Apply filters from the view ID (a tab from the Data Manager) + - $ref: '#/components/schemas/ReviewedEnum' + - $ref: '#/components/schemas/NullEnum' skipped: - nullable: true description: |- `only` - include all tasks with skipped annotations
    `exclude` - exclude all tasks with skipped annotations * `only` - only * `exclude` - exclude * `None` - None - oneOf: - - $ref: '#/components/schemas/SkippedEnum' - - $ref: '#/components/schemas/NullEnum' - finished: nullable: true + oneOf: + - $ref: '#/components/schemas/SkippedEnum' + - $ref: '#/components/schemas/NullEnum' + view: + description: Apply filters from the view ID (a tab from the Data Manager) + type: integer + type: object + LseTaskFilterOptionsRequest: + properties: + annotated: description: |- - `only` - include all finished tasks (is_labeled = true)
    `exclude` - exclude all finished tasks + `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation * `only` - only * `exclude` - exclude * `None` - None - oneOf: - - $ref: '#/components/schemas/FinishedEnum' - - $ref: '#/components/schemas/NullEnum' - annotated: nullable: true + oneOf: + - $ref: '#/components/schemas/AnnotatedEnum' + - $ref: '#/components/schemas/NullEnum' + finished: description: |- - `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation + `only` - include all finished tasks (is_labeled = true)
    `exclude` - exclude all finished tasks * `only` - only * `exclude` - exclude * `None` - None + nullable: true oneOf: - - $ref: '#/components/schemas/AnnotatedEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/FinishedEnum' + - $ref: '#/components/schemas/NullEnum' only_with_annotations: - type: boolean default: false + type: boolean reviewed: - nullable: true description: |- `only` - include all reviewed tasks
    `exclude` - exclude all reviewed tasks * `only` - only * `exclude` - exclude * `None` - None + nullable: true oneOf: - - $ref: '#/components/schemas/ReviewedEnum' - - $ref: '#/components/schemas/NullEnum' - LseTaskRequest: + - $ref: '#/components/schemas/ReviewedEnum' + - $ref: '#/components/schemas/NullEnum' + skipped: + description: |- + `only` - include all tasks with skipped annotations
    `exclude` - exclude all tasks with skipped annotations + + * `only` - only + * `exclude` - exclude + * `None` - None + nullable: true + oneOf: + - $ref: '#/components/schemas/SkippedEnum' + - $ref: '#/components/schemas/NullEnum' + view: + description: Apply filters from the view ID (a tab from the Data Manager) + type: integer type: object + LseTaskRequest: description: Task Serializer with project scheme configs validation properties: - data: - description: User imported or uploaded data for a task. Data is formatted - according to the project label config. You can find examples of data for - your project on the Import page in the Label Studio Data Manager UI. - meta: - nullable: true - description: Meta is user imported (uploaded) data and can be useful as - input for an ML Backend for embeddings, advanced vectors, and other info. - It is passed to ML during training/predicting steps. - is_labeled: - type: boolean - description: True if the number of annotations for this task is greater - than or equal to the number of maximum_completions for the project - overlap: + cancelled_annotations: + description: Number of total cancelled annotations for the current task + maximum: 2147483647 + minimum: -2147483648 type: integer + comment_authors: + description: Users who wrote comments + items: + type: integer + type: array + comment_count: + description: Number of comments in the task including all annotations maximum: 2147483647 minimum: -2147483648 - description: Number of distinct annotators that processed the current task - inner_id: type: integer + data: + description: User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI. + file_upload: + description: Uploaded file used as data source for this task + nullable: true + type: integer + inner_id: + description: Internal task ID in the project, starts with 1 + format: int64 maximum: 9223372036854775807 minimum: -9223372036854775808 - format: int64 nullable: true - description: Internal task ID in the project, starts with 1 - total_annotations: - type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of total annotations for the current task except cancelled - annotations - cancelled_annotations: type: integer + is_labeled: + description: True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + type: boolean + last_comment_updated_at: + description: When the last comment was updated + format: date-time + nullable: true + type: string + meta: + description: Meta is user imported (uploaded) data and can be useful as input for an ML Backend for embeddings, advanced vectors, and other info. It is passed to ML during training/predicting steps. + nullable: true + overlap: + description: Number of distinct annotators that processed the current task maximum: 2147483647 minimum: -2147483648 - description: Number of total cancelled annotations for the current task - total_predictions: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of total predictions for the current task - comment_count: + project: + description: Project ID for this task + nullable: true type: integer + total_annotations: + description: Number of total annotations for the current task except cancelled annotations maximum: 2147483647 minimum: -2147483648 - description: Number of comments in the task including all annotations - unresolved_comment_count: type: integer + total_predictions: + description: Number of total predictions for the current task maximum: 2147483647 minimum: -2147483648 + type: integer + unresolved_comment_count: description: Number of unresolved comments in the task including all annotations - last_comment_updated_at: - type: string - format: date-time - nullable: true - description: When the last comment was updated - project: + maximum: 2147483647 + minimum: -2147483648 type: integer - nullable: true - description: Project ID for this task updated_by: - type: integer - nullable: true description: Last annotator or reviewer who updated this task - file_upload: - type: integer nullable: true - description: Uploaded file used as data source for this task - comment_authors: - type: array - items: - type: integer - description: Users who wrote comments + type: integer required: - - data - LseTaskSerializerForAnnotators: + - data type: object + LseTaskSerializerForAnnotators: description: Task Serializer with project scheme configs validation properties: - id: + annotations: + default: [] + readOnly: true + type: string + annotations_results: + readOnly: true + type: string + cancelled_annotations: type: integer + comment_count: readOnly: true - data: - description: User imported or uploaded data for a task. Data is formatted - according to the project label config. You can find examples of data for - your project on the Import page in the Label Studio Data Manager UI. - created_at: type: string - format: date-time + comments: readOnly: true - description: Time a task was created - annotations: type: string + created_at: + description: Time a task was created + format: date-time readOnly: true - default: [] + type: string + data: + description: User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI. + draft_exists: + type: boolean drafts: - type: array - title: Annotation drafts description: Drafts for this task items: - type: object - title: Draft object properties: - result: - type: array - title: Draft result - items: - type: object - title: Draft result item created_at: - type: string format: date-time title: Creation time - updated_at: type: string + result: + items: + title: Draft result item + type: object + title: Draft result + type: array + updated_at: format: date-time title: Last update time + type: string + title: Draft object + type: object readOnly: true - total_annotations: - type: integer - cancelled_annotations: - type: integer - annotations_results: - type: string + title: Annotation drafts + type: array + id: readOnly: true + type: integer predictions: - type: array - title: Predictions description: Predictions for this task items: - type: object - title: Prediction object properties: - result: - type: array - title: Prediction result - items: - type: object - title: Prediction result item - score: - type: number - title: Prediction score - model_version: + created_at: + format: date-time + title: Creation time type: string - title: Model version model: - type: object title: ML Backend instance - model_run: type: object + model_run: title: Model Run instance - task: + type: object + model_version: + title: Model version + type: string + project: + title: Project ID related to the prediction type: integer + result: + items: + title: Prediction result item + type: object + title: Prediction result + type: array + score: + title: Prediction score + type: number + task: title: Task ID related to the prediction - project: type: integer - title: Project ID related to the prediction - created_at: - type: string - format: date-time - title: Creation time updated_at: - type: string format: date-time title: Last update time + type: string + title: Prediction object + type: object readOnly: true - total_predictions: - type: integer + title: Predictions + type: array + predictions_results: + readOnly: true + type: string predictions_score: - type: number format: double - predictions_results: + type: number + reviews_rejected: + type: integer + total_annotations: + type: integer + total_predictions: + type: integer + unresolved_comment_count: + readOnly: true type: string + required: + - annotations + - annotations_results + - comment_count + - comments + - created_at + - data + - drafts + - id + - predictions + - predictions_results + - unresolved_comment_count + type: object + LseTaskSerializerForReviewers: + description: Task Serializer with project scheme configs validation + properties: + agreement: readOnly: true - comments: type: string + annotations: readOnly: true - comment_count: type: string + annotations_ids: readOnly: true - unresolved_comment_count: type: string + annotations_results: readOnly: true - reviews_rejected: + type: string + annotators: + description: Annotators IDs who annotated this task + items: + title: User IDs + type: integer + readOnly: true + title: Annotators IDs + type: array + annotators_count: + description: The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. + readOnly: true + type: integer + avg_lead_time: + format: double + type: number + cancelled_annotations: + type: integer + comment_authors: + items: + additionalProperties: {} + type: object + readOnly: true + type: array + comment_authors_count: + readOnly: true + type: integer + comment_count: + description: Number of comments in the task including all annotations + maximum: 2147483647 + minimum: -2147483648 type: integer + comments: + readOnly: true + type: string + completed_at: + format: date-time + type: string + created_at: + description: Time a task was created + format: date-time + readOnly: true + type: string + data: + description: User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI. draft_exists: type: boolean - required: - - annotations - - annotations_results - - comment_count - - comments - - created_at - - data - - drafts - - id - - predictions - - predictions_results - - unresolved_comment_count - LseTaskSerializerForReviewers: - type: object - description: Task Serializer with project scheme configs validation - properties: + drafts: + description: Drafts for this task + items: + properties: + created_at: + format: date-time + title: Creation time + type: string + result: + items: + title: Draft result item + type: object + title: Draft result + type: array + updated_at: + format: date-time + title: Last update time + type: string + title: Draft object + type: object + readOnly: true + title: Annotation drafts + type: array + file_upload: + readOnly: true + type: string + ground_truth: + type: boolean id: + readOnly: true + type: integer + inner_id: + type: integer + is_labeled: + description: True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + type: boolean + last_comment_updated_at: + description: When the last comment was updated + format: date-time + nullable: true + type: string + meta: + description: Meta is user imported (uploaded) data and can be useful as input for an ML Backend for embeddings, advanced vectors, and other info. It is passed to ML during training/predicting steps. + nullable: true + overlap: + description: Number of distinct annotators that processed the current task + maximum: 2147483647 + minimum: -2147483648 type: integer - readOnly: true - agreement: - type: string - readOnly: true predictions: - type: array - title: Predictions description: Predictions for this task items: - type: object - title: Prediction object properties: - result: - type: array - title: Prediction result - items: - type: object - title: Prediction result item - score: - type: number - title: Prediction score - model_version: + created_at: + format: date-time + title: Creation time type: string - title: Model version model: - type: object title: ML Backend instance - model_run: type: object + model_run: title: Model Run instance - task: - type: integer - title: Task ID related to the prediction + type: object + model_version: + title: Model version + type: string project: - type: integer title: Project ID related to the prediction - created_at: - type: string - format: date-time - title: Creation time - updated_at: - type: string - format: date-time - title: Last update time - readOnly: true - annotations: - type: string - readOnly: true - drafts: - type: array - title: Annotation drafts - description: Drafts for this task - items: - type: object - title: Draft object - properties: + type: integer result: - type: array - title: Draft result items: + title: Prediction result item type: object - title: Draft result item - created_at: - type: string - format: date-time - title: Creation time + title: Prediction result + type: array + score: + title: Prediction score + type: number + task: + title: Task ID related to the prediction + type: integer updated_at: - type: string format: date-time title: Last update time + type: string + title: Prediction object + type: object readOnly: true - annotators: + title: Predictions type: array - title: Annotators IDs - description: Annotators IDs who annotated this task - items: - type: integer - title: User IDs + predictions_model_versions: readOnly: true - inner_id: - type: integer - cancelled_annotations: - type: integer - total_annotations: - type: integer - total_predictions: - type: integer - completed_at: - type: string - format: date-time - annotations_results: type: string - readOnly: true predictions_results: - type: string readOnly: true + type: string predictions_score: - type: number format: double - file_upload: - type: string - readOnly: true - storage_filename: - type: string - readOnly: true - annotations_ids: - type: string - readOnly: true - predictions_model_versions: - type: string - readOnly: true - avg_lead_time: type: number - format: double - draft_exists: + project: + description: Project ID for this task + nullable: true + type: integer + reviewed: type: boolean - updated_by: - type: array - title: User IDs - description: User IDs who updated this task - items: - type: object - title: User IDs - readOnly: true reviewers: - type: array items: - type: object additionalProperties: {} + type: object readOnly: true - comments: - type: string - readOnly: true - comment_authors: type: array - items: - type: object - additionalProperties: {} + reviewers_count: readOnly: true - reviewed: - type: boolean + type: integer reviews_accepted: type: integer reviews_rejected: type: integer - ground_truth: - type: boolean - annotators_count: - type: integer - description: The annotators_count is calculated as the number of users with - annotations (can be repeated, so same as the number of annotations) + - the number of assignees without annotations. - readOnly: true - reviewers_count: - type: integer - readOnly: true - comment_authors_count: - type: integer - readOnly: true - data: - description: User imported or uploaded data for a task. Data is formatted - according to the project label config. You can find examples of data for - your project on the Import page in the Label Studio Data Manager UI. - meta: - nullable: true - description: Meta is user imported (uploaded) data and can be useful as - input for an ML Backend for embeddings, advanced vectors, and other info. - It is passed to ML during training/predicting steps. - created_at: - type: string - format: date-time + storage_filename: readOnly: true - description: Time a task was created - updated_at: type: string - format: date-time - readOnly: true - description: Last time a task was updated - is_labeled: - type: boolean - description: True if the number of annotations for this task is greater - than or equal to the number of maximum_completions for the project - overlap: + total_annotations: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of distinct annotators that processed the current task - comment_count: + total_predictions: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of comments in the task including all annotations unresolved_comment_count: - type: integer + description: Number of unresolved comments in the task including all annotations maximum: 2147483647 minimum: -2147483648 - description: Number of unresolved comments in the task including all annotations - last_comment_updated_at: - type: string - format: date-time - nullable: true - description: When the last comment was updated - project: type: integer - nullable: true - description: Project ID for this task + updated_at: + description: Last time a task was updated + format: date-time + readOnly: true + type: string + updated_by: + description: User IDs who updated this task + items: + title: User IDs + type: object + readOnly: true + title: User IDs + type: array required: - - agreement - - annotations - - annotations_ids - - annotations_results - - annotators - - annotators_count - - comment_authors - - comment_authors_count - - comments - - created_at - - data - - drafts - - file_upload - - id - - predictions - - predictions_model_versions - - predictions_results - - reviewers - - reviewers_count - - storage_filename - - updated_at - - updated_by - LseUser: + - agreement + - annotations + - annotations_ids + - annotations_results + - annotators + - annotators_count + - comment_authors + - comment_authors_count + - comments + - created_at + - data + - drafts + - file_upload + - id + - predictions + - predictions_model_versions + - predictions_results + - reviewers + - reviewers_count + - storage_filename + - updated_at + - updated_by type: object + LseUser: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: + active_organization: + nullable: true type: integer + active_organization_meta: readOnly: true - first_name: type: string - maxLength: 256 - last_name: + allow_newsletters: + description: Allow sending newsletters to user + nullable: true + type: boolean + avatar: + readOnly: true type: string - maxLength: 256 - username: + custom_hotkeys: + description: Custom keyboard shortcuts configuration for the user interface + nullable: true + date_joined: + format: date-time type: string - maxLength: 256 email: - type: string format: email - title: Email address maxLength: 254 - last_activity: + title: Email address type: string - format: date-time - readOnly: true - custom_hotkeys: - nullable: true - description: Custom keyboard shortcuts configuration for the user interface - avatar: + first_name: + maxLength: 256 type: string + id: readOnly: true + type: integer initials: + default: '?' + readOnly: true type: string + last_activity: + format: date-time readOnly: true - default: '?' - phone: type: string + last_name: maxLength: 256 - active_organization: - type: integer - nullable: true - active_organization_meta: type: string + lse_fields: + allOf: + - $ref: '#/components/schemas/LseFields' readOnly: true - allow_newsletters: - type: boolean - nullable: true - description: Allow sending newsletters to user - date_joined: - type: string - format: date-time org_membership: - type: array items: $ref: '#/components/schemas/OrganizationMembership' readOnly: true - lse_fields: - allOf: - - $ref: '#/components/schemas/LseFields' - readOnly: true + type: array pause: - type: string readOnly: true + type: string + phone: + maxLength: 256 + type: string + username: + maxLength: 256 + type: string required: - - active_organization_meta - - avatar - - id - - initials - - last_activity - - lse_fields - - org_membership - - pause - - username - LseUserAPI: + - active_organization_meta + - avatar + - id + - initials + - last_activity + - lse_fields + - org_membership + - pause + - username type: object + LseUserAPI: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: + active_organization: + nullable: true type: integer + active_organization_meta: readOnly: true - first_name: type: string - maxLength: 256 - last_name: + allow_newsletters: + description: Allow sending newsletters to user + nullable: true + type: boolean + avatar: + readOnly: true type: string - maxLength: 256 - username: + custom_hotkeys: + description: Custom keyboard shortcuts configuration for the user interface + nullable: true + date_joined: + format: date-time type: string - maxLength: 256 email: - type: string format: email - title: Email address maxLength: 254 - last_activity: + title: Email address type: string - format: date-time - readOnly: true - custom_hotkeys: - nullable: true - description: Custom keyboard shortcuts configuration for the user interface - avatar: + first_name: + maxLength: 256 type: string + id: readOnly: true + type: integer initials: + default: '?' + readOnly: true type: string + last_activity: + format: date-time readOnly: true - default: '?' - phone: type: string + last_name: maxLength: 256 - active_organization: - type: integer - nullable: true - active_organization_meta: - type: string - readOnly: true - allow_newsletters: - type: boolean - nullable: true - description: Allow sending newsletters to user - date_joined: type: string - format: date-time org_membership: - type: array items: $ref: '#/components/schemas/OrganizationMembership' readOnly: true + type: array + phone: + maxLength: 256 + type: string + username: + maxLength: 256 + type: string required: - - active_organization_meta - - avatar - - id - - initials - - last_activity - - org_membership - - username - LseUserOrganizationMemberList: + - active_organization_meta + - avatar + - id + - initials + - last_activity + - org_membership + - username type: object + LseUserOrganizationMemberList: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: + active_organization: + nullable: true type: integer + allow_newsletters: + description: Allow sending newsletters to user + nullable: true + type: boolean + avatar: readOnly: true - first_name: type: string - maxLength: 256 - last_name: + contributed_to_projects: + readOnly: true type: string - maxLength: 256 - username: + created_projects: + readOnly: true type: string - maxLength: 256 - email: + custom_hotkeys: + description: Custom keyboard shortcuts configuration for the user interface + nullable: true + date_joined: + format: date-time type: string + email: format: email - title: Email address maxLength: 254 - last_activity: + title: Email address type: string - format: date-time - readOnly: true - custom_hotkeys: - nullable: true - description: Custom keyboard shortcuts configuration for the user interface - avatar: + first_name: + maxLength: 256 type: string + id: readOnly: true + type: integer initials: + default: '?' + readOnly: true type: string + last_activity: + format: date-time readOnly: true - default: '?' - phone: type: string + last_name: maxLength: 256 - active_organization: - type: integer - nullable: true - allow_newsletters: - type: boolean - nullable: true - description: Allow sending newsletters to user - date_joined: type: string - format: date-time lse_fields: allOf: - - $ref: '#/components/schemas/LseFields' + - $ref: '#/components/schemas/LseFields' readOnly: true pause: - type: string readOnly: true - created_projects: type: string - readOnly: true - contributed_to_projects: + phone: + maxLength: 256 + type: string + username: + maxLength: 256 type: string - readOnly: true required: - - avatar - - contributed_to_projects - - created_projects - - id - - initials - - last_activity - - lse_fields - - pause - - username - MLBackend: + - avatar + - contributed_to_projects + - created_projects + - id + - initials + - last_activity + - lse_fields + - pause + - username type: object + MLBackend: description: Serializer for MLBackend model. properties: - id: - type: integer - readOnly: true - state: - $ref: '#/components/schemas/StateEnum' - readable_state: - type: string - readOnly: true - is_interactive: - type: boolean - description: Used to interactively annotate tasks. If true, model returns - one list with results - url: - type: string - description: URL for the machine learning model server - error_message: - type: string - nullable: true - description: Error message in error state - title: - type: string - nullable: true - description: Name of the machine learning backend auth_method: $ref: '#/components/schemas/AuthMethodEnum' - basic_auth_user: + auto_update: + description: If false, model version is set by the user, if true - getting latest version from backend. + type: boolean + basic_auth_pass_is_set: + readOnly: true type: string - nullable: true + basic_auth_user: description: HTTP Basic Auth user - basic_auth_pass_is_set: + nullable: true type: string + created_at: + format: date-time readOnly: true + type: string description: + description: Description for the machine learning backend + nullable: true type: string + error_message: + description: Error message in error state nullable: true - description: Description for the machine learning backend + type: string extra_params: - nullable: true description: Any extra parameters passed to the ML Backend during the setup + nullable: true + id: + readOnly: true + type: integer + is_interactive: + description: Used to interactively annotate tasks. If true, model returns one list with results + type: boolean model_version: - type: string + description: Current model version associated with this machine learning backend nullable: true - description: Current model version associated with this machine learning - backend + type: string + project: + type: integer + readable_state: + readOnly: true + type: string + state: + $ref: '#/components/schemas/StateEnum' timeout: - type: number - format: double description: Response model timeout - created_at: + format: double + type: number + title: + description: Name of the machine learning backend + nullable: true type: string - format: date-time - readOnly: true updated_at: - type: string format: date-time readOnly: true - auto_update: - type: boolean - description: If false, model version is set by the user, if true - getting - latest version from backend. - project: - type: integer + type: string + url: + description: URL for the machine learning model server + type: string required: - - basic_auth_pass_is_set - - created_at - - id - - project - - readable_state - - updated_at - - url - MLBackendRequest: + - basic_auth_pass_is_set + - created_at + - id + - project + - readable_state + - updated_at + - url type: object + MLBackendRequest: description: Serializer for MLBackend model. properties: - state: - $ref: '#/components/schemas/StateEnum' - is_interactive: - type: boolean - description: Used to interactively annotate tasks. If true, model returns - one list with results - url: - type: string - minLength: 1 - description: URL for the machine learning model server - error_message: - type: string - nullable: true - description: Error message in error state - title: - type: string - nullable: true - description: Name of the machine learning backend auth_method: $ref: '#/components/schemas/AuthMethodEnum' - basic_auth_user: - type: string - nullable: true - description: HTTP Basic Auth user + auto_update: + description: If false, model version is set by the user, if true - getting latest version from backend. + type: boolean basic_auth_pass: + nullable: true type: string writeOnly: true + basic_auth_user: + description: HTTP Basic Auth user nullable: true + type: string description: + description: Description for the machine learning backend + nullable: true type: string + error_message: + description: Error message in error state nullable: true - description: Description for the machine learning backend + type: string extra_params: - nullable: true description: Any extra parameters passed to the ML Backend during the setup - model_version: - type: string nullable: true - description: Current model version associated with this machine learning - backend - timeout: - type: number - format: double - description: Response model timeout - auto_update: + is_interactive: + description: Used to interactively annotate tasks. If true, model returns one list with results type: boolean - description: If false, model version is set by the user, if true - getting - latest version from backend. + model_version: + description: Current model version associated with this machine learning backend + nullable: true + type: string project: type: integer + state: + $ref: '#/components/schemas/StateEnum' + timeout: + description: Response model timeout + format: double + type: number + title: + description: Name of the machine learning backend + nullable: true + type: string + url: + description: URL for the machine learning model server + minLength: 1 + type: string required: - - project - - url - MLInteractiveAnnotatingRequestRequest: + - project + - url type: object + MLInteractiveAnnotatingRequestRequest: description: Serializer for ML interactive annotating request. properties: - task: - type: integer - description: ID of task to annotate context: - nullable: true description: Context for ML model + nullable: true + task: + description: ID of task to annotate + type: integer required: - - task + - task + type: object MaybeExpandedComment: oneOf: - - $ref: '#/components/schemas/Comment' - - $ref: '#/components/schemas/CommentSerializerWithExpandedUser' + - $ref: '#/components/schemas/Comment' + - $ref: '#/components/schemas/CommentSerializerWithExpandedUser' ModeEnum: - enum: - - settings - - settings,data - type: string description: |- * `settings` - Only settings * `settings,data` - Settings and tasks + enum: + - settings + - settings,data + type: string ModelInterface: - type: object properties: - id: - type: integer + associated_projects: + items: + type: integer + type: array + created_at: + format: date-time readOnly: true + type: string created_by: allOf: - - $ref: '#/components/schemas/UserSimple' + - $ref: '#/components/schemas/UserSimple' description: User who created Dataset + description: + description: Model description + nullable: true + type: string + id: + readOnly: true + type: integer + input_fields: {} + organization: + nullable: true + type: integer + output_classes: {} skill_name: allOf: - - $ref: '#/components/schemas/SkillNameEnum' + - $ref: '#/components/schemas/SkillNameEnum' default: TextClassification title: - type: string description: Model name maxLength: 500 - description: - type: string - nullable: true - description: Model description - created_at: type: string - format: date-time - readOnly: true updated_at: - type: string format: date-time readOnly: true - input_fields: {} - output_classes: {} - organization: - type: integer - nullable: true - associated_projects: - type: array - items: - type: integer + type: string required: - - created_at - - id - - title - - updated_at - ModelInterfaceRequest: + - created_at + - id + - title + - updated_at type: object + ModelInterfaceRequest: properties: + associated_projects: + items: + type: integer + type: array created_by: allOf: - - $ref: '#/components/schemas/UserSimpleRequest' + - $ref: '#/components/schemas/UserSimpleRequest' description: User who created Dataset + description: + description: Model description + nullable: true + type: string + input_fields: {} + organization: + nullable: true + type: integer + output_classes: {} skill_name: allOf: - - $ref: '#/components/schemas/SkillNameEnum' + - $ref: '#/components/schemas/SkillNameEnum' default: TextClassification title: - type: string - minLength: 1 description: Model name maxLength: 500 - description: + minLength: 1 type: string - nullable: true - description: Model description - input_fields: {} - output_classes: {} - organization: - type: integer - nullable: true - associated_projects: - type: array - items: - type: integer required: - - title - ModelInterfaceSerializerGET: + - title type: object + ModelInterfaceSerializerGET: properties: - id: - type: integer + associated_projects: + default: [] + items: + $ref: '#/components/schemas/AssociatedProject' + type: array + created_at: + format: date-time readOnly: true + type: string created_by: allOf: - - $ref: '#/components/schemas/UserSimple' + - $ref: '#/components/schemas/UserSimple' description: User who created Dataset + description: + description: Model description + nullable: true + type: string + id: + readOnly: true + type: integer + input_fields: {} + organization: + nullable: true + type: integer + output_classes: {} skill_name: allOf: - - $ref: '#/components/schemas/SkillNameEnum' + - $ref: '#/components/schemas/SkillNameEnum' default: TextClassification - associated_projects: - type: array - items: - $ref: '#/components/schemas/AssociatedProject' - default: [] title: - type: string description: Model name maxLength: 500 - description: - type: string - nullable: true - description: Model description - created_at: type: string - format: date-time - readOnly: true updated_at: - type: string format: date-time readOnly: true - input_fields: {} - output_classes: {} - organization: - type: integer - nullable: true + type: string required: - - created_at - - id - - title - - updated_at - ModelProviderConnection: + - created_at + - id + - title + - updated_at type: object + ModelProviderConnection: properties: - id: - type: integer - readOnly: true - created_by: - allOf: - - $ref: '#/components/schemas/UserSimple' - readOnly: true - model_params: - type: string - readOnly: true - description: JSON schema for the model parameters available for the provider - provider: - $ref: '#/components/schemas/ProviderEnum' - deployment_name: - type: string + budget_alert_threshold: + description: Budget alert threshold for the given provider connection + format: double nullable: true - description: Azure OpenAI deployment name - maxLength: 512 - endpoint: - type: string + type: number + budget_last_reset_date: + description: Date and time the budget was last reset + format: date-time nullable: true - description: Azure OpenAI endpoint - maxLength: 512 - google_project_id: + readOnly: true type: string + budget_limit: + description: Budget limit for the model provider connection (null if unlimited) + format: double nullable: true - description: Google project ID - maxLength: 255 - google_location: - type: string + readOnly: true + type: number + budget_reset_period: + description: |- + Budget reset period for the model provider connection (null if not reset) + + * `Monthly` - Monthly + * `Yearly` - Yearly nullable: true - description: Google project location - maxLength: 255 - cached_available_models: - type: string + oneOf: + - $ref: '#/components/schemas/BudgetResetPeriodEnum' + - $ref: '#/components/schemas/NullEnum' + readOnly: true + budget_total_spent: + description: Tracked total budget spent for the given provider connection within the current budget period + format: double nullable: true + readOnly: true + type: number + cached_available_models: description: List of available models from the provider maxLength: 4096 - scope: - $ref: '#/components/schemas/ScopeEnum' - created_at: + nullable: true type: string + created_at: format: date-time readOnly: true - updated_at: type: string - format: date-time + created_by: + allOf: + - $ref: '#/components/schemas/UserSimple' readOnly: true - is_internal: - type: boolean + deployment_name: + description: Azure OpenAI deployment name + maxLength: 512 nullable: true - description: Whether the model provider connection is internal, not visible - to the user - budget_limit: - type: number - format: double - readOnly: true + type: string + endpoint: + description: Azure OpenAI endpoint + maxLength: 512 nullable: true - description: Budget limit for the model provider connection (null if unlimited) - budget_last_reset_date: type: string - format: date-time - readOnly: true + google_location: + description: Google project location + maxLength: 255 nullable: true - description: Date and time the budget was last reset - budget_reset_period: - readOnly: true + type: string + google_project_id: + description: Google project ID + maxLength: 255 nullable: true - description: |- - Budget reset period for the model provider connection (null if not reset) - - * `Monthly` - Monthly - * `Yearly` - Yearly - oneOf: - - $ref: '#/components/schemas/BudgetResetPeriodEnum' - - $ref: '#/components/schemas/NullEnum' - budget_total_spent: - type: number - format: double + type: string + id: readOnly: true + type: integer + is_internal: + description: Whether the model provider connection is internal, not visible to the user nullable: true - description: Tracked total budget spent for the given provider connection - within the current budget period - budget_alert_threshold: - type: number - format: double - nullable: true - description: Budget alert threshold for the given provider connection + type: boolean + model_params: + description: JSON schema for the model parameters available for the provider + readOnly: true + type: string organization: + nullable: true + readOnly: true type: integer + provider: + $ref: '#/components/schemas/ProviderEnum' + scope: + $ref: '#/components/schemas/ScopeEnum' + updated_at: + format: date-time readOnly: true - nullable: true + type: string required: - - budget_last_reset_date - - budget_limit - - budget_reset_period - - budget_total_spent - - created_at - - created_by - - id - - model_params - - organization - - updated_at - ModelProviderConnectionRequest: + - budget_last_reset_date + - budget_limit + - budget_reset_period + - budget_total_spent + - created_at + - created_by + - id + - model_params + - organization + - updated_at type: object + ModelProviderConnectionRequest: properties: - provider: - $ref: '#/components/schemas/ProviderEnum' api_key: + description: Model provider API key + nullable: true type: string writeOnly: true - nullable: true - description: Model provider API key auth_token: + description: Model provider Auth token + nullable: true type: string writeOnly: true + budget_alert_threshold: + description: Budget alert threshold for the given provider connection + format: double nullable: true - description: Model provider Auth token - deployment_name: - type: string + type: number + cached_available_models: + description: List of available models from the provider + maxLength: 4096 nullable: true + type: string + deployment_name: description: Azure OpenAI deployment name maxLength: 512 - endpoint: - type: string nullable: true + type: string + endpoint: description: Azure OpenAI endpoint maxLength: 512 + nullable: true + type: string google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file + nullable: true type: string writeOnly: true + google_location: + description: Google project location + maxLength: 255 nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string - nullable: true + google_project_id: description: Google project ID maxLength: 255 - google_location: - type: string nullable: true - description: Google project location - maxLength: 255 - cached_available_models: type: string + is_internal: + description: Whether the model provider connection is internal, not visible to the user nullable: true - description: List of available models from the provider - maxLength: 4096 + type: boolean + provider: + $ref: '#/components/schemas/ProviderEnum' scope: $ref: '#/components/schemas/ScopeEnum' - is_internal: - type: boolean - nullable: true - description: Whether the model provider connection is internal, not visible - to the user - budget_alert_threshold: - type: number - format: double - nullable: true - description: Budget alert threshold for the given provider connection - ModelRun: type: object + ModelRun: properties: - id: + completed_at: + format: date-time + nullable: true + readOnly: true + type: string + created_at: + format: date-time + readOnly: true + type: string + created_by: + nullable: true + readOnly: true type: integer + id: readOnly: true - parent_model: type: integer + job_id: + description: Job ID for inference job for a ModelRun e.g. Adala job ID + maxLength: 255 + nullable: true + type: string + organization: + nullable: true + type: integer + parent_model: readOnly: true + type: integer + predictions_updated_at: + format: date-time + nullable: true + type: string + project: + type: integer project_subset: $ref: '#/components/schemas/ProjectSubsetEnum' status: allOf: - - $ref: '#/components/schemas/ModelRunStatusEnum' + - $ref: '#/components/schemas/ModelRunStatusEnum' readOnly: true - job_id: - type: string - nullable: true - description: Job ID for inference job for a ModelRun e.g. Adala job ID - maxLength: 255 - total_predictions: - type: integer + total_correct_predictions: maximum: 2147483647 minimum: -2147483648 - total_correct_predictions: type: integer + total_predictions: maximum: 2147483647 minimum: -2147483648 - total_tasks: type: integer + total_tasks: maximum: 2147483647 minimum: -2147483648 - created_at: - type: string - format: date-time - readOnly: true + type: integer triggered_at: - type: string format: date-time - readOnly: true nullable: true - predictions_updated_at: + readOnly: true type: string - format: date-time + required: + - completed_at + - created_at + - created_by + - id + - parent_model + - project + - status + - triggered_at + type: object + ModelRunRequest: + properties: + job_id: + description: Job ID for inference job for a ModelRun e.g. Adala job ID + maxLength: 255 nullable: true - completed_at: type: string - format: date-time - readOnly: true - nullable: true organization: + nullable: true type: integer + predictions_updated_at: + format: date-time nullable: true + type: string project: type: integer - created_by: - type: integer - readOnly: true - nullable: true - required: - - completed_at - - created_at - - created_by - - id - - parent_model - - project - - status - - triggered_at - ModelRunRequest: - type: object - properties: project_subset: $ref: '#/components/schemas/ProjectSubsetEnum' - job_id: - type: string - nullable: true - description: Job ID for inference job for a ModelRun e.g. Adala job ID - maxLength: 255 - total_predictions: - type: integer + total_correct_predictions: maximum: 2147483647 minimum: -2147483648 - total_correct_predictions: type: integer + total_predictions: maximum: 2147483647 minimum: -2147483648 - total_tasks: type: integer + total_tasks: maximum: 2147483647 minimum: -2147483648 - predictions_updated_at: - type: string - format: date-time - nullable: true - organization: - type: integer - nullable: true - project: type: integer required: - - project + - project + type: object ModelRunStatusEnum: - enum: - - Pending - - InProgress - - Completed - - Failed - - Canceled - type: string description: |- * `Pending` - Pending * `InProgress` - InProgress * `Completed` - Completed * `Failed` - Failed * `Canceled` - Canceled + enum: + - Pending + - InProgress + - Completed + - Failed + - Canceled + type: string NullEnum: enum: - - null + - null OnboardingStateEnum: - enum: - - not_started - - signup - - trial_signup - - first_tutorial - - in_app_guidance - - complete - type: string description: |- * `not_started` - Not Started * `signup` - Signup @@ -23088,290 +22287,297 @@ components: * `first_tutorial` - First Tutorial * `in_app_guidance` - In App Guidance * `complete` - Complete + enum: + - not_started + - signup + - trial_signup + - first_tutorial + - in_app_guidance + - complete + type: string OrganizationBilling: - type: object properties: - manual_workspace_management: - type: string - readOnly: true manual_role_management: + readOnly: true type: string + manual_workspace_management: readOnly: true + type: string required: - - manual_role_management - - manual_workspace_management - OrganizationId: + - manual_role_management + - manual_workspace_management type: object + OrganizationId: description: |- A serializer mixin that takes an additional `fields` argument that controls which fields should be displayed. properties: - id: - type: integer - readOnly: true - title: - type: string - title: Organization title - maxLength: 1000 contact_info: - type: string format: email - nullable: true maxLength: 254 - created_at: + nullable: true type: string + created_at: format: date-time readOnly: true + type: string + id: + readOnly: true + type: integer + title: + maxLength: 1000 + title: Organization title + type: string required: - - created_at - - id - - title - OrganizationInvite: + - created_at + - id + - title type: object + OrganizationInvite: properties: - token: - type: string invite_url: type: string - OrganizationMember: + token: + type: string type: object + OrganizationMember: description: |- A serializer mixin that takes an additional `fields` argument that controls which fields should be displayed. properties: - user: - type: integer - description: User ID - organization: - type: integer - description: Organization ID - contributed_projects_count: - type: string - readOnly: true annotations_count: + readOnly: true type: string + contributed_projects_count: readOnly: true - created_at: type: string + created_at: format: date-time readOnly: true + type: string + organization: + description: Organization ID + type: integer + user: + description: User ID + type: integer required: - - annotations_count - - contributed_projects_count - - created_at - - organization - - user - OrganizationMembership: + - annotations_count + - contributed_projects_count + - created_at + - organization + - user type: object + OrganizationMembership: properties: - role: - type: string active: - type: string readOnly: true + type: string organization_id: - type: integer description: Organization ID readOnly: true + type: integer + role: + type: string required: - - active - - organization_id - - role - OrganizationMembershipRequest: + - active + - organization_id + - role type: object + OrganizationMembershipRequest: properties: role: - type: string minLength: 1 + type: string required: - - role - PaginatedAllRolesProjectListList: + - role type: object - required: - - count - - results + PaginatedAllRolesProjectListList: properties: count: - type: integer example: 123 + type: integer next: - type: string - nullable: true - format: uri example: http://api.example.org/accounts/?page=4 - previous: - type: string - nullable: true format: uri + nullable: true + type: string + previous: example: http://api.example.org/accounts/?page=2 + format: uri + nullable: true + type: string results: - type: array items: $ref: '#/components/schemas/AllRolesProjectList' - PaginatedAnnotationHistoryList: - type: object + type: array required: - - count - - results + - count + - results + type: object + PaginatedAnnotationHistoryList: properties: count: - type: integer example: 123 + type: integer next: - type: string - nullable: true - format: uri example: http://api.example.org/accounts/?page=4 - previous: - type: string - nullable: true format: uri + nullable: true + type: string + previous: example: http://api.example.org/accounts/?page=2 + format: uri + nullable: true + type: string results: - type: array items: $ref: '#/components/schemas/AnnotationHistory' - PaginatedLabelCreateList: - type: object + type: array required: - - count - - results + - count + - results + type: object + PaginatedLabelCreateList: properties: count: - type: integer example: 123 + type: integer next: - type: string - nullable: true - format: uri example: http://api.example.org/accounts/?page=4 - previous: - type: string - nullable: true format: uri + nullable: true + type: string + previous: example: http://api.example.org/accounts/?page=2 + format: uri + nullable: true + type: string results: - type: array items: $ref: '#/components/schemas/LabelCreate' - PaginatedLabelLinkList: - type: object + type: array required: - - count - - results + - count + - results + type: object + PaginatedLabelLinkList: properties: count: - type: integer example: 123 + type: integer next: - type: string - nullable: true - format: uri example: http://api.example.org/accounts/?page=4 - previous: - type: string - nullable: true format: uri + nullable: true + type: string + previous: example: http://api.example.org/accounts/?page=2 + format: uri + nullable: true + type: string results: - type: array items: $ref: '#/components/schemas/LabelLink' - PaginatedLabelList: - type: object + type: array required: - - count - - results + - count + - results + type: object + PaginatedLabelList: properties: count: - type: integer example: 123 + type: integer next: - type: string - nullable: true - format: uri example: http://api.example.org/accounts/?page=4 - previous: - type: string - nullable: true format: uri + nullable: true + type: string + previous: example: http://api.example.org/accounts/?page=2 + format: uri + nullable: true + type: string results: - type: array items: $ref: '#/components/schemas/Label' - PaginatedLseOrganizationMemberListList: - type: object + type: array required: - - count - - results + - count + - results + type: object + PaginatedLseOrganizationMemberListList: properties: count: - type: integer example: 123 + type: integer next: - type: string - nullable: true - format: uri example: http://api.example.org/accounts/?page=4 - previous: - type: string - nullable: true format: uri + nullable: true + type: string + previous: example: http://api.example.org/accounts/?page=2 + format: uri + nullable: true + type: string results: - type: array items: $ref: '#/components/schemas/LseOrganizationMemberList' - PaginatedLseProjectCountsList: - type: object + type: array required: - - count - - results + - count + - results + type: object + PaginatedLseProjectCountsList: properties: count: - type: integer example: 123 + type: integer next: - type: string - nullable: true - format: uri example: http://api.example.org/accounts/?page=4 - previous: - type: string - nullable: true format: uri + nullable: true + type: string + previous: example: http://api.example.org/accounts/?page=2 + format: uri + nullable: true + type: string results: - type: array items: $ref: '#/components/schemas/LseProjectCounts' - PaginatedRoleBasedTaskList: + type: array + required: + - count + - results type: object + PaginatedRoleBasedTaskList: properties: tasks: - type: array items: $ref: '#/components/schemas/RoleBasedTask' + type: array total: - type: integer description: Total number of tasks example: 123 - total_annotations: type: integer + total_annotations: description: Total number of annotations example: 456 - total_predictions: type: integer + total_predictions: description: Total number of predictions example: 78 + type: integer required: - - tasks - - total - - total_annotations - - total_predictions - PatchedAnnotationReviewRequest: + - tasks + - total + - total_annotations + - total_predictions type: object + PatchedAnnotationReviewRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to @@ -23379,370 +22585,385 @@ components: values with complex, nested serializations properties: accepted: - type: boolean description: Accepted or rejected (if false) flag - result: - nullable: true + type: boolean annotation: - type: integer description: Corresponding annotation - last_annotation_history: type: integer - nullable: true comment: + minLength: 1 + nullable: true type: string writeOnly: true + last_annotation_history: nullable: true - minLength: 1 + type: integer remove_from_queue: + nullable: true type: boolean + result: nullable: true started_at: - type: string format: date-time nullable: true - PatchedAzureDatasetStorageRequest: + type: string type: object + PatchedAzureDatasetStorageRequest: properties: - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true - container: - type: string + account_key: + description: Azure Blob account key nullable: true - description: Azure blob container - prefix: type: string + account_name: + description: Azure Blob account name nullable: true - description: Azure blob prefix name - regex_filter: type: string + container: + description: Azure blob container nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - account_name: type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description nullable: true - description: Azure Blob account name - account_key: type: string + glob_pattern: + description: Glob pattern for syncing from bucket nullable: true - description: Azure Blob account key - last_sync: type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - glob_pattern: - type: string - nullable: true - description: Glob pattern for syncing from bucket - synced: - type: boolean - description: Flag if dataset has been previously synced or not - dataset: type: integer - description: A unique integer value identifying this dataset. - PatchedAzureServicePrincipalExportStorageRequest: - type: object - properties: - synchronizable: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synced: + description: Flag if dataset has been previously synced or not type: boolean + synchronizable: default: true - prefix: - type: string + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob prefix name - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + type: object + PatchedAzureServicePrincipalExportStorageRequest: + properties: account_name: - type: string - nullable: true description: Azure Blob account name - container: - type: string nullable: true - description: Azure blob container - tenant_id: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Azure Tenant ID + type: boolean client_id: - type: string - nullable: true description: Azure Blob Service Principal Client ID + nullable: true + type: string client_secret: + description: Azure Blob Service Principal Client Secret + nullable: true type: string + container: + description: Azure blob container nullable: true - description: Azure Blob Service Principal Client Secret - user_delegation_key: type: string + description: + description: Cloud storage description nullable: true - description: User Delegation Key (Backend) - last_sync: type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string - nullable: true - description: Cloud storage description - can_delete_objects: - type: boolean + prefix: + description: Azure blob prefix name nullable: true - description: Deletion from storage enabled + type: string project: - type: integer description: A unique integer value identifying this project. - PatchedAzureServicePrincipalImportStorageRequest: - type: object - properties: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - prefix: + tenant_id: + description: Azure Tenant ID + nullable: true type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Azure blob prefix name - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - account_name: - type: string + type: boolean + user_delegation_key: + description: User Delegation Key (Backend) nullable: true - description: Azure Blob account name - container: type: string + type: object + PatchedAzureServicePrincipalImportStorageRequest: + properties: + account_name: + description: Azure Blob account name nullable: true - description: Azure blob container - tenant_id: type: string - nullable: true - description: Azure Tenant ID client_id: - type: string - nullable: true description: Azure Blob Service Principal Client ID + nullable: true + type: string client_secret: + description: Azure Blob Service Principal Client Secret + nullable: true type: string + container: + description: Azure blob container nullable: true - description: Azure Blob Service Principal Client Secret - user_delegation_key: type: string + description: + description: Cloud storage description nullable: true - description: User Delegation Key (Backend) - last_sync: type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: Azure blob prefix name nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. - PatchedCommentRequest: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + tenant_id: + description: Azure Tenant ID + nullable: true + type: string + title: + description: Cloud storage title + maxLength: 256 + nullable: true + type: string + traceback: + description: Traceback report for the last failed sync + nullable: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean + user_delegation_key: + description: User Delegation Key (Backend) + nullable: true + type: string type: object + PatchedCommentRequest: properties: - region_ref: + annotation: nullable: true - description: Set if this comment is related to a specific part of the annotation. - Normally contains region ID and control name. + type: integer classifications: - nullable: true description: Classifications applied by a reviewer or annotator - text: - type: string nullable: true - description: Reviewer or annotator comment - is_resolved: - type: boolean - description: True if the comment is resolved draft: - type: integer nullable: true - annotation: type: integer + is_resolved: + description: True if the comment is resolved + type: boolean + region_ref: + description: Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name. nullable: true - PatchedDatasetRequest: + text: + description: Reviewer or annotator comment + nullable: true + type: string type: object + PatchedDatasetRequest: properties: + columns: + description: All data columns found in Dataset tasks + nullable: true created_by: allOf: - - $ref: '#/components/schemas/UserSimpleRequest' + - $ref: '#/components/schemas/UserSimpleRequest' description: User who created Dataset - title: + description: + description: Dataset description + nullable: true type: string - minLength: 1 + organization: + nullable: true + type: integer + title: description: Dataset title maxLength: 1000 - description: + minLength: 1 type: string - nullable: true - description: Dataset description - columns: - nullable: true - description: All data columns found in Dataset tasks total_entities: - type: integer maximum: 2147483647 minimum: -2147483648 nullable: true title: The number of entities in the dataset + type: integer vector_db_dataset_name: - type: string - minLength: 1 description: Dataset name for weaviate schema maxLength: 37 - organization: - type: integer - nullable: true - PatchedDatasetViewRequest: + minLength: 1 + type: string type: object + PatchedDatasetViewRequest: properties: - filter_group: - $ref: '#/components/schemas/FilterGroupRequest' data: - nullable: true description: Custom view data - ordering: nullable: true - description: Ordering parameters - order: + dataset: + description: Dataset ID type: integer + filter_group: + $ref: '#/components/schemas/FilterGroupRequest' + order: + description: Position of the tab, starting at the left in data manager and increasing as the tabs go left to right maximum: 2147483647 minimum: -2147483648 nullable: true - description: Position of the tab, starting at the left in data manager and - increasing as the tabs go left to right - selected_items: + type: integer + ordering: + description: Ordering parameters nullable: true + selected_items: description: Selected items - user: - type: integer nullable: true + user: description: User who made this view - dataset: + nullable: true type: integer - description: Dataset ID - PatchedDefaultRoleRequest: type: object + PatchedDefaultRoleRequest: properties: - organization: - type: integer - description: A unique integer value identifying this organization. + annotator_reviewer_firewall_enabled_at: + description: Set to current time to restrict data sharing between annotators and reviewers in the label stream, review stream, and notifications (which will be disabled). In these settings, information about annotator and reviewer identity is suppressed in the UI. + format: date-time + nullable: true + type: string + custom_scripts_editable_by: + description: |- + Set the minimum user role that can edit custom scripts in the UI. + + * `AD` - Administrator + * `MA` - Manager + nullable: true + oneOf: + - $ref: '#/components/schemas/CustomScriptsEditableByEnum' + - $ref: '#/components/schemas/NullEnum' + custom_scripts_enabled_at: + description: Set to current time to enabled custom scripts for this organization. Can only be enabled if no organization members are active members of any other organizations; otherwise an error will be raised. If this occurs, contact the LEAP team for assistance with enabling custom scripts. + format: date-time + nullable: true + type: string default_role: allOf: - - $ref: '#/components/schemas/DefaultRoleEnum' + - $ref: '#/components/schemas/DefaultRoleEnum' description: |- Default membership role for invited users @@ -23753,336 +22974,307 @@ components: * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated - external_id: - type: string + email_notification_settings: + description: 'Email notification settings for this organization. Controls which email notifications users can receive. Structure: {"notifications_allowed": {"notification_type": bool}}' nullable: true - description: External ID to uniquely identify this organization embed_domains: + description: 'List of objects: {"domain": "example.com"}. Used for CSP header on /embed routes.' nullable: true - description: 'List of objects: {"domain": "example.com"}. Used for CSP header - on /embed routes.' embed_settings: - nullable: true description: Embed settings for this organization - extra_data_on_activity_logs: - type: boolean - custom_scripts_enabled_at: - type: string - format: date-time nullable: true - description: Set to current time to enabled custom scripts for this organization. - Can only be enabled if no organization members are active members of any - other organizations; otherwise an error will be raised. If this occurs, - contact the LEAP team for assistance with enabling custom scripts. - custom_scripts_editable_by: + external_id: + description: External ID to uniquely identify this organization nullable: true - description: |- - Set the minimum user role that can edit custom scripts in the UI. - - * `AD` - Administrator - * `MA` - Manager - oneOf: - - $ref: '#/components/schemas/CustomScriptsEditableByEnum' - - $ref: '#/components/schemas/NullEnum' - annotator_reviewer_firewall_enabled_at: type: string + extra_data_on_activity_logs: + type: boolean + label_stream_navigation_disabled_at: + description: Set to current time to disable the label stream navigation for this organization. This will prevent users from going back in the label stream to view previous labels. format: date-time nullable: true - description: Set to current time to restrict data sharing between annotators - and reviewers in the label stream, review stream, and notifications (which - will be disabled). In these settings, information about annotator and - reviewer identity is suppressed in the UI. - read_only_quick_view_enabled_at: type: string + organization: + description: A unique integer value identifying this organization. + type: integer + read_only_quick_view_enabled_at: + description: Set to current time to prevent creating or editing annotations in quick view. format: date-time nullable: true - description: Set to current time to prevent creating or editing annotations - in quick view. - label_stream_navigation_disabled_at: type: string - format: date-time - nullable: true - description: Set to current time to disable the label stream navigation - for this organization. This will prevent users from going back in the - label stream to view previous labels. - email_notification_settings: - nullable: true - description: 'Email notification settings for this organization. Controls - which email notifications users can receive. Structure: {"notifications_allowed": - {"notification_type": bool}}' - PatchedFileUploadRequest: type: object + PatchedFileUploadRequest: properties: file: - type: string format: binary - PatchedGCSDatasetStorageRequest: + type: string type: object + PatchedGCSDatasetStorageRequest: properties: - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true bucket: - type: string - nullable: true description: GCS bucket name - prefix: - type: string nullable: true - description: GCS bucket prefix - regex_filter: type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - google_application_credentials: type: string + glob_pattern: + description: Glob pattern for syncing from bucket nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true + type: string + google_project_id: description: Google project ID - last_sync: + nullable: true type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - glob_pattern: - type: string + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Glob pattern for syncing from bucket + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synced: - type: boolean description: Flag if dataset has been previously synced or not - dataset: - type: integer - description: A unique integer value identifying this dataset. - PatchedGCSWIFExportStorageRequest: - type: object - properties: - synchronizable: type: boolean + synchronizable: default: true - bucket: - type: string + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: GCS bucket name - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: GCS bucket prefix - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - google_application_credentials: + type: boolean + type: object + PatchedGCSWIFExportStorageRequest: + properties: + bucket: + description: GCS bucket name + nullable: true type: string + can_delete_objects: + description: Deletion from storage enabled + nullable: true + type: boolean + description: + description: Cloud storage description nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true - description: Google project ID - google_project_number: type: string + google_project_id: + description: Google project ID nullable: true + type: string + google_project_number: description: Google project number - google_wif_pool_id: + nullable: true type: string + google_service_account_email: + description: Google service account email nullable: true + type: string + google_wif_pool_id: description: Google WIF pool ID - google_wif_provider_id: + nullable: true type: string + google_wif_provider_id: + description: Google WIF provider ID nullable: true title: Google wif provider - description: Google WIF provider ID - google_service_account_email: type: string - nullable: true - description: Google service account email last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string - nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string nullable: true - description: Cloud storage description - can_delete_objects: - type: boolean + prefix: + description: GCS bucket prefix nullable: true - description: Deletion from storage enabled + type: string project: - type: integer description: A unique integer value identifying this project. - PatchedGCSWIFImportStorageRequest: - type: object - properties: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - presign: type: boolean - default: true - bucket: - type: string + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: GCS bucket name - prefix: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: GCS bucket prefix - regex_filter: type: string - nullable: true - description: Cloud storage regex for filtering objects use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs - google_application_credentials: + type: boolean + type: object + PatchedGCSWIFImportStorageRequest: + properties: + bucket: + description: GCS bucket name + nullable: true type: string + description: + description: Cloud storage description nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string + google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file nullable: true - description: Google project ID - google_project_number: type: string + google_project_id: + description: Google project ID nullable: true + type: string + google_project_number: description: Google project number - google_wif_pool_id: + nullable: true type: string + google_service_account_email: + description: Google service account email nullable: true + type: string + google_wif_pool_id: description: Google WIF pool ID - google_wif_provider_id: + nullable: true type: string + google_wif_provider_id: + description: Google WIF provider ID nullable: true title: Google wif provider - description: Google WIF provider ID - google_service_account_email: type: string - nullable: true - description: Google service account email last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string + prefix: + description: GCS bucket prefix nullable: true - description: Cloud storage description + type: string + presign: + default: true + type: boolean presign_ttl: - type: integer + description: Presigned URLs TTL (in minutes) maximum: 32767 minimum: 0 - description: Presigned URLs TTL (in minutes) - project: type: integer + project: description: A unique integer value identifying this project. - PatchedHotkeysRequest: + type: integer + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 + nullable: true + type: string + traceback: + description: Traceback report for the last failed sync + nullable: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean type: object + PatchedHotkeysRequest: properties: custom_hotkeys: - type: object additionalProperties: {} - PatchedLabelLinkRequest: + type: object type: object + PatchedLabelLinkRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to @@ -24090,677 +23282,660 @@ components: values with complex, nested serializations properties: from_name: - type: string - minLength: 1 - title: Tag name description: Tag name maxLength: 2048 - project: - type: integer + minLength: 1 + title: Tag name + type: string label: type: integer - PatchedLabelRequest: + project: + type: integer type: object + PatchedLabelRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - value: - description: Label value - title: - type: string - minLength: 1 - description: Label title - maxLength: 2048 - description: - type: string - nullable: true - description: Label description approved: - type: boolean description: Status of label - created_by: + type: boolean + approved_by: + description: User who approved this label + nullable: true type: integer + created_by: description: User who made this label - approved_by: type: integer + description: + description: Label description nullable: true - description: User who approved this label + type: string organization: type: integer - PatchedLseOrganizationSerializerUpdateRequest: + title: + description: Label title + maxLength: 2048 + minLength: 1 + type: string + value: + description: Label value type: object + PatchedLseOrganizationSerializerUpdateRequest: description: |- A serializer mixin that takes an additional `fields` argument that controls which fields should be displayed. properties: - title: + contact_info: + format: email + maxLength: 254 + nullable: true type: string - writeOnly: true + created_by: nullable: true + type: integer + custom_scripts_editable_by: minLength: 1 - embed_domains: - type: array - items: - type: object - additionalProperties: - type: string - minLength: 1 - writeOnly: true nullable: true + type: string + writeOnly: true custom_scripts_enabled: + nullable: true type: boolean writeOnly: true + email_notification_settings: nullable: true - custom_scripts_editable_by: - type: string writeOnly: true + embed_domains: + items: + additionalProperties: + minLength: 1 + type: string + type: object nullable: true - minLength: 1 - embed_settings: + type: array writeOnly: true + embed_settings: nullable: true - email_notification_settings: writeOnly: true + title: + minLength: 1 nullable: true - token: type: string - nullable: true + writeOnly: true + token: maxLength: 256 - contact_info: - type: string - format: email - nullable: true - maxLength: 254 - created_by: - type: integer nullable: true - PatchedLseProjectUpdateRequest: + type: string type: object + PatchedLseProjectUpdateRequest: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - title: + annotation_limit_count: + minimum: 1 + nullable: true + type: integer + annotation_limit_percent: + format: decimal + nullable: true + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ type: string + annotator_evaluation_minimum_score: + default: '95.00' + format: decimal nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - description: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ type: string + annotator_evaluation_minimum_tasks: + default: 10 + minimum: 0 nullable: true - description: Project description - label_config: + type: integer + assignment_settings: + $ref: '#/components/schemas/AssignmentSettingsRequest' + color: + maxLength: 16 + nullable: true + type: string + comment_classification_config: type: string + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' nullable: true - description: Label config in XML format. See more about it in documentation - expert_instruction: + created_by: + allOf: + - $ref: '#/components/schemas/UserSimpleRequest' + description: Project owner + custom_script: type: string + custom_task_lock_ttl: + description: TTL in seconds for task reservations, on new and existing tasks + maximum: 86400 + minimum: 1 nullable: true - description: Labeling instructions in HTML format - show_instruction: - type: boolean - description: Show instructions to the annotator before they start - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task + type: integer + description: + description: Project description + nullable: true + type: string enable_empty_annotation: - type: boolean description: Allow annotators to submit empty annotations - show_annotation_history: type: boolean - description: Show annotation history to annotator - organization: - type: integer + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task + type: boolean + expert_instruction: + description: Labeling instructions in HTML format nullable: true - color: type: string + is_draft: + description: Whether or not the project is in the middle of being created + type: boolean + is_published: + description: Whether or not the project is published to annotators + title: Published + type: boolean + label_config: + description: Label config in XML format. See more about it in documentation nullable: true - maxLength: 16 + type: string maximum_annotations: - type: integer + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) maximum: 2147483647 minimum: -2147483648 title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - is_published: - type: boolean - title: Published - description: Whether or not the project is published to annotators + type: integer + min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started + maximum: 2147483647 + minimum: -2147483648 + type: integer model_version: + description: Machine learning model version + nullable: true type: string + organization: nullable: true - description: Machine learning model version - is_draft: - type: boolean - description: Whether or not the project is in the middle of being created - created_by: - allOf: - - $ref: '#/components/schemas/UserSimpleRequest' - description: Project owner - min_annotations_to_start_training: type: integer + overlap_cohort_percentage: maximum: 2147483647 minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started - show_collab_predictions: + type: integer + pause_on_failed_annotator_evaluation: + default: false + nullable: true type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions + pinned_at: + description: Pinned date and time + format: date-time + nullable: true + type: string + require_comment_on_skip: + default: false + type: boolean + reveal_preannotations_interactively: + description: Reveal pre-annotations interactively + type: boolean + review_settings: + $ref: '#/components/schemas/ReviewSettingsRequest' sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator + type: boolean + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator + type: boolean show_ground_truth_first: type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean show_overlap_first: type: boolean - overlap_cohort_percentage: - type: integer - maximum: 2147483647 - minimum: -2147483648 - task_data_login: - type: string + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean + skip_queue: nullable: true + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + task_data_login: description: 'Task data credentials: login' maxLength: 256 - task_data_password: - type: string nullable: true + type: string + task_data_password: description: 'Task data credentials: password' maxLength: 256 - control_weights: - nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - skip_queue: nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: - type: boolean - description: Reveal pre-annotations interactively - pinned_at: type: string - format: date-time + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 nullable: true - description: Pinned date and time + type: string workspace: type: integer - review_settings: - $ref: '#/components/schemas/ReviewSettingsRequest' - assignment_settings: - $ref: '#/components/schemas/AssignmentSettingsRequest' - custom_script: + type: object + PatchedLseS3ExportStorageRequest: + properties: + aws_access_key_id: + description: AWS_ACCESS_KEY_ID + nullable: true type: string - comment_classification_config: + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY + nullable: true type: string - require_comment_on_skip: - type: boolean - default: false - custom_task_lock_ttl: - type: integer - maximum: 86400 - minimum: 1 + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true - description: TTL in seconds for task reservations, on new and existing tasks - annotation_limit_count: - type: integer - minimum: 1 + type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID nullable: true - annotation_limit_percent: type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + bucket: + description: S3 bucket name + nullable: true + type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - pause_on_failed_annotator_evaluation: type: boolean + description: + description: Cloud storage description nullable: true - default: false - annotator_evaluation_minimum_score: type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - nullable: true - default: '95.00' - annotator_evaluation_minimum_tasks: - type: integer - minimum: 0 + external_id: + description: AWS ExternalId nullable: true - default: 10 - PatchedLseS3ExportStorageRequest: - type: object - properties: - synchronizable: - type: boolean - default: true - last_sync: + title: ExternalID type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: + nullable: true type: string + legacy_auth: nullable: true - description: Traceback report for the last failed sync + type: boolean meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: + prefix: + description: S3 bucket prefix + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Cloud storage description - can_delete_objects: - type: boolean + type: string + region_name: + description: AWS Region nullable: true - description: Deletion from storage enabled - bucket: type: string + role_arn: + description: AWS RoleArn + minLength: 1 + type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: S3 bucket name - prefix: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: S3 bucket prefix - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + type: object + PatchedLseS3ImportStorageRequest: + properties: aws_access_key_id: - type: string - nullable: true description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true + type: string + aws_sse_kms_key_id: description: AWS SSE KMS Key ID - region_name: + nullable: true type: string + bucket: + description: S3 bucket name nullable: true - description: AWS Region - s3_endpoint: type: string + description: + description: Cloud storage description nullable: true - description: S3 Endpoint - external_id: type: string + external_id: + description: AWS ExternalId nullable: true title: ExternalID - description: AWS ExternalId - role_arn: type: string - minLength: 1 - description: AWS RoleArn - legacy_auth: - type: boolean - nullable: true - project: - type: integer - description: A unique integer value identifying this project. - PatchedLseS3ImportStorageRequest: - type: object - properties: - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: + nullable: true type: string + legacy_auth: nullable: true - description: Traceback report for the last failed sync + type: boolean meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string - nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string - nullable: true - description: Cloud storage description - bucket: - type: string nullable: true - description: S3 bucket name prefix: - type: string - nullable: true description: S3 bucket prefix - regex_filter: - type: string nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: string - nullable: true - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: type: string + presign: + default: true + type: boolean + presign_ttl: + description: Presigned URLs TTL (in minutes) + maximum: 32767 + minimum: 0 + type: integer + project: + description: A unique integer value identifying this project. + type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + region_name: + description: AWS Region nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string - nullable: true - description: AWS SSE KMS Key ID - region_name: + role_arn: + description: AWS RoleArn + minLength: 1 type: string - nullable: true - description: AWS Region s3_endpoint: - type: string - nullable: true description: S3 Endpoint - external_id: - type: string nullable: true - title: ExternalID - description: AWS ExternalId - role_arn: type: string - minLength: 1 - description: AWS RoleArn - legacy_auth: + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - presign_ttl: - type: integer - maximum: 32767 - minimum: 0 - description: Presigned URLs TTL (in minutes) - recursive_scan: + type: string + traceback: + description: Traceback report for the last failed sync + nullable: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs type: boolean - description: Perform recursive scan over the bucket content - project: - type: integer - description: A unique integer value identifying this project. - PatchedLseTaskRequest: type: object + PatchedLseTaskRequest: description: Task Serializer with project scheme configs validation properties: - inner_id: - type: integer + avg_lead_time: + format: double + type: number cancelled_annotations: type: integer - total_annotations: - type: integer - total_predictions: + comment_count: + description: Number of comments in the task including all annotations + maximum: 2147483647 + minimum: -2147483648 type: integer completed_at: + format: date-time type: string + data: + description: User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI. + draft_exists: + type: boolean + ground_truth: + type: boolean + inner_id: + type: integer + is_labeled: + description: True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + type: boolean + last_comment_updated_at: + description: When the last comment was updated format: date-time + nullable: true + type: string + meta: + description: Meta is user imported (uploaded) data and can be useful as input for an ML Backend for embeddings, advanced vectors, and other info. It is passed to ML during training/predicting steps. + nullable: true + overlap: + description: Number of distinct annotators that processed the current task + maximum: 2147483647 + minimum: -2147483648 + type: integer predictions_score: - type: number format: double - avg_lead_time: type: number - format: double - draft_exists: - type: boolean + project: + description: Project ID for this task + nullable: true + type: integer reviewed: type: boolean reviews_accepted: type: integer reviews_rejected: type: integer - ground_truth: - type: boolean - data: - description: User imported or uploaded data for a task. Data is formatted - according to the project label config. You can find examples of data for - your project on the Import page in the Label Studio Data Manager UI. - meta: - nullable: true - description: Meta is user imported (uploaded) data and can be useful as - input for an ML Backend for embeddings, advanced vectors, and other info. - It is passed to ML during training/predicting steps. - is_labeled: - type: boolean - description: True if the number of annotations for this task is greater - than or equal to the number of maximum_completions for the project - overlap: + total_annotations: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of distinct annotators that processed the current task - comment_count: + total_predictions: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of comments in the task including all annotations unresolved_comment_count: - type: integer + description: Number of unresolved comments in the task including all annotations maximum: 2147483647 minimum: -2147483648 - description: Number of unresolved comments in the task including all annotations - last_comment_updated_at: - type: string - format: date-time - nullable: true - description: When the last comment was updated - project: type: integer - nullable: true - description: Project ID for this task - PatchedLseUserSerializerUpdateRequest: type: object + PatchedLseUserSerializerUpdateRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - first_name: - type: string - maxLength: 256 - last_name: - type: string - maxLength: 256 - username: - type: string - minLength: 1 - maxLength: 256 - custom_hotkeys: + active_organization: + nullable: true + type: integer + allow_newsletters: + description: Allow sending newsletters to user nullable: true + type: boolean + custom_hotkeys: description: Custom keyboard shortcuts configuration for the user interface - phone: + nullable: true + date_joined: + format: date-time type: string + email_notification_settings: + writeOnly: true + first_name: maxLength: 256 - active_organization: - type: integer + type: string + is_email_verified: nullable: true - allow_newsletters: type: boolean + writeOnly: true + last_name: + maxLength: 256 + type: string + onboarding_state: + minLength: 1 nullable: true - description: Allow sending newsletters to user - date_joined: type: string - format: date-time + writeOnly: true password: + minLength: 1 type: string writeOnly: true - minLength: 1 - onboarding_state: + phone: + maxLength: 256 type: string - writeOnly: true - nullable: true + username: + maxLength: 256 minLength: 1 - is_email_verified: - type: boolean - writeOnly: true - nullable: true - email_notification_settings: - writeOnly: true - PatchedModelInterfaceRequest: + type: string type: object + PatchedModelInterfaceRequest: properties: + associated_projects: + items: + type: integer + type: array created_by: allOf: - - $ref: '#/components/schemas/UserSimpleRequest' + - $ref: '#/components/schemas/UserSimpleRequest' description: User who created Dataset + description: + description: Model description + nullable: true + type: string + input_fields: {} + organization: + nullable: true + type: integer + output_classes: {} skill_name: allOf: - - $ref: '#/components/schemas/SkillNameEnum' + - $ref: '#/components/schemas/SkillNameEnum' default: TextClassification title: - type: string - minLength: 1 description: Model name maxLength: 500 - description: + minLength: 1 type: string - nullable: true - description: Model description - input_fields: {} - output_classes: {} - organization: - type: integer - nullable: true - associated_projects: - type: array - items: - type: integer - PatchedModelProviderConnectionRequest: type: object + PatchedModelProviderConnectionRequest: properties: - provider: - $ref: '#/components/schemas/ProviderEnum' api_key: + description: Model provider API key + nullable: true type: string writeOnly: true - nullable: true - description: Model provider API key auth_token: + description: Model provider Auth token + nullable: true type: string writeOnly: true + budget_alert_threshold: + description: Budget alert threshold for the given provider connection + format: double nullable: true - description: Model provider Auth token - deployment_name: - type: string + type: number + cached_available_models: + description: List of available models from the provider + maxLength: 4096 nullable: true + type: string + deployment_name: description: Azure OpenAI deployment name maxLength: 512 - endpoint: - type: string nullable: true + type: string + endpoint: description: Azure OpenAI endpoint maxLength: 512 + nullable: true + type: string google_application_credentials: + description: The content of GOOGLE_APPLICATION_CREDENTIALS json file + nullable: true type: string writeOnly: true + google_location: + description: Google project location + maxLength: 255 nullable: true - description: The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id: type: string - nullable: true + google_project_id: description: Google project ID maxLength: 255 - google_location: - type: string nullable: true - description: Google project location - maxLength: 255 - cached_available_models: type: string + is_internal: + description: Whether the model provider connection is internal, not visible to the user nullable: true - description: List of available models from the provider - maxLength: 4096 + type: boolean + provider: + $ref: '#/components/schemas/ProviderEnum' scope: $ref: '#/components/schemas/ScopeEnum' - is_internal: - type: boolean - nullable: true - description: Whether the model provider connection is internal, not visible - to the user - budget_alert_threshold: - type: number - format: double - nullable: true - description: Budget alert threshold for the given provider connection - PatchedOrganizationMemberCreateUpdateRequest: type: object + PatchedOrganizationMemberCreateUpdateRequest: properties: - user_id: - type: integer role: $ref: '#/components/schemas/Role9e7Enum' - PatchedPauseRequest: + user_id: + type: integer type: object + PatchedPauseRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to @@ -24769,7 +23944,7 @@ components: properties: reason: allOf: - - $ref: '#/components/schemas/ReasonEnum' + - $ref: '#/components/schemas/ReasonEnum' description: |- Reason for pausing @@ -24779,194 +23954,193 @@ components: * `ANNOTATION_LIMIT` - Annotation limit * `CUSTOM_SCRIPT` - Custom script verbose_reason: - type: string + description: Detailed description of why the project is paused, will be readable by paused annotators nullable: true - description: Detailed description of why the project is paused, will be - readable by paused annotators - PatchedProjectTemplateRequest: + type: string type: object + PatchedProjectTemplateRequest: properties: - name: + assignment_settings: + description: general dict serialized assignment settings + created_by: + nullable: true + type: integer + custom_script: + description: custom script for projects created from this template + minLength: 1 + nullable: true type: string + description: minLength: 1 + nullable: true + type: string + name: maxLength: 1000 - description: + minLength: 1 type: string + organization: nullable: true - minLength: 1 - tags: {} + type: integer project_settings: description: general dict serialized project settings - review_settings: - description: general dict serialized review settings - assignment_settings: - description: general dict serialized assignment settings require_comment_on_skip: - type: boolean description: flag to require comment on skip - custom_script: + type: boolean + review_settings: + description: general dict serialized review settings + tags: {} + type: object + PatchedS3DatasetStorageRequest: + properties: + aws_access_key_id: + description: AWS_ACCESS_KEY_ID + nullable: true type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - minLength: 1 - description: custom script for projects created from this template - created_by: - type: integer + type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true - organization: + type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID + nullable: true + type: string + bucket: + description: S3 bucket name + nullable: true + type: string + dataset: + description: A unique integer value identifying this dataset. type: integer + description: + description: Cloud storage description nullable: true - PatchedS3DatasetStorageRequest: - type: object - properties: - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true - last_sync: type: string - format: date-time + glob_pattern: + description: Glob pattern for syncing from bucket nullable: true + type: string + last_sync: description: Last sync finished time + format: date-time + nullable: true + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string - nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string - nullable: true - description: Cloud storage description - bucket: - type: string nullable: true - description: S3 bucket name prefix: - type: string - nullable: true description: S3 bucket prefix - regex_filter: - type: string - nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - aws_access_key_id: - type: string nullable: true - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: type: string + presign: + default: true + type: boolean + presign_ttl: + description: Presigned URLs TTL (in minutes) + maximum: 32767 + minimum: 0 + type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + region_name: + description: AWS Region nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: AWS SSE KMS Key ID - region_name: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synced: + description: Flag if dataset has been previously synced or not + type: boolean + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: AWS Region - s3_endpoint: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: S3 Endpoint - presign_ttl: - type: integer - maximum: 32767 - minimum: 0 - description: Presigned URLs TTL (in minutes) - recursive_scan: - type: boolean - description: Perform recursive scan over the bucket content - glob_pattern: type: string - nullable: true - description: Glob pattern for syncing from bucket - synced: + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs type: boolean - description: Flag if dataset has been previously synced or not - dataset: - type: integer - description: A unique integer value identifying this dataset. - PatchedSessionTimeoutPolicyRequest: type: object + PatchedSessionTimeoutPolicyRequest: properties: max_session_age: - type: integer + description: Number of minutes that a session can be active before needing to re-login maximum: 2147483647 minimum: 1 title: Max session age (minutes) - description: Number of minutes that a session can be active before needing - to re-login - max_time_between_activity: type: integer + max_time_between_activity: + description: Number of minutes that a session stays active without any activity maximum: 2147483647 minimum: 1 title: Max time (minutes) between activity - description: Number of minutes that a session stays active without any activity - PatchedTaskAssignmentRequest: + type: integer type: object + PatchedTaskAssignmentRequest: properties: + assignee: + description: Assigned user + type: integer + task: + description: Assigned task + type: integer type: allOf: - - $ref: '#/components/schemas/TypeEnum' - title: Assignment type + - $ref: '#/components/schemas/TypeEnum' description: |- Type of assignment: Annotate|Review * `AN` - Annotate * `RE` - Review - assignee: - type: integer - description: Assigned user - task: - type: integer - description: Assigned task - PatchedThirdPartyModelVersionRequest: + title: Assignment type type: object + PatchedThirdPartyModelVersionRequest: properties: - parent_model: + model_provider_connection: + nullable: true + type: integer + organization: + nullable: true type: integer + parent_model: description: Parent model interface ID - title: - type: string - minLength: 1 - description: Model name - maxLength: 500 + type: integer prompt: - type: string - minLength: 1 description: Prompt to execute + minLength: 1 + type: string provider: allOf: - - $ref: '#/components/schemas/ProviderEnum' + - $ref: '#/components/schemas/ProviderEnum' description: |- The model provider to use e.g. OpenAI @@ -24978,107 +24152,117 @@ components: * `Anthropic` - Anthropic * `Custom` - Custom provider_model_id: - type: string - minLength: 1 description: The model ID to use within the given provider, e.g. gpt-3.5 maxLength: 255 - model_provider_connection: - type: integer - nullable: true - organization: - type: integer - nullable: true - PatchedWebhookSerializerForUpdateRequest: + minLength: 1 + type: string + title: + description: Model name + maxLength: 500 + minLength: 1 + type: string type: object + PatchedWebhookSerializerForUpdateRequest: description: |- Serializer class for updating webhooks Used to forbid updating project field. properties: - url: - type: string - format: uri - minLength: 1 - title: URL of webhook - description: URL of webhook - maxLength: 2048 - send_payload: - type: boolean - title: Does webhook send the payload - description: If value is False send only action - send_for_all_actions: - type: boolean - title: Use webhook for all actions - description: If value is False - used only for actions from WebhookAction + actions: + default: [] + items: + $ref: '#/components/schemas/ActionsEnum' + type: array headers: - title: Request extra headers of webhook description: Key Value Json of headers + title: Request extra headers of webhook is_active: - type: boolean - title: Is webhook active description: If value is False the webhook is disabled - actions: - type: array - items: - $ref: '#/components/schemas/ActionsEnum' - default: [] - PatchedWorkspaceRequest: + title: Is webhook active + type: boolean + send_for_all_actions: + description: If value is False - used only for actions from WebhookAction + title: Use webhook for all actions + type: boolean + send_payload: + description: If value is False send only action + title: Does webhook send the payload + type: boolean + url: + description: URL of webhook + format: uri + maxLength: 2048 + minLength: 1 + title: URL of webhook + type: string type: object + PatchedWorkspaceRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - title: + color: + maxLength: 16 + nullable: true type: string - minLength: 1 - description: Workspace name - maxLength: 1000 description: - type: string - nullable: true description: Workspace description - color: - type: string nullable: true - maxLength: 16 - is_personal: + type: string + is_archived: + description: Workspace is archived + title: Archived type: boolean - title: Personal + is_personal: description: Workspace is a personal user workspace - is_archived: + title: Personal type: boolean - title: Archived - description: Workspace is archived - Pause: + title: + description: Workspace name + maxLength: 1000 + minLength: 1 + type: string type: object + Pause: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: - type: integer + created_at: + description: Timestamp when this pause record was created + format: date-time readOnly: true - project: - type: integer + type: string + deleted_at: + description: Timestamp when this pause record was soft-deleted + format: date-time + nullable: true readOnly: true + type: string + deleted_by: + description: User who soft-deleted this pause record nullable: true - description: Related project for which the pause is set - user: + readOnly: true type: integer + id: readOnly: true - nullable: true - description: User who is paused + type: integer paused_by: allOf: - - $ref: '#/components/schemas/UserSimple' + - $ref: '#/components/schemas/UserSimple' + readOnly: true + project: + description: Related project for which the pause is set + nullable: true readOnly: true + type: integer reason: allOf: - - $ref: '#/components/schemas/ReasonEnum' + - $ref: '#/components/schemas/ReasonEnum' description: |- Reason for pausing @@ -25087,44 +24271,32 @@ components: * `ANNOTATOR_EVALUATION` - Annotator evaluation * `ANNOTATION_LIMIT` - Annotation limit * `CUSTOM_SCRIPT` - Custom script - verbose_reason: - type: string - nullable: true - description: Detailed description of why the project is paused, will be - readable by paused annotators - deleted_by: - type: integer - readOnly: true - nullable: true - description: User who soft-deleted this pause record - deleted_at: - type: string + updated_at: + description: Timestamp when this pause record was last updated format: date-time readOnly: true - nullable: true - description: Timestamp when this pause record was soft-deleted - created_at: type: string - format: date-time + user: + description: User who is paused + nullable: true readOnly: true - description: Timestamp when this pause record was created - updated_at: + type: integer + verbose_reason: + description: Detailed description of why the project is paused, will be readable by paused annotators + nullable: true type: string - format: date-time - readOnly: true - description: Timestamp when this pause record was last updated required: - - created_at - - deleted_at - - deleted_by - - id - - paused_by - - project - - reason - - updated_at - - user - PauseRequest: + - created_at + - deleted_at + - deleted_by + - id + - paused_by + - project + - reason + - updated_at + - user type: object + PauseRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to @@ -25132,687 +24304,657 @@ components: values with complex, nested serializations properties: reason: - allOf: - - $ref: '#/components/schemas/ReasonEnum' - description: |- - Reason for pausing - - * `MANUAL` - Manual - * `BEHAVIOR_BASED` - Behavior-based - * `ANNOTATOR_EVALUATION` - Annotator evaluation - * `ANNOTATION_LIMIT` - Annotation limit - * `CUSTOM_SCRIPT` - Custom script - verbose_reason: - type: string - nullable: true - description: Detailed description of why the project is paused, will be - readable by paused annotators - required: - - reason - Prediction: - type: object - properties: - id: - type: integer - readOnly: true - result: - type: array - title: Prediction result list - description: List of prediction results for the task - items: - type: object - title: Prediction result items (regions) - description: List of predicted regions for the task - model_version: - type: string - description: Model version - tag for predictions that can be used to filter - tasks in Data Manager, as well as select specific model version for showing - preannotations in the labeling interface - created_ago: - type: string - readOnly: true - default: '' - description: Delta time from creation time - score: - type: number - format: double + allOf: + - $ref: '#/components/schemas/ReasonEnum' + description: |- + Reason for pausing + + * `MANUAL` - Manual + * `BEHAVIOR_BASED` - Behavior-based + * `ANNOTATOR_EVALUATION` - Annotator evaluation + * `ANNOTATION_LIMIT` - Annotation limit + * `CUSTOM_SCRIPT` - Custom script + verbose_reason: + description: Detailed description of why the project is paused, will be readable by paused annotators nullable: true - description: Prediction score + type: string + required: + - reason + type: object + Prediction: + properties: cluster: - type: integer + description: Cluster for the current prediction maximum: 2147483647 minimum: -2147483648 nullable: true - description: Cluster for the current prediction - neighbors: - nullable: true - description: Array of task IDs of the closest neighbors - mislabeling: - type: number - format: double - description: Related task mislabeling score - created_at: + type: integer + created_ago: + default: '' + description: Delta time from creation time + readOnly: true type: string + created_at: format: date-time readOnly: true - updated_at: type: string - format: date-time + id: readOnly: true - model: type: integer - nullable: true + mislabeling: + description: Related task mislabeling score + format: double + type: number + model: description: An ML Backend instance that created the prediction. - model_run: - type: integer nullable: true + type: integer + model_run: description: A run of a ModelVersion that created the prediction. - task: + nullable: true type: integer + model_version: + description: Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + type: string + neighbors: + description: Array of task IDs of the closest neighbors + nullable: true project: - type: integer nullable: true - required: - - created_ago - - created_at - - id - - result - - task - - updated_at - PredictionRequest: - type: object - properties: + type: integer result: - type: array - title: Prediction result list description: List of prediction results for the task items: - type: object - title: Prediction result items (regions) description: List of predicted regions for the task - model_version: - type: string - description: Model version - tag for predictions that can be used to filter - tasks in Data Manager, as well as select specific model version for showing - preannotations in the labeling interface + title: Prediction result items (regions) + type: object + title: Prediction result list + type: array score: - type: number + description: Prediction score format: double nullable: true - description: Prediction score - cluster: + type: number + task: type: integer + updated_at: + format: date-time + readOnly: true + type: string + required: + - created_ago + - created_at + - id + - result + - task + - updated_at + type: object + PredictionRequest: + properties: + cluster: + description: Cluster for the current prediction maximum: 2147483647 minimum: -2147483648 nullable: true - description: Cluster for the current prediction - neighbors: - nullable: true - description: Array of task IDs of the closest neighbors + type: integer mislabeling: - type: number - format: double description: Related task mislabeling score + format: double + type: number model: - type: integer - nullable: true description: An ML Backend instance that created the prediction. - model_run: - type: integer nullable: true + type: integer + model_run: description: A run of a ModelVersion that created the prediction. - task: + nullable: true type: integer + model_version: + description: Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + type: string + neighbors: + description: Array of task IDs of the closest neighbors + nullable: true project: + nullable: true type: integer + result: + description: List of prediction results for the task + items: + description: List of predicted regions for the task + title: Prediction result items (regions) + type: object + title: Prediction result list + type: array + score: + description: Prediction score + format: double nullable: true + type: number + task: + type: integer required: - - result - - task - Project: + - result + - task type: object + Project: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - id: - type: integer - readOnly: true - title: - type: string + color: + maxLength: 16 nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - description: type: string + config_has_control_tags: + description: Flag to detect is project ready for labeling + readOnly: true + type: boolean + config_suitable_for_bulk_annotation: + description: Flag to detect is project ready for bulk annotation + readOnly: true + type: boolean + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' nullable: true - description: Project description - label_config: + created_at: + format: date-time + readOnly: true type: string + created_by: + allOf: + - $ref: '#/components/schemas/UserSimple' + description: Project owner + description: + description: Project description nullable: true - description: Label config in XML format. See more about it in documentation - expert_instruction: type: string - nullable: true - description: Labeling instructions in HTML format - show_instruction: - type: boolean - description: Show instructions to the annotator before they start - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task enable_empty_annotation: - type: boolean description: Allow annotators to submit empty annotations - show_annotation_history: type: boolean - description: Show annotation history to annotator - organization: - type: integer + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task + type: boolean + expert_instruction: + description: Labeling instructions in HTML format nullable: true - color: type: string - nullable: true - maxLength: 16 - maximum_annotations: + finished_task_number: + description: Finished tasks + readOnly: true type: integer - maximum: 2147483647 - minimum: -2147483648 - title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - is_published: + ground_truth_number: + description: Honeypot annotation number in project + readOnly: true + type: integer + id: + readOnly: true + type: integer + is_draft: + description: Whether or not the project is in the middle of being created type: boolean - title: Published + is_published: description: Whether or not the project is published to annotators - model_version: - type: string - nullable: true - description: Machine learning model version - is_draft: + title: Published type: boolean - description: Whether or not the project is in the middle of being created - created_by: - allOf: - - $ref: '#/components/schemas/UserSimple' - description: Project owner - created_at: + label_config: + description: Label config in XML format. See more about it in documentation + nullable: true type: string - format: date-time - readOnly: true - min_annotations_to_start_training: + maximum_annotations: + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + maximum: 2147483647 + minimum: -2147483648 + title: Maximum annotation number type: integer + min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started maximum: 2147483647 minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started - start_training_on_annotation_update: - type: boolean - readOnly: true - description: Start model training after any annotations are submitted or - updated - show_collab_predictions: - type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions - num_tasks_with_annotations: type: integer - readOnly: true + model_version: + description: Machine learning model version + nullable: true + type: string + num_tasks_with_annotations: description: Tasks with annotations count - task_number: - type: integer readOnly: true - description: Total task number in project - useful_annotation_number: type: integer - readOnly: true - description: Useful annotation number in project not including skipped_annotations_number - and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number - + ground_truth_number - ground_truth_number: + organization: + nullable: true type: integer - readOnly: true - description: Honeypot annotation number in project - skipped_annotations_number: + overlap_cohort_percentage: + maximum: 2147483647 + minimum: -2147483648 type: integer + parsed_label_config: + description: JSON-formatted labeling configuration readOnly: true - description: Skipped by collaborators annotation number in project - total_annotations_number: - type: integer + pinned_at: + description: Pinned date and time + format: date-time + nullable: true + type: string + queue_done: readOnly: true - description: Total annotations number in project including skipped_annotations_number - and ground_truth_number. - total_predictions_number: type: integer + queue_total: readOnly: true - description: Total predictions number in project including skipped_annotations_number, - ground_truth_number, and useful_annotation_number. + type: integer + reveal_preannotations_interactively: + description: Reveal pre-annotations interactively + type: boolean sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator + type: boolean + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator + type: boolean show_ground_truth_first: type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean show_overlap_first: type: boolean - overlap_cohort_percentage: + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean + skip_queue: + nullable: true + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + skipped_annotations_number: + description: Skipped by collaborators annotation number in project + readOnly: true type: integer - maximum: 2147483647 - minimum: -2147483648 + start_training_on_annotation_update: + description: Start model training after any annotations are submitted or updated + readOnly: true + type: boolean task_data_login: - type: string - nullable: true description: 'Task data credentials: login' maxLength: 256 - task_data_password: - type: string nullable: true + type: string + task_data_password: description: 'Task data credentials: password' maxLength: 256 - control_weights: nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' - parsed_label_config: - readOnly: true - description: JSON-formatted labeling configuration - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - config_has_control_tags: - type: boolean + type: string + task_number: + description: Total task number in project readOnly: true - description: Flag to detect is project ready for labeling - skip_queue: + type: integer + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: - type: boolean - description: Reveal pre-annotations interactively - pinned_at: type: string - format: date-time - nullable: true - description: Pinned date and time - finished_task_number: - type: integer + total_annotations_number: + description: Total annotations number in project including skipped_annotations_number and ground_truth_number. readOnly: true - description: Finished tasks - queue_total: type: integer + total_predictions_number: + description: Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. readOnly: true - queue_done: type: integer + useful_annotation_number: + description: Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number readOnly: true - config_suitable_for_bulk_annotation: - type: boolean - readOnly: true - description: Flag to detect is project ready for bulk annotation + type: integer required: - - config_has_control_tags - - config_suitable_for_bulk_annotation - - created_at - - finished_task_number - - ground_truth_number - - id - - num_tasks_with_annotations - - parsed_label_config - - queue_done - - queue_total - - skipped_annotations_number - - start_training_on_annotation_update - - task_number - - total_annotations_number - - total_predictions_number - - useful_annotation_number - ProjectDuplicateRequest: + - config_has_control_tags + - config_suitable_for_bulk_annotation + - created_at + - finished_task_number + - ground_truth_number + - id + - num_tasks_with_annotations + - parsed_label_config + - queue_done + - queue_total + - skipped_annotations_number + - start_training_on_annotation_update + - task_number + - total_annotations_number + - total_predictions_number + - useful_annotation_number type: object + ProjectDuplicateRequest: properties: + description: + default: '' + description: Description of duplicated project + type: string mode: allOf: - - $ref: '#/components/schemas/ModeEnum' + - $ref: '#/components/schemas/ModeEnum' description: |- Data that you want to duplicate: settings only, with tasks, with annotations * `settings` - Only settings * `settings,data` - Settings and tasks - workspace: - type: integer - description: Workspace, where to place duplicated project title: - type: string - minLength: 3 description: Title of duplicated project maxLength: 50 - description: + minLength: 3 type: string - default: '' - description: Description of duplicated project + workspace: + description: Workspace, where to place duplicated project + type: integer required: - - mode - - title - - workspace - ProjectGroup: + - mode + - title + - workspace type: object + ProjectGroup: properties: - project_id: - type: integer group: type: string + project_id: + type: integer role: $ref: '#/components/schemas/ProjectGroupRoleEnum' required: - - group - - project_id - - role - ProjectGroupRequest: + - group + - project_id + - role type: object + ProjectGroupRequest: properties: - project_id: - type: integer group: - type: string minLength: 1 + type: string + project_id: + type: integer role: $ref: '#/components/schemas/ProjectGroupRoleEnum' required: - - group - - project_id - - role + - group + - project_id + - role + type: object ProjectGroupRoleEnum: - enum: - - Inherit - - Annotator - - Reviewer - type: string description: |- * `Inherit` - Inherit * `Annotator` - Annotator * `Reviewer` - Reviewer + enum: + - Inherit + - Annotator + - Reviewer + type: string ProjectImport: - type: object properties: - id: - type: integer - readOnly: true - project: + annotation_count: + maximum: 2147483647 + minimum: -2147483648 type: integer - nullable: true - preannotated_from_fields: - nullable: true commit_to_project: type: boolean - return_task_ids: + could_be_tasks_list: type: boolean - status: - $ref: '#/components/schemas/Status7bfEnum' - url: - type: string - nullable: true - maxLength: 2048 - error: - type: string - nullable: true created_at: - type: string - format: date-time - readOnly: true - nullable: true description: Creation time - updated_at: - type: string format: date-time + nullable: true readOnly: true + type: string + data_columns: {} + duration: + maximum: 2147483647 + minimum: -2147483648 + type: integer + error: nullable: true - description: Updated time - finished_at: type: string + file_upload_ids: {} + finished_at: + description: Complete or fail time format: date-time nullable: true - description: Complete or fail time - task_count: + type: string + found_formats: {} + id: + readOnly: true type: integer + preannotated_from_fields: + nullable: true + prediction_count: maximum: 2147483647 minimum: -2147483648 - annotation_count: type: integer - maximum: 2147483647 - minimum: -2147483648 - prediction_count: + project: + nullable: true type: integer + return_task_ids: + type: boolean + status: + $ref: '#/components/schemas/Status7bfEnum' + task_count: maximum: 2147483647 minimum: -2147483648 - duration: type: integer - maximum: 2147483647 - minimum: -2147483648 - file_upload_ids: {} - could_be_tasks_list: - type: boolean - found_formats: {} - data_columns: {} + task_ids: {} tasks: nullable: true - task_ids: {} + updated_at: + description: Updated time + format: date-time + nullable: true + readOnly: true + type: string + url: + maxLength: 2048 + nullable: true + type: string required: - - created_at - - id - - updated_at - ProjectLabelConfig: + - created_at + - id + - updated_at type: object + ProjectLabelConfig: properties: label_config: - type: string description: Label config in XML format. See more about it in documentation + type: string required: - - label_config - ProjectLabelConfigRequest: + - label_config type: object + ProjectLabelConfigRequest: properties: label_config: - type: string - minLength: 1 description: Label config in XML format. See more about it in documentation + minLength: 1 + type: string required: - - label_config - ProjectMember: + - label_config type: object + ProjectMember: properties: user: type: integer required: - - user - ProjectMemberRequest: + - user type: object + ProjectMemberRequest: properties: user: type: integer required: - - user - ProjectReimport: + - user type: object + ProjectReimport: properties: - id: + annotation_count: + maximum: 2147483647 + minimum: -2147483648 type: integer - readOnly: true - project: + data_columns: {} + duration: + maximum: 2147483647 + minimum: -2147483648 type: integer - nullable: true - status: - $ref: '#/components/schemas/Status7bfEnum' error: - type: string nullable: true - task_count: + type: string + file_upload_ids: {} + files_as_tasks_list: + type: boolean + found_formats: {} + id: + readOnly: true type: integer + prediction_count: maximum: 2147483647 minimum: -2147483648 - annotation_count: type: integer - maximum: 2147483647 - minimum: -2147483648 - prediction_count: + project: + nullable: true type: integer + status: + $ref: '#/components/schemas/Status7bfEnum' + task_count: maximum: 2147483647 minimum: -2147483648 - duration: type: integer - maximum: 2147483647 - minimum: -2147483648 - file_upload_ids: {} - files_as_tasks_list: - type: boolean - found_formats: {} - data_columns: {} required: - - id - ProjectRequest: + - id type: object + ProjectRequest: description: |- Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) - properties: - title: - type: string + properties: + color: + maxLength: 16 nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - description: type: string + control_weights: + description: 'Dict of weights for each control tag in metric calculation. Each control tag (e.g. label or choice) will have it''s own key in control weight dict with weight for each label and overall weight.For example, if bounding box annotation with control tag named my_bbox should be included with 0.33 weight in agreement calculation, and the first label Car should be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' nullable: true + created_by: + allOf: + - $ref: '#/components/schemas/UserSimpleRequest' + description: Project owner + description: description: Project description - label_config: - type: string nullable: true - description: Label config in XML format. See more about it in documentation - expert_instruction: type: string - nullable: true - description: Labeling instructions in HTML format - show_instruction: - type: boolean - description: Show instructions to the annotator before they start - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task enable_empty_annotation: - type: boolean description: Allow annotators to submit empty annotations - show_annotation_history: type: boolean - description: Show annotation history to annotator - organization: - type: integer + evaluate_predictions_automatically: + description: Retrieve and display predictions when loading a task + type: boolean + expert_instruction: + description: Labeling instructions in HTML format nullable: true - color: type: string + is_draft: + description: Whether or not the project is in the middle of being created + type: boolean + is_published: + description: Whether or not the project is published to annotators + title: Published + type: boolean + label_config: + description: Label config in XML format. See more about it in documentation nullable: true - maxLength: 16 + type: string maximum_annotations: - type: integer + description: Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) maximum: 2147483647 minimum: -2147483648 title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - is_published: - type: boolean - title: Published - description: Whether or not the project is published to annotators + type: integer + min_annotations_to_start_training: + description: Minimum number of completed tasks after which model training is started + maximum: 2147483647 + minimum: -2147483648 + type: integer model_version: + description: Machine learning model version + nullable: true type: string + organization: nullable: true - description: Machine learning model version - is_draft: - type: boolean - description: Whether or not the project is in the middle of being created - created_by: - allOf: - - $ref: '#/components/schemas/UserSimpleRequest' - description: Project owner - min_annotations_to_start_training: type: integer + overlap_cohort_percentage: maximum: 2147483647 minimum: -2147483648 - description: Minimum number of completed tasks after which model training - is started - show_collab_predictions: + type: integer + pinned_at: + description: Pinned date and time + format: date-time + nullable: true + type: string + reveal_preannotations_interactively: + description: Reveal pre-annotations interactively type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + show_annotation_history: + description: Show annotation history to annotator + type: boolean + show_collab_predictions: + description: If set, the annotator can view model predictions + title: Show predictions to annotator + type: boolean show_ground_truth_first: type: boolean + show_instruction: + description: Show instructions to the annotator before they start + type: boolean show_overlap_first: type: boolean - overlap_cohort_percentage: - type: integer - maximum: 2147483647 - minimum: -2147483648 - task_data_login: - type: string + show_skip_button: + description: Show a skip button in interface and allow annotators to skip the task + type: boolean + skip_queue: nullable: true + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + task_data_login: description: 'Task data credentials: login' maxLength: 256 - task_data_password: - type: string nullable: true + type: string + task_data_password: description: 'Task data credentials: password' maxLength: 256 - control_weights: nullable: true - description: 'Dict of weights for each control tag in metric calculation. - Each control tag (e.g. label or choice) will have it''s own key in control - weight dict with weight for each label and overall weight.For example, - if bounding box annotation with control tag named my_bbox should be included - with 0.33 weight in agreement calculation, and the first label Car should - be twice more important than Airplaine, then you have to need the specify: - {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, - ''Airplaine'': 0.5}, ''overall'': 0.33}' - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - skip_queue: - nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: - type: boolean - description: Reveal pre-annotations interactively - pinned_at: type: string - format: date-time + title: + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 nullable: true - description: Pinned date and time - ProjectRole: + type: string type: object + ProjectRole: properties: id: - type: integer readOnly: true + type: integer + project: + type: integer role: allOf: - - $ref: '#/components/schemas/Role9e7Enum' + - $ref: '#/components/schemas/Role9e7Enum' description: |- User role in project @@ -25825,19 +24967,19 @@ components: * `NO` - Not Activated user: type: integer - project: - type: integer required: - - id - - project - - role - - user - ProjectRoleRequest: + - id + - project + - role + - user type: object + ProjectRoleRequest: properties: + project: + type: integer role: allOf: - - $ref: '#/components/schemas/Role9e7Enum' + - $ref: '#/components/schemas/Role9e7Enum' description: |- User role in project @@ -25850,111 +24992,101 @@ components: * `NO` - Not Activated user: type: integer - project: - type: integer required: - - project - - role - - user + - project + - role + - user + type: object ProjectSubsetEnum: - enum: - - All - - HasGT - - Sample - type: string description: |- * `All` - All * `HasGT` - HasGT * `Sample` - Sample + enum: + - All + - HasGT + - Sample + type: string ProjectTemplate: - type: object properties: - id: - type: integer - readOnly: true - name: - type: string - maxLength: 1000 - description: - type: string - nullable: true - tags: {} - project_settings: - description: general dict serialized project settings - review_settings: - description: general dict serialized review settings assignment_settings: description: general dict serialized assignment settings - require_comment_on_skip: - type: boolean - description: flag to require comment on skip - custom_script: - type: string - nullable: true - description: custom script for projects created from this template created_at: - type: string format: date-time readOnly: true - updated_at: type: string - format: date-time - readOnly: true created_by: - type: integer nullable: true - organization: type: integer + custom_script: + description: custom script for projects created from this template nullable: true - required: - - created_at - - id - - name - - updated_at - ProjectTemplateRequest: - type: object - properties: - name: type: string - minLength: 1 - maxLength: 1000 description: + nullable: true + type: string + id: + readOnly: true + type: integer + name: + maxLength: 1000 type: string + organization: nullable: true - minLength: 1 - tags: {} + type: integer project_settings: description: general dict serialized project settings + require_comment_on_skip: + description: flag to require comment on skip + type: boolean review_settings: description: general dict serialized review settings + tags: {} + updated_at: + format: date-time + readOnly: true + type: string + required: + - created_at + - id + - name + - updated_at + type: object + ProjectTemplateRequest: + properties: assignment_settings: description: general dict serialized assignment settings - require_comment_on_skip: - type: boolean - description: flag to require comment on skip + created_by: + nullable: true + type: integer custom_script: - type: string + description: custom script for projects created from this template + minLength: 1 nullable: true + type: string + description: minLength: 1 - description: custom script for projects created from this template - created_by: - type: integer nullable: true + type: string + name: + maxLength: 1000 + minLength: 1 + type: string organization: - type: integer nullable: true + type: integer + project_settings: + description: general dict serialized project settings + require_comment_on_skip: + description: flag to require comment on skip + type: boolean + review_settings: + description: general dict serialized review settings + tags: {} required: - - name + - name + type: object PromptsStatusEnum: - enum: - - Enabled - - Cloud license per organization disabled - - On-premise global license disabled - - Expired - - Adala not connected - - Disabled for this organization [FF] - - unknown - type: string description: |- * `Enabled` - Enabled * `Cloud license per organization disabled` - Cloud license per organization disabled @@ -25963,16 +25095,16 @@ components: * `Adala not connected` - Adala not connected * `Disabled for this organization [FF]` - Disabled for this organization [FF] * `unknown` - unknown - ProviderEnum: enum: - - OpenAI - - AzureOpenAI - - AzureAIFoundry - - VertexAI - - Gemini - - Anthropic - - Custom + - Enabled + - Cloud license per organization disabled + - On-premise global license disabled + - Expired + - Adala not connected + - Disabled for this organization [FF] + - unknown type: string + ProviderEnum: description: |- * `OpenAI` - OpenAI * `AzureOpenAI` - AzureOpenAI @@ -25981,419 +25113,417 @@ components: * `Gemini` - Gemini * `Anthropic` - Anthropic * `Custom` - Custom - ReasonEnum: enum: - - MANUAL - - BEHAVIOR_BASED - - ANNOTATOR_EVALUATION - - ANNOTATION_LIMIT - - CUSTOM_SCRIPT + - OpenAI + - AzureOpenAI + - AzureAIFoundry + - VertexAI + - Gemini + - Anthropic + - Custom type: string + ReasonEnum: description: |- * `MANUAL` - Manual * `BEHAVIOR_BASED` - Behavior-based * `ANNOTATOR_EVALUATION` - Annotator evaluation * `ANNOTATION_LIMIT` - Annotation limit * `CUSTOM_SCRIPT` - Custom script + enum: + - MANUAL + - BEHAVIOR_BASED + - ANNOTATOR_EVALUATION + - ANNOTATION_LIMIT + - CUSTOM_SCRIPT + type: string RedisExportStorage: - type: object properties: - id: - type: integer - readOnly: true - type: - type: string - readOnly: true - default: redis - synchronizable: - type: boolean - default: true - path: - type: string - nullable: true - description: Storage prefix (optional) - host: - type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Server Host IP (optional) - port: + type: boolean + created_at: + description: Creation time + format: date-time + readOnly: true type: string + db: + description: Server Database + maximum: 32767 + minimum: 0 + type: integer + description: + description: Cloud storage description nullable: true - description: Server Port (optional) - password: type: string + host: + description: Server Host IP (optional) nullable: true - description: Server Password (optional) - regex_filter: type: string - nullable: true - title: Port - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs + id: + readOnly: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: + password: + description: Server Password (optional) + nullable: true type: string + path: + description: Storage prefix (optional) nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - can_delete_objects: - type: boolean + port: + description: Server Port (optional) nullable: true - description: Deletion from storage enabled - db: - type: integer - maximum: 32767 - minimum: 0 - description: Server Database + type: string project: - type: integer description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - RedisImportStorage: - type: object - properties: - id: type: integer - readOnly: true - type: + regex_filter: + description: Cloud storage regex for filtering objects + nullable: true + title: Port type: string - readOnly: true - default: redis + status: + $ref: '#/components/schemas/StatusC5aEnum' synchronizable: - type: boolean default: true - path: - type: string + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: Storage prefix (optional) - host: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Server Host IP (optional) - port: type: string - nullable: true - description: Server Port (optional) - password: + type: + default: redis + readOnly: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - created_at + - id + - project + - type + type: object + RedisImportStorage: + properties: + created_at: + description: Creation time + format: date-time + readOnly: true type: string + db: + description: Server Database + maximum: 32767 + minimum: 0 + type: integer + description: + description: Cloud storage description nullable: true - description: Server Password (optional) - regex_filter: type: string + host: + description: Server Host IP (optional) nullable: true - title: Port - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - last_sync: type: string + id: + readOnly: true + type: integer + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: + nullable: true + password: + description: Server Password (optional) + nullable: true + type: string + path: + description: Storage prefix (optional) + nullable: true + type: string + port: + description: Server Port (optional) + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true + title: Port + type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: description: Cloud storage title maxLength: 256 - description: + nullable: true type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage description - created_at: type: string - format: date-time + type: + default: redis readOnly: true - description: Creation time - db: - type: integer - maximum: 32767 - minimum: 0 - description: Server Database - project: - type: integer - description: A unique integer value identifying this project. + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs + type: boolean required: - - created_at - - id - - project - - type - RefinePromptRequestRequest: + - created_at + - id + - project + - type type: object + RefinePromptRequestRequest: properties: - teacher_model_provider_connection_id: + project_id: + description: Project ID to target the refined prompt for type: integer - description: Model Provider Connection ID to use to refine the prompt teacher_model_name: - type: string - minLength: 1 description: Name of the model to use to refine the prompt - project_id: + minLength: 1 + type: string + teacher_model_provider_connection_id: + description: Model Provider Connection ID to use to refine the prompt type: integer - description: Project ID to target the refined prompt for required: - - project_id - - teacher_model_name - - teacher_model_provider_connection_id - RefinedPromptResponse: + - project_id + - teacher_model_name + - teacher_model_provider_connection_id type: object + RefinedPromptResponse: properties: - title: - type: string - nullable: true - description: Title of the refined prompt - reasoning: - type: string + previous_version: + allOf: + - $ref: '#/components/schemas/ThirdPartyModelVersion' + description: Previous version of the prompt nullable: true - description: Reasoning behind the refinement prompt: - type: string description: The refined prompt text - refinement_job_id: type: string + reasoning: + description: Reasoning behind the refinement nullable: true - description: Unique identifier for the refinement job - refinement_status: type: string + refinement_job_id: + description: Unique identifier for the refinement job nullable: true + type: string + refinement_status: description: Status of the refinement job - total_cost: + nullable: true type: string + title: + description: Title of the refined prompt nullable: true + type: string + total_cost: description: Total cost of the refinement job (in USD) - previous_version: - allOf: - - $ref: '#/components/schemas/ThirdPartyModelVersion' nullable: true - description: Previous version of the prompt + type: string required: - - previous_version - - prompt - - reasoning - - refinement_job_id - - refinement_status - - title - - total_cost + - previous_version + - prompt + - reasoning + - refinement_job_id + - refinement_status + - title + - total_cost + type: object RequeueRejectedTasksModeEnum: - enum: - - requeue - - remove - - flexible - type: string description: |- * `requeue` - Requeue * `remove` - Remove * `flexible` - Flexible - ReviewCriteriaEnum: enum: - - all - - one + - requeue + - remove + - flexible type: string + ReviewCriteriaEnum: description: |- * `all` - Task is reviewed if all annotations are reviewed * `one` - Task is reviewed if at least one annotation is reviewed + enum: + - all + - one + type: string ReviewSettings: - type: object properties: + anonymize_annotations: + description: Hide annotator names from annotations while review + type: boolean id: - type: integer readOnly: true - requeue_rejected_tasks_to_annotator: + type: integer + instruction: + description: Reviewer instructions in HTML format + nullable: true + type: string + only_finished_tasks: + description: Show only finished tasks in the review stream type: boolean + project: + nullable: true + type: integer + requeue_rejected_tasks_mode: + description: |- + Requeue mode for rejected tasks + + * `requeue` - Requeue + * `remove` - Remove + * `flexible` - Flexible + nullable: true + oneOf: + - $ref: '#/components/schemas/RequeueRejectedTasksModeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + requeue_rejected_tasks_to_annotator: readOnly: true + type: boolean + require_comment_on_reject: + description: If set, the reviewer must leave a comment on reject + type: boolean review_criteria: - nullable: true description: |- Criteria to mark task as reviewed * `all` - Task is reviewed if all annotations are reviewed * `one` - Task is reviewed if at least one annotation is reviewed + nullable: true oneOf: - - $ref: '#/components/schemas/ReviewCriteriaEnum' - - $ref: '#/components/schemas/NullEnum' - anonymize_annotations: + - $ref: '#/components/schemas/ReviewCriteriaEnum' + - $ref: '#/components/schemas/NullEnum' + review_only_manual_assignments: + description: When set True, review queue is built only from manually assigned tasks type: boolean - description: Hide annotator names from annotations while review - only_finished_tasks: + show_agreement_to_reviewers: + description: Show the agreement column to reviewers type: boolean - description: Show only finished tasks in the review stream - instruction: - type: string - nullable: true - description: Reviewer instructions in HTML format - show_instruction: + show_data_manager_to_reviewers: + description: Show the data manager to reviewers type: boolean + show_instruction: description: Show instructions to the reviewers before they start - show_data_manager_to_reviewers: type: boolean - description: Show the data manager to reviewers - show_agreement_to_reviewers: + required: + - id + - requeue_rejected_tasks_to_annotator + type: object + ReviewSettingsRequest: + properties: + anonymize_annotations: + description: Hide annotator names from annotations while review type: boolean - description: Show the agreement column to reviewers - require_comment_on_reject: + instruction: + description: Reviewer instructions in HTML format + nullable: true + type: string + only_finished_tasks: + description: Show only finished tasks in the review stream type: boolean - description: If set, the reviewer must leave a comment on reject - requeue_rejected_tasks_mode: + project: nullable: true + type: integer + requeue_rejected_tasks_mode: description: |- Requeue mode for rejected tasks * `requeue` - Requeue * `remove` - Remove * `flexible` - Flexible + nullable: true oneOf: - - $ref: '#/components/schemas/RequeueRejectedTasksModeEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - review_only_manual_assignments: + - $ref: '#/components/schemas/RequeueRejectedTasksModeEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' + require_comment_on_reject: + description: If set, the reviewer must leave a comment on reject type: boolean - description: When set True, review queue is built only from manually assigned - tasks - project: - type: integer - nullable: true - required: - - id - - requeue_rejected_tasks_to_annotator - ReviewSettingsRequest: - type: object - properties: review_criteria: - nullable: true description: |- Criteria to mark task as reviewed * `all` - Task is reviewed if all annotations are reviewed * `one` - Task is reviewed if at least one annotation is reviewed + nullable: true oneOf: - - $ref: '#/components/schemas/ReviewCriteriaEnum' - - $ref: '#/components/schemas/NullEnum' - anonymize_annotations: - type: boolean - description: Hide annotator names from annotations while review - only_finished_tasks: + - $ref: '#/components/schemas/ReviewCriteriaEnum' + - $ref: '#/components/schemas/NullEnum' + review_only_manual_assignments: + description: When set True, review queue is built only from manually assigned tasks type: boolean - description: Show only finished tasks in the review stream - instruction: - type: string - nullable: true - description: Reviewer instructions in HTML format - show_instruction: + show_agreement_to_reviewers: + description: Show the agreement column to reviewers type: boolean - description: Show instructions to the reviewers before they start show_data_manager_to_reviewers: - type: boolean description: Show the data manager to reviewers - show_agreement_to_reviewers: type: boolean - description: Show the agreement column to reviewers - require_comment_on_reject: - type: boolean - description: If set, the reviewer must leave a comment on reject - requeue_rejected_tasks_mode: - nullable: true - description: |- - Requeue mode for rejected tasks - - * `requeue` - Requeue - * `remove` - Remove - * `flexible` - Flexible - oneOf: - - $ref: '#/components/schemas/RequeueRejectedTasksModeEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - review_only_manual_assignments: + show_instruction: + description: Show instructions to the reviewers before they start type: boolean - description: When set True, review queue is built only from manually assigned - tasks - project: - type: integer - nullable: true + type: object ReviewedEnum: - enum: - - only - - exclude description: |- * `only` - only * `exclude` - exclude * `None` - None + enum: + - only + - exclude RevokeInviteRequest: - type: object properties: email: - type: string minLength: 1 + type: string required: - - email + - email + type: object Role9e7Enum: - enum: - - OW - - AD - - MA - - RE - - AN - - DI - - 'NO' - type: string description: |- * `OW` - Owner * `AD` - Administrator @@ -26402,751 +25532,750 @@ components: * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated + enum: + - OW + - AD + - MA + - RE + - AN + - DI + - 'NO' + type: string RoleBasedTask: oneOf: - - $ref: '#/components/schemas/LseTask' - - $ref: '#/components/schemas/LseTaskSerializerForReviewers' - - $ref: '#/components/schemas/LseTaskSerializerForAnnotators' + - $ref: '#/components/schemas/LseTask' + - $ref: '#/components/schemas/LseTaskSerializerForReviewers' + - $ref: '#/components/schemas/LseTaskSerializerForAnnotators' S3DatasetStorage: - type: object properties: + aws_access_key_id: + description: AWS_ACCESS_KEY_ID + nullable: true + type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY + nullable: true + type: string + aws_session_token: + description: AWS_SESSION_TOKEN + nullable: true + type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID + nullable: true + type: string + bucket: + description: S3 bucket name + nullable: true + type: string + created_at: + description: Creation time + format: date-time + readOnly: true + type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description + nullable: true + type: string + glob_pattern: + description: Glob pattern for syncing from bucket + nullable: true + type: string id: + readOnly: true type: integer + job_id: + nullable: true readOnly: true - type: + title: The Job ID for the GCP Dataproc job that will import the records of this dataset into the vector db type: string - readOnly: true - default: s3 - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: + prefix: + description: S3 bucket prefix + nullable: true type: string + presign: + default: true + type: boolean + presign_ttl: + description: Presigned URLs TTL (in minutes) + maximum: 32767 + minimum: 0 + type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - bucket: + region_name: + description: AWS Region + nullable: true type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: S3 bucket name - prefix: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synced: + description: Flag if dataset has been previously synced or not + type: boolean + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: S3 bucket prefix - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string + type: + default: s3 + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - created_at + - dataset + - id + - job_id + - type + type: object + S3DatasetStorageRequest: + properties: aws_access_key_id: - type: string - nullable: true description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true - description: AWS SSE KMS Key ID - region_name: type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID nullable: true - description: AWS Region - s3_endpoint: type: string + bucket: + description: S3 bucket name nullable: true - description: S3 Endpoint - presign_ttl: - type: integer - maximum: 32767 - minimum: 0 - description: Presigned URLs TTL (in minutes) - recursive_scan: - type: boolean - description: Perform recursive scan over the bucket content - glob_pattern: type: string + dataset: + description: A unique integer value identifying this dataset. + type: integer + description: + description: Cloud storage description nullable: true - description: Glob pattern for syncing from bucket - synced: - type: boolean - description: Flag if dataset has been previously synced or not - job_id: type: string - readOnly: true + glob_pattern: + description: Glob pattern for syncing from bucket nullable: true - title: The Job ID for the GCP Dataproc job that will import the records - of this dataset into the vector db - dataset: - type: integer - description: A unique integer value identifying this dataset. - required: - - created_at - - dataset - - id - - job_id - - type - S3DatasetStorageRequest: - type: object - properties: - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true - last_sync: type: string + last_sync: + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: + nullable: true + prefix: + description: S3 bucket prefix + nullable: true type: string + presign: + default: true + type: boolean + presign_ttl: + description: Presigned URLs TTL (in minutes) + maximum: 32767 + minimum: 0 + type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Cloud storage title - maxLength: 256 - description: type: string + region_name: + description: AWS Region nullable: true - description: Cloud storage description - bucket: type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: S3 bucket name - prefix: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synced: + description: Flag if dataset has been previously synced or not + type: boolean + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: S3 bucket prefix - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - dataset + type: object + S3ExportStorage: + properties: aws_access_key_id: - type: string - nullable: true description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true - description: AWS SSE KMS Key ID - region_name: type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID nullable: true - description: AWS Region - s3_endpoint: type: string + bucket: + description: S3 bucket name nullable: true - description: S3 Endpoint - presign_ttl: - type: integer - maximum: 32767 - minimum: 0 - description: Presigned URLs TTL (in minutes) - recursive_scan: - type: boolean - description: Perform recursive scan over the bucket content - glob_pattern: type: string + can_delete_objects: + description: Deletion from storage enabled nullable: true - description: Glob pattern for syncing from bucket - synced: type: boolean - description: Flag if dataset has been previously synced or not - dataset: - type: integer - description: A unique integer value identifying this dataset. - required: - - dataset - S3ExportStorage: - type: object - properties: - id: - type: integer + created_at: + description: Creation time + format: date-time readOnly: true - type: type: string + description: + description: Cloud storage description + nullable: true + type: string + id: readOnly: true - default: s3 - synchronizable: - type: boolean - default: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string nullable: true - description: Cloud storage title - maxLength: 256 - description: + prefix: + description: S3 bucket prefix + nullable: true type: string + project: + description: A unique integer value identifying this project. + type: integer + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: Cloud storage description - created_at: type: string - format: date-time - readOnly: true - description: Creation time - can_delete_objects: - type: boolean + region_name: + description: AWS Region nullable: true - description: Deletion from storage enabled - bucket: type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: S3 bucket name - prefix: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: S3 bucket prefix - regex_filter: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: Cloud storage regex for filtering objects + type: string + type: + default: s3 + readOnly: true + type: string use_blob_urls: - type: boolean description: Interpret objects as BLOBs and generate URLs + type: boolean + required: + - created_at + - id + - project + - type + type: object + S3ImportStorage: + properties: aws_access_key_id: - type: string - nullable: true description: AWS_ACCESS_KEY_ID - aws_secret_access_key: - type: string nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + aws_secret_access_key: + description: AWS_SECRET_ACCESS_KEY nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + aws_session_token: + description: AWS_SESSION_TOKEN nullable: true - description: AWS SSE KMS Key ID - region_name: type: string + aws_sse_kms_key_id: + description: AWS SSE KMS Key ID nullable: true - description: AWS Region - s3_endpoint: type: string + bucket: + description: S3 bucket name nullable: true - description: S3 Endpoint - project: - type: integer - description: A unique integer value identifying this project. - required: - - created_at - - id - - project - - type - S3ImportStorage: - type: object - properties: - id: - type: integer + type: string + created_at: + description: Creation time + format: date-time readOnly: true - type: type: string + description: + description: Cloud storage description + nullable: true + type: string + id: readOnly: true - default: s3 - synchronizable: - type: boolean - default: true - presign: - type: boolean - default: true + type: integer last_sync: - type: string + description: Last sync finished time format: date-time nullable: true - description: Last sync finished time + type: string last_sync_count: - type: integer + description: Count of tasks synced last time maximum: 2147483647 minimum: 0 nullable: true - description: Count of tasks synced last time + type: integer last_sync_job: - type: string - nullable: true description: Last sync job ID maxLength: 256 - status: - $ref: '#/components/schemas/StatusC5aEnum' - traceback: - type: string nullable: true - description: Traceback report for the last failed sync + type: string meta: - nullable: true description: Meta and debug information about storage processes - title: - type: string - nullable: true - description: Cloud storage title - maxLength: 256 - description: - type: string - nullable: true - description: Cloud storage description - created_at: - type: string - format: date-time - readOnly: true - description: Creation time - bucket: - type: string nullable: true - description: S3 bucket name prefix: - type: string - nullable: true description: S3 bucket prefix - regex_filter: - type: string nullable: true - description: Cloud storage regex for filtering objects - use_blob_urls: - type: boolean - description: Interpret objects as BLOBs and generate URLs - aws_access_key_id: type: string + presign: + default: true + type: boolean + presign_ttl: + description: Presigned URLs TTL (in minutes) + maximum: 32767 + minimum: 0 + type: integer + project: + description: A unique integer value identifying this project. + type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + type: boolean + regex_filter: + description: Cloud storage regex for filtering objects nullable: true - description: AWS_ACCESS_KEY_ID - aws_secret_access_key: type: string + region_name: + description: AWS Region nullable: true - description: AWS_SECRET_ACCESS_KEY - aws_session_token: type: string + s3_endpoint: + description: S3 Endpoint nullable: true - description: AWS_SESSION_TOKEN - aws_sse_kms_key_id: type: string + status: + $ref: '#/components/schemas/StatusC5aEnum' + synchronizable: + default: true + type: boolean + title: + description: Cloud storage title + maxLength: 256 nullable: true - description: AWS SSE KMS Key ID - region_name: type: string + traceback: + description: Traceback report for the last failed sync nullable: true - description: AWS Region - s3_endpoint: type: string - nullable: true - description: S3 Endpoint - presign_ttl: - type: integer - maximum: 32767 - minimum: 0 - description: Presigned URLs TTL (in minutes) - recursive_scan: + type: + default: s3 + readOnly: true + type: string + use_blob_urls: + description: Interpret objects as BLOBs and generate URLs type: boolean - description: Perform recursive scan over the bucket content - project: - type: integer - description: A unique integer value identifying this project. required: - - created_at - - id - - project - - type - SamlSettings: + - created_at + - id + - project + - type type: object + SamlSettings: properties: - workspaces_groups: + projects_groups: + description: Projects to groups mapping nullable: true - description: Workspaces to groups mapping roles_groups: - nullable: true description: Roles to groups mapping - projects_groups: nullable: true - description: Projects to groups mapping - SamlSettingsUpdate: + workspaces_groups: + description: Workspaces to groups mapping + nullable: true type: object + SamlSettingsUpdate: properties: - workspaces_groups: + projects_groups: + items: + $ref: '#/components/schemas/ProjectGroup' type: array + roles_groups: items: - type: array items: type: string - roles_groups: + type: array type: array + workspaces_groups: items: - type: array items: type: string - projects_groups: + type: array type: array - items: - $ref: '#/components/schemas/ProjectGroup' - SamlSettingsUpdateRequest: type: object + SamlSettingsUpdateRequest: properties: - workspaces_groups: + projects_groups: + items: + $ref: '#/components/schemas/ProjectGroupRequest' type: array + roles_groups: items: - type: array items: - type: string minLength: 1 - roles_groups: + type: string + type: array type: array + workspaces_groups: items: - type: array items: - type: string minLength: 1 - projects_groups: + type: string + type: array type: array - items: - $ref: '#/components/schemas/ProjectGroupRequest' + type: object SamplingEnum: - enum: - - Sequential sampling - - Uniform sampling - - Uncertainty sampling - type: string description: |- * `Sequential sampling` - Tasks are ordered by Data manager ordering * `Uniform sampling` - Tasks are chosen randomly * `Uncertainty sampling` - Tasks are chosen according to model uncertainty scores (active learning mode) + enum: + - Sequential sampling + - Uniform sampling + - Uncertainty sampling + type: string ScimSettings: - type: object properties: - workspaces_groups: + projects_groups: + description: Projects to groups mapping nullable: true - description: Workspaces to groups mapping roles_groups: - nullable: true description: Roles to groups mapping - projects_groups: nullable: true - description: Projects to groups mapping - ScimSettingsUpdate: + workspaces_groups: + description: Workspaces to groups mapping + nullable: true type: object + ScimSettingsUpdate: properties: - workspaces_groups: + projects_groups: + items: + $ref: '#/components/schemas/ProjectGroup' type: array + roles_groups: items: - type: array items: type: string - roles_groups: + type: array type: array + workspaces_groups: items: - type: array items: type: string - projects_groups: + type: array type: array - items: - $ref: '#/components/schemas/ProjectGroup' - ScimSettingsUpdateRequest: type: object + ScimSettingsUpdateRequest: properties: - workspaces_groups: + projects_groups: + items: + $ref: '#/components/schemas/ProjectGroupRequest' type: array + roles_groups: items: - type: array items: - type: string minLength: 1 - roles_groups: + type: string + type: array type: array + workspaces_groups: items: - type: array items: - type: string minLength: 1 - projects_groups: + type: string + type: array type: array - items: - $ref: '#/components/schemas/ProjectGroupRequest' + type: object ScopeEnum: - enum: - - Organization - - User - - Model - type: string description: |- * `Organization` - Organization * `User` - User * `Model` - Model + enum: + - Organization + - User + - Model + type: string SelectedItemsRequest: - type: object properties: all: type: boolean - included: - type: array + excluded: items: type: integer - excluded: type: array + included: items: type: integer + type: array required: - - all - SendInviteRequest: + - all type: object + SendInviteRequest: properties: emails: - type: array items: - type: string minLength: 1 + type: string + type: array role: - type: string minLength: 1 + type: string required: - - emails - - role - SerializationOption: + - emails + - role type: object + SerializationOption: properties: only_id: - type: boolean default: false description: Include a full json body or IDs only - SerializationOptionRequest: + type: boolean type: object + SerializationOptionRequest: properties: only_id: - type: boolean default: false description: Include a full json body or IDs only - SerializationOptions: + type: boolean type: object + SerializationOptions: properties: - drafts: + annotations__completed_by: allOf: - - $ref: '#/components/schemas/SerializationOption' + - $ref: '#/components/schemas/SerializationOption' description: JSON dict with parameters - predictions: + drafts: allOf: - - $ref: '#/components/schemas/SerializationOption' + - $ref: '#/components/schemas/SerializationOption' description: JSON dict with parameters include_annotation_history: - type: boolean default: false description: Include annotation history - annotations__completed_by: - allOf: - - $ref: '#/components/schemas/SerializationOption' - description: JSON dict with parameters - interpolate_key_frames: type: boolean + interpolate_key_frames: default: false description: Interpolate video key frames - SerializationOptionsRequest: + type: boolean + predictions: + allOf: + - $ref: '#/components/schemas/SerializationOption' + description: JSON dict with parameters type: object + SerializationOptionsRequest: properties: - drafts: + annotations__completed_by: allOf: - - $ref: '#/components/schemas/SerializationOptionRequest' + - $ref: '#/components/schemas/SerializationOptionRequest' description: JSON dict with parameters - predictions: + drafts: allOf: - - $ref: '#/components/schemas/SerializationOptionRequest' + - $ref: '#/components/schemas/SerializationOptionRequest' description: JSON dict with parameters include_annotation_history: - type: boolean default: false description: Include annotation history - annotations__completed_by: - allOf: - - $ref: '#/components/schemas/SerializationOptionRequest' - description: JSON dict with parameters - interpolate_key_frames: type: boolean + interpolate_key_frames: default: false description: Interpolate video key frames - SessionTimeoutPolicy: + type: boolean + predictions: + allOf: + - $ref: '#/components/schemas/SerializationOptionRequest' + description: JSON dict with parameters type: object + SessionTimeoutPolicy: properties: + created_at: + format: date-time + readOnly: true + type: string max_session_age: - type: integer + description: Number of minutes that a session can be active before needing to re-login maximum: 2147483647 minimum: 1 title: Max session age (minutes) - description: Number of minutes that a session can be active before needing - to re-login - max_time_between_activity: type: integer + max_time_between_activity: + description: Number of minutes that a session stays active without any activity maximum: 2147483647 minimum: 1 title: Max time (minutes) between activity - description: Number of minutes that a session stays active without any activity - created_at: - type: string - format: date-time - readOnly: true + type: integer updated_at: - type: string format: date-time readOnly: true + type: string required: - - created_at - - updated_at + - created_at + - updated_at + type: object SkillNameEnum: - enum: - - TextClassification - - NamedEntityRecognition - type: string description: |- * `TextClassification` - TextClassification * `NamedEntityRecognition` - NamedEntityRecognition - SkipQueueEnum: enum: - - REQUEUE_FOR_ME - - REQUEUE_FOR_OTHERS - - IGNORE_SKIPPED + - TextClassification + - NamedEntityRecognition type: string + SkipQueueEnum: description: |- * `REQUEUE_FOR_ME` - Requeue for me * `REQUEUE_FOR_OTHERS` - Requeue for others * `IGNORE_SKIPPED` - Ignore skipped - SkippedEnum: enum: - - only - - exclude + - REQUEUE_FOR_ME + - REQUEUE_FOR_OTHERS + - IGNORE_SKIPPED + type: string + SkippedEnum: description: |- * `only` - only * `exclude` - exclude * `None` - None - StateEnum: enum: - - CO - - DI - - ER - - TR - - PR - type: string + - only + - exclude + StateEnum: description: |- * `CO` - Connected * `DI` - Disconnected * `ER` - Error * `TR` - Training * `PR` - Predicting - Status7bfEnum: enum: - - created - - in_progress - - failed - - completed + - CO + - DI + - ER + - TR + - PR type: string + Status7bfEnum: description: |- * `created` - Created * `in_progress` - In progress * `failed` - Failed * `completed` - Completed - StatusC5aEnum: enum: - - initialized - - queued - - in_progress - - failed - - completed - - completed_with_errors + - created + - in_progress + - failed + - completed type: string + StatusC5aEnum: description: |- * `initialized` - Initialized * `queued` - Queued @@ -27154,193 +26283,197 @@ components: * `failed` - Failed * `completed` - Completed * `completed_with_errors` - Completed with errors + enum: + - initialized + - queued + - in_progress + - failed + - completed + - completed_with_errors + type: string TaskAssignment: - type: object properties: - id: + assignee: + description: Assigned user type: integer - readOnly: true created_at: - type: string + description: Time of assignment format: date-time readOnly: true - description: Time of assignment + type: string + id: + readOnly: true + type: integer + task: + description: Assigned task + type: integer type: allOf: - - $ref: '#/components/schemas/TypeEnum' - title: Assignment type + - $ref: '#/components/schemas/TypeEnum' description: |- Type of assignment: Annotate|Review * `AN` - Annotate * `RE` - Review + title: Assignment type + required: + - assignee + - created_at + - id + - task + type: object + TaskAssignmentRequest: + properties: assignee: - type: integer description: Assigned user - task: type: integer + task: description: Assigned task - required: - - assignee - - created_at - - id - - task - TaskAssignmentRequest: - type: object - properties: + type: integer type: allOf: - - $ref: '#/components/schemas/TypeEnum' - title: Assignment type + - $ref: '#/components/schemas/TypeEnum' description: |- Type of assignment: Annotate|Review * `AN` - Annotate * `RE` - Review - assignee: - type: integer - description: Assigned user - task: - type: integer - description: Assigned task + title: Assignment type required: - - assignee - - task - TaskSimple: + - assignee + - task type: object + TaskSimple: properties: - id: - type: integer + annotations: + default: [] + items: + $ref: '#/components/schemas/Annotation' readOnly: true - data: - description: User imported or uploaded data for a task. Data is formatted - according to the project label config. You can find examples of data for - your project on the Import page in the Label Studio Data Manager UI. - meta: - nullable: true - description: Meta is user imported (uploaded) data and can be useful as - input for an ML Backend for embeddings, advanced vectors, and other info. - It is passed to ML during training/predicting steps. + type: array + cancelled_annotations: + description: Number of total cancelled annotations for the current task + maximum: 2147483647 + minimum: -2147483648 + type: integer + comment_authors: + description: Users who wrote comments + items: + type: integer + type: array + comment_count: + description: Number of comments in the task including all annotations + maximum: 2147483647 + minimum: -2147483648 + type: integer created_at: - type: string + description: Time a task was created format: date-time readOnly: true - description: Time a task was created - updated_at: type: string - format: date-time + data: + description: User imported or uploaded data for a task. Data is formatted according to the project label config. You can find examples of data for your project on the Import page in the Label Studio Data Manager UI. + file_upload: + description: Uploaded file used as data source for this task + nullable: true + type: integer + id: readOnly: true - description: Last time a task was updated - is_labeled: - type: boolean - description: True if the number of annotations for this task is greater - than or equal to the number of maximum_completions for the project - overlap: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of distinct annotators that processed the current task inner_id: - type: integer + description: Internal task ID in the project, starts with 1 + format: int64 maximum: 9223372036854775807 minimum: -9223372036854775808 - format: int64 nullable: true - description: Internal task ID in the project, starts with 1 - total_annotations: type: integer + is_labeled: + description: True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + type: boolean + last_comment_updated_at: + description: When the last comment was updated + format: date-time + nullable: true + type: string + meta: + description: Meta is user imported (uploaded) data and can be useful as input for an ML Backend for embeddings, advanced vectors, and other info. It is passed to ML during training/predicting steps. + nullable: true + overlap: + description: Number of distinct annotators that processed the current task maximum: 2147483647 minimum: -2147483648 - description: Number of total annotations for the current task except cancelled - annotations - cancelled_annotations: type: integer - maximum: 2147483647 - minimum: -2147483648 - description: Number of total cancelled annotations for the current task - total_predictions: + predictions: + default: [] + items: + $ref: '#/components/schemas/Prediction' + readOnly: true + type: array + project: + description: Project ID for this task + nullable: true type: integer + total_annotations: + description: Number of total annotations for the current task except cancelled annotations maximum: 2147483647 minimum: -2147483648 - description: Number of total predictions for the current task - comment_count: type: integer + total_predictions: + description: Number of total predictions for the current task maximum: 2147483647 minimum: -2147483648 - description: Number of comments in the task including all annotations - unresolved_comment_count: type: integer + unresolved_comment_count: + description: Number of unresolved comments in the task including all annotations maximum: 2147483647 minimum: -2147483648 - description: Number of unresolved comments in the task including all annotations - last_comment_updated_at: - type: string - format: date-time - nullable: true - description: When the last comment was updated - project: type: integer - nullable: true - description: Project ID for this task + updated_at: + description: Last time a task was updated + format: date-time + readOnly: true + type: string updated_by: - type: integer - nullable: true description: Last annotator or reviewer who updated this task - file_upload: - type: integer nullable: true - description: Uploaded file used as data source for this task - comment_authors: - type: array - items: - type: integer - description: Users who wrote comments - annotations: - type: array - items: - $ref: '#/components/schemas/Annotation' - readOnly: true - default: [] - predictions: - type: array - items: - $ref: '#/components/schemas/Prediction' - readOnly: true - default: [] + type: integer required: - - annotations - - created_at - - data - - id - - predictions - - updated_at - ThirdPartyModelVersion: + - annotations + - created_at + - data + - id + - predictions + - updated_at type: object + ThirdPartyModelVersion: properties: - id: - type: integer + created_at: + format: date-time readOnly: true + type: string created_by: allOf: - - $ref: '#/components/schemas/UserSimple' - readOnly: true + - $ref: '#/components/schemas/UserSimple' description: User who created Dataset - score: - type: string readOnly: true - parent_model: + id: + readOnly: true + type: integer + model_provider_connection: + nullable: true + type: integer + organization: + nullable: true type: integer + parent_model: description: Parent model interface ID - title: - type: string - description: Model name - maxLength: 500 + type: integer prompt: - type: string description: Prompt to execute + type: string provider: allOf: - - $ref: '#/components/schemas/ProviderEnum' + - $ref: '#/components/schemas/ProviderEnum' description: |- The model provider to use e.g. OpenAI @@ -27352,50 +26485,48 @@ components: * `Anthropic` - Anthropic * `Custom` - Custom provider_model_id: - type: string description: The model ID to use within the given provider, e.g. gpt-3.5 maxLength: 255 - created_at: type: string - format: date-time + score: readOnly: true - updated_at: type: string + title: + description: Model name + maxLength: 500 + type: string + updated_at: format: date-time readOnly: true + type: string + required: + - created_at + - created_by + - id + - prompt + - provider_model_id + - score + - title + - updated_at + type: object + ThirdPartyModelVersionRequest: + properties: model_provider_connection: - type: integer nullable: true - organization: type: integer + organization: nullable: true - required: - - created_at - - created_by - - id - - prompt - - provider_model_id - - score - - title - - updated_at - ThirdPartyModelVersionRequest: - type: object - properties: - parent_model: type: integer + parent_model: description: Parent model interface ID - title: - type: string - minLength: 1 - description: Model name - maxLength: 500 + type: integer prompt: - type: string - minLength: 1 description: Prompt to execute + minLength: 1 + type: string provider: allOf: - - $ref: '#/components/schemas/ProviderEnum' + - $ref: '#/components/schemas/ProviderEnum' description: |- The model provider to use e.g. OpenAI @@ -27407,53 +26538,44 @@ components: * `Anthropic` - Anthropic * `Custom` - Custom provider_model_id: - type: string - minLength: 1 description: The model ID to use within the given provider, e.g. gpt-3.5 maxLength: 255 - model_provider_connection: - type: integer - nullable: true - organization: - type: integer - nullable: true + minLength: 1 + type: string + title: + description: Model name + maxLength: 500 + minLength: 1 + type: string required: - - prompt - - provider_model_id - - title - TokenRefreshRequest: + - prompt + - provider_model_id + - title type: object + TokenRefreshRequest: properties: refresh: + minLength: 1 type: string writeOnly: true - minLength: 1 required: - - refresh - TokenRefreshResponse: + - refresh type: object + TokenRefreshResponse: properties: access: type: string required: - - access - TokenRotateResponse: + - access type: object + TokenRotateResponse: properties: refresh: type: string required: - - refresh + - refresh + type: object TrialRoleEnum: - enum: - - annotator - - annotator_team_manager - - business_analyst - - business_or_data_team_leadership - - data_engineer_platform_engineer - - data_scientist - - other - type: string description: |- * `annotator` - Annotator * `annotator_team_manager` - Annotator Team Manager @@ -27462,445 +26584,450 @@ components: * `data_engineer_platform_engineer` - Data Engineer Platform Engineer * `data_scientist` - Data Scientist * `other` - Other - TypeEnum: enum: - - AN - - RE + - annotator + - annotator_team_manager + - business_analyst + - business_or_data_team_leadership + - data_engineer_platform_engineer + - data_scientist + - other type: string + TypeEnum: description: |- * `AN` - Annotate * `RE` - Review + enum: + - AN + - RE + type: string UserSimple: - type: object description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: - type: integer + avatar: readOnly: true - first_name: - type: string - maxLength: 256 - last_name: type: string - maxLength: 256 email: - type: string format: email - title: Email address maxLength: 254 - avatar: + title: Email address + type: string + first_name: + maxLength: 256 type: string + id: readOnly: true + type: integer + last_name: + maxLength: 256 + type: string required: - - avatar - - id - UserSimpleRequest: + - avatar + - id type: object + UserSimpleRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - first_name: + email: + format: email + maxLength: 254 + title: Email address type: string + first_name: maxLength: 256 - last_name: type: string + last_name: maxLength: 256 - email: type: string - format: email - title: Email address - maxLength: 254 - VersionResponse: type: object + VersionResponse: properties: - release: - type: string - description: Current release version of Label Studio - label-studio-os-package: - description: Information about the Label Studio open source package - label-studio-os-backend: - description: Information about the Label Studio backend - label-studio-frontend: - description: Information about the Label Studio frontend + backend: + description: Additional backend information dm2: description: Information about the Data Manager 2.0 component - label-studio-converter: - description: Information about the Label Studio converter component edition: allOf: - - $ref: '#/components/schemas/EditionEnum' + - $ref: '#/components/schemas/EditionEnum' description: |- Label Studio edition (Community or Enterprise) * `Community` - Community * `Enterprise` - Enterprise + label-studio-converter: + description: Information about the Label Studio converter component + label-studio-frontend: + description: Information about the Label Studio frontend + label-studio-os-backend: + description: Information about the Label Studio backend + label-studio-os-package: + description: Information about the Label Studio open source package lsf: description: Information about the Label Studio Frontend library - backend: - description: Additional backend information + release: + description: Current release version of Label Studio + type: string required: - - backend - - dm2 - - edition - - label-studio-converter - - label-studio-frontend - - label-studio-os-backend - - label-studio-os-package - - lsf - - release - View: + - backend + - dm2 + - edition + - label-studio-converter + - label-studio-frontend + - label-studio-os-backend + - label-studio-os-package + - lsf + - release type: object + View: properties: - id: - type: integer - readOnly: true - filter_group: - $ref: '#/components/schemas/FilterGroup' data: - nullable: true description: Custom view data - ordering: nullable: true - description: Ordering parameters - order: + filter_group: + $ref: '#/components/schemas/FilterGroup' + id: + readOnly: true type: integer + order: + description: Position of the tab, starting at the left in data manager and increasing as the tabs go left to right maximum: 2147483647 minimum: -2147483648 nullable: true - description: Position of the tab, starting at the left in data manager and - increasing as the tabs go left to right - selected_items: + type: integer + ordering: + description: Ordering parameters nullable: true - description: Selected items - user: + project: + description: Project ID type: integer + selected_items: + description: Selected items nullable: true + user: description: User who made this view - project: + nullable: true type: integer - description: Project ID required: - - id - - project - ViewOrderRequest: + - id + - project type: object + ViewOrderRequest: properties: - project: - type: integer ids: - type: array + description: A list of view IDs in the desired order. items: type: integer - description: A list of view IDs in the desired order. + type: array + project: + type: integer required: - - ids - - project - Webhook: + - ids + - project type: object + Webhook: properties: + actions: + default: [] + items: + $ref: '#/components/schemas/ActionsEnum' + type: array + created_at: + description: Creation time + format: date-time + readOnly: true + type: string + headers: + description: Key Value Json of headers + title: Request extra headers of webhook id: - type: integer readOnly: true - organization: type: integer + is_active: + description: If value is False the webhook is disabled + title: Is webhook active + type: boolean + organization: readOnly: true - project: type: integer + project: nullable: true - url: - type: string - format: uri - title: URL of webhook - description: URL of webhook - maxLength: 2048 - send_payload: - type: boolean - title: Does webhook send the payload - description: If value is False send only action + type: integer send_for_all_actions: - type: boolean - title: Use webhook for all actions description: If value is False - used only for actions from WebhookAction - headers: - title: Request extra headers of webhook - description: Key Value Json of headers - is_active: + title: Use webhook for all actions + type: boolean + send_payload: + description: If value is False send only action + title: Does webhook send the payload type: boolean - title: Is webhook active - description: If value is False the webhook is disabled - actions: - type: array - items: - $ref: '#/components/schemas/ActionsEnum' - default: [] - created_at: - type: string - format: date-time - readOnly: true - description: Creation time updated_at: - type: string + description: Last update time format: date-time readOnly: true - description: Last update time + type: string + url: + description: URL of webhook + format: uri + maxLength: 2048 + title: URL of webhook + type: string required: - - created_at - - id - - organization - - updated_at - - url - WebhookRequest: + - created_at + - id + - organization + - updated_at + - url type: object + WebhookRequest: properties: + actions: + default: [] + items: + $ref: '#/components/schemas/ActionsEnum' + type: array + headers: + description: Key Value Json of headers + title: Request extra headers of webhook + is_active: + description: If value is False the webhook is disabled + title: Is webhook active + type: boolean project: - type: integer nullable: true + type: integer + send_for_all_actions: + description: If value is False - used only for actions from WebhookAction + title: Use webhook for all actions + type: boolean + send_payload: + description: If value is False send only action + title: Does webhook send the payload + type: boolean url: - type: string + description: URL of webhook format: uri + maxLength: 2048 minLength: 1 title: URL of webhook - description: URL of webhook - maxLength: 2048 - send_payload: - type: boolean - title: Does webhook send the payload - description: If value is False send only action - send_for_all_actions: - type: boolean - title: Use webhook for all actions - description: If value is False - used only for actions from WebhookAction - headers: - title: Request extra headers of webhook - description: Key Value Json of headers - is_active: - type: boolean - title: Is webhook active - description: If value is False the webhook is disabled - actions: - type: array - items: - $ref: '#/components/schemas/ActionsEnum' - default: [] + type: string required: - - url - WebhookSerializerForUpdate: + - url type: object + WebhookSerializerForUpdate: description: |- Serializer class for updating webhooks Used to forbid updating project field. properties: + actions: + default: [] + items: + $ref: '#/components/schemas/ActionsEnum' + type: array + created_at: + description: Creation time + format: date-time + readOnly: true + type: string + headers: + description: Key Value Json of headers + title: Request extra headers of webhook id: - type: integer readOnly: true - organization: type: integer + is_active: + description: If value is False the webhook is disabled + title: Is webhook active + type: boolean + organization: readOnly: true - project: type: integer - readOnly: true + project: nullable: true - url: - type: string - format: uri - title: URL of webhook - description: URL of webhook - maxLength: 2048 - send_payload: - type: boolean - title: Does webhook send the payload - description: If value is False send only action + readOnly: true + type: integer send_for_all_actions: - type: boolean - title: Use webhook for all actions description: If value is False - used only for actions from WebhookAction - headers: - title: Request extra headers of webhook - description: Key Value Json of headers - is_active: + title: Use webhook for all actions + type: boolean + send_payload: + description: If value is False send only action + title: Does webhook send the payload type: boolean - title: Is webhook active - description: If value is False the webhook is disabled - actions: - type: array - items: - $ref: '#/components/schemas/ActionsEnum' - default: [] - created_at: - type: string - format: date-time - readOnly: true - description: Creation time updated_at: - type: string + description: Last update time format: date-time readOnly: true - description: Last update time + type: string + url: + description: URL of webhook + format: uri + maxLength: 2048 + title: URL of webhook + type: string required: - - created_at - - id - - organization - - project - - updated_at - - url - WebhookSerializerForUpdateRequest: + - created_at + - id + - organization + - project + - updated_at + - url type: object + WebhookSerializerForUpdateRequest: description: |- Serializer class for updating webhooks Used to forbid updating project field. properties: - url: - type: string - format: uri - minLength: 1 - title: URL of webhook - description: URL of webhook - maxLength: 2048 - send_payload: - type: boolean - title: Does webhook send the payload - description: If value is False send only action - send_for_all_actions: - type: boolean - title: Use webhook for all actions - description: If value is False - used only for actions from WebhookAction + actions: + default: [] + items: + $ref: '#/components/schemas/ActionsEnum' + type: array headers: - title: Request extra headers of webhook description: Key Value Json of headers + title: Request extra headers of webhook is_active: - type: boolean - title: Is webhook active description: If value is False the webhook is disabled - actions: - type: array - items: - $ref: '#/components/schemas/ActionsEnum' - default: [] + title: Is webhook active + type: boolean + send_for_all_actions: + description: If value is False - used only for actions from WebhookAction + title: Use webhook for all actions + type: boolean + send_payload: + description: If value is False send only action + title: Does webhook send the payload + type: boolean + url: + description: URL of webhook + format: uri + maxLength: 2048 + minLength: 1 + title: URL of webhook + type: string required: - - url - Workspace: + - url type: object + Workspace: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - id: - type: integer - readOnly: true - title: + color: + maxLength: 16 + nullable: true type: string - description: Workspace name - maxLength: 1000 + created_by: + readOnly: true + type: integer description: - type: string - nullable: true description: Workspace description - color: - type: string nullable: true - maxLength: 16 - is_personal: + type: string + id: + readOnly: true + type: integer + is_archived: + description: Workspace is archived + title: Archived type: boolean - title: Personal + is_personal: description: Workspace is a personal user workspace - is_archived: + title: Personal type: boolean - title: Archived - description: Workspace is archived - created_by: - type: integer - readOnly: true + title: + description: Workspace name + maxLength: 1000 + type: string required: - - created_by - - id - - title - WorkspaceMemberCreate: + - created_by + - id + - title type: object + WorkspaceMemberCreate: properties: user: - type: integer description: User ID - workspace: type: integer + workspace: description: Workspace ID + type: integer required: - - user - WorkspaceMemberCreateRequest: + - user type: object + WorkspaceMemberCreateRequest: properties: user: - type: integer description: User ID - workspace: type: integer + workspace: description: Workspace ID + type: integer required: - - user - WorkspaceMemberList: + - user type: object + WorkspaceMemberList: properties: user: $ref: '#/components/schemas/LseUser' workspace: - type: integer description: Workspace ID + type: integer required: - - user - WorkspaceRequest: + - user type: object + WorkspaceRequest: description: |- A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations properties: - title: + color: + maxLength: 16 + nullable: true type: string - minLength: 1 - description: Workspace name - maxLength: 1000 description: - type: string - nullable: true description: Workspace description - color: - type: string nullable: true - maxLength: 16 - is_personal: + type: string + is_archived: + description: Workspace is archived + title: Archived type: boolean - title: Personal + is_personal: description: Workspace is a personal user workspace - is_archived: + title: Personal type: boolean - title: Archived - description: Workspace is archived + title: + description: Workspace name + maxLength: 1000 + minLength: 1 + type: string required: - - title + - title + type: object securitySchemes: Token: - type: apiKey - name: Authorization + description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
    curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
    ' in: header - description: 'The token (or API key) must be passed as a request header. You - can find your user token on the User Account page in Label Studio. Example: -
    curl https://label-studio-host/api/projects
    -        -H "Authorization: Token [your-token]"
    ' + name: Authorization + type: apiKey x-fern-header: - name: api_key env: LABEL_STUDIO_API_KEY + name: api_key prefix: 'Token ' servers: -- url: http://localhost:8000 - description: Label Studio + - description: Label Studio + url: http://localhost:8000 diff --git a/poetry.lock b/poetry.lock index 52eebb2d5..0fe331649 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2055,89 +2055,95 @@ files = [ [[package]] name = "ujson" -version = "5.10.0" +version = "5.11.0" description = "Ultra fast JSON encoder and decoder for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "ujson-5.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2601aa9ecdbee1118a1c2065323bda35e2c5a2cf0797ef4522d485f9d3ef65bd"}, - {file = "ujson-5.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:348898dd702fc1c4f1051bc3aacbf894caa0927fe2c53e68679c073375f732cf"}, - {file = "ujson-5.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22cffecf73391e8abd65ef5f4e4dd523162a3399d5e84faa6aebbf9583df86d6"}, - {file = "ujson-5.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26b0e2d2366543c1bb4fbd457446f00b0187a2bddf93148ac2da07a53fe51569"}, - {file = "ujson-5.10.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:caf270c6dba1be7a41125cd1e4fc7ba384bf564650beef0df2dd21a00b7f5770"}, - {file = "ujson-5.10.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a245d59f2ffe750446292b0094244df163c3dc96b3ce152a2c837a44e7cda9d1"}, - {file = "ujson-5.10.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:94a87f6e151c5f483d7d54ceef83b45d3a9cca7a9cb453dbdbb3f5a6f64033f5"}, - {file = "ujson-5.10.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:29b443c4c0a113bcbb792c88bea67b675c7ca3ca80c3474784e08bba01c18d51"}, - {file = "ujson-5.10.0-cp310-cp310-win32.whl", hash = "sha256:c18610b9ccd2874950faf474692deee4223a994251bc0a083c114671b64e6518"}, - {file = "ujson-5.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:924f7318c31874d6bb44d9ee1900167ca32aa9b69389b98ecbde34c1698a250f"}, - {file = "ujson-5.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a5b366812c90e69d0f379a53648be10a5db38f9d4ad212b60af00bd4048d0f00"}, - {file = "ujson-5.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:502bf475781e8167f0f9d0e41cd32879d120a524b22358e7f205294224c71126"}, - {file = "ujson-5.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b91b5d0d9d283e085e821651184a647699430705b15bf274c7896f23fe9c9d8"}, - {file = "ujson-5.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:129e39af3a6d85b9c26d5577169c21d53821d8cf68e079060602e861c6e5da1b"}, - {file = "ujson-5.10.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f77b74475c462cb8b88680471193064d3e715c7c6074b1c8c412cb526466efe9"}, - {file = "ujson-5.10.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7ec0ca8c415e81aa4123501fee7f761abf4b7f386aad348501a26940beb1860f"}, - {file = "ujson-5.10.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ab13a2a9e0b2865a6c6db9271f4b46af1c7476bfd51af1f64585e919b7c07fd4"}, - {file = "ujson-5.10.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:57aaf98b92d72fc70886b5a0e1a1ca52c2320377360341715dd3933a18e827b1"}, - {file = "ujson-5.10.0-cp311-cp311-win32.whl", hash = "sha256:2987713a490ceb27edff77fb184ed09acdc565db700ee852823c3dc3cffe455f"}, - {file = "ujson-5.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:f00ea7e00447918ee0eff2422c4add4c5752b1b60e88fcb3c067d4a21049a720"}, - {file = "ujson-5.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:98ba15d8cbc481ce55695beee9f063189dce91a4b08bc1d03e7f0152cd4bbdd5"}, - {file = "ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a9d2edbf1556e4f56e50fab7d8ff993dbad7f54bac68eacdd27a8f55f433578e"}, - {file = "ujson-5.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6627029ae4f52d0e1a2451768c2c37c0c814ffc04f796eb36244cf16b8e57043"}, - {file = "ujson-5.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8ccb77b3e40b151e20519c6ae6d89bfe3f4c14e8e210d910287f778368bb3d1"}, - {file = "ujson-5.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3caf9cd64abfeb11a3b661329085c5e167abbe15256b3b68cb5d914ba7396f3"}, - {file = "ujson-5.10.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6e32abdce572e3a8c3d02c886c704a38a1b015a1fb858004e03d20ca7cecbb21"}, - {file = "ujson-5.10.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a65b6af4d903103ee7b6f4f5b85f1bfd0c90ba4eeac6421aae436c9988aa64a2"}, - {file = "ujson-5.10.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:604a046d966457b6cdcacc5aa2ec5314f0e8c42bae52842c1e6fa02ea4bda42e"}, - {file = "ujson-5.10.0-cp312-cp312-win32.whl", hash = "sha256:6dea1c8b4fc921bf78a8ff00bbd2bfe166345f5536c510671bccececb187c80e"}, - {file = "ujson-5.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:38665e7d8290188b1e0d57d584eb8110951a9591363316dd41cf8686ab1d0abc"}, - {file = "ujson-5.10.0-cp313-cp313-macosx_10_9_x86_64.whl", hash = "sha256:618efd84dc1acbd6bff8eaa736bb6c074bfa8b8a98f55b61c38d4ca2c1f7f287"}, - {file = "ujson-5.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38d5d36b4aedfe81dfe251f76c0467399d575d1395a1755de391e58985ab1c2e"}, - {file = "ujson-5.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67079b1f9fb29ed9a2914acf4ef6c02844b3153913eb735d4bf287ee1db6e557"}, - {file = "ujson-5.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7d0e0ceeb8fe2468c70ec0c37b439dd554e2aa539a8a56365fd761edb418988"}, - {file = "ujson-5.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:59e02cd37bc7c44d587a0ba45347cc815fb7a5fe48de16bf05caa5f7d0d2e816"}, - {file = "ujson-5.10.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a890b706b64e0065f02577bf6d8ca3b66c11a5e81fb75d757233a38c07a1f20"}, - {file = "ujson-5.10.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:621e34b4632c740ecb491efc7f1fcb4f74b48ddb55e65221995e74e2d00bbff0"}, - {file = "ujson-5.10.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b9500e61fce0cfc86168b248104e954fead61f9be213087153d272e817ec7b4f"}, - {file = "ujson-5.10.0-cp313-cp313-win32.whl", hash = "sha256:4c4fc16f11ac1612f05b6f5781b384716719547e142cfd67b65d035bd85af165"}, - {file = "ujson-5.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:4573fd1695932d4f619928fd09d5d03d917274381649ade4328091ceca175539"}, - {file = "ujson-5.10.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a984a3131da7f07563057db1c3020b1350a3e27a8ec46ccbfbf21e5928a43050"}, - {file = "ujson-5.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:73814cd1b9db6fc3270e9d8fe3b19f9f89e78ee9d71e8bd6c9a626aeaeaf16bd"}, - {file = "ujson-5.10.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61e1591ed9376e5eddda202ec229eddc56c612b61ac6ad07f96b91460bb6c2fb"}, - {file = "ujson-5.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2c75269f8205b2690db4572a4a36fe47cd1338e4368bc73a7a0e48789e2e35a"}, - {file = "ujson-5.10.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7223f41e5bf1f919cd8d073e35b229295aa8e0f7b5de07ed1c8fddac63a6bc5d"}, - {file = "ujson-5.10.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d4dc2fd6b3067c0782e7002ac3b38cf48608ee6366ff176bbd02cf969c9c20fe"}, - {file = "ujson-5.10.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:232cc85f8ee3c454c115455195a205074a56ff42608fd6b942aa4c378ac14dd7"}, - {file = "ujson-5.10.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:cc6139531f13148055d691e442e4bc6601f6dba1e6d521b1585d4788ab0bfad4"}, - {file = "ujson-5.10.0-cp38-cp38-win32.whl", hash = "sha256:e7ce306a42b6b93ca47ac4a3b96683ca554f6d35dd8adc5acfcd55096c8dfcb8"}, - {file = "ujson-5.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:e82d4bb2138ab05e18f089a83b6564fee28048771eb63cdecf4b9b549de8a2cc"}, - {file = "ujson-5.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dfef2814c6b3291c3c5f10065f745a1307d86019dbd7ea50e83504950136ed5b"}, - {file = "ujson-5.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4734ee0745d5928d0ba3a213647f1c4a74a2a28edc6d27b2d6d5bd9fa4319e27"}, - {file = "ujson-5.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d47ebb01bd865fdea43da56254a3930a413f0c5590372a1241514abae8aa7c76"}, - {file = "ujson-5.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dee5e97c2496874acbf1d3e37b521dd1f307349ed955e62d1d2f05382bc36dd5"}, - {file = "ujson-5.10.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7490655a2272a2d0b072ef16b0b58ee462f4973a8f6bbe64917ce5e0a256f9c0"}, - {file = "ujson-5.10.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ba17799fcddaddf5c1f75a4ba3fd6441f6a4f1e9173f8a786b42450851bd74f1"}, - {file = "ujson-5.10.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2aff2985cef314f21d0fecc56027505804bc78802c0121343874741650a4d3d1"}, - {file = "ujson-5.10.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ad88ac75c432674d05b61184178635d44901eb749786c8eb08c102330e6e8996"}, - {file = "ujson-5.10.0-cp39-cp39-win32.whl", hash = "sha256:2544912a71da4ff8c4f7ab5606f947d7299971bdd25a45e008e467ca638d13c9"}, - {file = "ujson-5.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:3ff201d62b1b177a46f113bb43ad300b424b7847f9c5d38b1b4ad8f75d4a282a"}, - {file = "ujson-5.10.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5b6fee72fa77dc172a28f21693f64d93166534c263adb3f96c413ccc85ef6e64"}, - {file = "ujson-5.10.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:61d0af13a9af01d9f26d2331ce49bb5ac1fb9c814964018ac8df605b5422dcb3"}, - {file = "ujson-5.10.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ecb24f0bdd899d368b715c9e6664166cf694d1e57be73f17759573a6986dd95a"}, - {file = "ujson-5.10.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fbd8fd427f57a03cff3ad6574b5e299131585d9727c8c366da4624a9069ed746"}, - {file = "ujson-5.10.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:beeaf1c48e32f07d8820c705ff8e645f8afa690cca1544adba4ebfa067efdc88"}, - {file = "ujson-5.10.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:baed37ea46d756aca2955e99525cc02d9181de67f25515c468856c38d52b5f3b"}, - {file = "ujson-5.10.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7663960f08cd5a2bb152f5ee3992e1af7690a64c0e26d31ba7b3ff5b2ee66337"}, - {file = "ujson-5.10.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:d8640fb4072d36b08e95a3a380ba65779d356b2fee8696afeb7794cf0902d0a1"}, - {file = "ujson-5.10.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78778a3aa7aafb11e7ddca4e29f46bc5139131037ad628cc10936764282d6753"}, - {file = "ujson-5.10.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b0111b27f2d5c820e7f2dbad7d48e3338c824e7ac4d2a12da3dc6061cc39c8e6"}, - {file = "ujson-5.10.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:c66962ca7565605b355a9ed478292da628b8f18c0f2793021ca4425abf8b01e5"}, - {file = "ujson-5.10.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ba43cc34cce49cf2d4bc76401a754a81202d8aa926d0e2b79f0ee258cb15d3a4"}, - {file = "ujson-5.10.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ac56eb983edce27e7f51d05bc8dd820586c6e6be1c5216a6809b0c668bb312b8"}, - {file = "ujson-5.10.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f44bd4b23a0e723bf8b10628288c2c7c335161d6840013d4d5de20e48551773b"}, - {file = "ujson-5.10.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7c10f4654e5326ec14a46bcdeb2b685d4ada6911050aa8baaf3501e57024b804"}, - {file = "ujson-5.10.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0de4971a89a762398006e844ae394bd46991f7c385d7a6a3b93ba229e6dac17e"}, - {file = "ujson-5.10.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e1402f0564a97d2a52310ae10a64d25bcef94f8dd643fcf5d310219d915484f7"}, - {file = "ujson-5.10.0.tar.gz", hash = "sha256:b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1"}, + {file = "ujson-5.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:446e8c11c06048611c9d29ef1237065de0af07cabdd97e6b5b527b957692ec25"}, + {file = "ujson-5.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:16ccb973b7ada0455201808ff11d48fe9c3f034a6ab5bd93b944443c88299f89"}, + {file = "ujson-5.11.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3134b783ab314d2298d58cda7e47e7a0f7f71fc6ade6ac86d5dbeaf4b9770fa6"}, + {file = "ujson-5.11.0-cp310-cp310-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:185f93ebccffebc8baf8302c869fac70dd5dd78694f3b875d03a31b03b062cdb"}, + {file = "ujson-5.11.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d06e87eded62ff0e5f5178c916337d2262fdbc03b31688142a3433eabb6511db"}, + {file = "ujson-5.11.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:181fb5b15703a8b9370b25345d2a1fd1359f0f18776b3643d24e13ed9c036d4c"}, + {file = "ujson-5.11.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a4df61a6df0a4a8eb5b9b1ffd673429811f50b235539dac586bb7e9e91994138"}, + {file = "ujson-5.11.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6eff24e1abd79e0ec6d7eae651dd675ddbc41f9e43e29ef81e16b421da896915"}, + {file = "ujson-5.11.0-cp310-cp310-win32.whl", hash = "sha256:30f607c70091483550fbd669a0b37471e5165b317d6c16e75dba2aa967608723"}, + {file = "ujson-5.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:3d2720e9785f84312b8e2cb0c2b87f1a0b1c53aaab3b2af3ab817d54409012e0"}, + {file = "ujson-5.11.0-cp310-cp310-win_arm64.whl", hash = "sha256:85e6796631165f719084a9af00c79195d3ebf108151452fefdcb1c8bb50f0105"}, + {file = "ujson-5.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d7c46cb0fe5e7056b9acb748a4c35aa1b428025853032540bb7e41f46767321f"}, + {file = "ujson-5.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d8951bb7a505ab2a700e26f691bdfacf395bc7e3111e3416d325b513eea03a58"}, + {file = "ujson-5.11.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:952c0be400229940248c0f5356514123d428cba1946af6fa2bbd7503395fef26"}, + {file = "ujson-5.11.0-cp311-cp311-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:94fcae844f1e302f6f8095c5d1c45a2f0bfb928cccf9f1b99e3ace634b980a2a"}, + {file = "ujson-5.11.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7e0ec1646db172beb8d3df4c32a9d78015e671d2000af548252769e33079d9a6"}, + {file = "ujson-5.11.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:da473b23e3a54448b008d33f742bcd6d5fb2a897e42d1fc6e7bf306ea5d18b1b"}, + {file = "ujson-5.11.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:aa6b3d4f1c0d3f82930f4cbd7fe46d905a4a9205a7c13279789c1263faf06dba"}, + {file = "ujson-5.11.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4843f3ab4fe1cc596bb7e02228ef4c25d35b4bb0809d6a260852a4bfcab37ba3"}, + {file = "ujson-5.11.0-cp311-cp311-win32.whl", hash = "sha256:e979fbc469a7f77f04ec2f4e853ba00c441bf2b06720aa259f0f720561335e34"}, + {file = "ujson-5.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:683f57f0dd3acdd7d9aff1de0528d603aafcb0e6d126e3dc7ce8b020a28f5d01"}, + {file = "ujson-5.11.0-cp311-cp311-win_arm64.whl", hash = "sha256:7855ccea3f8dad5e66d8445d754fc1cf80265a4272b5f8059ebc7ec29b8d0835"}, + {file = "ujson-5.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7895f0d2d53bd6aea11743bd56e3cb82d729980636cd0ed9b89418bf66591702"}, + {file = "ujson-5.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12b5e7e22a1fe01058000d1b317d3b65cc3daf61bd2ea7a2b76721fe160fa74d"}, + {file = "ujson-5.11.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0180a480a7d099082501cad1fe85252e4d4bf926b40960fb3d9e87a3a6fbbc80"}, + {file = "ujson-5.11.0-cp312-cp312-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:fa79fdb47701942c2132a9dd2297a1a85941d966d8c87bfd9e29b0cf423f26cc"}, + {file = "ujson-5.11.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8254e858437c00f17cb72e7a644fc42dad0ebb21ea981b71df6e84b1072aaa7c"}, + {file = "ujson-5.11.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1aa8a2ab482f09f6c10fba37112af5f957689a79ea598399c85009f2f29898b5"}, + {file = "ujson-5.11.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a638425d3c6eed0318df663df44480f4a40dc87cc7c6da44d221418312f6413b"}, + {file = "ujson-5.11.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7e3cff632c1d78023b15f7e3a81c3745cd3f94c044d1e8fa8efbd6b161997bbc"}, + {file = "ujson-5.11.0-cp312-cp312-win32.whl", hash = "sha256:be6b0eaf92cae8cdee4d4c9e074bde43ef1c590ed5ba037ea26c9632fb479c88"}, + {file = "ujson-5.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:b7b136cc6abc7619124fd897ef75f8e63105298b5ca9bdf43ebd0e1fa0ee105f"}, + {file = "ujson-5.11.0-cp312-cp312-win_arm64.whl", hash = "sha256:6cd2df62f24c506a0ba322d5e4fe4466d47a9467b57e881ee15a31f7ecf68ff6"}, + {file = "ujson-5.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:109f59885041b14ee9569bf0bb3f98579c3fa0652317b355669939e5fc5ede53"}, + {file = "ujson-5.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a31c6b8004438e8c20fc55ac1c0e07dad42941db24176fe9acf2815971f8e752"}, + {file = "ujson-5.11.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:78c684fb21255b9b90320ba7e199780f653e03f6c2528663768965f4126a5b50"}, + {file = "ujson-5.11.0-cp313-cp313-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:4c9f5d6a27d035dd90a146f7761c2272cf7103de5127c9ab9c4cd39ea61e878a"}, + {file = "ujson-5.11.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:837da4d27fed5fdc1b630bd18f519744b23a0b5ada1bbde1a36ba463f2900c03"}, + {file = "ujson-5.11.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:787aff4a84da301b7f3bac09bc696e2e5670df829c6f8ecf39916b4e7e24e701"}, + {file = "ujson-5.11.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:6dd703c3e86dc6f7044c5ac0b3ae079ed96bf297974598116aa5fb7f655c3a60"}, + {file = "ujson-5.11.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3772e4fe6b0c1e025ba3c50841a0ca4786825a4894c8411bf8d3afe3a8061328"}, + {file = "ujson-5.11.0-cp313-cp313-win32.whl", hash = "sha256:8fa2af7c1459204b7a42e98263b069bd535ea0cd978b4d6982f35af5a04a4241"}, + {file = "ujson-5.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:34032aeca4510a7c7102bd5933f59a37f63891f30a0706fb46487ab6f0edf8f0"}, + {file = "ujson-5.11.0-cp313-cp313-win_arm64.whl", hash = "sha256:ce076f2df2e1aa62b685086fbad67f2b1d3048369664b4cdccc50707325401f9"}, + {file = "ujson-5.11.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:65724738c73645db88f70ba1f2e6fb678f913281804d5da2fd02c8c5839af302"}, + {file = "ujson-5.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:29113c003ca33ab71b1b480bde952fbab2a0b6b03a4ee4c3d71687cdcbd1a29d"}, + {file = "ujson-5.11.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c44c703842024d796b4c78542a6fcd5c3cb948b9fc2a73ee65b9c86a22ee3638"}, + {file = "ujson-5.11.0-cp314-cp314-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:e750c436fb90edf85585f5c62a35b35082502383840962c6983403d1bd96a02c"}, + {file = "ujson-5.11.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f278b31a7c52eb0947b2db55a5133fbc46b6f0ef49972cd1a80843b72e135aba"}, + {file = "ujson-5.11.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ab2cb8351d976e788669c8281465d44d4e94413718af497b4e7342d7b2f78018"}, + {file = "ujson-5.11.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:090b4d11b380ae25453100b722d0609d5051ffe98f80ec52853ccf8249dfd840"}, + {file = "ujson-5.11.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:80017e870d882d5517d28995b62e4e518a894f932f1e242cbc802a2fd64d365c"}, + {file = "ujson-5.11.0-cp314-cp314-win32.whl", hash = "sha256:1d663b96eb34c93392e9caae19c099ec4133ba21654b081956613327f0e973ac"}, + {file = "ujson-5.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:849e65b696f0d242833f1df4182096cedc50d414215d1371fca85c541fbff629"}, + {file = "ujson-5.11.0-cp314-cp314-win_arm64.whl", hash = "sha256:e73df8648c9470af2b6a6bf5250d4744ad2cf3d774dcf8c6e31f018bdd04d764"}, + {file = "ujson-5.11.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:de6e88f62796372fba1de973c11138f197d3e0e1d80bcb2b8aae1e826096d433"}, + {file = "ujson-5.11.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:49e56ef8066f11b80d620985ae36869a3ff7e4b74c3b6129182ec5d1df0255f3"}, + {file = "ujson-5.11.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1a325fd2c3a056cf6c8e023f74a0c478dd282a93141356ae7f16d5309f5ff823"}, + {file = "ujson-5.11.0-cp314-cp314t-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:a0af6574fc1d9d53f4ff371f58c96673e6d988ed2b5bf666a6143c782fa007e9"}, + {file = "ujson-5.11.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10f29e71ecf4ecd93a6610bd8efa8e7b6467454a363c3d6416db65de883eb076"}, + {file = "ujson-5.11.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:1a0a9b76a89827a592656fe12e000cf4f12da9692f51a841a4a07aa4c7ecc41c"}, + {file = "ujson-5.11.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:b16930f6a0753cdc7d637b33b4e8f10d5e351e1fb83872ba6375f1e87be39746"}, + {file = "ujson-5.11.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:04c41afc195fd477a59db3a84d5b83a871bd648ef371cf8c6f43072d89144eef"}, + {file = "ujson-5.11.0-cp314-cp314t-win32.whl", hash = "sha256:aa6d7a5e09217ff93234e050e3e380da62b084e26b9f2e277d2606406a2fc2e5"}, + {file = "ujson-5.11.0-cp314-cp314t-win_amd64.whl", hash = "sha256:48055e1061c1bb1f79e75b4ac39e821f3f35a9b82de17fce92c3140149009bec"}, + {file = "ujson-5.11.0-cp314-cp314t-win_arm64.whl", hash = "sha256:1194b943e951092db611011cb8dbdb6cf94a3b816ed07906e14d3bc6ce0e90ab"}, + {file = "ujson-5.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:65f3c279f4ed4bf9131b11972040200c66ae040368abdbb21596bf1564899694"}, + {file = "ujson-5.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:99c49400572cd77050894e16864a335225191fd72a818ea6423ae1a06467beac"}, + {file = "ujson-5.11.0-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0654a2691fc252c3c525e3d034bb27b8a7546c9d3eb33cd29ce6c9feda361a6a"}, + {file = "ujson-5.11.0-cp39-cp39-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:6b6ec7e7321d7fc19abdda3ad809baef935f49673951a8bab486aea975007e02"}, + {file = "ujson-5.11.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f62b9976fabbcde3ab6e413f4ec2ff017749819a0786d84d7510171109f2d53c"}, + {file = "ujson-5.11.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7f1a27ab91083b4770e160d17f61b407f587548f2c2b5fbf19f94794c495594a"}, + {file = "ujson-5.11.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ecd6ff8a3b5a90c292c2396c2d63c687fd0ecdf17de390d852524393cd9ed052"}, + {file = "ujson-5.11.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9aacbeb23fdbc4b256a7d12e0beb9063a1ba5d9e0dbb2cfe16357c98b4334596"}, + {file = "ujson-5.11.0-cp39-cp39-win32.whl", hash = "sha256:674f306e3e6089f92b126eb2fe41bcb65e42a15432c143365c729fdb50518547"}, + {file = "ujson-5.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:c6618f480f7c9ded05e78a1938873fde68baf96cdd74e6d23c7e0a8441175c4b"}, + {file = "ujson-5.11.0-cp39-cp39-win_arm64.whl", hash = "sha256:5600202a731af24a25e2d7b6eb3f648e4ecd4bb67c4d5cf12f8fab31677469c9"}, + {file = "ujson-5.11.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:abae0fb58cc820092a0e9e8ba0051ac4583958495bfa5262a12f628249e3b362"}, + {file = "ujson-5.11.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:fac6c0649d6b7c3682a0a6e18d3de6857977378dce8d419f57a0b20e3d775b39"}, + {file = "ujson-5.11.0-pp311-pypy311_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4b42c115c7c6012506e8168315150d1e3f76e7ba0f4f95616f4ee599a1372bbc"}, + {file = "ujson-5.11.0-pp311-pypy311_pp73-manylinux_2_24_i686.manylinux_2_28_i686.whl", hash = "sha256:86baf341d90b566d61a394869ce77188cc8668f76d7bb2c311d77a00f4bdf844"}, + {file = "ujson-5.11.0-pp311-pypy311_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4598bf3965fc1a936bd84034312bcbe00ba87880ef1ee33e33c1e88f2c398b49"}, + {file = "ujson-5.11.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:416389ec19ef5f2013592f791486bef712ebce0cd59299bf9df1ba40bb2f6e04"}, + {file = "ujson-5.11.0.tar.gz", hash = "sha256:e204ae6f909f099ba6b6b942131cee359ddda2b6e4ea39c12eb8b991fe2010e0"}, ] [[package]] diff --git a/reference.md b/reference.md index d4de5f4ea..a624bf1b5 100644 --- a/reference.md +++ b/reference.md @@ -1,6 +1,6 @@ # Reference ## Annotations -
    client.annotations.get(...) +
    client.annotations.create_bulk(...)
    @@ -12,7 +12,7 @@
    -Retrieve a specific annotation for a task using the annotation result ID. +Create multiple annotations at once
    @@ -32,9 +32,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.annotations.get( - id=1, -) +client.annotations.create_bulk() ``` @@ -50,7 +48,7 @@ client.annotations.get(
    -**id:** `int` +**bulk_created:** `typing.Optional[bool]` — Annotation was created in bulk mode
    @@ -58,69 +56,60 @@ client.annotations.get(
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**completed_by:** `typing.Optional[int]`
    - -
    +
    +
    +**draft_created_at:** `typing.Optional[dt.datetime]` — Draft creation time +
    -
    -
    client.annotations.delete(...)
    -#### 📝 Description - -
    -
    +**ground_truth:** `typing.Optional[bool]` — This annotation is a Ground Truth (ground_truth) + +
    +
    -Delete an annotation. This action can't be undone! -
    -
    +**import_id:** `typing.Optional[int]` — Original annotation ID that was at the import step or NULL if this annotation wasn't imported +
    -#### 🔌 Usage -
    -
    -
    - -```python -from label_studio_sdk import LabelStudio +**last_action:** `typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction]` -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.annotations.delete( - id=1, -) +Action which was performed in the last annotation history item -``` -
    -
    +* `prediction` - Created from prediction +* `propagated_annotation` - Created from another annotation +* `imported` - Imported +* `submitted` - Submitted +* `updated` - Updated +* `skipped` - Skipped +* `accepted` - Accepted +* `rejected` - Rejected +* `fixed_and_accepted` - Fixed and accepted +* `deleted_review` - Deleted review +
    -#### ⚙️ Parameters -
    -
    -
    - -**id:** `int` +**last_created_by:** `typing.Optional[int]` — User who created the last annotation history item
    @@ -128,89 +117,55 @@ client.annotations.delete(
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**lead_time:** `typing.Optional[float]` — How much time it took to annotate the task
    -
    -
    +
    +
    +**parent_annotation:** `typing.Optional[int]` — Points to the parent annotation from which this annotation was created +
    -
    -
    client.annotations.update(...)
    -#### 📝 Description - -
    -
    +**parent_prediction:** `typing.Optional[int]` — Points to the prediction from which this annotation was created + +
    +
    -Update existing attributes on an annotation. -
    -
    +**project:** `typing.Optional[int]` — Project ID for this annotation +
    -#### 🔌 Usage -
    -
    -
    - -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.annotations.update( - id=1, - result=[ - { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, - "from_name": "bboxes", - "to_name": "image", - "type": "rectanglelabels", - "value": { - "x": 20, - "y": 30, - "width": 50, - "height": 60, - "rotation": 0, - "values": {"rectanglelabels": ["Person"]}, - }, - } - ], - was_cancelled=False, - ground_truth=True, -) - -``` -
    -
    +**result:** `typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]` — List of annotation results for the task +
    -#### ⚙️ Parameters -
    +**selected_items:** `typing.Optional[SelectedItemsRequest]` + +
    +
    +
    -**id:** `int` +**task:** `typing.Optional[int]` — Corresponding task for this annotation
    @@ -218,7 +173,7 @@ client.annotations.update(
    -**result:** `typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]` — Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) +**tasks:** `typing.Optional[typing.Sequence[int]]`
    @@ -226,7 +181,7 @@ client.annotations.update(
    -**task:** `typing.Optional[int]` — Corresponding task for this annotation +**unique_id:** `typing.Optional[str]`
    @@ -234,7 +189,7 @@ client.annotations.update(
    -**project:** `typing.Optional[int]` — Project ID for this annotation +**updated_by:** `typing.Optional[int]` — Last user who updated this annotation
    @@ -242,7 +197,7 @@ client.annotations.update(
    -**completed_by:** `typing.Optional[int]` — User ID of the person who created this annotation +**was_cancelled:** `typing.Optional[bool]` — User skipped the task
    @@ -250,31 +205,69 @@ client.annotations.update(
    -**updated_by:** `typing.Optional[int]` — Last user who updated this annotation +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + + + + + + +
    +
    client.annotations.get(...)
    -**was_cancelled:** `typing.Optional[bool]` — User skipped the task - +#### 📝 Description + +
    +
    + +
    +
    + +Retrieve a specific annotation for a task using the annotation result ID. +
    +
    +#### 🔌 Usage +
    -**ground_truth:** `typing.Optional[bool]` — This annotation is a Ground Truth - +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.annotations.get( + id=1, +) + +``` +
    +
    +#### ⚙️ Parameters +
    -**lead_time:** `typing.Optional[float]` — How much time it took to annotate the task (in seconds) +
    +
    + +**id:** `int`
    @@ -294,7 +287,7 @@ client.annotations.update(
    -
    client.annotations.create_bulk(...) +
    client.annotations.delete(...)
    @@ -306,7 +299,7 @@ client.annotations.update(
    -Create multiple annotations at once +Delete an annotation. This action can't be undone!
    @@ -326,7 +319,9 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.annotations.create_bulk() +client.annotations.delete( + id=1, +) ``` @@ -342,7 +337,7 @@ client.annotations.create_bulk()
    -**result:** `typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]` — List of annotation results for the task +**id:** `int`
    @@ -350,71 +345,89 @@ client.annotations.create_bulk()
    -**completed_by:** `typing.Optional[int]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + +
    -
    -
    -**unique_id:** `typing.Optional[str]` -
    +
    +
    client.annotations.update(...)
    -**tasks:** `typing.Optional[typing.Sequence[int]]` - -
    -
    +#### 📝 Description
    -**selected_items:** `typing.Optional[SelectedItemsRequest]` - -
    -
    -
    -**was_cancelled:** `typing.Optional[bool]` — User skipped the task - +Update existing attributes on an annotation.
    + + + +#### 🔌 Usage
    -**ground_truth:** `typing.Optional[bool]` — This annotation is a Ground Truth (ground_truth) - -
    -
    -
    -**draft_created_at:** `typing.Optional[dt.datetime]` — Draft creation time - +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.annotations.update( + id=1, + ground_truth=True, + result=[ + { + "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, + "to_name": "image", + "type": "rectanglelabels", + "value": { + "height": 60, + "rotation": 0, + "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, + }, + } + ], + was_cancelled=False, +) + +``` +
    +
    +#### ⚙️ Parameters +
    -**lead_time:** `typing.Optional[float]` — How much time it took to annotate the task - -
    -
    -
    -**import_id:** `typing.Optional[int]` — Original annotation ID that was at the import step or NULL if this annotation wasn't imported +**id:** `int`
    @@ -422,20 +435,7 @@ client.annotations.create_bulk()
    -**last_action:** `typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction]` - -Action which was performed in the last annotation history item - -* `prediction` - Created from prediction -* `propagated_annotation` - Created from another annotation -* `imported` - Imported -* `submitted` - Submitted -* `updated` - Updated -* `skipped` - Skipped -* `accepted` - Accepted -* `rejected` - Rejected -* `fixed_and_accepted` - Fixed and accepted -* `deleted_review` - Deleted review +**completed_by:** `typing.Optional[int]` — User ID of the person who created this annotation
    @@ -443,7 +443,7 @@ Action which was performed in the last annotation history item
    -**bulk_created:** `typing.Optional[bool]` — Annotation was created in bulk mode +**ground_truth:** `typing.Optional[bool]` — This annotation is a Ground Truth
    @@ -451,7 +451,7 @@ Action which was performed in the last annotation history item
    -**task:** `typing.Optional[int]` — Corresponding task for this annotation +**lead_time:** `typing.Optional[float]` — How much time it took to annotate the task (in seconds)
    @@ -467,7 +467,7 @@ Action which was performed in the last annotation history item
    -**updated_by:** `typing.Optional[int]` — Last user who updated this annotation +**result:** `typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]` — Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format)
    @@ -475,7 +475,7 @@ Action which was performed in the last annotation history item
    -**parent_prediction:** `typing.Optional[int]` — Points to the prediction from which this annotation was created +**task:** `typing.Optional[int]` — Corresponding task for this annotation
    @@ -483,7 +483,7 @@ Action which was performed in the last annotation history item
    -**parent_annotation:** `typing.Optional[int]` — Points to the parent annotation from which this annotation was created +**updated_by:** `typing.Optional[int]` — Last user who updated this annotation
    @@ -491,7 +491,7 @@ Action which was performed in the last annotation history item
    -**last_created_by:** `typing.Optional[int]` — User who created the last annotation history item +**was_cancelled:** `typing.Optional[bool]` — User skipped the task
    @@ -638,26 +638,26 @@ client = LabelStudio( ) client.annotations.create( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) ``` @@ -682,7 +682,7 @@ client.annotations.create(
    -**result:** `typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]` — Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) +**completed_by:** `typing.Optional[int]` — User ID of the person who created this annotation
    @@ -690,7 +690,7 @@ client.annotations.create(
    -**task:** `typing.Optional[int]` — Corresponding task for this annotation +**ground_truth:** `typing.Optional[bool]` — This annotation is a Ground Truth
    @@ -698,7 +698,7 @@ client.annotations.create(
    -**project:** `typing.Optional[int]` — Project ID for this annotation +**lead_time:** `typing.Optional[float]` — How much time it took to annotate the task (in seconds)
    @@ -706,7 +706,7 @@ client.annotations.create(
    -**completed_by:** `typing.Optional[int]` — User ID of the person who created this annotation +**project:** `typing.Optional[int]` — Project ID for this annotation
    @@ -714,7 +714,7 @@ client.annotations.create(
    -**updated_by:** `typing.Optional[int]` — Last user who updated this annotation +**result:** `typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]` — Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format)
    @@ -722,7 +722,7 @@ client.annotations.create(
    -**was_cancelled:** `typing.Optional[bool]` — User skipped the task +**task:** `typing.Optional[int]` — Corresponding task for this annotation
    @@ -730,7 +730,7 @@ client.annotations.create(
    -**ground_truth:** `typing.Optional[bool]` — This annotation is a Ground Truth +**updated_by:** `typing.Optional[int]` — Last user who updated this annotation
    @@ -738,7 +738,7 @@ client.annotations.create(
    -**lead_time:** `typing.Optional[float]` — How much time it took to annotate the task (in seconds) +**was_cancelled:** `typing.Optional[bool]` — User skipped the task
    @@ -984,7 +984,7 @@ client.comments.create()
    -**region_ref:** `typing.Optional[typing.Optional[typing.Any]]` +**annotation:** `typing.Optional[int]`
    @@ -1000,7 +1000,7 @@ client.comments.create()
    -**text:** `typing.Optional[str]` — Reviewer or annotator comment +**draft:** `typing.Optional[int]`
    @@ -1016,7 +1016,7 @@ client.comments.create()
    -**draft:** `typing.Optional[int]` +**region_ref:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -1024,7 +1024,7 @@ client.comments.create()
    -**annotation:** `typing.Optional[int]` +**text:** `typing.Optional[str]` — Reviewer or annotator comment
    @@ -1266,7 +1266,7 @@ client.comments.update(
    -**region_ref:** `typing.Optional[typing.Optional[typing.Any]]` +**annotation:** `typing.Optional[int]`
    @@ -1282,7 +1282,7 @@ client.comments.update(
    -**text:** `typing.Optional[str]` — Reviewer or annotator comment +**draft:** `typing.Optional[int]`
    @@ -1298,7 +1298,7 @@ client.comments.update(
    -**draft:** `typing.Optional[int]` +**region_ref:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -1306,7 +1306,7 @@ client.comments.update(
    -**annotation:** `typing.Optional[int]` +**text:** `typing.Optional[str]` — Reviewer or annotator comment
    @@ -1435,7 +1435,7 @@ client.users.update_current_user()
    -**first_name:** `typing.Optional[str]` +**active_organization:** `typing.Optional[int]`
    @@ -1443,7 +1443,7 @@ client.users.update_current_user()
    -**last_name:** `typing.Optional[str]` +**allow_newsletters:** `typing.Optional[bool]` — Allow sending newsletters to user
    @@ -1451,7 +1451,7 @@ client.users.update_current_user()
    -**username:** `typing.Optional[str]` +**custom_hotkeys:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -1459,7 +1459,7 @@ client.users.update_current_user()
    -**custom_hotkeys:** `typing.Optional[typing.Optional[typing.Any]]` +**date_joined:** `typing.Optional[dt.datetime]`
    @@ -1467,7 +1467,7 @@ client.users.update_current_user()
    -**phone:** `typing.Optional[str]` +**email_notification_settings:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -1475,7 +1475,7 @@ client.users.update_current_user()
    -**active_organization:** `typing.Optional[int]` +**first_name:** `typing.Optional[str]`
    @@ -1483,7 +1483,7 @@ client.users.update_current_user()
    -**allow_newsletters:** `typing.Optional[bool]` — Allow sending newsletters to user +**is_email_verified:** `typing.Optional[bool]`
    @@ -1491,7 +1491,7 @@ client.users.update_current_user()
    -**date_joined:** `typing.Optional[dt.datetime]` +**last_name:** `typing.Optional[str]`
    @@ -1499,7 +1499,7 @@ client.users.update_current_user()
    -**password:** `typing.Optional[str]` +**onboarding_state:** `typing.Optional[str]`
    @@ -1507,7 +1507,7 @@ client.users.update_current_user()
    -**onboarding_state:** `typing.Optional[str]` +**password:** `typing.Optional[str]`
    @@ -1515,7 +1515,7 @@ client.users.update_current_user()
    -**is_email_verified:** `typing.Optional[bool]` +**phone:** `typing.Optional[str]`
    @@ -1523,7 +1523,7 @@ client.users.update_current_user()
    -**email_notification_settings:** `typing.Optional[typing.Optional[typing.Any]]` +**username:** `typing.Optional[str]`
    @@ -1967,7 +1967,7 @@ client.users.create()
    -**id:** `typing.Optional[int]` — User ID +**allow_newsletters:** `typing.Optional[bool]` — Whether the user allows newsletters
    @@ -1975,7 +1975,7 @@ client.users.create()
    -**first_name:** `typing.Optional[str]` — First name of the user +**avatar:** `typing.Optional[str]` — Avatar URL of the user
    @@ -1983,7 +1983,7 @@ client.users.create()
    -**last_name:** `typing.Optional[str]` — Last name of the user +**email:** `typing.Optional[str]` — Email of the user
    @@ -1991,7 +1991,7 @@ client.users.create()
    -**username:** `typing.Optional[str]` — Username of the user +**first_name:** `typing.Optional[str]` — First name of the user
    @@ -1999,7 +1999,7 @@ client.users.create()
    -**email:** `typing.Optional[str]` — Email of the user +**id:** `typing.Optional[int]` — User ID
    @@ -2007,7 +2007,7 @@ client.users.create()
    -**avatar:** `typing.Optional[str]` — Avatar URL of the user +**initials:** `typing.Optional[str]` — Initials of the user
    @@ -2015,7 +2015,7 @@ client.users.create()
    -**initials:** `typing.Optional[str]` — Initials of the user +**last_name:** `typing.Optional[str]` — Last name of the user
    @@ -2031,7 +2031,7 @@ client.users.create()
    -**allow_newsletters:** `typing.Optional[bool]` — Whether the user allows newsletters +**username:** `typing.Optional[str]` — Username of the user
    @@ -2253,7 +2253,7 @@ client.users.update(
    -**users_update_request_id:** `typing.Optional[int]` — User ID +**allow_newsletters:** `typing.Optional[bool]` — Whether the user allows newsletters
    @@ -2261,7 +2261,7 @@ client.users.update(
    -**first_name:** `typing.Optional[str]` — First name of the user +**avatar:** `typing.Optional[str]` — Avatar URL of the user
    @@ -2269,7 +2269,7 @@ client.users.update(
    -**last_name:** `typing.Optional[str]` — Last name of the user +**email:** `typing.Optional[str]` — Email of the user
    @@ -2277,7 +2277,7 @@ client.users.update(
    -**username:** `typing.Optional[str]` — Username of the user +**first_name:** `typing.Optional[str]` — First name of the user
    @@ -2285,7 +2285,7 @@ client.users.update(
    -**email:** `typing.Optional[str]` — Email of the user +**users_update_request_id:** `typing.Optional[int]` — User ID
    @@ -2293,7 +2293,7 @@ client.users.update(
    -**avatar:** `typing.Optional[str]` — Avatar URL of the user +**initials:** `typing.Optional[str]` — Initials of the user
    @@ -2301,7 +2301,7 @@ client.users.update(
    -**initials:** `typing.Optional[str]` — Initials of the user +**last_name:** `typing.Optional[str]` — Last name of the user
    @@ -2317,7 +2317,7 @@ client.users.update(
    -**allow_newsletters:** `typing.Optional[bool]` — Whether the user allows newsletters +**username:** `typing.Optional[str]` — Username of the user
    @@ -2459,11 +2459,11 @@ client.actions.create( ) ], ), + ordering=["tasks:total_annotations"], selected_items=ActionsCreateRequestSelectedItemsExcluded( all_=True, excluded=[124, 125, 126], ), - ordering=["tasks:total_annotations"], ) ``` @@ -2512,7 +2512,7 @@ client.actions.create(
    -**selected_items:** `typing.Optional[ActionsCreateRequestSelectedItems]` — Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` +**ordering:** `typing.Optional[typing.Sequence[ActionsCreateRequestOrderingItem]]` — List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`.
    @@ -2520,7 +2520,7 @@ client.actions.create(
    -**ordering:** `typing.Optional[typing.Sequence[ActionsCreateRequestOrderingItem]]` — List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`. +**selected_items:** `typing.Optional[ActionsCreateRequestSelectedItems]` — Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}`
    @@ -2685,7 +2685,7 @@ client.views.create()
    -
    client.views.get(...) +
    client.views.update_order(...)
    @@ -2697,7 +2697,7 @@ client.views.create()
    -Get the details about a specific view in the data manager +Update the order field of views based on the provided list of view IDs
    @@ -2717,8 +2717,9 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.views.get( - id="id", +client.views.update_order( + ids=[1], + project=1, ) ``` @@ -2735,7 +2736,15 @@ client.views.get(
    -**id:** `str` — View ID +**ids:** `typing.Sequence[int]` — A list of view IDs in the desired order. + +
    +
    + +
    +
    + +**project:** `int`
    @@ -2755,7 +2764,7 @@ client.views.get(
    -
    client.views.delete(...) +
    client.views.delete_all(...)
    @@ -2767,7 +2776,7 @@ client.views.get(
    -Delete a specific view by ID. +Delete all views for a specific project.
    @@ -2787,8 +2796,8 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.views.delete( - id="id", +client.views.delete_all( + project=1, ) ``` @@ -2805,7 +2814,7 @@ client.views.delete(
    -**id:** `str` — View ID +**project:** `int` — Project ID
    @@ -2825,7 +2834,7 @@ client.views.delete(
    -
    client.views.update(...) +
    client.views.get(...)
    @@ -2837,7 +2846,7 @@ client.views.delete(
    -Update view data with additional filters and other information for a specific project. +Get the details about a specific view in the data manager
    @@ -2857,7 +2866,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.views.update( +client.views.get( id="id", ) @@ -2883,22 +2892,6 @@ client.views.update(
    -**data:** `typing.Optional[ViewsUpdateRequestData]` — Custom view data - -
    -
    - -
    -
    - -**project:** `typing.Optional[int]` — Project ID - -
    -
    - -
    -
    - **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    @@ -2911,7 +2904,7 @@ client.views.update(
    -
    client.views.update_order(...) +
    client.views.delete(...)
    @@ -2923,7 +2916,7 @@ client.views.update(
    -Update the order field of views based on the provided list of view IDs +Delete a specific view by ID.
    @@ -2943,9 +2936,8 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.views.update_order( - project=1, - ids=[1], +client.views.delete( + id="id", ) ``` @@ -2962,15 +2954,7 @@ client.views.update_order(
    -**project:** `int` - -
    -
    - -
    -
    - -**ids:** `typing.Sequence[int]` — A list of view IDs in the desired order. +**id:** `str` — View ID
    @@ -2990,7 +2974,7 @@ client.views.update_order(
    -
    client.views.delete_all(...) +
    client.views.update(...)
    @@ -3002,7 +2986,7 @@ client.views.update_order(
    -Delete all views for a specific project. +Update view data with additional filters and other information for a specific project.
    @@ -3022,8 +3006,8 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.views.delete_all( - project=1, +client.views.update( + id="id", ) ``` @@ -3040,7 +3024,23 @@ client.views.delete_all(
    -**project:** `int` — Project ID +**id:** `str` — View ID + +
    +
    + +
    +
    + +**data:** `typing.Optional[ViewsUpdateRequestData]` — Custom view data + +
    +
    + +
    +
    + +**project:** `typing.Optional[int]` — Project ID
    @@ -3829,7 +3829,7 @@ client.jwt_settings.update()
    -**api_tokens_enabled:** `typing.Optional[bool]` — Enable JWT API token authentication for this organization +**api_token_ttl_days:** `typing.Optional[int]` — Number of days before JWT API tokens expire
    @@ -3837,7 +3837,7 @@ client.jwt_settings.update()
    -**legacy_api_tokens_enabled:** `typing.Optional[bool]` — Enable legacy API token authentication for this organization +**api_tokens_enabled:** `typing.Optional[bool]` — Enable JWT API token authentication for this organization
    @@ -3845,7 +3845,7 @@ client.jwt_settings.update()
    -**api_token_ttl_days:** `typing.Optional[int]` — Number of days before JWT API tokens expire +**legacy_api_tokens_enabled:** `typing.Optional[bool]` — Enable legacy API token authentication for this organization
    @@ -3993,7 +3993,7 @@ client.ml.create()
    -**url:** `typing.Optional[str]` — ML backend URL +**auth_method:** `typing.Optional[MlCreateRequestAuthMethod]` — Auth method
    @@ -4001,7 +4001,7 @@ client.ml.create()
    -**project:** `typing.Optional[int]` — Project ID +**basic_auth_pass:** `typing.Optional[str]` — Basic auth password
    @@ -4009,7 +4009,7 @@ client.ml.create()
    -**is_interactive:** `typing.Optional[bool]` — Is interactive +**basic_auth_user:** `typing.Optional[str]` — Basic auth user
    @@ -4017,7 +4017,7 @@ client.ml.create()
    -**title:** `typing.Optional[str]` — Title +**description:** `typing.Optional[str]` — Description
    @@ -4025,7 +4025,7 @@ client.ml.create()
    -**description:** `typing.Optional[str]` — Description +**extra_params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Extra parameters
    @@ -4033,7 +4033,7 @@ client.ml.create()
    -**auth_method:** `typing.Optional[MlCreateRequestAuthMethod]` — Auth method +**is_interactive:** `typing.Optional[bool]` — Is interactive
    @@ -4041,7 +4041,7 @@ client.ml.create()
    -**basic_auth_user:** `typing.Optional[str]` — Basic auth user +**project:** `typing.Optional[int]` — Project ID
    @@ -4049,7 +4049,7 @@ client.ml.create()
    -**basic_auth_pass:** `typing.Optional[str]` — Basic auth password +**timeout:** `typing.Optional[int]` — Response model timeout
    @@ -4057,7 +4057,7 @@ client.ml.create()
    -**extra_params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Extra parameters +**title:** `typing.Optional[str]` — Title
    @@ -4065,7 +4065,7 @@ client.ml.create()
    -**timeout:** `typing.Optional[int]` — Response model timeout +**url:** `typing.Optional[str]` — ML backend URL
    @@ -4298,7 +4298,7 @@ client.ml.update(
    -**url:** `typing.Optional[str]` — ML backend URL +**auth_method:** `typing.Optional[MlUpdateRequestAuthMethod]` — Auth method
    @@ -4306,7 +4306,7 @@ client.ml.update(
    -**project:** `typing.Optional[int]` — Project ID +**basic_auth_pass:** `typing.Optional[str]` — Basic auth password
    @@ -4314,7 +4314,7 @@ client.ml.update(
    -**is_interactive:** `typing.Optional[bool]` — Is interactive +**basic_auth_user:** `typing.Optional[str]` — Basic auth user
    @@ -4322,7 +4322,7 @@ client.ml.update(
    -**title:** `typing.Optional[str]` — Title +**description:** `typing.Optional[str]` — Description
    @@ -4330,7 +4330,7 @@ client.ml.update(
    -**description:** `typing.Optional[str]` — Description +**extra_params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Extra parameters
    @@ -4338,7 +4338,7 @@ client.ml.update(
    -**auth_method:** `typing.Optional[MlUpdateRequestAuthMethod]` — Auth method +**is_interactive:** `typing.Optional[bool]` — Is interactive
    @@ -4346,7 +4346,7 @@ client.ml.update(
    -**basic_auth_user:** `typing.Optional[str]` — Basic auth user +**project:** `typing.Optional[int]` — Project ID
    @@ -4354,7 +4354,7 @@ client.ml.update(
    -**basic_auth_pass:** `typing.Optional[str]` — Basic auth password +**timeout:** `typing.Optional[int]` — Response model timeout
    @@ -4362,7 +4362,7 @@ client.ml.update(
    -**extra_params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Extra parameters +**title:** `typing.Optional[str]` — Title
    @@ -4370,7 +4370,7 @@ client.ml.update(
    -**timeout:** `typing.Optional[int]` — Response model timeout +**url:** `typing.Optional[str]` — ML backend URL
    @@ -4751,7 +4751,7 @@ client.model_providers.create()
    -**provider:** `typing.Optional[ProviderEnum]` +**api_key:** `typing.Optional[str]` — Model provider API key
    @@ -4759,7 +4759,7 @@ client.model_providers.create()
    -**api_key:** `typing.Optional[str]` — Model provider API key +**auth_token:** `typing.Optional[str]` — Model provider Auth token
    @@ -4767,7 +4767,7 @@ client.model_providers.create()
    -**auth_token:** `typing.Optional[str]` — Model provider Auth token +**budget_alert_threshold:** `typing.Optional[float]` — Budget alert threshold for the given provider connection
    @@ -4775,7 +4775,7 @@ client.model_providers.create()
    -**deployment_name:** `typing.Optional[str]` — Azure OpenAI deployment name +**cached_available_models:** `typing.Optional[str]` — List of available models from the provider
    @@ -4783,7 +4783,7 @@ client.model_providers.create()
    -**endpoint:** `typing.Optional[str]` — Azure OpenAI endpoint +**deployment_name:** `typing.Optional[str]` — Azure OpenAI deployment name
    @@ -4791,7 +4791,7 @@ client.model_providers.create()
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file +**endpoint:** `typing.Optional[str]` — Azure OpenAI endpoint
    @@ -4799,7 +4799,7 @@ client.model_providers.create()
    -**google_project_id:** `typing.Optional[str]` — Google project ID +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file
    @@ -4815,7 +4815,7 @@ client.model_providers.create()
    -**cached_available_models:** `typing.Optional[str]` — List of available models from the provider +**google_project_id:** `typing.Optional[str]` — Google project ID
    @@ -4823,7 +4823,7 @@ client.model_providers.create()
    -**scope:** `typing.Optional[ScopeEnum]` +**is_internal:** `typing.Optional[bool]` — Whether the model provider connection is internal, not visible to the user
    @@ -4831,7 +4831,7 @@ client.model_providers.create()
    -**is_internal:** `typing.Optional[bool]` — Whether the model provider connection is internal, not visible to the user +**provider:** `typing.Optional[ProviderEnum]`
    @@ -4839,7 +4839,7 @@ client.model_providers.create()
    -**budget_alert_threshold:** `typing.Optional[float]` — Budget alert threshold for the given provider connection +**scope:** `typing.Optional[ScopeEnum]`
    @@ -4859,7 +4859,7 @@ client.model_providers.create()
    -
    client.model_providers.get(...) +
    client.model_providers.list_model_provider_choices()
    @@ -4871,7 +4871,7 @@ client.model_providers.create()
    -Retrieve a specific model provider connection. +List all possible model provider choices
    @@ -4891,9 +4891,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.model_providers.get( - id="id", -) +client.model_providers.list_model_provider_choices() ``` @@ -4909,14 +4907,6 @@ client.model_providers.get(
    -**id:** `str` - -
    -
    - -
    -
    - **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    @@ -4929,7 +4919,7 @@ client.model_providers.get(
    -
    client.model_providers.delete(...) +
    client.model_providers.get(...)
    @@ -4941,7 +4931,7 @@ client.model_providers.get(
    -Delete a model provider connection by ID +Retrieve a specific model provider connection.
    @@ -4961,7 +4951,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.model_providers.delete( +client.model_providers.get( id="id", ) @@ -4999,7 +4989,7 @@ client.model_providers.delete(
    -
    client.model_providers.update(...) +
    client.model_providers.delete(...)
    @@ -5011,7 +5001,7 @@ client.model_providers.delete(
    -Update a specific model provider connection by ID. +Delete a model provider connection by ID
    @@ -5031,7 +5021,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.model_providers.update( +client.model_providers.delete( id="id", ) @@ -5057,47 +5047,69 @@ client.model_providers.update(
    -**provider:** `typing.Optional[ProviderEnum]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + +
    -
    -
    -**api_key:** `typing.Optional[str]` — Model provider API key -
    +
    +
    client.model_providers.update(...)
    -**auth_token:** `typing.Optional[str]` — Model provider Auth token - -
    -
    +#### 📝 Description
    -**deployment_name:** `typing.Optional[str]` — Azure OpenAI deployment name - +
    +
    + +Update a specific model provider connection by ID. +
    +
    +#### 🔌 Usage +
    -**endpoint:** `typing.Optional[str]` — Azure OpenAI endpoint - +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.model_providers.update( + id="id", +) + +``` +
    +
    +#### ⚙️ Parameters +
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file +
    +
    + +**id:** `str`
    @@ -5105,7 +5117,7 @@ client.model_providers.update(
    -**google_project_id:** `typing.Optional[str]` — Google project ID +**api_key:** `typing.Optional[str]` — Model provider API key
    @@ -5113,7 +5125,7 @@ client.model_providers.update(
    -**google_location:** `typing.Optional[str]` — Google project location +**auth_token:** `typing.Optional[str]` — Model provider Auth token
    @@ -5121,7 +5133,7 @@ client.model_providers.update(
    -**cached_available_models:** `typing.Optional[str]` — List of available models from the provider +**budget_alert_threshold:** `typing.Optional[float]` — Budget alert threshold for the given provider connection
    @@ -5129,7 +5141,7 @@ client.model_providers.update(
    -**scope:** `typing.Optional[ScopeEnum]` +**cached_available_models:** `typing.Optional[str]` — List of available models from the provider
    @@ -5137,7 +5149,7 @@ client.model_providers.update(
    -**is_internal:** `typing.Optional[bool]` — Whether the model provider connection is internal, not visible to the user +**deployment_name:** `typing.Optional[str]` — Azure OpenAI deployment name
    @@ -5145,7 +5157,7 @@ client.model_providers.update(
    -**budget_alert_threshold:** `typing.Optional[float]` — Budget alert threshold for the given provider connection +**endpoint:** `typing.Optional[str]` — Azure OpenAI endpoint
    @@ -5153,63 +5165,51 @@ client.model_providers.update(
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file
    -
    -
    +
    +
    +**google_location:** `typing.Optional[str]` — Google project location +
    -
    -
    client.model_providers.list_model_provider_choices()
    -#### 📝 Description - -
    -
    +**google_project_id:** `typing.Optional[str]` — Google project ID + +
    +
    -List all possible model provider choices -
    -
    +**is_internal:** `typing.Optional[bool]` — Whether the model provider connection is internal, not visible to the user +
    -#### 🔌 Usage - -
    -
    -
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.model_providers.list_model_provider_choices() - -``` -
    -
    +**provider:** `typing.Optional[ProviderEnum]` +
    -#### ⚙️ Parameters -
    +**scope:** `typing.Optional[ScopeEnum]` + +
    +
    +
    @@ -5354,8 +5354,8 @@ client = LabelStudio( api_key="YOUR_API_KEY", ) client.prompts.batch_predictions( - results=[], modelrun_id=1, + results=[], ) ``` @@ -5372,7 +5372,7 @@ client.prompts.batch_predictions(
    -**results:** `typing.Sequence[typing.Optional[typing.Any]]` +**modelrun_id:** `int`
    @@ -5380,7 +5380,7 @@ client.prompts.batch_predictions(
    -**modelrun_id:** `int` +**results:** `typing.Sequence[typing.Optional[typing.Any]]`
    @@ -5542,7 +5542,7 @@ client.prompts.create(
    -**created_by:** `typing.Optional[UserSimpleRequest]` — User who created Dataset +**associated_projects:** `typing.Optional[typing.Sequence[int]]`
    @@ -5550,7 +5550,7 @@ client.prompts.create(
    -**skill_name:** `typing.Optional[SkillNameEnum]` +**created_by:** `typing.Optional[UserSimpleRequest]` — User who created Dataset
    @@ -5574,7 +5574,7 @@ client.prompts.create(
    -**output_classes:** `typing.Optional[typing.Optional[typing.Any]]` +**organization:** `typing.Optional[int]`
    @@ -5582,7 +5582,7 @@ client.prompts.create(
    -**organization:** `typing.Optional[int]` +**output_classes:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -5590,7 +5590,7 @@ client.prompts.create(
    -**associated_projects:** `typing.Optional[typing.Sequence[int]]` +**skill_name:** `typing.Optional[SkillNameEnum]`
    @@ -5610,7 +5610,7 @@ client.prompts.create(
    -
    client.prompts.get(...) +
    client.prompts.compatible_projects(...)
    @@ -5622,7 +5622,7 @@ client.prompts.create(
    -Retrieve a specific prompt. +Retrieve a list of compatible project for prompt.
    @@ -5642,9 +5642,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.prompts.get( - id="id", -) +client.prompts.compatible_projects() ``` @@ -5660,7 +5658,31 @@ client.prompts.get(
    -**id:** `str` +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. + +
    +
    + +
    +
    + +**page:** `typing.Optional[int]` — A page number within the paginated result set. + +
    +
    + +
    +
    + +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
    +
    + +
    +
    + +**project_type:** `typing.Optional[PromptsCompatibleProjectsRequestProjectType]` — Skill to filter by
    @@ -5680,7 +5702,7 @@ client.prompts.get(
    -
    client.prompts.delete(...) +
    client.prompts.get(...)
    @@ -5692,7 +5714,7 @@ client.prompts.get(
    -Delete a prompt by ID +Retrieve a specific prompt.
    @@ -5712,7 +5734,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.prompts.delete( +client.prompts.get( id="id", ) @@ -5750,7 +5772,7 @@ client.prompts.delete(
    -
    client.prompts.update(...) +
    client.prompts.delete(...)
    @@ -5762,7 +5784,7 @@ client.prompts.delete(
    -Update a specific prompt by ID. +Delete a prompt by ID
    @@ -5782,7 +5804,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.prompts.update( +client.prompts.delete( id="id", ) @@ -5808,131 +5830,109 @@ client.prompts.update(
    -**created_by:** `typing.Optional[UserSimpleRequest]` — User who created Dataset +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    - -
    -
    - -**skill_name:** `typing.Optional[SkillNameEnum]` -
    -
    -
    -**title:** `typing.Optional[str]` — Model name -
    +
    +
    client.prompts.update(...)
    -**description:** `typing.Optional[str]` — Model description - -
    -
    +#### 📝 Description
    -**input_fields:** `typing.Optional[typing.Optional[typing.Any]]` - -
    -
    -
    -**output_classes:** `typing.Optional[typing.Optional[typing.Any]]` - +Update a specific prompt by ID.
    - -
    -
    - -**organization:** `typing.Optional[int]` -
    +#### 🔌 Usage +
    -**associated_projects:** `typing.Optional[typing.Sequence[int]]` - -
    -
    -
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.prompts.update( + id="id", +) + +```
    +#### ⚙️ Parameters - - -
    - -
    client.prompts.compatible_projects(...)
    -#### 📝 Description -
    +**id:** `str` + +
    +
    +
    -Retrieve a list of compatible project for prompt. -
    -
    +**associated_projects:** `typing.Optional[typing.Sequence[int]]` +
    -#### 🔌 Usage -
    +**created_by:** `typing.Optional[UserSimpleRequest]` — User who created Dataset + +
    +
    +
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.prompts.compatible_projects() - -``` -
    -
    +**description:** `typing.Optional[str]` — Model description + -#### ⚙️ Parameters -
    +**input_fields:** `typing.Optional[typing.Optional[typing.Any]]` + +
    +
    +
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**organization:** `typing.Optional[int]`
    @@ -5940,7 +5940,7 @@ client.prompts.compatible_projects()
    -**page:** `typing.Optional[int]` — A page number within the paginated result set. +**output_classes:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -5948,7 +5948,7 @@ client.prompts.compatible_projects()
    -**page_size:** `typing.Optional[int]` — Number of results to return per page. +**skill_name:** `typing.Optional[SkillNameEnum]`
    @@ -5956,7 +5956,7 @@ client.prompts.compatible_projects()
    -**project_type:** `typing.Optional[PromptsCompatibleProjectsRequestProjectType]` — Skill to filter by +**title:** `typing.Optional[str]` — Model name
    @@ -6086,26 +6086,26 @@ client = LabelStudio( api_key="YOUR_API_KEY", ) client.predictions.create( + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) ``` @@ -6122,7 +6122,7 @@ client.predictions.create(
    -**task:** `typing.Optional[int]` — Task ID for which the prediction is created +**model_version:** `typing.Optional[str]` — Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface
    @@ -6146,7 +6146,7 @@ client.predictions.create(
    -**model_version:** `typing.Optional[str]` — Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface +**task:** `typing.Optional[int]` — Task ID for which the prediction is created
    @@ -6340,26 +6340,26 @@ client = LabelStudio( ) client.predictions.update( id=1, + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) ``` @@ -6384,7 +6384,7 @@ client.predictions.update(
    -**task:** `typing.Optional[int]` — Task ID for which the prediction is created +**model_version:** `typing.Optional[str]` — Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface
    @@ -6408,7 +6408,7 @@ client.predictions.update(
    -**model_version:** `typing.Optional[str]` — Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface +**task:** `typing.Optional[int]` — Task ID for which the prediction is created
    @@ -6614,7 +6614,7 @@ client.projects.create()
    -**title:** `typing.Optional[str]` — Project name. Must be between 3 and 50 characters long. +**color:** `typing.Optional[str]`
    @@ -6622,7 +6622,7 @@ client.projects.create()
    -**description:** `typing.Optional[str]` — Project description +**control_weights:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -6630,7 +6630,7 @@ client.projects.create()
    -**label_config:** `typing.Optional[str]` — Label config in XML format. See more about it in documentation +**created_by:** `typing.Optional[UserSimpleRequest]` — Project owner
    @@ -6638,7 +6638,7 @@ client.projects.create()
    -**expert_instruction:** `typing.Optional[str]` — Labeling instructions in HTML format +**description:** `typing.Optional[str]` — Project description
    @@ -6646,7 +6646,7 @@ client.projects.create()
    -**show_instruction:** `typing.Optional[bool]` — Show instructions to the annotator before they start +**enable_empty_annotation:** `typing.Optional[bool]` — Allow annotators to submit empty annotations
    @@ -6654,7 +6654,7 @@ client.projects.create()
    -**show_skip_button:** `typing.Optional[bool]` — Show a skip button in interface and allow annotators to skip the task +**evaluate_predictions_automatically:** `typing.Optional[bool]` — Retrieve and display predictions when loading a task
    @@ -6662,7 +6662,7 @@ client.projects.create()
    -**enable_empty_annotation:** `typing.Optional[bool]` — Allow annotators to submit empty annotations +**expert_instruction:** `typing.Optional[str]` — Labeling instructions in HTML format
    @@ -6670,7 +6670,7 @@ client.projects.create()
    -**show_annotation_history:** `typing.Optional[bool]` — Show annotation history to annotator +**is_draft:** `typing.Optional[bool]` — Whether or not the project is in the middle of being created
    @@ -6678,7 +6678,7 @@ client.projects.create()
    -**organization:** `typing.Optional[int]` +**is_published:** `typing.Optional[bool]` — Whether or not the project is published to annotators
    @@ -6686,7 +6686,7 @@ client.projects.create()
    -**color:** `typing.Optional[str]` +**label_config:** `typing.Optional[str]` — Label config in XML format. See more about it in documentation
    @@ -6702,7 +6702,7 @@ client.projects.create()
    -**is_published:** `typing.Optional[bool]` — Whether or not the project is published to annotators +**min_annotations_to_start_training:** `typing.Optional[int]` — Minimum number of completed tasks after which model training is started
    @@ -6718,7 +6718,7 @@ client.projects.create()
    -**is_draft:** `typing.Optional[bool]` — Whether or not the project is in the middle of being created +**organization:** `typing.Optional[int]`
    @@ -6726,7 +6726,7 @@ client.projects.create()
    -**created_by:** `typing.Optional[UserSimpleRequest]` — Project owner +**overlap_cohort_percentage:** `typing.Optional[int]`
    @@ -6734,7 +6734,7 @@ client.projects.create()
    -**min_annotations_to_start_training:** `typing.Optional[int]` — Minimum number of completed tasks after which model training is started +**pinned_at:** `typing.Optional[dt.datetime]` — Pinned date and time
    @@ -6742,7 +6742,7 @@ client.projects.create()
    -**show_collab_predictions:** `typing.Optional[bool]` — If set, the annotator can view model predictions +**reveal_preannotations_interactively:** `typing.Optional[bool]` — Reveal pre-annotations interactively
    @@ -6758,7 +6758,7 @@ client.projects.create()
    -**show_ground_truth_first:** `typing.Optional[bool]` +**show_annotation_history:** `typing.Optional[bool]` — Show annotation history to annotator
    @@ -6766,7 +6766,7 @@ client.projects.create()
    -**show_overlap_first:** `typing.Optional[bool]` +**show_collab_predictions:** `typing.Optional[bool]` — If set, the annotator can view model predictions
    @@ -6774,7 +6774,7 @@ client.projects.create()
    -**overlap_cohort_percentage:** `typing.Optional[int]` +**show_ground_truth_first:** `typing.Optional[bool]`
    @@ -6782,7 +6782,7 @@ client.projects.create()
    -**task_data_login:** `typing.Optional[str]` — Task data credentials: login +**show_instruction:** `typing.Optional[bool]` — Show instructions to the annotator before they start
    @@ -6790,7 +6790,7 @@ client.projects.create()
    -**task_data_password:** `typing.Optional[str]` — Task data credentials: password +**show_overlap_first:** `typing.Optional[bool]`
    @@ -6798,7 +6798,7 @@ client.projects.create()
    -**control_weights:** `typing.Optional[typing.Optional[typing.Any]]` +**show_skip_button:** `typing.Optional[bool]` — Show a skip button in interface and allow annotators to skip the task
    @@ -6806,7 +6806,7 @@ client.projects.create()
    -**evaluate_predictions_automatically:** `typing.Optional[bool]` — Retrieve and display predictions when loading a task +**skip_queue:** `typing.Optional[LseProjectCreateRequestSkipQueue]`
    @@ -6814,7 +6814,7 @@ client.projects.create()
    -**skip_queue:** `typing.Optional[LseProjectCreateRequestSkipQueue]` +**task_data_login:** `typing.Optional[str]` — Task data credentials: login
    @@ -6822,7 +6822,7 @@ client.projects.create()
    -**reveal_preannotations_interactively:** `typing.Optional[bool]` — Reveal pre-annotations interactively +**task_data_password:** `typing.Optional[str]` — Task data credentials: password
    @@ -6830,7 +6830,7 @@ client.projects.create()
    -**pinned_at:** `typing.Optional[dt.datetime]` — Pinned date and time +**title:** `typing.Optional[str]` — Project name. Must be between 3 and 50 characters long.
    @@ -7056,7 +7056,7 @@ client.projects.update(
    -**title:** `typing.Optional[str]` — Project name. Must be between 3 and 50 characters long. +**annotation_limit_count:** `typing.Optional[int]`
    @@ -7064,7 +7064,7 @@ client.projects.update(
    -**description:** `typing.Optional[str]` — Project description +**annotation_limit_percent:** `typing.Optional[str]`
    @@ -7072,7 +7072,7 @@ client.projects.update(
    -**label_config:** `typing.Optional[str]` — Label config in XML format. See more about it in documentation +**annotator_evaluation_minimum_score:** `typing.Optional[str]`
    @@ -7080,7 +7080,7 @@ client.projects.update(
    -**expert_instruction:** `typing.Optional[str]` — Labeling instructions in HTML format +**annotator_evaluation_minimum_tasks:** `typing.Optional[int]`
    @@ -7088,7 +7088,7 @@ client.projects.update(
    -**show_instruction:** `typing.Optional[bool]` — Show instructions to the annotator before they start +**assignment_settings:** `typing.Optional[AssignmentSettingsRequest]`
    @@ -7096,7 +7096,7 @@ client.projects.update(
    -**show_skip_button:** `typing.Optional[bool]` — Show a skip button in interface and allow annotators to skip the task +**color:** `typing.Optional[str]`
    @@ -7104,7 +7104,7 @@ client.projects.update(
    -**enable_empty_annotation:** `typing.Optional[bool]` — Allow annotators to submit empty annotations +**comment_classification_config:** `typing.Optional[str]`
    @@ -7112,7 +7112,7 @@ client.projects.update(
    -**show_annotation_history:** `typing.Optional[bool]` — Show annotation history to annotator +**control_weights:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -7120,7 +7120,7 @@ client.projects.update(
    -**organization:** `typing.Optional[int]` +**created_by:** `typing.Optional[UserSimpleRequest]` — Project owner
    @@ -7128,7 +7128,7 @@ client.projects.update(
    -**color:** `typing.Optional[str]` +**custom_script:** `typing.Optional[str]`
    @@ -7136,7 +7136,7 @@ client.projects.update(
    -**maximum_annotations:** `typing.Optional[int]` — Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) +**custom_task_lock_ttl:** `typing.Optional[int]` — TTL in seconds for task reservations, on new and existing tasks
    @@ -7144,7 +7144,7 @@ client.projects.update(
    -**is_published:** `typing.Optional[bool]` — Whether or not the project is published to annotators +**description:** `typing.Optional[str]` — Project description
    @@ -7152,7 +7152,7 @@ client.projects.update(
    -**model_version:** `typing.Optional[str]` — Machine learning model version +**enable_empty_annotation:** `typing.Optional[bool]` — Allow annotators to submit empty annotations
    @@ -7160,7 +7160,7 @@ client.projects.update(
    -**is_draft:** `typing.Optional[bool]` — Whether or not the project is in the middle of being created +**evaluate_predictions_automatically:** `typing.Optional[bool]` — Retrieve and display predictions when loading a task
    @@ -7168,7 +7168,7 @@ client.projects.update(
    -**created_by:** `typing.Optional[UserSimpleRequest]` — Project owner +**expert_instruction:** `typing.Optional[str]` — Labeling instructions in HTML format
    @@ -7176,7 +7176,7 @@ client.projects.update(
    -**min_annotations_to_start_training:** `typing.Optional[int]` — Minimum number of completed tasks after which model training is started +**is_draft:** `typing.Optional[bool]` — Whether or not the project is in the middle of being created
    @@ -7184,7 +7184,7 @@ client.projects.update(
    -**show_collab_predictions:** `typing.Optional[bool]` — If set, the annotator can view model predictions +**is_published:** `typing.Optional[bool]` — Whether or not the project is published to annotators
    @@ -7192,7 +7192,7 @@ client.projects.update(
    -**sampling:** `typing.Optional[PatchedLseProjectUpdateRequestSampling]` +**label_config:** `typing.Optional[str]` — Label config in XML format. See more about it in documentation
    @@ -7200,7 +7200,7 @@ client.projects.update(
    -**show_ground_truth_first:** `typing.Optional[bool]` +**maximum_annotations:** `typing.Optional[int]` — Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True)
    @@ -7208,7 +7208,7 @@ client.projects.update(
    -**show_overlap_first:** `typing.Optional[bool]` +**min_annotations_to_start_training:** `typing.Optional[int]` — Minimum number of completed tasks after which model training is started
    @@ -7216,7 +7216,7 @@ client.projects.update(
    -**overlap_cohort_percentage:** `typing.Optional[int]` +**model_version:** `typing.Optional[str]` — Machine learning model version
    @@ -7224,7 +7224,7 @@ client.projects.update(
    -**task_data_login:** `typing.Optional[str]` — Task data credentials: login +**organization:** `typing.Optional[int]`
    @@ -7232,7 +7232,7 @@ client.projects.update(
    -**task_data_password:** `typing.Optional[str]` — Task data credentials: password +**overlap_cohort_percentage:** `typing.Optional[int]`
    @@ -7240,7 +7240,7 @@ client.projects.update(
    -**control_weights:** `typing.Optional[typing.Optional[typing.Any]]` +**pause_on_failed_annotator_evaluation:** `typing.Optional[bool]`
    @@ -7248,7 +7248,7 @@ client.projects.update(
    -**evaluate_predictions_automatically:** `typing.Optional[bool]` — Retrieve and display predictions when loading a task +**pinned_at:** `typing.Optional[dt.datetime]` — Pinned date and time
    @@ -7256,7 +7256,7 @@ client.projects.update(
    -**skip_queue:** `typing.Optional[PatchedLseProjectUpdateRequestSkipQueue]` +**require_comment_on_skip:** `typing.Optional[bool]`
    @@ -7272,7 +7272,7 @@ client.projects.update(
    -**pinned_at:** `typing.Optional[dt.datetime]` — Pinned date and time +**review_settings:** `typing.Optional[ReviewSettingsRequest]`
    @@ -7280,7 +7280,7 @@ client.projects.update(
    -**workspace:** `typing.Optional[int]` +**sampling:** `typing.Optional[PatchedLseProjectUpdateRequestSampling]`
    @@ -7288,7 +7288,7 @@ client.projects.update(
    -**review_settings:** `typing.Optional[ReviewSettingsRequest]` +**show_annotation_history:** `typing.Optional[bool]` — Show annotation history to annotator
    @@ -7296,7 +7296,7 @@ client.projects.update(
    -**assignment_settings:** `typing.Optional[AssignmentSettingsRequest]` +**show_collab_predictions:** `typing.Optional[bool]` — If set, the annotator can view model predictions
    @@ -7304,7 +7304,7 @@ client.projects.update(
    -**custom_script:** `typing.Optional[str]` +**show_ground_truth_first:** `typing.Optional[bool]`
    @@ -7312,7 +7312,7 @@ client.projects.update(
    -**comment_classification_config:** `typing.Optional[str]` +**show_instruction:** `typing.Optional[bool]` — Show instructions to the annotator before they start
    @@ -7320,7 +7320,7 @@ client.projects.update(
    -**require_comment_on_skip:** `typing.Optional[bool]` +**show_overlap_first:** `typing.Optional[bool]`
    @@ -7328,7 +7328,7 @@ client.projects.update(
    -**custom_task_lock_ttl:** `typing.Optional[int]` — TTL in seconds for task reservations, on new and existing tasks +**show_skip_button:** `typing.Optional[bool]` — Show a skip button in interface and allow annotators to skip the task
    @@ -7336,7 +7336,7 @@ client.projects.update(
    -**annotation_limit_count:** `typing.Optional[int]` +**skip_queue:** `typing.Optional[PatchedLseProjectUpdateRequestSkipQueue]`
    @@ -7344,7 +7344,7 @@ client.projects.update(
    -**annotation_limit_percent:** `typing.Optional[str]` +**task_data_login:** `typing.Optional[str]` — Task data credentials: login
    @@ -7352,7 +7352,7 @@ client.projects.update(
    -**pause_on_failed_annotator_evaluation:** `typing.Optional[bool]` +**task_data_password:** `typing.Optional[str]` — Task data credentials: password
    @@ -7360,7 +7360,7 @@ client.projects.update(
    -**annotator_evaluation_minimum_score:** `typing.Optional[str]` +**title:** `typing.Optional[str]` — Project name. Must be between 3 and 50 characters long.
    @@ -7368,7 +7368,7 @@ client.projects.update(
    -**annotator_evaluation_minimum_tasks:** `typing.Optional[int]` +**workspace:** `typing.Optional[int]`
    @@ -7423,8 +7423,8 @@ client = LabelStudio( client.projects.duplicate( id=1, mode="settings", - workspace=1, title="title", + workspace=1, ) ``` @@ -7462,7 +7462,7 @@ Data that you want to duplicate: settings only, with tasks, with annotations
    -**workspace:** `int` — Workspace, where to place duplicated project +**title:** `str` — Title of duplicated project
    @@ -7470,7 +7470,7 @@ Data that you want to duplicate: settings only, with tasks, with annotations
    -**title:** `str` — Title of duplicated project +**workspace:** `int` — Workspace, where to place duplicated project
    @@ -8096,7 +8096,7 @@ client.tasks.create(
    -**data:** `typing.Optional[typing.Any]` +**cancelled_annotations:** `typing.Optional[int]` — Number of total cancelled annotations for the current task
    @@ -8104,7 +8104,7 @@ client.tasks.create(
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` +**comment_authors:** `typing.Optional[typing.Sequence[int]]` — Users who wrote comments
    @@ -8112,7 +8112,7 @@ client.tasks.create(
    -**is_labeled:** `typing.Optional[bool]` — True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project +**comment_count:** `typing.Optional[int]` — Number of comments in the task including all annotations
    @@ -8120,7 +8120,7 @@ client.tasks.create(
    -**overlap:** `typing.Optional[int]` — Number of distinct annotators that processed the current task +**data:** `typing.Optional[typing.Any]`
    @@ -8128,7 +8128,7 @@ client.tasks.create(
    -**inner_id:** `typing.Optional[int]` — Internal task ID in the project, starts with 1 +**file_upload:** `typing.Optional[int]` — Uploaded file used as data source for this task
    @@ -8136,7 +8136,7 @@ client.tasks.create(
    -**total_annotations:** `typing.Optional[int]` — Number of total annotations for the current task except cancelled annotations +**inner_id:** `typing.Optional[int]` — Internal task ID in the project, starts with 1
    @@ -8144,7 +8144,7 @@ client.tasks.create(
    -**cancelled_annotations:** `typing.Optional[int]` — Number of total cancelled annotations for the current task +**is_labeled:** `typing.Optional[bool]` — True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project
    @@ -8152,7 +8152,7 @@ client.tasks.create(
    -**total_predictions:** `typing.Optional[int]` — Number of total predictions for the current task +**last_comment_updated_at:** `typing.Optional[dt.datetime]` — When the last comment was updated
    @@ -8160,7 +8160,7 @@ client.tasks.create(
    -**comment_count:** `typing.Optional[int]` — Number of comments in the task including all annotations +**meta:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -8168,7 +8168,7 @@ client.tasks.create(
    -**unresolved_comment_count:** `typing.Optional[int]` — Number of unresolved comments in the task including all annotations +**overlap:** `typing.Optional[int]` — Number of distinct annotators that processed the current task
    @@ -8176,7 +8176,7 @@ client.tasks.create(
    -**last_comment_updated_at:** `typing.Optional[dt.datetime]` — When the last comment was updated +**project:** `typing.Optional[int]` — Project ID for this task
    @@ -8184,7 +8184,7 @@ client.tasks.create(
    -**project:** `typing.Optional[int]` — Project ID for this task +**total_annotations:** `typing.Optional[int]` — Number of total annotations for the current task except cancelled annotations
    @@ -8192,7 +8192,7 @@ client.tasks.create(
    -**updated_by:** `typing.Optional[int]` — Last annotator or reviewer who updated this task +**total_predictions:** `typing.Optional[int]` — Number of total predictions for the current task
    @@ -8200,7 +8200,7 @@ client.tasks.create(
    -**file_upload:** `typing.Optional[int]` — Uploaded file used as data source for this task +**unresolved_comment_count:** `typing.Optional[int]` — Number of unresolved comments in the task including all annotations
    @@ -8208,7 +8208,7 @@ client.tasks.create(
    -**comment_authors:** `typing.Optional[typing.Sequence[int]]` — Users who wrote comments +**updated_by:** `typing.Optional[int]` — Last annotator or reviewer who updated this task
    @@ -8426,7 +8426,7 @@ client.tasks.update(
    -**inner_id:** `typing.Optional[int]` +**avg_lead_time:** `typing.Optional[float]`
    @@ -8442,7 +8442,7 @@ client.tasks.update(
    -**total_annotations:** `typing.Optional[int]` +**comment_count:** `typing.Optional[int]` — Number of comments in the task including all annotations
    @@ -8450,7 +8450,7 @@ client.tasks.update(
    -**total_predictions:** `typing.Optional[int]` +**completed_at:** `typing.Optional[dt.datetime]`
    @@ -8458,7 +8458,7 @@ client.tasks.update(
    -**completed_at:** `typing.Optional[dt.datetime]` +**data:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -8466,7 +8466,7 @@ client.tasks.update(
    -**predictions_score:** `typing.Optional[float]` +**draft_exists:** `typing.Optional[bool]`
    @@ -8474,7 +8474,7 @@ client.tasks.update(
    -**avg_lead_time:** `typing.Optional[float]` +**ground_truth:** `typing.Optional[bool]`
    @@ -8482,7 +8482,7 @@ client.tasks.update(
    -**draft_exists:** `typing.Optional[bool]` +**inner_id:** `typing.Optional[int]`
    @@ -8490,7 +8490,7 @@ client.tasks.update(
    -**reviewed:** `typing.Optional[bool]` +**is_labeled:** `typing.Optional[bool]` — True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project
    @@ -8498,7 +8498,7 @@ client.tasks.update(
    -**reviews_accepted:** `typing.Optional[int]` +**last_comment_updated_at:** `typing.Optional[dt.datetime]` — When the last comment was updated
    @@ -8506,7 +8506,7 @@ client.tasks.update(
    -**reviews_rejected:** `typing.Optional[int]` +**meta:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -8514,7 +8514,7 @@ client.tasks.update(
    -**ground_truth:** `typing.Optional[bool]` +**overlap:** `typing.Optional[int]` — Number of distinct annotators that processed the current task
    @@ -8522,7 +8522,7 @@ client.tasks.update(
    -**data:** `typing.Optional[typing.Optional[typing.Any]]` +**predictions_score:** `typing.Optional[float]`
    @@ -8530,7 +8530,7 @@ client.tasks.update(
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` +**project:** `typing.Optional[int]` — Project ID for this task
    @@ -8538,7 +8538,7 @@ client.tasks.update(
    -**is_labeled:** `typing.Optional[bool]` — True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project +**reviewed:** `typing.Optional[bool]`
    @@ -8546,7 +8546,7 @@ client.tasks.update(
    -**overlap:** `typing.Optional[int]` — Number of distinct annotators that processed the current task +**reviews_accepted:** `typing.Optional[int]`
    @@ -8554,7 +8554,7 @@ client.tasks.update(
    -**comment_count:** `typing.Optional[int]` — Number of comments in the task including all annotations +**reviews_rejected:** `typing.Optional[int]`
    @@ -8562,7 +8562,7 @@ client.tasks.update(
    -**unresolved_comment_count:** `typing.Optional[int]` — Number of unresolved comments in the task including all annotations +**total_annotations:** `typing.Optional[int]`
    @@ -8570,7 +8570,7 @@ client.tasks.update(
    -**last_comment_updated_at:** `typing.Optional[dt.datetime]` — When the last comment was updated +**total_predictions:** `typing.Optional[int]`
    @@ -8578,7 +8578,7 @@ client.tasks.update(
    -**project:** `typing.Optional[int]` — Project ID for this task +**unresolved_comment_count:** `typing.Optional[int]` — Number of unresolved comments in the task including all annotations
    @@ -9247,6 +9247,30 @@ client.webhooks.create(
    +**actions:** `typing.Optional[typing.Sequence[ActionsEnum]]` + +
    +
    + +
    +
    + +**headers:** `typing.Optional[typing.Optional[typing.Any]]` + +
    +
    + +
    +
    + +**is_active:** `typing.Optional[bool]` — If value is False the webhook is disabled + +
    +
    + +
    +
    + **project:** `typing.Optional[int]`
    @@ -9255,6 +9279,14 @@ client.webhooks.create(
    +**send_for_all_actions:** `typing.Optional[bool]` — If value is False - used only for actions from WebhookAction + +
    +
    + +
    +
    + **send_payload:** `typing.Optional[bool]` — If value is False send only action
    @@ -9263,31 +9295,67 @@ client.webhooks.create(
    -**send_for_all_actions:** `typing.Optional[bool]` — If value is False - used only for actions from WebhookAction - +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
    +
    + +
    + + + +
    +
    + +
    client.webhooks.info(...) +
    +
    + +#### 📝 Description + +
    +
    + +
    +
    + +Get descriptions of all available webhook actions to set up webhooks. +
    +
    +
    +
    + +#### 🔌 Usage + +
    +
    + +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.webhooks.info() + +```
    - -
    -
    - -**headers:** `typing.Optional[typing.Optional[typing.Any]]` -
    +#### ⚙️ Parameters +
    -**is_active:** `typing.Optional[bool]` — If value is False the webhook is disabled - -
    -
    -
    -**actions:** `typing.Optional[typing.Sequence[ActionsEnum]]` +**organization_only:** `typing.Optional[bool]` — organization-only or not
    @@ -9463,23 +9531,7 @@ client.webhooks.update(
    -**url:** `typing.Optional[str]` — URL of webhook - -
    -
    - -
    -
    - -**send_payload:** `typing.Optional[bool]` — If value is False send only action - -
    -
    - -
    -
    - -**send_for_all_actions:** `typing.Optional[bool]` — If value is False - used only for actions from WebhookAction +**actions:** `typing.Optional[typing.Sequence[ActionsEnum]]`
    @@ -9503,7 +9555,7 @@ client.webhooks.update(
    -**actions:** `typing.Optional[typing.Sequence[ActionsEnum]]` +**send_for_all_actions:** `typing.Optional[bool]` — If value is False - used only for actions from WebhookAction
    @@ -9511,67 +9563,15 @@ client.webhooks.update(
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**send_payload:** `typing.Optional[bool]` — If value is False send only action
    -
    -
    - - -
    -
    -
    - -
    client.webhooks.info(...) -
    -
    - -#### 📝 Description - -
    -
    - -
    -
    - -Get descriptions of all available webhook actions to set up webhooks. -
    -
    -
    -
    - -#### 🔌 Usage - -
    -
    - -
    -
    - -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.webhooks.info() - -``` -
    -
    -
    -
    - -#### ⚙️ Parameters - -
    -
    -**organization_only:** `typing.Optional[bool]` — organization-only or not +**url:** `typing.Optional[str]` — URL of webhook
    @@ -9726,7 +9726,7 @@ client.workspaces.create(
    -**description:** `typing.Optional[str]` — Workspace description +**color:** `typing.Optional[str]`
    @@ -9734,7 +9734,7 @@ client.workspaces.create(
    -**color:** `typing.Optional[str]` +**description:** `typing.Optional[str]` — Workspace description
    @@ -9742,7 +9742,7 @@ client.workspaces.create(
    -**is_personal:** `typing.Optional[bool]` — Workspace is a personal user workspace +**is_archived:** `typing.Optional[bool]` — Workspace is archived
    @@ -9750,7 +9750,7 @@ client.workspaces.create(
    -**is_archived:** `typing.Optional[bool]` — Workspace is archived +**is_personal:** `typing.Optional[bool]` — Workspace is a personal user workspace
    @@ -9968,7 +9968,7 @@ client.workspaces.update(
    -**title:** `typing.Optional[str]` — Workspace name +**color:** `typing.Optional[str]`
    @@ -9984,7 +9984,7 @@ client.workspaces.update(
    -**color:** `typing.Optional[str]` +**is_archived:** `typing.Optional[bool]` — Workspace is archived
    @@ -10000,7 +10000,7 @@ client.workspaces.update(
    -**is_archived:** `typing.Optional[bool]` — Workspace is archived +**title:** `typing.Optional[str]` — Workspace name
    @@ -10145,6 +10145,22 @@ client.export_storage.azure.create()
    +**account_key:** `typing.Optional[str]` — Azure Blob account key + +
    +
    + +
    +
    + +**account_name:** `typing.Optional[str]` — Azure Blob account name + +
    +
    + +
    +
    + **can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled
    @@ -10153,7 +10169,7 @@ client.export_storage.azure.create()
    -**title:** `typing.Optional[str]` — Storage title +**container:** `typing.Optional[str]` — Azure blob container
    @@ -10169,6 +10185,14 @@ client.export_storage.azure.create()
    +**prefix:** `typing.Optional[str]` — Azure blob prefix name + +
    +
    + +
    +
    + **project:** `typing.Optional[int]` — Project ID
    @@ -10177,6 +10201,98 @@ client.export_storage.azure.create()
    +**title:** `typing.Optional[str]` — Storage title + +
    +
    + +
    +
    + +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
    +
    +
    +
    + + +
    +
    +
    + +
    client.export_storage.azure.validate(...) +
    +
    + +#### 📝 Description + +
    +
    + +
    +
    + +Validate a specific Azure export storage connection. +
    +
    +
    +
    + +#### 🔌 Usage + +
    +
    + +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.export_storage.azure.validate() + +``` +
    +
    +
    +
    + +#### ⚙️ Parameters + +
    +
    + +
    +
    + +**account_key:** `typing.Optional[str]` — Azure Blob account key + +
    +
    + +
    +
    + +**account_name:** `typing.Optional[str]` — Azure Blob account name + +
    +
    + +
    +
    + +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled + +
    +
    + +
    +
    + **container:** `typing.Optional[str]` — Azure blob container
    @@ -10185,6 +10301,22 @@ client.export_storage.azure.create()
    +**description:** `typing.Optional[str]` — Storage description + +
    +
    + +
    +
    + +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated + +
    +
    + +
    +
    + **prefix:** `typing.Optional[str]` — Azure blob prefix name
    @@ -10193,7 +10325,7 @@ client.export_storage.azure.create()
    -**account_name:** `typing.Optional[str]` — Azure Blob account name +**project:** `typing.Optional[int]` — Project ID
    @@ -10201,7 +10333,7 @@ client.export_storage.azure.create()
    -**account_key:** `typing.Optional[str]` — Azure Blob account key +**title:** `typing.Optional[str]` — Storage title
    @@ -10419,7 +10551,7 @@ client.export_storage.azure.update(
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled +**account_key:** `typing.Optional[str]` — Azure Blob account key
    @@ -10427,7 +10559,7 @@ client.export_storage.azure.update(
    -**title:** `typing.Optional[str]` — Storage title +**account_name:** `typing.Optional[str]` — Azure Blob account name
    @@ -10435,7 +10567,7 @@ client.export_storage.azure.update(
    -**description:** `typing.Optional[str]` — Storage description +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled
    @@ -10443,7 +10575,7 @@ client.export_storage.azure.update(
    -**project:** `typing.Optional[int]` — Project ID +**container:** `typing.Optional[str]` — Azure blob container
    @@ -10451,7 +10583,7 @@ client.export_storage.azure.update(
    -**container:** `typing.Optional[str]` — Azure blob container +**description:** `typing.Optional[str]` — Storage description
    @@ -10467,7 +10599,7 @@ client.export_storage.azure.update(
    -**account_name:** `typing.Optional[str]` — Azure Blob account name +**project:** `typing.Optional[int]` — Project ID
    @@ -10475,7 +10607,7 @@ client.export_storage.azure.update(
    -**account_key:** `typing.Optional[str]` — Azure Blob account key +**title:** `typing.Optional[str]` — Storage title
    @@ -10565,7 +10697,8 @@ client.export_storage.azure.sync(
    -
    client.export_storage.azure.validate(...) +## ExportStorage Gcs +
    client.export_storage.gcs.list(...)
    @@ -10577,7 +10710,7 @@ client.export_storage.azure.sync(
    -Validate a specific Azure export storage connection. +Get a list of all GCS export storage connections.
    @@ -10597,7 +10730,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.azure.validate() +client.export_storage.gcs.list() ``` @@ -10613,7 +10746,7 @@ client.export_storage.azure.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -10621,7 +10754,7 @@ client.export_storage.azure.validate()
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled +**project:** `typing.Optional[int]` — Project ID
    @@ -10629,124 +10762,115 @@ client.export_storage.azure.validate()
    -**title:** `typing.Optional[str]` — Storage title +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    - -
    -
    - -**description:** `typing.Optional[str]` — Storage description -
    -
    -
    -**project:** `typing.Optional[int]` — Project ID -
    +
    +
    client.export_storage.gcs.create(...)
    -**container:** `typing.Optional[str]` — Azure blob container - -
    -
    +#### 📝 Description
    -**prefix:** `typing.Optional[str]` — Azure blob prefix name - -
    -
    -
    -**account_name:** `typing.Optional[str]` — Azure Blob account name - +Create a new GCS export storage connection to store annotations.
    + + + +#### 🔌 Usage
    -**account_key:** `typing.Optional[str]` — Azure Blob account key - -
    -
    -
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.export_storage.gcs.create() + +```
    +#### ⚙️ Parameters - - -
    - -## ExportStorage Gcs -
    client.export_storage.gcs.list(...)
    -#### 📝 Description -
    +**bucket:** `typing.Optional[str]` — GCS bucket name + +
    +
    +
    -Get a list of all GCS export storage connections. -
    -
    +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +
    -#### 🔌 Usage -
    +**description:** `typing.Optional[str]` — Storage description + +
    +
    +
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.export_storage.gcs.list() - -``` +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. +
    + +
    +
    + +**google_project_id:** `typing.Optional[str]` — Google project ID +
    -#### ⚙️ Parameters -
    +**prefix:** `typing.Optional[str]` — GCS bucket prefix + +
    +
    +
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**project:** `typing.Optional[int]` — Project ID
    @@ -10754,7 +10878,7 @@ client.export_storage.gcs.list()
    -**project:** `typing.Optional[int]` — Project ID +**title:** `typing.Optional[str]` — Storage title
    @@ -10774,7 +10898,7 @@ client.export_storage.gcs.list()
    -
    client.export_storage.gcs.create(...) +
    client.export_storage.gcs.validate(...)
    @@ -10786,7 +10910,7 @@ client.export_storage.gcs.list()
    -Create a new GCS export storage connection to store annotations. +Validate a specific GCS export storage connection.
    @@ -10806,7 +10930,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.gcs.create() +client.export_storage.gcs.validate() ``` @@ -10822,7 +10946,7 @@ client.export_storage.gcs.create()
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**bucket:** `typing.Optional[str]` — GCS bucket name
    @@ -10830,7 +10954,7 @@ client.export_storage.gcs.create()
    -**title:** `typing.Optional[str]` — Storage title +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled.
    @@ -10846,7 +10970,7 @@ client.export_storage.gcs.create()
    -**project:** `typing.Optional[int]` — Project ID +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details.
    @@ -10854,7 +10978,15 @@ client.export_storage.gcs.create()
    -**bucket:** `typing.Optional[str]` — GCS bucket name +**google_project_id:** `typing.Optional[str]` — Google project ID + +
    +
    + +
    +
    + +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -10870,7 +11002,7 @@ client.export_storage.gcs.create()
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. +**project:** `typing.Optional[int]` — Project ID
    @@ -10878,7 +11010,7 @@ client.export_storage.gcs.create()
    -**google_project_id:** `typing.Optional[str]` — Google project ID +**title:** `typing.Optional[str]` — Storage title
    @@ -11096,7 +11228,7 @@ client.export_storage.gcs.update(
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**bucket:** `typing.Optional[str]` — GCS bucket name
    @@ -11104,7 +11236,7 @@ client.export_storage.gcs.update(
    -**title:** `typing.Optional[str]` — Storage title +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled.
    @@ -11120,7 +11252,7 @@ client.export_storage.gcs.update(
    -**project:** `typing.Optional[int]` — Project ID +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details.
    @@ -11128,7 +11260,7 @@ client.export_storage.gcs.update(
    -**bucket:** `typing.Optional[str]` — GCS bucket name +**google_project_id:** `typing.Optional[str]` — Google project ID
    @@ -11144,7 +11276,7 @@ client.export_storage.gcs.update(
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. +**project:** `typing.Optional[int]` — Project ID
    @@ -11152,7 +11284,7 @@ client.export_storage.gcs.update(
    -**google_project_id:** `typing.Optional[str]` — Google project ID +**title:** `typing.Optional[str]` — Storage title
    @@ -11242,7 +11374,8 @@ client.export_storage.gcs.sync(
    -
    client.export_storage.gcs.validate(...) +## ExportStorage Local +
    client.export_storage.local.list(...)
    @@ -11254,7 +11387,7 @@ client.export_storage.gcs.sync(
    -Validate a specific GCS export storage connection. +Get a list of all local file export storage connections.
    @@ -11274,7 +11407,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.gcs.validate() +client.export_storage.local.list() ``` @@ -11290,7 +11423,7 @@ client.export_storage.gcs.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -11298,7 +11431,7 @@ client.export_storage.gcs.validate()
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**project:** `typing.Optional[int]` — Project ID
    @@ -11306,80 +11439,59 @@ client.export_storage.gcs.validate()
    -**title:** `typing.Optional[str]` — Storage title +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    - -
    -
    - -**description:** `typing.Optional[str]` — Storage description -
    -
    -
    -**project:** `typing.Optional[int]` — Project ID -
    +
    +
    client.export_storage.local.create(...)
    -**bucket:** `typing.Optional[str]` — GCS bucket name - -
    -
    +#### 📝 Description
    -**prefix:** `typing.Optional[str]` — GCS bucket prefix - -
    -
    -
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - +Create a new local file export storage connection to store annotations. +
    +
    +#### 🔌 Usage +
    -**google_project_id:** `typing.Optional[str]` — Google project ID - -
    -
    -
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
    -
    - - +```python +from label_studio_sdk import LabelStudio +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.export_storage.local.create() +``` + + -
    - -## ExportStorage Local -
    client.export_storage.local.list(...) -
    -
    -#### 📝 Description +#### ⚙️ Parameters
    @@ -11387,43 +11499,39 @@ client.export_storage.gcs.validate()
    -Get a list of all local file export storage connections. -
    -
    +**description:** `typing.Optional[str]` — Storage description +
    -#### 🔌 Usage -
    +**path:** `typing.Optional[str]` — Path to local directory + +
    +
    +
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.export_storage.local.list() - -``` -
    -
    +**project:** `typing.Optional[int]` — Project ID +
    -#### ⚙️ Parameters -
    +**regex_filter:** `typing.Optional[str]` — Regex for filtering objects + +
    +
    +
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**title:** `typing.Optional[str]` — Storage title
    @@ -11431,7 +11539,7 @@ client.export_storage.local.list()
    -**project:** `typing.Optional[int]` — Project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -11451,7 +11559,7 @@ client.export_storage.local.list()
    -
    client.export_storage.local.create(...) +
    client.export_storage.local.validate(...)
    @@ -11463,7 +11571,7 @@ client.export_storage.local.list()
    -Create a new local file export storage connection to store annotations. +Validate a specific local file export storage connection.
    @@ -11483,7 +11591,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.local.create() +client.export_storage.local.validate() ``` @@ -11499,7 +11607,7 @@ client.export_storage.local.create()
    -**title:** `typing.Optional[str]` — Storage title +**description:** `typing.Optional[str]` — Storage description
    @@ -11507,7 +11615,7 @@ client.export_storage.local.create()
    -**description:** `typing.Optional[str]` — Storage description +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -11515,7 +11623,7 @@ client.export_storage.local.create()
    -**project:** `typing.Optional[int]` — Project ID +**path:** `typing.Optional[str]` — Path to local directory
    @@ -11523,7 +11631,7 @@ client.export_storage.local.create()
    -**path:** `typing.Optional[str]` — Path to local directory +**project:** `typing.Optional[int]` — Project ID
    @@ -11539,6 +11647,14 @@ client.export_storage.local.create()
    +**title:** `typing.Optional[str]` — Storage title + +
    +
    + +
    +
    + **use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -11757,7 +11873,7 @@ client.export_storage.local.update(
    -**title:** `typing.Optional[str]` — Storage title +**description:** `typing.Optional[str]` — Storage description
    @@ -11765,7 +11881,7 @@ client.export_storage.local.update(
    -**description:** `typing.Optional[str]` — Storage description +**path:** `typing.Optional[str]` — Path to local directory
    @@ -11781,7 +11897,7 @@ client.export_storage.local.update(
    -**path:** `typing.Optional[str]` — Path to local directory +**regex_filter:** `typing.Optional[str]` — Regex for filtering objects
    @@ -11789,7 +11905,7 @@ client.export_storage.local.update(
    -**regex_filter:** `typing.Optional[str]` — Regex for filtering objects +**title:** `typing.Optional[str]` — Storage title
    @@ -11887,7 +12003,8 @@ client.export_storage.local.sync(
    -
    client.export_storage.local.validate(...) +## ExportStorage Redis +
    client.export_storage.redis.list(...)
    @@ -11899,7 +12016,7 @@ client.export_storage.local.sync(
    -Validate a specific local file export storage connection. +Get a list of all Redis export storage connections.
    @@ -11919,7 +12036,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.local.validate() +client.export_storage.redis.list() ``` @@ -11935,7 +12052,7 @@ client.export_storage.local.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -11943,7 +12060,7 @@ client.export_storage.local.validate()
    -**title:** `typing.Optional[str]` — Storage title +**project:** `typing.Optional[int]` — Project ID
    @@ -11951,64 +12068,59 @@ client.export_storage.local.validate()
    -**description:** `typing.Optional[str]` — Storage description +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    - -
    -
    - -**project:** `typing.Optional[int]` — Project ID -
    -
    -
    -**path:** `typing.Optional[str]` — Path to local directory -
    +
    +
    client.export_storage.redis.create(...)
    -**regex_filter:** `typing.Optional[str]` — Regex for filtering objects - -
    -
    +#### 📝 Description
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - -
    -
    -
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - +Create a new Redis export storage connection to store annotations.
    +#### 🔌 Usage - - -
    +
    +
    -## ExportStorage Redis -
    client.export_storage.redis.list(...)
    -#### 📝 Description +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.export_storage.redis.create() + +``` +
    +
    +
    +
    + +#### ⚙️ Parameters
    @@ -12016,43 +12128,63 @@ client.export_storage.local.validate()
    -Get a list of all Redis export storage connections. +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +
    + +
    +
    + +**db:** `typing.Optional[int]` — Database ID of database to use +
    -#### 🔌 Usage -
    +**description:** `typing.Optional[str]` — Storage description + +
    +
    +
    -```python -from label_studio_sdk import LabelStudio +**host:** `typing.Optional[str]` — Server Host IP (optional) + +
    +
    -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.export_storage.redis.list() +
    +
    -``` +**password:** `typing.Optional[str]` — Server Password (optional) +
    + +
    +
    + +**path:** `typing.Optional[str]` — Storage prefix (optional) +
    -#### ⚙️ Parameters -
    +**port:** `typing.Optional[str]` — Server Port (optional) + +
    +
    +
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**project:** `typing.Optional[int]` — Project ID
    @@ -12060,7 +12192,7 @@ client.export_storage.redis.list()
    -**project:** `typing.Optional[int]` — Project ID +**title:** `typing.Optional[str]` — Storage title
    @@ -12080,7 +12212,7 @@ client.export_storage.redis.list()
    -
    client.export_storage.redis.create(...) +
    client.export_storage.redis.validate(...)
    @@ -12092,7 +12224,7 @@ client.export_storage.redis.list()
    -Create a new Redis export storage connection to store annotations. +Validate a specific Redis export storage connection.
    @@ -12112,7 +12244,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.redis.create() +client.export_storage.redis.validate() ``` @@ -12128,6 +12260,14 @@ client.export_storage.redis.create()
    +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. + +
    +
    + +
    +
    + **db:** `typing.Optional[int]` — Database ID of database to use
    @@ -12136,7 +12276,7 @@ client.export_storage.redis.create()
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**description:** `typing.Optional[str]` — Storage description
    @@ -12144,7 +12284,7 @@ client.export_storage.redis.create()
    -**title:** `typing.Optional[str]` — Storage title +**host:** `typing.Optional[str]` — Server Host IP (optional)
    @@ -12152,7 +12292,7 @@ client.export_storage.redis.create()
    -**description:** `typing.Optional[str]` — Storage description +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -12160,7 +12300,7 @@ client.export_storage.redis.create()
    -**project:** `typing.Optional[int]` — Project ID +**password:** `typing.Optional[str]` — Server Password (optional)
    @@ -12176,7 +12316,7 @@ client.export_storage.redis.create()
    -**host:** `typing.Optional[str]` — Server Host IP (optional) +**port:** `typing.Optional[str]` — Server Port (optional)
    @@ -12184,7 +12324,7 @@ client.export_storage.redis.create()
    -**port:** `typing.Optional[str]` — Server Port (optional) +**project:** `typing.Optional[int]` — Project ID
    @@ -12192,7 +12332,7 @@ client.export_storage.redis.create()
    -**password:** `typing.Optional[str]` — Server Password (optional) +**title:** `typing.Optional[str]` — Storage title
    @@ -12410,7 +12550,7 @@ client.export_storage.redis.update(
    -**db:** `typing.Optional[int]` — Database ID of database to use +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled.
    @@ -12418,7 +12558,7 @@ client.export_storage.redis.update(
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**db:** `typing.Optional[int]` — Database ID of database to use
    @@ -12426,7 +12566,7 @@ client.export_storage.redis.update(
    -**title:** `typing.Optional[str]` — Storage title +**description:** `typing.Optional[str]` — Storage description
    @@ -12434,7 +12574,7 @@ client.export_storage.redis.update(
    -**description:** `typing.Optional[str]` — Storage description +**host:** `typing.Optional[str]` — Server Host IP (optional)
    @@ -12442,7 +12582,7 @@ client.export_storage.redis.update(
    -**project:** `typing.Optional[int]` — Project ID +**password:** `typing.Optional[str]` — Server Password (optional)
    @@ -12458,7 +12598,7 @@ client.export_storage.redis.update(
    -**host:** `typing.Optional[str]` — Server Host IP (optional) +**port:** `typing.Optional[str]` — Server Port (optional)
    @@ -12466,7 +12606,7 @@ client.export_storage.redis.update(
    -**port:** `typing.Optional[str]` — Server Port (optional) +**project:** `typing.Optional[int]` — Project ID
    @@ -12474,7 +12614,7 @@ client.export_storage.redis.update(
    -**password:** `typing.Optional[str]` — Server Password (optional) +**title:** `typing.Optional[str]` — Storage title
    @@ -12564,7 +12704,8 @@ client.export_storage.redis.sync(
    -
    client.export_storage.redis.validate(...) +## ExportStorage S3 +
    client.export_storage.s3.list(...)
    @@ -12576,7 +12717,7 @@ client.export_storage.redis.sync(
    -Validate a specific Redis export storage connection. +Get a list of all S3 export storage connections.
    @@ -12596,7 +12737,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.redis.validate() +client.export_storage.s3.list() ``` @@ -12612,31 +12753,83 @@ client.export_storage.redis.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated - +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. + +
    +
    + +
    +
    + +**project:** `typing.Optional[int]` — Project ID + +
    +
    + +
    +
    + +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
    +
    + +
    + + + + +
    + +
    client.export_storage.s3.create(...) +
    +
    + +#### 📝 Description + +
    +
    + +
    +
    + +Create a new S3 export storage connection to store annotations. +
    +
    +
    +
    + +#### 🔌 Usage + +
    +
    + +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.export_storage.s3.create() + +```
    - -
    -
    - -**db:** `typing.Optional[int]` — Database ID of database to use -
    +#### ⚙️ Parameters +
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. - -
    -
    -
    -**title:** `typing.Optional[str]` — Storage title +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -12644,7 +12837,7 @@ client.export_storage.redis.validate()
    -**description:** `typing.Optional[str]` — Storage description +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -12652,7 +12845,7 @@ client.export_storage.redis.validate()
    -**project:** `typing.Optional[int]` — Project ID +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -12660,7 +12853,7 @@ client.export_storage.redis.validate()
    -**path:** `typing.Optional[str]` — Storage prefix (optional) +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -12668,7 +12861,7 @@ client.export_storage.redis.validate()
    -**host:** `typing.Optional[str]` — Server Host IP (optional) +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -12676,7 +12869,7 @@ client.export_storage.redis.validate()
    -**port:** `typing.Optional[str]` — Server Port (optional) +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled.
    @@ -12684,7 +12877,7 @@ client.export_storage.redis.validate()
    -**password:** `typing.Optional[str]` — Server Password (optional) +**description:** `typing.Optional[str]` — Storage description
    @@ -12692,68 +12885,31 @@ client.export_storage.redis.validate()
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    -
    -
    - - -
    -
    -
    - -## ExportStorage S3 -
    client.export_storage.s3.list(...) -
    -
    - -#### 📝 Description - -
    -
    -Get a list of all S3 export storage connections. -
    -
    +**project:** `typing.Optional[int]` — Project ID +
    -#### 🔌 Usage - -
    -
    -
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.export_storage.s3.list() - -``` -
    -
    +**region_name:** `typing.Optional[str]` — AWS Region +
    -#### ⚙️ Parameters - -
    -
    -
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -12761,7 +12917,7 @@ client.export_storage.s3.list()
    -**project:** `typing.Optional[int]` — Project ID +**title:** `typing.Optional[str]` — Storage title
    @@ -12781,7 +12937,7 @@ client.export_storage.s3.list()
    -
    client.export_storage.s3.create(...) +
    client.export_storage.s3.validate(...)
    @@ -12793,7 +12949,7 @@ client.export_storage.s3.list()
    -Create a new S3 export storage connection to store annotations. +Validate a specific S3 export storage connection.
    @@ -12813,7 +12969,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.s3.create() +client.export_storage.s3.validate() ``` @@ -12829,7 +12985,7 @@ client.export_storage.s3.create()
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -12837,7 +12993,7 @@ client.export_storage.s3.create()
    -**title:** `typing.Optional[str]` — Storage title +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -12845,7 +13001,7 @@ client.export_storage.s3.create()
    -**description:** `typing.Optional[str]` — Storage description +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -12853,7 +13009,7 @@ client.export_storage.s3.create()
    -**project:** `typing.Optional[int]` — Project ID +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -12869,7 +13025,7 @@ client.export_storage.s3.create()
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled.
    @@ -12877,7 +13033,7 @@ client.export_storage.s3.create()
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**description:** `typing.Optional[str]` — Storage description
    @@ -12885,7 +13041,7 @@ client.export_storage.s3.create()
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -12893,7 +13049,7 @@ client.export_storage.s3.create()
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -12901,7 +13057,7 @@ client.export_storage.s3.create()
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**project:** `typing.Optional[int]` — Project ID
    @@ -12925,6 +13081,14 @@ client.export_storage.s3.create()
    +**title:** `typing.Optional[str]` — Storage title + +
    +
    + +
    +
    + **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    @@ -13135,7 +13299,7 @@ client.export_storage.s3.update(
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -13143,7 +13307,7 @@ client.export_storage.s3.update(
    -**title:** `typing.Optional[str]` — Storage title +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -13151,7 +13315,7 @@ client.export_storage.s3.update(
    -**description:** `typing.Optional[str]` — Storage description +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -13159,7 +13323,7 @@ client.export_storage.s3.update(
    -**project:** `typing.Optional[int]` — Project ID +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -13175,7 +13339,7 @@ client.export_storage.s3.update(
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled.
    @@ -13183,7 +13347,7 @@ client.export_storage.s3.update(
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**description:** `typing.Optional[str]` — Storage description
    @@ -13191,7 +13355,7 @@ client.export_storage.s3.update(
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -13199,7 +13363,7 @@ client.export_storage.s3.update(
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**project:** `typing.Optional[int]` — Project ID
    @@ -13207,7 +13371,7 @@ client.export_storage.s3.update(
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -13215,7 +13379,7 @@ client.export_storage.s3.update(
    -**region_name:** `typing.Optional[str]` — AWS Region +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -13223,7 +13387,7 @@ client.export_storage.s3.update(
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**title:** `typing.Optional[str]` — Storage title
    @@ -13313,7 +13477,8 @@ client.export_storage.s3.sync(
    -
    client.export_storage.s3.validate(...) +## ExportStorage S3S +
    client.export_storage.s3s.list(...)
    @@ -13325,7 +13490,7 @@ client.export_storage.s3.sync(
    -Validate a specific S3 export storage connection. +Get a list of all S3 export storage connections that were set up with IAM role access.
    @@ -13345,7 +13510,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.s3.validate() +client.export_storage.s3s.list() ``` @@ -13361,7 +13526,7 @@ client.export_storage.s3.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -13369,7 +13534,7 @@ client.export_storage.s3.validate()
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled. +**project:** `typing.Optional[int]` — Project ID
    @@ -13377,31 +13542,70 @@ client.export_storage.s3.validate()
    -**title:** `typing.Optional[str]` — Storage title +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + +
    + + + + +
    +
    client.export_storage.s3s.create(...)
    -**description:** `typing.Optional[str]` — Storage description - +#### 📝 Description + +
    +
    + +
    +
    + +Create an S3 export storage connection with IAM role access to store annotations. +
    +
    +#### 🔌 Usage +
    -**project:** `typing.Optional[int]` — Project ID - +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.export_storage.s3s.create( + project=1, + role_arn="role_arn", +) + +``` +
    +
    +#### ⚙️ Parameters +
    -**bucket:** `typing.Optional[str]` — S3 bucket name +
    +
    + +**project:** `int` — A unique integer value identifying this project.
    @@ -13409,7 +13613,7 @@ client.export_storage.s3.validate()
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**role_arn:** `str` — AWS RoleArn
    @@ -13449,7 +13653,7 @@ client.export_storage.s3.validate()
    -**region_name:** `typing.Optional[str]` — AWS Region +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -13457,7 +13661,7 @@ client.export_storage.s3.validate()
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled
    @@ -13465,68 +13669,119 @@ client.export_storage.s3.validate()
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**description:** `typing.Optional[str]` — Cloud storage description
    + +
    +
    + +**external_id:** `typing.Optional[str]` — AWS ExternalId +
    +
    +
    +**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time +
    -
    -## ExportStorage S3S -
    client.export_storage.s3s.list(...)
    -#### 📝 Description +**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time + +
    +
    +**last_sync_job:** `typing.Optional[str]` — Last sync job ID + +
    +
    +
    -Get a list of all S3 export storage connections that were set up with IAM role access. +**legacy_auth:** `typing.Optional[bool]` + +
    +
    + +
    +
    + +**meta:** `typing.Optional[typing.Optional[typing.Any]]` + +
    +
    + +
    +
    + +**prefix:** `typing.Optional[str]` — S3 bucket prefix +
    + +
    +
    + +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects +
    -#### 🔌 Usage -
    +**region_name:** `typing.Optional[str]` — AWS Region + +
    +
    +
    -```python -from label_studio_sdk import LabelStudio +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint + +
    +
    -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.export_storage.s3s.list() +
    +
    -``` +**status:** `typing.Optional[StatusC5AEnum]` +
    + +
    +
    + +**synchronizable:** `typing.Optional[bool]` +
    -#### ⚙️ Parameters -
    +**title:** `typing.Optional[str]` — Cloud storage title + +
    +
    +
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync
    @@ -13534,7 +13789,7 @@ client.export_storage.s3s.list()
    -**project:** `typing.Optional[int]` — Project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs
    @@ -13554,7 +13809,7 @@ client.export_storage.s3s.list()
    -
    client.export_storage.s3s.create(...) +
    client.export_storage.s3s.validate(...)
    @@ -13566,7 +13821,7 @@ client.export_storage.s3s.list()
    -Create an S3 export storage connection with IAM role access to store annotations. +Validate a specific S3 export storage connection that was set up with IAM role access.
    @@ -13586,9 +13841,9 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.s3s.create( - role_arn="role_arn", +client.export_storage.s3s.validate( project=1, + role_arn="role_arn", ) ``` @@ -13605,7 +13860,7 @@ client.export_storage.s3s.create(
    -**role_arn:** `str` — AWS RoleArn +**project:** `int` — A unique integer value identifying this project.
    @@ -13613,7 +13868,7 @@ client.export_storage.s3s.create(
    -**project:** `int` — A unique integer value identifying this project. +**role_arn:** `str` — AWS RoleArn
    @@ -13621,7 +13876,7 @@ client.export_storage.s3s.create(
    -**synchronizable:** `typing.Optional[bool]` +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -13629,7 +13884,7 @@ client.export_storage.s3s.create(
    -**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -13637,7 +13892,7 @@ client.export_storage.s3s.create(
    -**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -13645,7 +13900,7 @@ client.export_storage.s3s.create(
    -**last_sync_job:** `typing.Optional[str]` — Last sync job ID +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -13653,7 +13908,7 @@ client.export_storage.s3s.create(
    -**status:** `typing.Optional[StatusC5AEnum]` +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -13661,7 +13916,7 @@ client.export_storage.s3s.create(
    -**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled
    @@ -13669,7 +13924,7 @@ client.export_storage.s3s.create(
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` +**description:** `typing.Optional[str]` — Cloud storage description
    @@ -13677,7 +13932,7 @@ client.export_storage.s3s.create(
    -**title:** `typing.Optional[str]` — Cloud storage title +**external_id:** `typing.Optional[str]` — AWS ExternalId
    @@ -13685,7 +13940,7 @@ client.export_storage.s3s.create(
    -**description:** `typing.Optional[str]` — Cloud storage description +**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time
    @@ -13693,7 +13948,7 @@ client.export_storage.s3s.create(
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled +**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time
    @@ -13701,7 +13956,7 @@ client.export_storage.s3s.create(
    -**bucket:** `typing.Optional[str]` — S3 bucket name +**last_sync_job:** `typing.Optional[str]` — Last sync job ID
    @@ -13709,7 +13964,7 @@ client.export_storage.s3s.create(
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**legacy_auth:** `typing.Optional[bool]`
    @@ -13717,7 +13972,7 @@ client.export_storage.s3s.create(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects +**meta:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -13725,7 +13980,7 @@ client.export_storage.s3s.create(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -13733,7 +13988,7 @@ client.export_storage.s3s.create(
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
    @@ -13741,7 +13996,7 @@ client.export_storage.s3s.create(
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -13749,7 +14004,7 @@ client.export_storage.s3s.create(
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -13757,7 +14012,7 @@ client.export_storage.s3s.create(
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**status:** `typing.Optional[StatusC5AEnum]`
    @@ -13765,7 +14020,7 @@ client.export_storage.s3s.create(
    -**region_name:** `typing.Optional[str]` — AWS Region +**synchronizable:** `typing.Optional[bool]`
    @@ -13773,7 +14028,7 @@ client.export_storage.s3s.create(
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**title:** `typing.Optional[str]` — Cloud storage title
    @@ -13781,7 +14036,7 @@ client.export_storage.s3s.create(
    -**external_id:** `typing.Optional[str]` — AWS ExternalId +**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync
    @@ -13789,7 +14044,7 @@ client.export_storage.s3s.create(
    -**legacy_auth:** `typing.Optional[bool]` +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs
    @@ -14007,7 +14262,7 @@ client.export_storage.s3s.update(
    -**synchronizable:** `typing.Optional[bool]` +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -14015,7 +14270,7 @@ client.export_storage.s3s.update(
    -**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -14023,7 +14278,7 @@ client.export_storage.s3s.update(
    -**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -14031,7 +14286,7 @@ client.export_storage.s3s.update(
    -**last_sync_job:** `typing.Optional[str]` — Last sync job ID +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -14039,7 +14294,7 @@ client.export_storage.s3s.update(
    -**status:** `typing.Optional[StatusC5AEnum]` +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -14047,7 +14302,7 @@ client.export_storage.s3s.update(
    -**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync +**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled
    @@ -14055,7 +14310,7 @@ client.export_storage.s3s.update(
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` +**description:** `typing.Optional[str]` — Cloud storage description
    @@ -14063,7 +14318,7 @@ client.export_storage.s3s.update(
    -**title:** `typing.Optional[str]` — Cloud storage title +**external_id:** `typing.Optional[str]` — AWS ExternalId
    @@ -14071,7 +14326,7 @@ client.export_storage.s3s.update(
    -**description:** `typing.Optional[str]` — Cloud storage description +**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time
    @@ -14079,7 +14334,7 @@ client.export_storage.s3s.update(
    -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled +**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time
    @@ -14087,7 +14342,7 @@ client.export_storage.s3s.update(
    -**bucket:** `typing.Optional[str]` — S3 bucket name +**last_sync_job:** `typing.Optional[str]` — Last sync job ID
    @@ -14095,7 +14350,7 @@ client.export_storage.s3s.update(
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**legacy_auth:** `typing.Optional[bool]`
    @@ -14103,7 +14358,7 @@ client.export_storage.s3s.update(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects +**meta:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -14111,7 +14366,7 @@ client.export_storage.s3s.update(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -14119,7 +14374,7 @@ client.export_storage.s3s.update(
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**project:** `typing.Optional[int]` — A unique integer value identifying this project.
    @@ -14127,7 +14382,7 @@ client.export_storage.s3s.update(
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
    @@ -14135,7 +14390,7 @@ client.export_storage.s3s.update(
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -14143,7 +14398,7 @@ client.export_storage.s3s.update(
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**role_arn:** `typing.Optional[str]` — AWS RoleArn
    @@ -14151,7 +14406,7 @@ client.export_storage.s3s.update(
    -**region_name:** `typing.Optional[str]` — AWS Region +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -14159,7 +14414,7 @@ client.export_storage.s3s.update(
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**status:** `typing.Optional[StatusC5AEnum]`
    @@ -14167,7 +14422,7 @@ client.export_storage.s3s.update(
    -**external_id:** `typing.Optional[str]` — AWS ExternalId +**synchronizable:** `typing.Optional[bool]`
    @@ -14175,7 +14430,7 @@ client.export_storage.s3s.update(
    -**role_arn:** `typing.Optional[str]` — AWS RoleArn +**title:** `typing.Optional[str]` — Cloud storage title
    @@ -14183,7 +14438,7 @@ client.export_storage.s3s.update(
    -**legacy_auth:** `typing.Optional[bool]` +**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync
    @@ -14191,7 +14446,7 @@ client.export_storage.s3s.update(
    -**project:** `typing.Optional[int]` — A unique integer value identifying this project. +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs
    @@ -14281,7 +14536,8 @@ client.export_storage.s3s.sync(
    -
    client.export_storage.s3s.validate(...) +## ImportStorage Azure +
    client.import_storage.azure.list(...)
    @@ -14293,7 +14549,7 @@ client.export_storage.s3s.sync(
    -Validate a specific S3 export storage connection that was set up with IAM role access. +Get list of all Azure import storage connections.
    @@ -14313,10 +14569,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.export_storage.s3s.validate( - role_arn="role_arn", - project=1, -) +client.import_storage.azure.list() ``` @@ -14332,31 +14585,7 @@ client.export_storage.s3s.validate(
    -**role_arn:** `str` — AWS RoleArn - -
    -
    - -
    -
    - -**project:** `int` — A unique integer value identifying this project. - -
    -
    - -
    -
    - -**synchronizable:** `typing.Optional[bool]` - -
    -
    - -
    -
    - -**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -14364,7 +14593,7 @@ client.export_storage.s3s.validate(
    -**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time +**project:** `typing.Optional[int]` — Project ID
    @@ -14372,119 +14601,67 @@ client.export_storage.s3s.validate(
    -**last_sync_job:** `typing.Optional[str]` — Last sync job ID +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    - -
    -
    - -**status:** `typing.Optional[StatusC5AEnum]` -
    -
    -
    -**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync -
    +
    +
    client.import_storage.azure.create(...)
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` - -
    -
    +#### 📝 Description
    -**title:** `typing.Optional[str]` — Cloud storage title - -
    -
    -
    -**description:** `typing.Optional[str]` — Cloud storage description - +Create new Azure import storage
    - -
    -
    - -**can_delete_objects:** `typing.Optional[bool]` — Deletion from storage enabled -
    -
    -
    - -**bucket:** `typing.Optional[str]` — S3 bucket name - -
    -
    +#### 🔌 Usage
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix - -
    -
    -
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects - -
    -
    +```python +from label_studio_sdk import LabelStudio -
    -
    +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.import_storage.azure.create() -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs - +```
    - -
    -
    - -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID -
    -
    -
    - -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY - -
    -
    +#### ⚙️ Parameters
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN - -
    -
    -
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**account_key:** `typing.Optional[str]` — Azure Blob account key
    @@ -14492,7 +14669,7 @@ client.export_storage.s3s.validate(
    -**region_name:** `typing.Optional[str]` — AWS Region +**account_name:** `typing.Optional[str]` — Azure Blob account name
    @@ -14500,7 +14677,7 @@ client.export_storage.s3s.validate(
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**container:** `typing.Optional[str]` — Azure blob container
    @@ -14508,7 +14685,7 @@ client.export_storage.s3s.validate(
    -**external_id:** `typing.Optional[str]` — AWS ExternalId +**description:** `typing.Optional[str]` — Storage description
    @@ -14516,7 +14693,7 @@ client.export_storage.s3s.validate(
    -**legacy_auth:** `typing.Optional[bool]` +**prefix:** `typing.Optional[str]` — Azure blob prefix name
    @@ -14524,68 +14701,39 @@ client.export_storage.s3s.validate(
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**presign:** `typing.Optional[bool]` — Presign URLs for direct download
    - - - - - - -
    -## ImportStorage Azure -
    client.import_storage.azure.list(...)
    -#### 📝 Description - -
    -
    +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes + +
    +
    -Get list of all Azure import storage connections. -
    -
    +**project:** `typing.Optional[int]` — Project ID +
    -#### 🔌 Usage - -
    -
    -
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.azure.list() - -``` -
    -
    +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +
    -#### ⚙️ Parameters - -
    -
    -
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**title:** `typing.Optional[str]` — Storage title
    @@ -14593,7 +14741,7 @@ client.import_storage.azure.list()
    -**project:** `typing.Optional[int]` — Project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -14613,7 +14761,7 @@ client.import_storage.azure.list()
    -
    client.import_storage.azure.create(...) +
    client.import_storage.azure.validate(...)
    @@ -14625,7 +14773,7 @@ client.import_storage.azure.list()
    -Create new Azure import storage +Validate a specific Azure import storage connection.
    @@ -14645,7 +14793,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.azure.create() +client.import_storage.azure.validate() ``` @@ -14661,7 +14809,7 @@ client.import_storage.azure.create()
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**account_key:** `typing.Optional[str]` — Azure Blob account key
    @@ -14669,7 +14817,7 @@ client.import_storage.azure.create()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**account_name:** `typing.Optional[str]` — Azure Blob account name
    @@ -14677,7 +14825,7 @@ client.import_storage.azure.create()
    -**presign:** `typing.Optional[bool]` — Presign URLs for direct download +**container:** `typing.Optional[str]` — Azure blob container
    @@ -14685,7 +14833,7 @@ client.import_storage.azure.create()
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes +**description:** `typing.Optional[str]` — Storage description
    @@ -14693,7 +14841,7 @@ client.import_storage.azure.create()
    -**title:** `typing.Optional[str]` — Storage title +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -14701,7 +14849,7 @@ client.import_storage.azure.create()
    -**description:** `typing.Optional[str]` — Storage description +**prefix:** `typing.Optional[str]` — Azure blob prefix name
    @@ -14709,7 +14857,7 @@ client.import_storage.azure.create()
    -**project:** `typing.Optional[int]` — Project ID +**presign:** `typing.Optional[bool]` — Presign URLs for direct download
    @@ -14717,7 +14865,7 @@ client.import_storage.azure.create()
    -**container:** `typing.Optional[str]` — Azure blob container +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes
    @@ -14725,7 +14873,7 @@ client.import_storage.azure.create()
    -**prefix:** `typing.Optional[str]` — Azure blob prefix name +**project:** `typing.Optional[int]` — Project ID
    @@ -14733,7 +14881,7 @@ client.import_storage.azure.create()
    -**account_name:** `typing.Optional[str]` — Azure Blob account name +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -14741,7 +14889,15 @@ client.import_storage.azure.create()
    -**account_key:** `typing.Optional[str]` — Azure Blob account key +**title:** `typing.Optional[str]` — Storage title + +
    +
    + +
    +
    + +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -14959,7 +15115,7 @@ client.import_storage.azure.update(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**account_key:** `typing.Optional[str]` — Azure Blob account key
    @@ -14967,7 +15123,7 @@ client.import_storage.azure.update(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**account_name:** `typing.Optional[str]` — Azure Blob account name
    @@ -14975,7 +15131,7 @@ client.import_storage.azure.update(
    -**presign:** `typing.Optional[bool]` — Presign URLs for direct download +**container:** `typing.Optional[str]` — Azure blob container
    @@ -14983,7 +15139,7 @@ client.import_storage.azure.update(
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes +**description:** `typing.Optional[str]` — Storage description
    @@ -14991,7 +15147,7 @@ client.import_storage.azure.update(
    -**title:** `typing.Optional[str]` — Storage title +**prefix:** `typing.Optional[str]` — Azure blob prefix name
    @@ -14999,7 +15155,7 @@ client.import_storage.azure.update(
    -**description:** `typing.Optional[str]` — Storage description +**presign:** `typing.Optional[bool]` — Presign URLs for direct download
    @@ -15007,7 +15163,7 @@ client.import_storage.azure.update(
    -**project:** `typing.Optional[int]` — Project ID +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes
    @@ -15015,7 +15171,7 @@ client.import_storage.azure.update(
    -**container:** `typing.Optional[str]` — Azure blob container +**project:** `typing.Optional[int]` — Project ID
    @@ -15023,7 +15179,7 @@ client.import_storage.azure.update(
    -**prefix:** `typing.Optional[str]` — Azure blob prefix name +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -15031,7 +15187,7 @@ client.import_storage.azure.update(
    -**account_name:** `typing.Optional[str]` — Azure Blob account name +**title:** `typing.Optional[str]` — Storage title
    @@ -15039,7 +15195,7 @@ client.import_storage.azure.update(
    -**account_key:** `typing.Optional[str]` — Azure Blob account key +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -15129,7 +15285,8 @@ client.import_storage.azure.sync(
    -
    client.import_storage.azure.validate(...) +## ImportStorage Gcs +
    client.import_storage.gcs.list(...)
    @@ -15141,7 +15298,7 @@ client.import_storage.azure.sync(
    -Validate a specific Azure import storage connection. +Get a list of all GCS import storage connections.
    @@ -15161,7 +15318,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.azure.validate() +client.import_storage.gcs.list() ``` @@ -15177,7 +15334,7 @@ client.import_storage.azure.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -15185,7 +15342,7 @@ client.import_storage.azure.validate()
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**project:** `typing.Optional[int]` — Project ID
    @@ -15193,55 +15350,67 @@ client.import_storage.azure.validate()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + +
    -
    -
    -**presign:** `typing.Optional[bool]` — Presign URLs for direct download -
    +
    +
    client.import_storage.gcs.create(...)
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes - -
    -
    +#### 📝 Description
    -**title:** `typing.Optional[str]` — Storage title - -
    -
    -
    -**description:** `typing.Optional[str]` — Storage description - +Create a new GCS import storage connection. +
    +
    +#### 🔌 Usage +
    -**project:** `typing.Optional[int]` — Project ID - +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.import_storage.gcs.create() + +```
    +
    +
    + +#### ⚙️ Parameters
    -**container:** `typing.Optional[str]` — Azure blob container +
    +
    + +**bucket:** `typing.Optional[str]` — GCS bucket name
    @@ -15249,7 +15418,7 @@ client.import_storage.azure.validate()
    -**prefix:** `typing.Optional[str]` — Azure blob prefix name +**description:** `typing.Optional[str]` — Storage description
    @@ -15257,7 +15426,7 @@ client.import_storage.azure.validate()
    -**account_name:** `typing.Optional[str]` — Azure Blob account name +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details.
    @@ -15265,7 +15434,7 @@ client.import_storage.azure.validate()
    -**account_key:** `typing.Optional[str]` — Azure Blob account key +**google_project_id:** `typing.Optional[str]` — Google project ID
    @@ -15273,68 +15442,47 @@ client.import_storage.azure.validate()
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**prefix:** `typing.Optional[str]` — GCS bucket prefix
    -
    -
    +
    +
    +**presign:** `typing.Optional[bool]` — Presign URLs for direct download +
    -
    -## ImportStorage Gcs -
    client.import_storage.gcs.list(...)
    -#### 📝 Description - -
    -
    +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes + +
    +
    -Get a list of all GCS import storage connections. -
    -
    +**project:** `typing.Optional[int]` — Project ID +
    -#### 🔌 Usage - -
    -
    -
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.gcs.list() - -``` -
    -
    +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +
    -#### ⚙️ Parameters - -
    -
    -
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**title:** `typing.Optional[str]` — Storage title
    @@ -15342,7 +15490,7 @@ client.import_storage.gcs.list()
    -**project:** `typing.Optional[int]` — Project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -15362,7 +15510,7 @@ client.import_storage.gcs.list()
    -
    client.import_storage.gcs.create(...) +
    client.import_storage.gcs.validate(...)
    @@ -15374,7 +15522,7 @@ client.import_storage.gcs.list()
    -Create a new GCS import storage connection. +Validate a specific GCS import storage connection.
    @@ -15394,7 +15542,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.gcs.create() +client.import_storage.gcs.validate() ``` @@ -15410,7 +15558,15 @@ client.import_storage.gcs.create()
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**bucket:** `typing.Optional[str]` — GCS bucket name + +
    +
    + +
    +
    + +**description:** `typing.Optional[str]` — Storage description
    @@ -15418,7 +15574,7 @@ client.import_storage.gcs.create()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details.
    @@ -15426,7 +15582,7 @@ client.import_storage.gcs.create()
    -**presign:** `typing.Optional[bool]` — Presign URLs for direct download +**google_project_id:** `typing.Optional[str]` — Google project ID
    @@ -15434,7 +15590,7 @@ client.import_storage.gcs.create()
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -15442,7 +15598,7 @@ client.import_storage.gcs.create()
    -**title:** `typing.Optional[str]` — Storage title +**prefix:** `typing.Optional[str]` — GCS bucket prefix
    @@ -15450,7 +15606,7 @@ client.import_storage.gcs.create()
    -**description:** `typing.Optional[str]` — Storage description +**presign:** `typing.Optional[bool]` — Presign URLs for direct download
    @@ -15458,7 +15614,7 @@ client.import_storage.gcs.create()
    -**project:** `typing.Optional[int]` — Project ID +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes
    @@ -15466,7 +15622,7 @@ client.import_storage.gcs.create()
    -**bucket:** `typing.Optional[str]` — GCS bucket name +**project:** `typing.Optional[int]` — Project ID
    @@ -15474,7 +15630,7 @@ client.import_storage.gcs.create()
    -**prefix:** `typing.Optional[str]` — GCS bucket prefix +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -15482,7 +15638,7 @@ client.import_storage.gcs.create()
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. +**title:** `typing.Optional[str]` — Storage title
    @@ -15490,7 +15646,7 @@ client.import_storage.gcs.create()
    -**google_project_id:** `typing.Optional[str]` — Google project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -15708,7 +15864,7 @@ client.import_storage.gcs.update(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**bucket:** `typing.Optional[str]` — GCS bucket name
    @@ -15716,7 +15872,7 @@ client.import_storage.gcs.update(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**description:** `typing.Optional[str]` — Storage description
    @@ -15724,7 +15880,7 @@ client.import_storage.gcs.update(
    -**presign:** `typing.Optional[bool]` — Presign URLs for direct download +**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details.
    @@ -15732,7 +15888,7 @@ client.import_storage.gcs.update(
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes +**google_project_id:** `typing.Optional[str]` — Google project ID
    @@ -15740,7 +15896,7 @@ client.import_storage.gcs.update(
    -**title:** `typing.Optional[str]` — Storage title +**prefix:** `typing.Optional[str]` — GCS bucket prefix
    @@ -15748,7 +15904,7 @@ client.import_storage.gcs.update(
    -**description:** `typing.Optional[str]` — Storage description +**presign:** `typing.Optional[bool]` — Presign URLs for direct download
    @@ -15756,7 +15912,7 @@ client.import_storage.gcs.update(
    -**project:** `typing.Optional[int]` — Project ID +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes
    @@ -15764,7 +15920,7 @@ client.import_storage.gcs.update(
    -**bucket:** `typing.Optional[str]` — GCS bucket name +**project:** `typing.Optional[int]` — Project ID
    @@ -15772,7 +15928,7 @@ client.import_storage.gcs.update(
    -**prefix:** `typing.Optional[str]` — GCS bucket prefix +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -15780,7 +15936,7 @@ client.import_storage.gcs.update(
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. +**title:** `typing.Optional[str]` — Storage title
    @@ -15788,7 +15944,7 @@ client.import_storage.gcs.update(
    -**google_project_id:** `typing.Optional[str]` — Google project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -15878,7 +16034,8 @@ client.import_storage.gcs.sync(
    -
    client.import_storage.gcs.validate(...) +## ImportStorage Local +
    client.import_storage.local.list(...)
    @@ -15890,7 +16047,7 @@ client.import_storage.gcs.sync(
    -Validate a specific GCS import storage connection. +Get a list of all local file import storage connections.
    @@ -15910,7 +16067,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.gcs.validate() +client.import_storage.local.list() ``` @@ -15926,7 +16083,7 @@ client.import_storage.gcs.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -15934,7 +16091,7 @@ client.import_storage.gcs.validate()
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**project:** `typing.Optional[int]` — Project ID
    @@ -15942,104 +16099,59 @@ client.import_storage.gcs.validate()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    - -
    -
    - -**presign:** `typing.Optional[bool]` — Presign URLs for direct download -
    -
    -
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes -
    +
    +
    client.import_storage.local.create(...)
    -**title:** `typing.Optional[str]` — Storage title - -
    -
    +#### 📝 Description
    -**description:** `typing.Optional[str]` — Storage description - -
    -
    -
    -**project:** `typing.Optional[int]` — Project ID - +Create a new local file import storage connection.
    - -
    -
    - -**bucket:** `typing.Optional[str]` — GCS bucket name -
    -
    -
    - -**prefix:** `typing.Optional[str]` — GCS bucket prefix - -
    -
    +#### 🔌 Usage
    -**google_application_credentials:** `typing.Optional[str]` — The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - -
    -
    -
    -**google_project_id:** `typing.Optional[str]` — Google project ID - -
    -
    +```python +from label_studio_sdk import LabelStudio -
    -
    +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.import_storage.local.create() -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
    -
    +``` - - -
    - -## ImportStorage Local -
    client.import_storage.local.list(...) -
    -
    -#### 📝 Description +#### ⚙️ Parameters
    @@ -16047,43 +16159,39 @@ client.import_storage.gcs.validate()
    -Get a list of all local file import storage connections. -
    -
    +**description:** `typing.Optional[str]` — Storage description +
    -#### 🔌 Usage -
    +**path:** `typing.Optional[str]` — Path to local directory + +
    +
    +
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.local.list() - -``` -
    -
    +**project:** `typing.Optional[int]` — Project ID +
    -#### ⚙️ Parameters -
    +**regex_filter:** `typing.Optional[str]` — Regex for filtering objects + +
    +
    +
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**title:** `typing.Optional[str]` — Storage title
    @@ -16091,7 +16199,7 @@ client.import_storage.local.list()
    -**project:** `typing.Optional[int]` — Project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -16111,7 +16219,7 @@ client.import_storage.local.list()
    -
    client.import_storage.local.create(...) +
    client.import_storage.local.validate(...)
    @@ -16123,7 +16231,7 @@ client.import_storage.local.list()
    -Create a new local file import storage connection. +Validate a specific local file import storage connection.
    @@ -16143,7 +16251,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.local.create() +client.import_storage.local.validate() ``` @@ -16159,7 +16267,7 @@ client.import_storage.local.create()
    -**title:** `typing.Optional[str]` — Storage title +**description:** `typing.Optional[str]` — Storage description
    @@ -16167,7 +16275,7 @@ client.import_storage.local.create()
    -**description:** `typing.Optional[str]` — Storage description +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -16175,7 +16283,7 @@ client.import_storage.local.create()
    -**project:** `typing.Optional[int]` — Project ID +**path:** `typing.Optional[str]` — Path to local directory
    @@ -16183,7 +16291,7 @@ client.import_storage.local.create()
    -**path:** `typing.Optional[str]` — Path to local directory +**project:** `typing.Optional[int]` — Project ID
    @@ -16199,6 +16307,14 @@ client.import_storage.local.create()
    +**title:** `typing.Optional[str]` — Storage title + +
    +
    + +
    +
    + **use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -16417,7 +16533,7 @@ client.import_storage.local.update(
    -**title:** `typing.Optional[str]` — Storage title +**description:** `typing.Optional[str]` — Storage description
    @@ -16425,7 +16541,7 @@ client.import_storage.local.update(
    -**description:** `typing.Optional[str]` — Storage description +**path:** `typing.Optional[str]` — Path to local directory
    @@ -16441,7 +16557,7 @@ client.import_storage.local.update(
    -**path:** `typing.Optional[str]` — Path to local directory +**regex_filter:** `typing.Optional[str]` — Regex for filtering objects
    @@ -16449,7 +16565,7 @@ client.import_storage.local.update(
    -**regex_filter:** `typing.Optional[str]` — Regex for filtering objects +**title:** `typing.Optional[str]` — Storage title
    @@ -16547,7 +16663,8 @@ client.import_storage.local.sync(
    -
    client.import_storage.local.validate(...) +## ImportStorage Redis +
    client.import_storage.redis.list(...)
    @@ -16559,7 +16676,7 @@ client.import_storage.local.sync(
    -Validate a specific local file import storage connection. +Get a list of all Redis import storage connections.
    @@ -16579,7 +16696,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.local.validate() +client.import_storage.redis.list() ``` @@ -16595,7 +16712,7 @@ client.import_storage.local.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -16603,7 +16720,7 @@ client.import_storage.local.validate()
    -**title:** `typing.Optional[str]` — Storage title +**project:** `typing.Optional[int]` — Project ID
    @@ -16611,23 +16728,67 @@ client.import_storage.local.validate()
    -**description:** `typing.Optional[str]` — Storage description +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + +
    + + + + +
    + +
    client.import_storage.redis.create(...) +
    +
    + +#### 📝 Description + +
    +
    + +
    +
    + +Create a new Redis import storage connection. +
    +
    +
    +
    + +#### 🔌 Usage + +
    +
    + +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.import_storage.redis.create() + +``` +
    +
    +
    +
    + +#### ⚙️ Parameters
    -**project:** `typing.Optional[int]` — Project ID - -
    -
    -
    -**path:** `typing.Optional[str]` — Path to local directory +**description:** `typing.Optional[str]` — Storage description
    @@ -16635,7 +16796,7 @@ client.import_storage.local.validate()
    -**regex_filter:** `typing.Optional[str]` — Regex for filtering objects +**host:** `typing.Optional[str]` — Server Host IP (optional)
    @@ -16643,7 +16804,7 @@ client.import_storage.local.validate()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**password:** `typing.Optional[str]` — Server Password (optional)
    @@ -16651,68 +16812,39 @@ client.import_storage.local.validate()
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**path:** `typing.Optional[str]` — Storage prefix (optional)
    -
    -
    - - - - -
    -## ImportStorage Redis -
    client.import_storage.redis.list(...)
    -#### 📝 Description - -
    -
    +**port:** `typing.Optional[str]` — Server Port (optional) + +
    +
    -Get a list of all Redis import storage connections. -
    -
    +**project:** `typing.Optional[int]` — Project ID +
    -#### 🔌 Usage - -
    -
    -
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.redis.list() - -``` -
    -
    +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +
    -#### ⚙️ Parameters - -
    -
    -
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**title:** `typing.Optional[str]` — Storage title
    @@ -16720,7 +16852,7 @@ client.import_storage.redis.list()
    -**project:** `typing.Optional[int]` — Project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -16740,7 +16872,7 @@ client.import_storage.redis.list()
    -
    client.import_storage.redis.create(...) +
    client.import_storage.redis.validate(...)
    @@ -16752,7 +16884,7 @@ client.import_storage.redis.list()
    -Create a new Redis import storage connection. +Validate a specific Redis import storage connection.
    @@ -16772,7 +16904,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.redis.create() +client.import_storage.redis.validate() ``` @@ -16788,7 +16920,7 @@ client.import_storage.redis.create()
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**description:** `typing.Optional[str]` — Storage description
    @@ -16796,7 +16928,7 @@ client.import_storage.redis.create()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**host:** `typing.Optional[str]` — Server Host IP (optional)
    @@ -16804,7 +16936,7 @@ client.import_storage.redis.create()
    -**title:** `typing.Optional[str]` — Storage title +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -16812,7 +16944,7 @@ client.import_storage.redis.create()
    -**description:** `typing.Optional[str]` — Storage description +**password:** `typing.Optional[str]` — Server Password (optional)
    @@ -16820,7 +16952,7 @@ client.import_storage.redis.create()
    -**project:** `typing.Optional[int]` — Project ID +**path:** `typing.Optional[str]` — Storage prefix (optional)
    @@ -16828,7 +16960,7 @@ client.import_storage.redis.create()
    -**path:** `typing.Optional[str]` — Storage prefix (optional) +**port:** `typing.Optional[str]` — Server Port (optional)
    @@ -16836,7 +16968,7 @@ client.import_storage.redis.create()
    -**host:** `typing.Optional[str]` — Server Host IP (optional) +**project:** `typing.Optional[int]` — Project ID
    @@ -16844,7 +16976,7 @@ client.import_storage.redis.create()
    -**port:** `typing.Optional[str]` — Server Port (optional) +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -16852,7 +16984,15 @@ client.import_storage.redis.create()
    -**password:** `typing.Optional[str]` — Server Password (optional) +**title:** `typing.Optional[str]` — Storage title + +
    +
    + +
    +
    + +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -17070,7 +17210,7 @@ client.import_storage.redis.update(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**description:** `typing.Optional[str]` — Storage description
    @@ -17078,7 +17218,7 @@ client.import_storage.redis.update(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**host:** `typing.Optional[str]` — Server Host IP (optional)
    @@ -17086,7 +17226,7 @@ client.import_storage.redis.update(
    -**title:** `typing.Optional[str]` — Storage title +**password:** `typing.Optional[str]` — Server Password (optional)
    @@ -17094,7 +17234,7 @@ client.import_storage.redis.update(
    -**description:** `typing.Optional[str]` — Storage description +**path:** `typing.Optional[str]` — Storage prefix (optional)
    @@ -17102,7 +17242,7 @@ client.import_storage.redis.update(
    -**project:** `typing.Optional[int]` — Project ID +**port:** `typing.Optional[str]` — Server Port (optional)
    @@ -17110,7 +17250,7 @@ client.import_storage.redis.update(
    -**path:** `typing.Optional[str]` — Storage prefix (optional) +**project:** `typing.Optional[int]` — Project ID
    @@ -17118,7 +17258,7 @@ client.import_storage.redis.update(
    -**host:** `typing.Optional[str]` — Server Host IP (optional) +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -17126,7 +17266,7 @@ client.import_storage.redis.update(
    -**port:** `typing.Optional[str]` — Server Port (optional) +**title:** `typing.Optional[str]` — Storage title
    @@ -17134,7 +17274,7 @@ client.import_storage.redis.update(
    -**password:** `typing.Optional[str]` — Server Password (optional) +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -17224,7 +17364,8 @@ client.import_storage.redis.sync(
    -
    client.import_storage.redis.validate(...) +## ImportStorage S3 +
    client.import_storage.s3.list(...)
    @@ -17236,7 +17377,7 @@ client.import_storage.redis.sync(
    -Validate a specific Redis import storage connection. +Get a list of all S3 import storage connections.
    @@ -17256,7 +17397,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.redis.validate() +client.import_storage.s3.list() ``` @@ -17272,7 +17413,7 @@ client.import_storage.redis.validate()
    -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated +**ordering:** `typing.Optional[str]` — Which field to use when ordering the results.
    @@ -17280,7 +17421,7 @@ client.import_storage.redis.validate()
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**project:** `typing.Optional[int]` — Project ID
    @@ -17288,31 +17429,67 @@ client.import_storage.redis.validate()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + +
    + + + + +
    +
    client.import_storage.s3.create(...)
    -**title:** `typing.Optional[str]` — Storage title - +#### 📝 Description + +
    +
    + +
    +
    + +Create new S3 import storage
    +
    +
    + +#### 🔌 Usage
    -**description:** `typing.Optional[str]` — Storage description - +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.import_storage.s3.create() + +``` +
    +
    +#### ⚙️ Parameters +
    -**project:** `typing.Optional[int]` — Project ID +
    +
    + +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -17320,7 +17497,7 @@ client.import_storage.redis.validate()
    -**path:** `typing.Optional[str]` — Storage prefix (optional) +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -17328,7 +17505,7 @@ client.import_storage.redis.validate()
    -**host:** `typing.Optional[str]` — Server Host IP (optional) +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -17336,7 +17513,7 @@ client.import_storage.redis.validate()
    -**port:** `typing.Optional[str]` — Server Port (optional) +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -17344,7 +17521,7 @@ client.import_storage.redis.validate()
    -**password:** `typing.Optional[str]` — Server Password (optional) +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -17352,68 +17529,79 @@ client.import_storage.redis.validate()
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**description:** `typing.Optional[str]` — Storage description
    -
    -
    +
    +
    +**prefix:** `typing.Optional[str]` — S3 bucket prefix +
    -
    -## ImportStorage S3 -
    client.import_storage.s3.list(...)
    -#### 📝 Description +**presign:** `typing.Optional[bool]` — Presign URLs for download + +
    +
    +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes + +
    +
    +
    -Get a list of all S3 import storage connections. -
    -
    +**project:** `typing.Optional[int]` — Project ID + -#### 🔌 Usage -
    +**recursive_scan:** `typing.Optional[bool]` — Scan recursively + +
    +
    +
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.s3.list() - -``` +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +
    + +
    +
    + +**region_name:** `typing.Optional[str]` — AWS Region +
    -#### ⚙️ Parameters -
    +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint + +
    +
    +
    -**ordering:** `typing.Optional[str]` — Which field to use when ordering the results. +**title:** `typing.Optional[str]` — Storage title
    @@ -17421,7 +17609,7 @@ client.import_storage.s3.list()
    -**project:** `typing.Optional[int]` — Project ID +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -17441,7 +17629,7 @@ client.import_storage.s3.list()
    -
    client.import_storage.s3.create(...) +
    client.import_storage.s3.validate(...)
    @@ -17453,7 +17641,7 @@ client.import_storage.s3.list()
    -Create new S3 import storage +Validate a specific S3 import storage connection.
    @@ -17473,7 +17661,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.s3.create() +client.import_storage.s3.validate() ``` @@ -17489,7 +17677,15 @@ client.import_storage.s3.create()
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID + +
    +
    + +
    +
    + +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -17497,7 +17693,7 @@ client.import_storage.s3.create()
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -17505,7 +17701,7 @@ client.import_storage.s3.create()
    -**presign:** `typing.Optional[bool]` — Presign URLs for download +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -17513,7 +17709,7 @@ client.import_storage.s3.create()
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -17521,7 +17717,7 @@ client.import_storage.s3.create()
    -**recursive_scan:** `typing.Optional[bool]` — Scan recursively +**description:** `typing.Optional[str]` — Storage description
    @@ -17529,7 +17725,7 @@ client.import_storage.s3.create()
    -**title:** `typing.Optional[str]` — Storage title +**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated
    @@ -17537,7 +17733,7 @@ client.import_storage.s3.create()
    -**description:** `typing.Optional[str]` — Storage description +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -17545,7 +17741,7 @@ client.import_storage.s3.create()
    -**project:** `typing.Optional[int]` — Project ID +**presign:** `typing.Optional[bool]` — Presign URLs for download
    @@ -17553,7 +17749,7 @@ client.import_storage.s3.create()
    -**bucket:** `typing.Optional[str]` — S3 bucket name +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes
    @@ -17561,7 +17757,7 @@ client.import_storage.s3.create()
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**project:** `typing.Optional[int]` — Project ID
    @@ -17569,7 +17765,7 @@ client.import_storage.s3.create()
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**recursive_scan:** `typing.Optional[bool]` — Scan recursively
    @@ -17577,7 +17773,7 @@ client.import_storage.s3.create()
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -17585,7 +17781,7 @@ client.import_storage.s3.create()
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -17593,7 +17789,7 @@ client.import_storage.s3.create()
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -17601,7 +17797,7 @@ client.import_storage.s3.create()
    -**region_name:** `typing.Optional[str]` — AWS Region +**title:** `typing.Optional[str]` — Storage title
    @@ -17609,7 +17805,7 @@ client.import_storage.s3.create()
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -17827,7 +18023,7 @@ client.import_storage.s3.update(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -17835,7 +18031,7 @@ client.import_storage.s3.update(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -17843,7 +18039,7 @@ client.import_storage.s3.update(
    -**presign:** `typing.Optional[bool]` — Presign URLs for download +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -17851,7 +18047,7 @@ client.import_storage.s3.update(
    -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -17859,7 +18055,7 @@ client.import_storage.s3.update(
    -**recursive_scan:** `typing.Optional[bool]` — Scan recursively +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -17867,7 +18063,7 @@ client.import_storage.s3.update(
    -**title:** `typing.Optional[str]` — Storage title +**description:** `typing.Optional[str]` — Storage description
    @@ -17875,7 +18071,7 @@ client.import_storage.s3.update(
    -**description:** `typing.Optional[str]` — Storage description +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -17883,7 +18079,7 @@ client.import_storage.s3.update(
    -**project:** `typing.Optional[int]` — Project ID +**presign:** `typing.Optional[bool]` — Presign URLs for download
    @@ -17891,7 +18087,7 @@ client.import_storage.s3.update(
    -**bucket:** `typing.Optional[str]` — S3 bucket name +**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes
    @@ -17899,7 +18095,7 @@ client.import_storage.s3.update(
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**project:** `typing.Optional[int]` — Project ID
    @@ -17907,7 +18103,7 @@ client.import_storage.s3.update(
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**recursive_scan:** `typing.Optional[bool]` — Scan recursively
    @@ -17915,7 +18111,7 @@ client.import_storage.s3.update(
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported.
    @@ -17923,7 +18119,7 @@ client.import_storage.s3.update(
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -17931,7 +18127,7 @@ client.import_storage.s3.update(
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -17939,7 +18135,7 @@ client.import_storage.s3.update(
    -**region_name:** `typing.Optional[str]` — AWS Region +**title:** `typing.Optional[str]` — Storage title
    @@ -17947,7 +18143,7 @@ client.import_storage.s3.update(
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio.
    @@ -18003,217 +18199,21 @@ client.import_storage.s3.sync( id=1, ) -``` - -
    - - - -#### ⚙️ Parameters - -
    -
    - -
    -
    - -**id:** `int` — Storage ID - -
    -
    - -
    -
    - -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
    -
    -
    -
    - - - - -
    - -
    client.import_storage.s3.validate(...) -
    -
    - -#### 📝 Description - -
    -
    - -
    -
    - -Validate a specific S3 import storage connection. -
    -
    -
    -
    - -#### 🔌 Usage - -
    -
    - -
    -
    - -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.s3.validate() - -``` -
    -
    -
    -
    - -#### ⚙️ Parameters - -
    -
    - -
    -
    - -**id:** `typing.Optional[int]` — Storage ID. If set, storage with specified ID will be updated - -
    -
    - -
    -
    - -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - -
    -
    - -
    -
    - -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - -
    -
    - -
    -
    - -**presign:** `typing.Optional[bool]` — Presign URLs for download - -
    -
    - -
    -
    - -**presign_ttl:** `typing.Optional[int]` — Presign TTL in minutes - -
    -
    - -
    -
    - -**recursive_scan:** `typing.Optional[bool]` — Scan recursively - -
    -
    - -
    -
    - -**title:** `typing.Optional[str]` — Storage title - -
    -
    - -
    -
    - -**description:** `typing.Optional[str]` — Storage description - -
    -
    - -
    -
    - -**project:** `typing.Optional[int]` — Project ID - -
    -
    - -
    -
    - -**bucket:** `typing.Optional[str]` — S3 bucket name - -
    -
    - -
    -
    - -**prefix:** `typing.Optional[str]` — S3 bucket prefix - -
    -
    - -
    -
    - -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID - -
    -
    - -
    -
    - -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY - -
    -
    - -
    -
    - -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN - -
    -
    - -
    -
    - -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID - +``` +
    +
    +#### ⚙️ Parameters +
    -**region_name:** `typing.Optional[str]` — AWS Region - -
    -
    -
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**id:** `int` — Storage ID
    @@ -18343,8 +18343,8 @@ client = LabelStudio( api_key="YOUR_API_KEY", ) client.import_storage.s3s.create( - role_arn="role_arn", project=1, + role_arn="role_arn", ) ``` @@ -18361,7 +18361,7 @@ client.import_storage.s3s.create(
    -**role_arn:** `str` — AWS RoleArn +**project:** `int` — A unique integer value identifying this project.
    @@ -18369,7 +18369,7 @@ client.import_storage.s3s.create(
    -**project:** `int` — A unique integer value identifying this project. +**role_arn:** `str` — AWS RoleArn
    @@ -18377,7 +18377,7 @@ client.import_storage.s3s.create(
    -**synchronizable:** `typing.Optional[bool]` +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -18385,7 +18385,7 @@ client.import_storage.s3s.create(
    -**presign:** `typing.Optional[bool]` +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -18393,7 +18393,7 @@ client.import_storage.s3s.create(
    -**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -18401,7 +18401,7 @@ client.import_storage.s3s.create(
    -**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    @@ -18409,7 +18409,7 @@ client.import_storage.s3s.create(
    -**last_sync_job:** `typing.Optional[str]` — Last sync job ID +**bucket:** `typing.Optional[str]` — S3 bucket name
    @@ -18417,7 +18417,7 @@ client.import_storage.s3s.create(
    -**status:** `typing.Optional[StatusC5AEnum]` +**description:** `typing.Optional[str]` — Cloud storage description
    @@ -18425,7 +18425,7 @@ client.import_storage.s3s.create(
    -**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync +**external_id:** `typing.Optional[str]` — AWS ExternalId
    @@ -18433,7 +18433,7 @@ client.import_storage.s3s.create(
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` +**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time
    @@ -18441,7 +18441,7 @@ client.import_storage.s3s.create(
    -**title:** `typing.Optional[str]` — Cloud storage title +**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time
    @@ -18449,7 +18449,7 @@ client.import_storage.s3s.create(
    -**description:** `typing.Optional[str]` — Cloud storage description +**last_sync_job:** `typing.Optional[str]` — Last sync job ID
    @@ -18457,7 +18457,7 @@ client.import_storage.s3s.create(
    -**bucket:** `typing.Optional[str]` — S3 bucket name +**legacy_auth:** `typing.Optional[bool]`
    @@ -18465,7 +18465,7 @@ client.import_storage.s3s.create(
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**meta:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -18473,7 +18473,7 @@ client.import_storage.s3s.create(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -18481,7 +18481,7 @@ client.import_storage.s3s.create(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs +**presign:** `typing.Optional[bool]`
    @@ -18489,7 +18489,7 @@ client.import_storage.s3s.create(
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**presign_ttl:** `typing.Optional[int]` — Presigned URLs TTL (in minutes)
    @@ -18497,7 +18497,7 @@ client.import_storage.s3s.create(
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content
    @@ -18505,7 +18505,7 @@ client.import_storage.s3s.create(
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
    @@ -18513,7 +18513,7 @@ client.import_storage.s3s.create(
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -18521,7 +18521,7 @@ client.import_storage.s3s.create(
    -**region_name:** `typing.Optional[str]` — AWS Region +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -18529,7 +18529,7 @@ client.import_storage.s3s.create(
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**status:** `typing.Optional[StatusC5AEnum]`
    @@ -18537,7 +18537,7 @@ client.import_storage.s3s.create(
    -**external_id:** `typing.Optional[str]` — AWS ExternalId +**synchronizable:** `typing.Optional[bool]`
    @@ -18545,7 +18545,7 @@ client.import_storage.s3s.create(
    -**legacy_auth:** `typing.Optional[bool]` +**title:** `typing.Optional[str]` — Cloud storage title
    @@ -18553,7 +18553,7 @@ client.import_storage.s3s.create(
    -**presign_ttl:** `typing.Optional[int]` — Presigned URLs TTL (in minutes) +**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync
    @@ -18561,7 +18561,7 @@ client.import_storage.s3s.create(
    -**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs
    @@ -18581,7 +18581,7 @@ client.import_storage.s3s.create(
    -
    client.import_storage.s3s.get(...) +
    client.import_storage.s3s.validate(...)
    @@ -18593,7 +18593,7 @@ client.import_storage.s3s.create(
    -Get a specific S3 import storage connection that was set up with IAM role access. +Validate a specific S3 import storage connection that was set up with IAM role access.
    @@ -18613,8 +18613,9 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.s3s.get( - id=1, +client.import_storage.s3s.validate( + project=1, + role_arn="role_arn", ) ``` @@ -18631,7 +18632,7 @@ client.import_storage.s3s.get(
    -**id:** `int` +**project:** `int` — A unique integer value identifying this project.
    @@ -18639,69 +18640,31 @@ client.import_storage.s3s.get(
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**role_arn:** `str` — AWS RoleArn
    - -
    - - - - -
    - -
    client.import_storage.s3s.delete(...) -
    -
    - -#### 📝 Description - -
    -
    -Delete a specific S3 import storage connection that was set up with IAM role access. -
    -
    +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +
    -#### 🔌 Usage -
    -
    -
    - -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.s3s.delete( - id=1, -) - -``` -
    -
    +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +
    -#### ⚙️ Parameters -
    -
    -
    - -**id:** `int` +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN
    @@ -18709,69 +18672,31 @@ client.import_storage.s3s.delete(
    -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID
    -
    -
    - - -
    -
    -
    - -
    client.import_storage.s3s.update(...) -
    -
    - -#### 📝 Description
    -
    -
    - -Update a specific S3 import storage connection that was set up with IAM role access. -
    -
    +**bucket:** `typing.Optional[str]` — S3 bucket name +
    -#### 🔌 Usage - -
    -
    -
    -```python -from label_studio_sdk import LabelStudio - -client = LabelStudio( - api_key="YOUR_API_KEY", -) -client.import_storage.s3s.update( - id=1, -) - -``` -
    -
    +**description:** `typing.Optional[str]` — Cloud storage description +
    -#### ⚙️ Parameters - -
    -
    -
    -**id:** `int` +**external_id:** `typing.Optional[str]` — AWS ExternalId
    @@ -18779,7 +18704,7 @@ client.import_storage.s3s.update(
    -**synchronizable:** `typing.Optional[bool]` +**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time
    @@ -18787,7 +18712,7 @@ client.import_storage.s3s.update(
    -**presign:** `typing.Optional[bool]` +**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time
    @@ -18795,7 +18720,7 @@ client.import_storage.s3s.update(
    -**last_sync:** `typing.Optional[dt.datetime]` — Last sync finished time +**last_sync_job:** `typing.Optional[str]` — Last sync job ID
    @@ -18803,7 +18728,7 @@ client.import_storage.s3s.update(
    -**last_sync_count:** `typing.Optional[int]` — Count of tasks synced last time +**legacy_auth:** `typing.Optional[bool]`
    @@ -18811,7 +18736,7 @@ client.import_storage.s3s.update(
    -**last_sync_job:** `typing.Optional[str]` — Last sync job ID +**meta:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -18819,7 +18744,7 @@ client.import_storage.s3s.update(
    -**status:** `typing.Optional[StatusC5AEnum]` +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -18827,7 +18752,7 @@ client.import_storage.s3s.update(
    -**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync +**presign:** `typing.Optional[bool]`
    @@ -18835,7 +18760,7 @@ client.import_storage.s3s.update(
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` +**presign_ttl:** `typing.Optional[int]` — Presigned URLs TTL (in minutes)
    @@ -18843,7 +18768,7 @@ client.import_storage.s3s.update(
    -**title:** `typing.Optional[str]` — Cloud storage title +**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content
    @@ -18851,7 +18776,7 @@ client.import_storage.s3s.update(
    -**description:** `typing.Optional[str]` — Cloud storage description +**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
    @@ -18859,7 +18784,7 @@ client.import_storage.s3s.update(
    -**bucket:** `typing.Optional[str]` — S3 bucket name +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -18867,7 +18792,7 @@ client.import_storage.s3s.update(
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -18875,7 +18800,7 @@ client.import_storage.s3s.update(
    -**regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects +**status:** `typing.Optional[StatusC5AEnum]`
    @@ -18883,7 +18808,7 @@ client.import_storage.s3s.update(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs +**synchronizable:** `typing.Optional[bool]`
    @@ -18891,7 +18816,7 @@ client.import_storage.s3s.update(
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**title:** `typing.Optional[str]` — Cloud storage title
    @@ -18899,7 +18824,7 @@ client.import_storage.s3s.update(
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync
    @@ -18907,7 +18832,7 @@ client.import_storage.s3s.update(
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs
    @@ -18915,71 +18840,69 @@ client.import_storage.s3s.update(
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    +
    +
    -
    -
    -**region_name:** `typing.Optional[str]` — AWS Region -
    +
    +
    client.import_storage.s3s.get(...)
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint - -
    -
    +#### 📝 Description
    -**external_id:** `typing.Optional[str]` — AWS ExternalId - -
    -
    -
    -**role_arn:** `typing.Optional[str]` — AWS RoleArn - +Get a specific S3 import storage connection that was set up with IAM role access.
    + + + +#### 🔌 Usage
    -**legacy_auth:** `typing.Optional[bool]` - -
    -
    -
    -**presign_ttl:** `typing.Optional[int]` — Presigned URLs TTL (in minutes) - +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.import_storage.s3s.get( + id=1, +) + +``` +
    +
    +#### ⚙️ Parameters +
    -**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content - -
    -
    -
    -**project:** `typing.Optional[int]` — A unique integer value identifying this project. +**id:** `int`
    @@ -18999,7 +18922,7 @@ client.import_storage.s3s.update(
    -
    client.import_storage.s3s.sync(...) +
    client.import_storage.s3s.delete(...)
    @@ -19011,7 +18934,7 @@ client.import_storage.s3s.update(
    -Sync tasks from an S3 import storage connection that was set up with IAM role access. +Delete a specific S3 import storage connection that was set up with IAM role access.
    @@ -19031,7 +18954,7 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.s3s.sync( +client.import_storage.s3s.delete( id=1, ) @@ -19069,7 +18992,7 @@ client.import_storage.s3s.sync(
    -
    client.import_storage.s3s.validate(...) +
    client.import_storage.s3s.update(...)
    @@ -19081,7 +19004,7 @@ client.import_storage.s3s.sync(
    -Validate a specific S3 import storage connection that was set up with IAM role access. +Update a specific S3 import storage connection that was set up with IAM role access.
    @@ -19101,9 +19024,8 @@ from label_studio_sdk import LabelStudio client = LabelStudio( api_key="YOUR_API_KEY", ) -client.import_storage.s3s.validate( - role_arn="role_arn", - project=1, +client.import_storage.s3s.update( + id=1, ) ``` @@ -19120,7 +19042,7 @@ client.import_storage.s3s.validate(
    -**role_arn:** `str` — AWS RoleArn +**id:** `int`
    @@ -19128,7 +19050,7 @@ client.import_storage.s3s.validate(
    -**project:** `int` — A unique integer value identifying this project. +**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID
    @@ -19136,7 +19058,7 @@ client.import_storage.s3s.validate(
    -**synchronizable:** `typing.Optional[bool]` +**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY
    @@ -19144,7 +19066,39 @@ client.import_storage.s3s.validate(
    -**presign:** `typing.Optional[bool]` +**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN + +
    +
    + +
    +
    + +**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID + +
    +
    + +
    +
    + +**bucket:** `typing.Optional[str]` — S3 bucket name + +
    +
    + +
    +
    + +**description:** `typing.Optional[str]` — Cloud storage description + +
    +
    + +
    +
    + +**external_id:** `typing.Optional[str]` — AWS ExternalId
    @@ -19176,7 +19130,7 @@ client.import_storage.s3s.validate(
    -**status:** `typing.Optional[StatusC5AEnum]` +**legacy_auth:** `typing.Optional[bool]`
    @@ -19184,7 +19138,7 @@ client.import_storage.s3s.validate(
    -**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync +**meta:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -19192,7 +19146,7 @@ client.import_storage.s3s.validate(
    -**meta:** `typing.Optional[typing.Optional[typing.Any]]` +**prefix:** `typing.Optional[str]` — S3 bucket prefix
    @@ -19200,7 +19154,7 @@ client.import_storage.s3s.validate(
    -**title:** `typing.Optional[str]` — Cloud storage title +**presign:** `typing.Optional[bool]`
    @@ -19208,7 +19162,7 @@ client.import_storage.s3s.validate(
    -**description:** `typing.Optional[str]` — Cloud storage description +**presign_ttl:** `typing.Optional[int]` — Presigned URLs TTL (in minutes)
    @@ -19216,7 +19170,7 @@ client.import_storage.s3s.validate(
    -**bucket:** `typing.Optional[str]` — S3 bucket name +**project:** `typing.Optional[int]` — A unique integer value identifying this project.
    @@ -19224,7 +19178,7 @@ client.import_storage.s3s.validate(
    -**prefix:** `typing.Optional[str]` — S3 bucket prefix +**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content
    @@ -19240,7 +19194,7 @@ client.import_storage.s3s.validate(
    -**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs +**region_name:** `typing.Optional[str]` — AWS Region
    @@ -19248,7 +19202,7 @@ client.import_storage.s3s.validate(
    -**aws_access_key_id:** `typing.Optional[str]` — AWS_ACCESS_KEY_ID +**role_arn:** `typing.Optional[str]` — AWS RoleArn
    @@ -19256,7 +19210,7 @@ client.import_storage.s3s.validate(
    -**aws_secret_access_key:** `typing.Optional[str]` — AWS_SECRET_ACCESS_KEY +**s3endpoint:** `typing.Optional[str]` — S3 Endpoint
    @@ -19264,7 +19218,7 @@ client.import_storage.s3s.validate(
    -**aws_session_token:** `typing.Optional[str]` — AWS_SESSION_TOKEN +**status:** `typing.Optional[StatusC5AEnum]`
    @@ -19272,7 +19226,7 @@ client.import_storage.s3s.validate(
    -**aws_sse_kms_key_id:** `typing.Optional[str]` — AWS SSE KMS Key ID +**synchronizable:** `typing.Optional[bool]`
    @@ -19280,7 +19234,7 @@ client.import_storage.s3s.validate(
    -**region_name:** `typing.Optional[str]` — AWS Region +**title:** `typing.Optional[str]` — Cloud storage title
    @@ -19288,7 +19242,7 @@ client.import_storage.s3s.validate(
    -**s3endpoint:** `typing.Optional[str]` — S3 Endpoint +**traceback:** `typing.Optional[str]` — Traceback report for the last failed sync
    @@ -19296,7 +19250,7 @@ client.import_storage.s3s.validate(
    -**external_id:** `typing.Optional[str]` — AWS ExternalId +**use_blob_urls:** `typing.Optional[bool]` — Interpret objects as BLOBs and generate URLs
    @@ -19304,23 +19258,69 @@ client.import_storage.s3s.validate(
    -**legacy_auth:** `typing.Optional[bool]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
    + +
    + + + + +
    +
    client.import_storage.s3s.sync(...)
    -**presign_ttl:** `typing.Optional[int]` — Presigned URLs TTL (in minutes) - +#### 📝 Description + +
    +
    + +
    +
    + +Sync tasks from an S3 import storage connection that was set up with IAM role access. +
    +
    +#### 🔌 Usage +
    -**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content +
    +
    + +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.import_storage.s3s.sync( + id=1, +) + +``` +
    +
    +
    +
    + +#### ⚙️ Parameters + +
    +
    + +
    +
    + +**id:** `int`
    @@ -19530,7 +19530,7 @@ client.organizations.members.update(
    -**user_id:** `typing.Optional[int]` +**role:** `typing.Optional[Role9E7Enum]`
    @@ -19538,7 +19538,7 @@ client.organizations.members.update(
    -**role:** `typing.Optional[Role9E7Enum]` +**user_id:** `typing.Optional[int]`
    @@ -19923,7 +19923,7 @@ client.projects.exports.create(
    -**title:** `typing.Optional[str]` +**annotation_filter_options:** `typing.Optional[LseAnnotationFilterOptionsRequest]`
    @@ -19931,7 +19931,7 @@ client.projects.exports.create(
    -**created_by:** `typing.Optional[UserSimpleRequest]` +**converted_formats:** `typing.Optional[typing.Sequence[ConvertedFormatRequest]]`
    @@ -19939,7 +19939,7 @@ client.projects.exports.create(
    -**finished_at:** `typing.Optional[dt.datetime]` — Complete or fail time +**counters:** `typing.Optional[typing.Optional[typing.Any]]`
    @@ -19947,7 +19947,7 @@ client.projects.exports.create(
    -**status:** `typing.Optional[Status7BfEnum]` +**created_by:** `typing.Optional[UserSimpleRequest]`
    @@ -19955,7 +19955,7 @@ client.projects.exports.create(
    -**md5:** `typing.Optional[str]` +**finished_at:** `typing.Optional[dt.datetime]` — Complete or fail time
    @@ -19963,7 +19963,7 @@ client.projects.exports.create(
    -**counters:** `typing.Optional[typing.Optional[typing.Any]]` +**md5:** `typing.Optional[str]`
    @@ -19971,7 +19971,7 @@ client.projects.exports.create(
    -**converted_formats:** `typing.Optional[typing.Sequence[ConvertedFormatRequest]]` +**serialization_options:** `typing.Optional[SerializationOptionsRequest]`
    @@ -19979,7 +19979,7 @@ client.projects.exports.create(
    -**task_filter_options:** `typing.Optional[LseTaskFilterOptionsRequest]` +**status:** `typing.Optional[Status7BfEnum]`
    @@ -19987,7 +19987,7 @@ client.projects.exports.create(
    -**annotation_filter_options:** `typing.Optional[LseAnnotationFilterOptionsRequest]` +**task_filter_options:** `typing.Optional[LseTaskFilterOptionsRequest]`
    @@ -19995,7 +19995,7 @@ client.projects.exports.create(
    -**serialization_options:** `typing.Optional[SerializationOptionsRequest]` +**title:** `typing.Optional[str]`
    @@ -21202,9 +21202,9 @@ client = LabelStudio( ) client.prompts.versions.create( prompt_id=1, - title="title", prompt="prompt", provider_model_id="provider_model_id", + title="title", ) ``` @@ -21229,7 +21229,7 @@ client.prompts.versions.create(
    -**title:** `str` — Model name +**prompt:** `str` — Prompt to execute
    @@ -21237,7 +21237,7 @@ client.prompts.versions.create(
    -**prompt:** `str` — Prompt to execute +**provider_model_id:** `str` — The model ID to use within the given provider, e.g. gpt-3.5
    @@ -21245,7 +21245,7 @@ client.prompts.versions.create(
    -**provider_model_id:** `str` — The model ID to use within the given provider, e.g. gpt-3.5 +**title:** `str` — Model name
    @@ -21253,7 +21253,7 @@ client.prompts.versions.create(
    -**parent_model:** `typing.Optional[int]` — Parent model interface ID +**model_provider_connection:** `typing.Optional[int]`
    @@ -21261,17 +21261,7 @@ client.prompts.versions.create(
    -**provider:** `typing.Optional[ProviderEnum]` - -The model provider to use e.g. OpenAI - -* `OpenAI` - OpenAI -* `AzureOpenAI` - AzureOpenAI -* `AzureAIFoundry` - AzureAIFoundry -* `VertexAI` - VertexAI -* `Gemini` - Gemini -* `Anthropic` - Anthropic -* `Custom` - Custom +**organization:** `typing.Optional[int]`
    @@ -21279,7 +21269,7 @@ The model provider to use e.g. OpenAI
    -**model_provider_connection:** `typing.Optional[int]` +**parent_model:** `typing.Optional[int]` — Parent model interface ID
    @@ -21287,7 +21277,17 @@ The model provider to use e.g. OpenAI
    -**organization:** `typing.Optional[int]` +**provider:** `typing.Optional[ProviderEnum]` + +The model provider to use e.g. OpenAI + +* `OpenAI` - OpenAI +* `AzureOpenAI` - AzureOpenAI +* `AzureAIFoundry` - AzureAIFoundry +* `VertexAI` - VertexAI +* `Gemini` - Gemini +* `Anthropic` - Anthropic +* `Custom` - Custom
    @@ -21532,7 +21532,7 @@ client.prompts.versions.update(
    -**parent_model:** `typing.Optional[int]` — Parent model interface ID +**model_provider_connection:** `typing.Optional[int]`
    @@ -21540,7 +21540,15 @@ client.prompts.versions.update(
    -**title:** `typing.Optional[str]` — Model name +**organization:** `typing.Optional[int]` + +
    +
    + +
    +
    + +**parent_model:** `typing.Optional[int]` — Parent model interface ID
    @@ -21582,15 +21590,7 @@ The model provider to use e.g. OpenAI
    -**model_provider_connection:** `typing.Optional[int]` - -
    -
    - -
    -
    - -**organization:** `typing.Optional[int]` +**title:** `typing.Optional[str]` — Model name
    @@ -21811,9 +21811,9 @@ client = LabelStudio( client.prompts.versions.refine_prompt( prompt_id=1, version_id=1, - teacher_model_provider_connection_id=1, - teacher_model_name="teacher_model_name", project_id=1, + teacher_model_name="teacher_model_name", + teacher_model_provider_connection_id=1, ) ``` @@ -21846,7 +21846,7 @@ client.prompts.versions.refine_prompt(
    -**teacher_model_provider_connection_id:** `int` — Model Provider Connection ID to use to refine the prompt +**project_id:** `int` — Project ID to target the refined prompt for
    @@ -21862,7 +21862,7 @@ client.prompts.versions.refine_prompt(
    -**project_id:** `int` — Project ID to target the refined prompt for +**teacher_model_provider_connection_id:** `int` — Model Provider Connection ID to use to refine the prompt
    @@ -22078,7 +22078,7 @@ client.prompts.runs.create(
    -**project_subset:** `typing.Optional[ProjectSubsetEnum]` +**job_id:** `typing.Optional[str]` — Job ID for inference job for a ModelRun e.g. Adala job ID
    @@ -22086,7 +22086,7 @@ client.prompts.runs.create(
    -**job_id:** `typing.Optional[str]` — Job ID for inference job for a ModelRun e.g. Adala job ID +**organization:** `typing.Optional[int]`
    @@ -22094,7 +22094,7 @@ client.prompts.runs.create(
    -**total_predictions:** `typing.Optional[int]` +**predictions_updated_at:** `typing.Optional[dt.datetime]`
    @@ -22102,7 +22102,7 @@ client.prompts.runs.create(
    -**total_correct_predictions:** `typing.Optional[int]` +**project_subset:** `typing.Optional[ProjectSubsetEnum]`
    @@ -22110,7 +22110,7 @@ client.prompts.runs.create(
    -**total_tasks:** `typing.Optional[int]` +**total_correct_predictions:** `typing.Optional[int]`
    @@ -22118,7 +22118,7 @@ client.prompts.runs.create(
    -**predictions_updated_at:** `typing.Optional[dt.datetime]` +**total_predictions:** `typing.Optional[int]`
    @@ -22126,7 +22126,7 @@ client.prompts.runs.create(
    -**organization:** `typing.Optional[int]` +**total_tasks:** `typing.Optional[int]`
    diff --git a/src/label_studio_sdk/actions/client.py b/src/label_studio_sdk/actions/client.py index 7bd10226d..863a122bd 100644 --- a/src/label_studio_sdk/actions/client.py +++ b/src/label_studio_sdk/actions/client.py @@ -9,8 +9,8 @@ from ..core.api_error import ApiError from .types.actions_create_request_id import ActionsCreateRequestId from .types.actions_create_request_filters import ActionsCreateRequestFilters -from .types.actions_create_request_selected_items import ActionsCreateRequestSelectedItems from .types.actions_create_request_ordering_item import ActionsCreateRequestOrderingItem +from .types.actions_create_request_selected_items import ActionsCreateRequestSelectedItems from ..core.serialization import convert_and_respect_annotation_metadata from ..core.client_wrapper import AsyncClientWrapper @@ -81,8 +81,8 @@ def create( project: int, view: typing.Optional[int] = None, filters: typing.Optional[ActionsCreateRequestFilters] = OMIT, - selected_items: typing.Optional[ActionsCreateRequestSelectedItems] = OMIT, ordering: typing.Optional[typing.Sequence[ActionsCreateRequestOrderingItem]] = OMIT, + selected_items: typing.Optional[ActionsCreateRequestSelectedItems] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -102,12 +102,12 @@ def create( filters : typing.Optional[ActionsCreateRequestFilters] Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
    Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}` - selected_items : typing.Optional[ActionsCreateRequestSelectedItems] - Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` - ordering : typing.Optional[typing.Sequence[ActionsCreateRequestOrderingItem]] List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`. + selected_items : typing.Optional[ActionsCreateRequestSelectedItems] + Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -141,11 +141,11 @@ def create( ) ], ), + ordering=["tasks:total_annotations"], selected_items=ActionsCreateRequestSelectedItemsExcluded( all_=True, excluded=[124, 125, 126], ), - ordering=["tasks:total_annotations"], ) """ _response = self._client_wrapper.httpx_client.request( @@ -160,10 +160,10 @@ def create( "filters": convert_and_respect_annotation_metadata( object_=filters, annotation=ActionsCreateRequestFilters, direction="write" ), + "ordering": ordering, "selectedItems": convert_and_respect_annotation_metadata( object_=selected_items, annotation=ActionsCreateRequestSelectedItems, direction="write" ), - "ordering": ordering, }, headers={ "content-type": "application/json", @@ -251,8 +251,8 @@ async def create( project: int, view: typing.Optional[int] = None, filters: typing.Optional[ActionsCreateRequestFilters] = OMIT, - selected_items: typing.Optional[ActionsCreateRequestSelectedItems] = OMIT, ordering: typing.Optional[typing.Sequence[ActionsCreateRequestOrderingItem]] = OMIT, + selected_items: typing.Optional[ActionsCreateRequestSelectedItems] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -272,12 +272,12 @@ async def create( filters : typing.Optional[ActionsCreateRequestFilters] Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
    Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}` - selected_items : typing.Optional[ActionsCreateRequestSelectedItems] - Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` - ordering : typing.Optional[typing.Sequence[ActionsCreateRequestOrderingItem]] List of fields to order by. Fields are similar to filters but without the `filter:` prefix. To reverse the order, add a minus sign before the field name, e.g. `-tasks:created_at`. + selected_items : typing.Optional[ActionsCreateRequestSelectedItems] + Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}` + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -316,11 +316,11 @@ async def main() -> None: ) ], ), + ordering=["tasks:total_annotations"], selected_items=ActionsCreateRequestSelectedItemsExcluded( all_=True, excluded=[124, 125, 126], ), - ordering=["tasks:total_annotations"], ) @@ -338,10 +338,10 @@ async def main() -> None: "filters": convert_and_respect_annotation_metadata( object_=filters, annotation=ActionsCreateRequestFilters, direction="write" ), + "ordering": ordering, "selectedItems": convert_and_respect_annotation_metadata( object_=selected_items, annotation=ActionsCreateRequestSelectedItems, direction="write" ), - "ordering": ordering, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/actions/types/actions_list_response_item.py b/src/label_studio_sdk/actions/types/actions_list_response_item.py index aa0cdc7b4..9934b183b 100644 --- a/src/label_studio_sdk/actions/types/actions_list_response_item.py +++ b/src/label_studio_sdk/actions/types/actions_list_response_item.py @@ -8,12 +8,12 @@ class ActionsListResponseItem(UncheckedBaseModel): + dialog: typing.Optional[ActionsListResponseItemDialog] = None + experimental: typing.Optional[bool] = None id: typing.Optional[str] = None - title: typing.Optional[str] = None order: typing.Optional[int] = None permission: typing.Optional[str] = None - experimental: typing.Optional[bool] = None - dialog: typing.Optional[ActionsListResponseItemDialog] = None + title: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/actions/types/actions_list_response_item_dialog.py b/src/label_studio_sdk/actions/types/actions_list_response_item_dialog.py index 65637210b..b7c501022 100644 --- a/src/label_studio_sdk/actions/types/actions_list_response_item_dialog.py +++ b/src/label_studio_sdk/actions/types/actions_list_response_item_dialog.py @@ -7,10 +7,10 @@ class ActionsListResponseItemDialog(UncheckedBaseModel): - title: typing.Optional[str] = None + form: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None text: typing.Optional[str] = None + title: typing.Optional[str] = None type: typing.Optional[str] = None - form: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/annotations/client.py b/src/label_studio_sdk/annotations/client.py index eb77217ea..338d7c30c 100644 --- a/src/label_studio_sdk/annotations/client.py +++ b/src/label_studio_sdk/annotations/client.py @@ -2,19 +2,19 @@ import typing from ..core.client_wrapper import SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.annotation import Annotation -from ..core.jsonable_encoder import jsonable_encoder -from ..core.unchecked_base_model import construct_type -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from ..types.selected_items_request import SelectedItemsRequest import datetime as dt from .types.annotation_bulk_serializer_with_selected_items_request_last_action import ( AnnotationBulkSerializerWithSelectedItemsRequestLastAction, ) +from ..types.selected_items_request import SelectedItemsRequest +from ..core.request_options import RequestOptions from .types.annotations_create_bulk_response_item import AnnotationsCreateBulkResponseItem from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..types.annotation import Annotation +from ..core.jsonable_encoder import jsonable_encoder from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters @@ -25,6 +25,161 @@ class AnnotationsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + def create_bulk( + self, + *, + bulk_created: typing.Optional[bool] = OMIT, + completed_by: typing.Optional[int] = OMIT, + draft_created_at: typing.Optional[dt.datetime] = OMIT, + ground_truth: typing.Optional[bool] = OMIT, + import_id: typing.Optional[int] = OMIT, + last_action: typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] = OMIT, + last_created_by: typing.Optional[int] = OMIT, + lead_time: typing.Optional[float] = OMIT, + parent_annotation: typing.Optional[int] = OMIT, + parent_prediction: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, + selected_items: typing.Optional[SelectedItemsRequest] = OMIT, + task: typing.Optional[int] = OMIT, + tasks: typing.Optional[typing.Sequence[int]] = OMIT, + unique_id: typing.Optional[str] = OMIT, + updated_by: typing.Optional[int] = OMIT, + was_cancelled: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.List[AnnotationsCreateBulkResponseItem]: + """ + Create multiple annotations at once + + Parameters + ---------- + bulk_created : typing.Optional[bool] + Annotation was created in bulk mode + + completed_by : typing.Optional[int] + + draft_created_at : typing.Optional[dt.datetime] + Draft creation time + + ground_truth : typing.Optional[bool] + This annotation is a Ground Truth (ground_truth) + + import_id : typing.Optional[int] + Original annotation ID that was at the import step or NULL if this annotation wasn't imported + + last_action : typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] + Action which was performed in the last annotation history item + + * `prediction` - Created from prediction + * `propagated_annotation` - Created from another annotation + * `imported` - Imported + * `submitted` - Submitted + * `updated` - Updated + * `skipped` - Skipped + * `accepted` - Accepted + * `rejected` - Rejected + * `fixed_and_accepted` - Fixed and accepted + * `deleted_review` - Deleted review + + last_created_by : typing.Optional[int] + User who created the last annotation history item + + lead_time : typing.Optional[float] + How much time it took to annotate the task + + parent_annotation : typing.Optional[int] + Points to the parent annotation from which this annotation was created + + parent_prediction : typing.Optional[int] + Points to the prediction from which this annotation was created + + project : typing.Optional[int] + Project ID for this annotation + + result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] + List of annotation results for the task + + selected_items : typing.Optional[SelectedItemsRequest] + + task : typing.Optional[int] + Corresponding task for this annotation + + tasks : typing.Optional[typing.Sequence[int]] + + unique_id : typing.Optional[str] + + updated_by : typing.Optional[int] + Last user who updated this annotation + + was_cancelled : typing.Optional[bool] + User skipped the task + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[AnnotationsCreateBulkResponseItem] + Bulk annotations created successfully + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.annotations.create_bulk() + """ + _response = self._client_wrapper.httpx_client.request( + "api/annotations/bulk/", + method="POST", + json={ + "bulk_created": bulk_created, + "completed_by": completed_by, + "draft_created_at": draft_created_at, + "ground_truth": ground_truth, + "import_id": import_id, + "last_action": convert_and_respect_annotation_metadata( + object_=last_action, + annotation=AnnotationBulkSerializerWithSelectedItemsRequestLastAction, + direction="write", + ), + "last_created_by": last_created_by, + "lead_time": lead_time, + "parent_annotation": parent_annotation, + "parent_prediction": parent_prediction, + "project": project, + "result": result, + "selected_items": convert_and_respect_annotation_metadata( + object_=selected_items, annotation=SelectedItemsRequest, direction="write" + ), + "task": task, + "tasks": tasks, + "unique_id": unique_id, + "updated_by": updated_by, + "was_cancelled": was_cancelled, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[AnnotationsCreateBulkResponseItem], + construct_type( + type_=typing.List[AnnotationsCreateBulkResponseItem], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> Annotation: """ Retrieve a specific annotation for a task using the annotation result ID. @@ -114,14 +269,14 @@ def update( self, id: int, *, + completed_by: typing.Optional[int] = OMIT, + ground_truth: typing.Optional[bool] = OMIT, + lead_time: typing.Optional[float] = OMIT, + project: typing.Optional[int] = OMIT, result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, task: typing.Optional[int] = OMIT, - project: typing.Optional[int] = OMIT, - completed_by: typing.Optional[int] = OMIT, updated_by: typing.Optional[int] = OMIT, was_cancelled: typing.Optional[bool] = OMIT, - ground_truth: typing.Optional[bool] = OMIT, - lead_time: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Annotation: """ @@ -131,17 +286,23 @@ def update( ---------- id : int - result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + completed_by : typing.Optional[int] + User ID of the person who created this annotation - task : typing.Optional[int] - Corresponding task for this annotation + ground_truth : typing.Optional[bool] + This annotation is a Ground Truth + + lead_time : typing.Optional[float] + How much time it took to annotate the task (in seconds) project : typing.Optional[int] Project ID for this annotation - completed_by : typing.Optional[int] - User ID of the person who created this annotation + result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] + Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + + task : typing.Optional[int] + Corresponding task for this annotation updated_by : typing.Optional[int] Last user who updated this annotation @@ -149,12 +310,6 @@ def update( was_cancelled : typing.Optional[bool] User skipped the task - ground_truth : typing.Optional[bool] - This annotation is a Ground Truth - - lead_time : typing.Optional[float] - How much time it took to annotate the task (in seconds) - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -172,195 +327,40 @@ def update( ) client.annotations.update( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) """ _response = self._client_wrapper.httpx_client.request( f"api/annotations/{jsonable_encoder(id)}/", method="PATCH", json={ - "result": result, - "task": task, - "project": project, "completed_by": completed_by, - "updated_by": updated_by, - "was_cancelled": was_cancelled, "ground_truth": ground_truth, "lead_time": lead_time, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Annotation, - construct_type( - type_=Annotation, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def create_bulk( - self, - *, - result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - completed_by: typing.Optional[int] = OMIT, - unique_id: typing.Optional[str] = OMIT, - tasks: typing.Optional[typing.Sequence[int]] = OMIT, - selected_items: typing.Optional[SelectedItemsRequest] = OMIT, - was_cancelled: typing.Optional[bool] = OMIT, - ground_truth: typing.Optional[bool] = OMIT, - draft_created_at: typing.Optional[dt.datetime] = OMIT, - lead_time: typing.Optional[float] = OMIT, - import_id: typing.Optional[int] = OMIT, - last_action: typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] = OMIT, - bulk_created: typing.Optional[bool] = OMIT, - task: typing.Optional[int] = OMIT, - project: typing.Optional[int] = OMIT, - updated_by: typing.Optional[int] = OMIT, - parent_prediction: typing.Optional[int] = OMIT, - parent_annotation: typing.Optional[int] = OMIT, - last_created_by: typing.Optional[int] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[AnnotationsCreateBulkResponseItem]: - """ - Create multiple annotations at once - - Parameters - ---------- - result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - List of annotation results for the task - - completed_by : typing.Optional[int] - - unique_id : typing.Optional[str] - - tasks : typing.Optional[typing.Sequence[int]] - - selected_items : typing.Optional[SelectedItemsRequest] - - was_cancelled : typing.Optional[bool] - User skipped the task - - ground_truth : typing.Optional[bool] - This annotation is a Ground Truth (ground_truth) - - draft_created_at : typing.Optional[dt.datetime] - Draft creation time - - lead_time : typing.Optional[float] - How much time it took to annotate the task - - import_id : typing.Optional[int] - Original annotation ID that was at the import step or NULL if this annotation wasn't imported - - last_action : typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] - Action which was performed in the last annotation history item - - * `prediction` - Created from prediction - * `propagated_annotation` - Created from another annotation - * `imported` - Imported - * `submitted` - Submitted - * `updated` - Updated - * `skipped` - Skipped - * `accepted` - Accepted - * `rejected` - Rejected - * `fixed_and_accepted` - Fixed and accepted - * `deleted_review` - Deleted review - - bulk_created : typing.Optional[bool] - Annotation was created in bulk mode - - task : typing.Optional[int] - Corresponding task for this annotation - - project : typing.Optional[int] - Project ID for this annotation - - updated_by : typing.Optional[int] - Last user who updated this annotation - - parent_prediction : typing.Optional[int] - Points to the prediction from which this annotation was created - - parent_annotation : typing.Optional[int] - Points to the parent annotation from which this annotation was created - - last_created_by : typing.Optional[int] - User who created the last annotation history item - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[AnnotationsCreateBulkResponseItem] - Bulk annotations created successfully - - Examples - -------- - from label_studio_sdk import LabelStudio - - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.annotations.create_bulk() - """ - _response = self._client_wrapper.httpx_client.request( - "api/annotations/bulk/", - method="POST", - json={ - "result": result, - "completed_by": completed_by, - "unique_id": unique_id, - "tasks": tasks, - "selected_items": convert_and_respect_annotation_metadata( - object_=selected_items, annotation=SelectedItemsRequest, direction="write" - ), - "was_cancelled": was_cancelled, - "ground_truth": ground_truth, - "draft_created_at": draft_created_at, - "lead_time": lead_time, - "import_id": import_id, - "last_action": convert_and_respect_annotation_metadata( - object_=last_action, - annotation=AnnotationBulkSerializerWithSelectedItemsRequestLastAction, - direction="write", - ), - "bulk_created": bulk_created, - "task": task, "project": project, + "result": result, + "task": task, "updated_by": updated_by, - "parent_prediction": parent_prediction, - "parent_annotation": parent_annotation, - "last_created_by": last_created_by, + "was_cancelled": was_cancelled, }, headers={ "content-type": "application/json", @@ -371,9 +371,9 @@ def create_bulk( try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[AnnotationsCreateBulkResponseItem], + Annotation, construct_type( - type_=typing.List[AnnotationsCreateBulkResponseItem], # type: ignore + type_=Annotation, # type: ignore object_=_response.json(), ), ) @@ -441,14 +441,14 @@ def create( self, id: int, *, + completed_by: typing.Optional[int] = OMIT, + ground_truth: typing.Optional[bool] = OMIT, + lead_time: typing.Optional[float] = OMIT, + project: typing.Optional[int] = OMIT, result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, task: typing.Optional[int] = OMIT, - project: typing.Optional[int] = OMIT, - completed_by: typing.Optional[int] = OMIT, updated_by: typing.Optional[int] = OMIT, was_cancelled: typing.Optional[bool] = OMIT, - ground_truth: typing.Optional[bool] = OMIT, - lead_time: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Annotation: """ @@ -474,17 +474,23 @@ def create( id : int Task ID - result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + completed_by : typing.Optional[int] + User ID of the person who created this annotation - task : typing.Optional[int] - Corresponding task for this annotation + ground_truth : typing.Optional[bool] + This annotation is a Ground Truth + + lead_time : typing.Optional[float] + How much time it took to annotate the task (in seconds) project : typing.Optional[int] Project ID for this annotation - completed_by : typing.Optional[int] - User ID of the person who created this annotation + result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] + Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + + task : typing.Optional[int] + Corresponding task for this annotation updated_by : typing.Optional[int] Last user who updated this annotation @@ -492,12 +498,6 @@ def create( was_cancelled : typing.Optional[bool] User skipped the task - ground_truth : typing.Optional[bool] - This annotation is a Ground Truth - - lead_time : typing.Optional[float] - How much time it took to annotate the task (in seconds) - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -515,40 +515,40 @@ def create( ) client.annotations.create( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) """ _response = self._client_wrapper.httpx_client.request( f"api/tasks/{jsonable_encoder(id)}/annotations/", method="POST", json={ + "completed_by": completed_by, + "ground_truth": ground_truth, + "lead_time": lead_time, + "project": project, "result": result, "task": task, - "project": project, - "completed_by": completed_by, "updated_by": updated_by, "was_cancelled": was_cancelled, - "ground_truth": ground_truth, - "lead_time": lead_time, }, headers={ "content-type": "application/json", @@ -575,21 +575,102 @@ class AsyncAnnotationsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> Annotation: + async def create_bulk( + self, + *, + bulk_created: typing.Optional[bool] = OMIT, + completed_by: typing.Optional[int] = OMIT, + draft_created_at: typing.Optional[dt.datetime] = OMIT, + ground_truth: typing.Optional[bool] = OMIT, + import_id: typing.Optional[int] = OMIT, + last_action: typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] = OMIT, + last_created_by: typing.Optional[int] = OMIT, + lead_time: typing.Optional[float] = OMIT, + parent_annotation: typing.Optional[int] = OMIT, + parent_prediction: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, + selected_items: typing.Optional[SelectedItemsRequest] = OMIT, + task: typing.Optional[int] = OMIT, + tasks: typing.Optional[typing.Sequence[int]] = OMIT, + unique_id: typing.Optional[str] = OMIT, + updated_by: typing.Optional[int] = OMIT, + was_cancelled: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.List[AnnotationsCreateBulkResponseItem]: """ - Retrieve a specific annotation for a task using the annotation result ID. + Create multiple annotations at once Parameters ---------- - id : int + bulk_created : typing.Optional[bool] + Annotation was created in bulk mode + + completed_by : typing.Optional[int] + + draft_created_at : typing.Optional[dt.datetime] + Draft creation time + + ground_truth : typing.Optional[bool] + This annotation is a Ground Truth (ground_truth) + + import_id : typing.Optional[int] + Original annotation ID that was at the import step or NULL if this annotation wasn't imported + + last_action : typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] + Action which was performed in the last annotation history item + + * `prediction` - Created from prediction + * `propagated_annotation` - Created from another annotation + * `imported` - Imported + * `submitted` - Submitted + * `updated` - Updated + * `skipped` - Skipped + * `accepted` - Accepted + * `rejected` - Rejected + * `fixed_and_accepted` - Fixed and accepted + * `deleted_review` - Deleted review + + last_created_by : typing.Optional[int] + User who created the last annotation history item + + lead_time : typing.Optional[float] + How much time it took to annotate the task + + parent_annotation : typing.Optional[int] + Points to the parent annotation from which this annotation was created + + parent_prediction : typing.Optional[int] + Points to the prediction from which this annotation was created + + project : typing.Optional[int] + Project ID for this annotation + + result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] + List of annotation results for the task + + selected_items : typing.Optional[SelectedItemsRequest] + + task : typing.Optional[int] + Corresponding task for this annotation + + tasks : typing.Optional[typing.Sequence[int]] + + unique_id : typing.Optional[str] + + updated_by : typing.Optional[int] + Last user who updated this annotation + + was_cancelled : typing.Optional[bool] + User skipped the task request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Annotation - Retrieved annotation + typing.List[AnnotationsCreateBulkResponseItem] + Bulk annotations created successfully Examples -------- @@ -603,24 +684,52 @@ async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] async def main() -> None: - await client.annotations.get( - id=1, - ) + await client.annotations.create_bulk() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/annotations/{jsonable_encoder(id)}/", - method="GET", + "api/annotations/bulk/", + method="POST", + json={ + "bulk_created": bulk_created, + "completed_by": completed_by, + "draft_created_at": draft_created_at, + "ground_truth": ground_truth, + "import_id": import_id, + "last_action": convert_and_respect_annotation_metadata( + object_=last_action, + annotation=AnnotationBulkSerializerWithSelectedItemsRequestLastAction, + direction="write", + ), + "last_created_by": last_created_by, + "lead_time": lead_time, + "parent_annotation": parent_annotation, + "parent_prediction": parent_prediction, + "project": project, + "result": result, + "selected_items": convert_and_respect_annotation_metadata( + object_=selected_items, annotation=SelectedItemsRequest, direction="write" + ), + "task": task, + "tasks": tasks, + "unique_id": unique_id, + "updated_by": updated_by, + "was_cancelled": was_cancelled, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - Annotation, + typing.List[AnnotationsCreateBulkResponseItem], construct_type( - type_=Annotation, # type: ignore + type_=typing.List[AnnotationsCreateBulkResponseItem], # type: ignore object_=_response.json(), ), ) @@ -629,9 +738,9 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: + async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> Annotation: """ - Delete an annotation. This action can't be undone! + Retrieve a specific annotation for a task using the annotation result ID. Parameters ---------- @@ -642,7 +751,8 @@ async def delete(self, id: int, *, request_options: typing.Optional[RequestOptio Returns ------- - None + Annotation + Retrieved annotation Examples -------- @@ -656,7 +766,7 @@ async def delete(self, id: int, *, request_options: typing.Optional[RequestOptio async def main() -> None: - await client.annotations.delete( + await client.annotations.get( id=1, ) @@ -665,69 +775,37 @@ async def main() -> None: """ _response = await self._client_wrapper.httpx_client.request( f"api/annotations/{jsonable_encoder(id)}/", - method="DELETE", + method="GET", request_options=request_options, ) try: if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def update( - self, - id: int, - *, - result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - task: typing.Optional[int] = OMIT, - project: typing.Optional[int] = OMIT, - completed_by: typing.Optional[int] = OMIT, - updated_by: typing.Optional[int] = OMIT, - was_cancelled: typing.Optional[bool] = OMIT, - ground_truth: typing.Optional[bool] = OMIT, - lead_time: typing.Optional[float] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> Annotation: - """ - Update existing attributes on an annotation. - - Parameters - ---------- - id : int - - result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) - - task : typing.Optional[int] - Corresponding task for this annotation - - project : typing.Optional[int] - Project ID for this annotation - - completed_by : typing.Optional[int] - User ID of the person who created this annotation - - updated_by : typing.Optional[int] - Last user who updated this annotation - - was_cancelled : typing.Optional[bool] - User skipped the task + return typing.cast( + Annotation, + construct_type( + type_=Annotation, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - ground_truth : typing.Optional[bool] - This annotation is a Ground Truth + async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Delete an annotation. This action can't be undone! - lead_time : typing.Optional[float] - How much time it took to annotate the task (in seconds) + Parameters + ---------- + id : int request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Annotation - Updated annotation + None Examples -------- @@ -741,28 +819,8 @@ async def update( async def main() -> None: - await client.annotations.update( + await client.annotations.delete( id=1, - result=[ - { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, - "from_name": "bboxes", - "to_name": "image", - "type": "rectanglelabels", - "value": { - "x": 20, - "y": 30, - "width": 50, - "height": 60, - "rotation": 0, - "values": {"rectanglelabels": ["Person"]}, - }, - } - ], - was_cancelled=False, - ground_truth=True, ) @@ -770,133 +828,69 @@ async def main() -> None: """ _response = await self._client_wrapper.httpx_client.request( f"api/annotations/{jsonable_encoder(id)}/", - method="PATCH", - json={ - "result": result, - "task": task, - "project": project, - "completed_by": completed_by, - "updated_by": updated_by, - "was_cancelled": was_cancelled, - "ground_truth": ground_truth, - "lead_time": lead_time, - }, - headers={ - "content-type": "application/json", - }, + method="DELETE", request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return typing.cast( - Annotation, - construct_type( - type_=Annotation, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create_bulk( + async def update( self, + id: int, *, - result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, completed_by: typing.Optional[int] = OMIT, - unique_id: typing.Optional[str] = OMIT, - tasks: typing.Optional[typing.Sequence[int]] = OMIT, - selected_items: typing.Optional[SelectedItemsRequest] = OMIT, - was_cancelled: typing.Optional[bool] = OMIT, ground_truth: typing.Optional[bool] = OMIT, - draft_created_at: typing.Optional[dt.datetime] = OMIT, lead_time: typing.Optional[float] = OMIT, - import_id: typing.Optional[int] = OMIT, - last_action: typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] = OMIT, - bulk_created: typing.Optional[bool] = OMIT, - task: typing.Optional[int] = OMIT, project: typing.Optional[int] = OMIT, + result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, + task: typing.Optional[int] = OMIT, updated_by: typing.Optional[int] = OMIT, - parent_prediction: typing.Optional[int] = OMIT, - parent_annotation: typing.Optional[int] = OMIT, - last_created_by: typing.Optional[int] = OMIT, + was_cancelled: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[AnnotationsCreateBulkResponseItem]: + ) -> Annotation: """ - Create multiple annotations at once + Update existing attributes on an annotation. Parameters ---------- - result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - List of annotation results for the task + id : int completed_by : typing.Optional[int] - - unique_id : typing.Optional[str] - - tasks : typing.Optional[typing.Sequence[int]] - - selected_items : typing.Optional[SelectedItemsRequest] - - was_cancelled : typing.Optional[bool] - User skipped the task + User ID of the person who created this annotation ground_truth : typing.Optional[bool] - This annotation is a Ground Truth (ground_truth) - - draft_created_at : typing.Optional[dt.datetime] - Draft creation time + This annotation is a Ground Truth lead_time : typing.Optional[float] - How much time it took to annotate the task - - import_id : typing.Optional[int] - Original annotation ID that was at the import step or NULL if this annotation wasn't imported - - last_action : typing.Optional[AnnotationBulkSerializerWithSelectedItemsRequestLastAction] - Action which was performed in the last annotation history item + How much time it took to annotate the task (in seconds) - * `prediction` - Created from prediction - * `propagated_annotation` - Created from another annotation - * `imported` - Imported - * `submitted` - Submitted - * `updated` - Updated - * `skipped` - Skipped - * `accepted` - Accepted - * `rejected` - Rejected - * `fixed_and_accepted` - Fixed and accepted - * `deleted_review` - Deleted review + project : typing.Optional[int] + Project ID for this annotation - bulk_created : typing.Optional[bool] - Annotation was created in bulk mode + result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] + Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) task : typing.Optional[int] Corresponding task for this annotation - project : typing.Optional[int] - Project ID for this annotation - updated_by : typing.Optional[int] Last user who updated this annotation - parent_prediction : typing.Optional[int] - Points to the prediction from which this annotation was created - - parent_annotation : typing.Optional[int] - Points to the parent annotation from which this annotation was created - - last_created_by : typing.Optional[int] - User who created the last annotation history item + was_cancelled : typing.Optional[bool] + User skipped the task request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[AnnotationsCreateBulkResponseItem] - Bulk annotations created successfully + Annotation + Updated annotation Examples -------- @@ -910,39 +904,45 @@ async def create_bulk( async def main() -> None: - await client.annotations.create_bulk() + await client.annotations.update( + id=1, + ground_truth=True, + result=[ + { + "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, + "to_name": "image", + "type": "rectanglelabels", + "value": { + "height": 60, + "rotation": 0, + "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, + }, + } + ], + was_cancelled=False, + ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/annotations/bulk/", - method="POST", + f"api/annotations/{jsonable_encoder(id)}/", + method="PATCH", json={ - "result": result, "completed_by": completed_by, - "unique_id": unique_id, - "tasks": tasks, - "selected_items": convert_and_respect_annotation_metadata( - object_=selected_items, annotation=SelectedItemsRequest, direction="write" - ), - "was_cancelled": was_cancelled, "ground_truth": ground_truth, - "draft_created_at": draft_created_at, "lead_time": lead_time, - "import_id": import_id, - "last_action": convert_and_respect_annotation_metadata( - object_=last_action, - annotation=AnnotationBulkSerializerWithSelectedItemsRequestLastAction, - direction="write", - ), - "bulk_created": bulk_created, - "task": task, "project": project, + "result": result, + "task": task, "updated_by": updated_by, - "parent_prediction": parent_prediction, - "parent_annotation": parent_annotation, - "last_created_by": last_created_by, + "was_cancelled": was_cancelled, }, headers={ "content-type": "application/json", @@ -953,9 +953,9 @@ async def main() -> None: try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[AnnotationsCreateBulkResponseItem], + Annotation, construct_type( - type_=typing.List[AnnotationsCreateBulkResponseItem], # type: ignore + type_=Annotation, # type: ignore object_=_response.json(), ), ) @@ -1031,14 +1031,14 @@ async def create( self, id: int, *, + completed_by: typing.Optional[int] = OMIT, + ground_truth: typing.Optional[bool] = OMIT, + lead_time: typing.Optional[float] = OMIT, + project: typing.Optional[int] = OMIT, result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, task: typing.Optional[int] = OMIT, - project: typing.Optional[int] = OMIT, - completed_by: typing.Optional[int] = OMIT, updated_by: typing.Optional[int] = OMIT, was_cancelled: typing.Optional[bool] = OMIT, - ground_truth: typing.Optional[bool] = OMIT, - lead_time: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Annotation: """ @@ -1064,17 +1064,23 @@ async def create( id : int Task ID - result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + completed_by : typing.Optional[int] + User ID of the person who created this annotation - task : typing.Optional[int] - Corresponding task for this annotation + ground_truth : typing.Optional[bool] + This annotation is a Ground Truth + + lead_time : typing.Optional[float] + How much time it took to annotate the task (in seconds) project : typing.Optional[int] Project ID for this annotation - completed_by : typing.Optional[int] - User ID of the person who created this annotation + result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] + Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format) + + task : typing.Optional[int] + Corresponding task for this annotation updated_by : typing.Optional[int] Last user who updated this annotation @@ -1082,12 +1088,6 @@ async def create( was_cancelled : typing.Optional[bool] User skipped the task - ground_truth : typing.Optional[bool] - This annotation is a Ground Truth - - lead_time : typing.Optional[float] - How much time it took to annotate the task (in seconds) - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1110,26 +1110,26 @@ async def create( async def main() -> None: await client.annotations.create( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) @@ -1139,14 +1139,14 @@ async def main() -> None: f"api/tasks/{jsonable_encoder(id)}/annotations/", method="POST", json={ + "completed_by": completed_by, + "ground_truth": ground_truth, + "lead_time": lead_time, + "project": project, "result": result, "task": task, - "project": project, - "completed_by": completed_by, "updated_by": updated_by, "was_cancelled": was_cancelled, - "ground_truth": ground_truth, - "lead_time": lead_time, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/comments/client.py b/src/label_studio_sdk/comments/client.py index 5e04c12aa..4213d8538 100644 --- a/src/label_studio_sdk/comments/client.py +++ b/src/label_studio_sdk/comments/client.py @@ -95,12 +95,12 @@ def create( self, *, expand_created_by: typing.Optional[bool] = None, - region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + annotation: typing.Optional[int] = OMIT, classifications: typing.Optional[typing.Optional[typing.Any]] = OMIT, - text: typing.Optional[str] = OMIT, - is_resolved: typing.Optional[bool] = OMIT, draft: typing.Optional[int] = OMIT, - annotation: typing.Optional[int] = OMIT, + is_resolved: typing.Optional[bool] = OMIT, + region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + text: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MaybeExpandedComment: """ @@ -111,19 +111,19 @@ def create( expand_created_by : typing.Optional[bool] Expand the created_by field - region_ref : typing.Optional[typing.Optional[typing.Any]] + annotation : typing.Optional[int] classifications : typing.Optional[typing.Optional[typing.Any]] - text : typing.Optional[str] - Reviewer or annotator comment + draft : typing.Optional[int] is_resolved : typing.Optional[bool] True if the comment is resolved - draft : typing.Optional[int] + region_ref : typing.Optional[typing.Optional[typing.Any]] - annotation : typing.Optional[int] + text : typing.Optional[str] + Reviewer or annotator comment request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -149,12 +149,12 @@ def create( "expand_created_by": expand_created_by, }, json={ - "region_ref": region_ref, + "annotation": annotation, "classifications": classifications, - "text": text, - "is_resolved": is_resolved, "draft": draft, - "annotation": annotation, + "is_resolved": is_resolved, + "region_ref": region_ref, + "text": text, }, request_options=request_options, omit=OMIT, @@ -173,6 +173,68 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def export( + self, + *, + annotation: typing.Optional[int] = None, + annotators: typing.Optional[str] = None, + draft: typing.Optional[int] = None, + expand_created_by: typing.Optional[bool] = None, + projects: typing.Optional[str] = None, + tz: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[bytes]: + """ + Export comments to CSV file + + Parameters + ---------- + annotation : typing.Optional[int] + + annotators : typing.Optional[str] + + draft : typing.Optional[int] + + expand_created_by : typing.Optional[bool] + + projects : typing.Optional[str] + + tz : typing.Optional[str] + Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York" + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Yields + ------ + typing.Iterator[bytes] + CSV file with comments + """ + with self._client_wrapper.httpx_client.stream( + "api/comments/export/", + method="GET", + params={ + "annotation": annotation, + "annotators": annotators, + "draft": draft, + "expand_created_by": expand_created_by, + "projects": projects, + "tz": tz, + }, + request_options=request_options, + ) as _response: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None + for _chunk in _response.iter_bytes(chunk_size=_chunk_size): + yield _chunk + return + _response.read() + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get( self, id: str, @@ -287,12 +349,12 @@ def update( id: str, *, expand_created_by: typing.Optional[bool] = None, - region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + annotation: typing.Optional[int] = OMIT, classifications: typing.Optional[typing.Optional[typing.Any]] = OMIT, - text: typing.Optional[str] = OMIT, - is_resolved: typing.Optional[bool] = OMIT, draft: typing.Optional[int] = OMIT, - annotation: typing.Optional[int] = OMIT, + is_resolved: typing.Optional[bool] = OMIT, + region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + text: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MaybeExpandedComment: """ @@ -305,19 +367,19 @@ def update( expand_created_by : typing.Optional[bool] Expand the created_by field - region_ref : typing.Optional[typing.Optional[typing.Any]] + annotation : typing.Optional[int] classifications : typing.Optional[typing.Optional[typing.Any]] - text : typing.Optional[str] - Reviewer or annotator comment + draft : typing.Optional[int] is_resolved : typing.Optional[bool] True if the comment is resolved - draft : typing.Optional[int] + region_ref : typing.Optional[typing.Optional[typing.Any]] - annotation : typing.Optional[int] + text : typing.Optional[str] + Reviewer or annotator comment request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -345,12 +407,12 @@ def update( "expand_created_by": expand_created_by, }, json={ - "region_ref": region_ref, + "annotation": annotation, "classifications": classifications, - "text": text, - "is_resolved": is_resolved, "draft": draft, - "annotation": annotation, + "is_resolved": is_resolved, + "region_ref": region_ref, + "text": text, }, headers={ "content-type": "application/json", @@ -372,68 +434,6 @@ def update( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def export( - self, - *, - annotation: typing.Optional[int] = None, - annotators: typing.Optional[str] = None, - draft: typing.Optional[int] = None, - expand_created_by: typing.Optional[bool] = None, - projects: typing.Optional[str] = None, - tz: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Iterator[bytes]: - """ - Export comments to CSV file - - Parameters - ---------- - annotation : typing.Optional[int] - - annotators : typing.Optional[str] - - draft : typing.Optional[int] - - expand_created_by : typing.Optional[bool] - - projects : typing.Optional[str] - - tz : typing.Optional[str] - Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York" - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. - - Yields - ------ - typing.Iterator[bytes] - CSV file with comments - """ - with self._client_wrapper.httpx_client.stream( - "api/comments/export/", - method="GET", - params={ - "annotation": annotation, - "annotators": annotators, - "draft": draft, - "expand_created_by": expand_created_by, - "projects": projects, - "tz": tz, - }, - request_options=request_options, - ) as _response: - try: - if 200 <= _response.status_code < 300: - _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None - for _chunk in _response.iter_bytes(chunk_size=_chunk_size): - yield _chunk - return - _response.read() - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - class AsyncCommentsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -524,12 +524,12 @@ async def create( self, *, expand_created_by: typing.Optional[bool] = None, - region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + annotation: typing.Optional[int] = OMIT, classifications: typing.Optional[typing.Optional[typing.Any]] = OMIT, - text: typing.Optional[str] = OMIT, - is_resolved: typing.Optional[bool] = OMIT, draft: typing.Optional[int] = OMIT, - annotation: typing.Optional[int] = OMIT, + is_resolved: typing.Optional[bool] = OMIT, + region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + text: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MaybeExpandedComment: """ @@ -540,19 +540,19 @@ async def create( expand_created_by : typing.Optional[bool] Expand the created_by field - region_ref : typing.Optional[typing.Optional[typing.Any]] + annotation : typing.Optional[int] classifications : typing.Optional[typing.Optional[typing.Any]] - text : typing.Optional[str] - Reviewer or annotator comment + draft : typing.Optional[int] is_resolved : typing.Optional[bool] True if the comment is resolved - draft : typing.Optional[int] + region_ref : typing.Optional[typing.Optional[typing.Any]] - annotation : typing.Optional[int] + text : typing.Optional[str] + Reviewer or annotator comment request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -586,12 +586,12 @@ async def main() -> None: "expand_created_by": expand_created_by, }, json={ - "region_ref": region_ref, + "annotation": annotation, "classifications": classifications, - "text": text, - "is_resolved": is_resolved, "draft": draft, - "annotation": annotation, + "is_resolved": is_resolved, + "region_ref": region_ref, + "text": text, }, request_options=request_options, omit=OMIT, @@ -610,6 +610,68 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def export( + self, + *, + annotation: typing.Optional[int] = None, + annotators: typing.Optional[str] = None, + draft: typing.Optional[int] = None, + expand_created_by: typing.Optional[bool] = None, + projects: typing.Optional[str] = None, + tz: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[bytes]: + """ + Export comments to CSV file + + Parameters + ---------- + annotation : typing.Optional[int] + + annotators : typing.Optional[str] + + draft : typing.Optional[int] + + expand_created_by : typing.Optional[bool] + + projects : typing.Optional[str] + + tz : typing.Optional[str] + Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York" + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + + Yields + ------ + typing.AsyncIterator[bytes] + CSV file with comments + """ + async with self._client_wrapper.httpx_client.stream( + "api/comments/export/", + method="GET", + params={ + "annotation": annotation, + "annotators": annotators, + "draft": draft, + "expand_created_by": expand_created_by, + "projects": projects, + "tz": tz, + }, + request_options=request_options, + ) as _response: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None + async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size): + yield _chunk + return + await _response.aread() + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def get( self, id: str, @@ -740,12 +802,12 @@ async def update( id: str, *, expand_created_by: typing.Optional[bool] = None, - region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + annotation: typing.Optional[int] = OMIT, classifications: typing.Optional[typing.Optional[typing.Any]] = OMIT, - text: typing.Optional[str] = OMIT, - is_resolved: typing.Optional[bool] = OMIT, draft: typing.Optional[int] = OMIT, - annotation: typing.Optional[int] = OMIT, + is_resolved: typing.Optional[bool] = OMIT, + region_ref: typing.Optional[typing.Optional[typing.Any]] = OMIT, + text: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MaybeExpandedComment: """ @@ -758,19 +820,19 @@ async def update( expand_created_by : typing.Optional[bool] Expand the created_by field - region_ref : typing.Optional[typing.Optional[typing.Any]] + annotation : typing.Optional[int] classifications : typing.Optional[typing.Optional[typing.Any]] - text : typing.Optional[str] - Reviewer or annotator comment + draft : typing.Optional[int] is_resolved : typing.Optional[bool] True if the comment is resolved - draft : typing.Optional[int] + region_ref : typing.Optional[typing.Optional[typing.Any]] - annotation : typing.Optional[int] + text : typing.Optional[str] + Reviewer or annotator comment request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -806,12 +868,12 @@ async def main() -> None: "expand_created_by": expand_created_by, }, json={ - "region_ref": region_ref, + "annotation": annotation, "classifications": classifications, - "text": text, - "is_resolved": is_resolved, "draft": draft, - "annotation": annotation, + "is_resolved": is_resolved, + "region_ref": region_ref, + "text": text, }, headers={ "content-type": "application/json", @@ -832,65 +894,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def export( - self, - *, - annotation: typing.Optional[int] = None, - annotators: typing.Optional[str] = None, - draft: typing.Optional[int] = None, - expand_created_by: typing.Optional[bool] = None, - projects: typing.Optional[str] = None, - tz: typing.Optional[str] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.AsyncIterator[bytes]: - """ - Export comments to CSV file - - Parameters - ---------- - annotation : typing.Optional[int] - - annotators : typing.Optional[str] - - draft : typing.Optional[int] - - expand_created_by : typing.Optional[bool] - - projects : typing.Optional[str] - - tz : typing.Optional[str] - Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York" - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. - - Yields - ------ - typing.AsyncIterator[bytes] - CSV file with comments - """ - async with self._client_wrapper.httpx_client.stream( - "api/comments/export/", - method="GET", - params={ - "annotation": annotation, - "annotators": annotators, - "draft": draft, - "expand_created_by": expand_created_by, - "projects": projects, - "tz": tz, - }, - request_options=request_options, - ) as _response: - try: - if 200 <= _response.status_code < 300: - _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None - async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size): - yield _chunk - return - await _response.aread() - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/export_storage/azure/client.py b/src/label_studio_sdk/export_storage/azure/client.py index 894b16a8f..ff98d0b76 100644 --- a/src/label_studio_sdk/export_storage/azure/client.py +++ b/src/label_studio_sdk/export_storage/azure/client.py @@ -79,14 +79,14 @@ def list( def create( self, *, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AzureBlobExportStorage: """ @@ -94,29 +94,29 @@ def create( Parameters ---------- + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled - title : typing.Optional[str] - Storage title + container : typing.Optional[str] + Azure blob container description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - - container : typing.Optional[str] - Azure blob container - prefix : typing.Optional[str] Azure blob prefix name - account_name : typing.Optional[str] - Azure Blob account name + project : typing.Optional[int] + Project ID - account_key : typing.Optional[str] - Azure Blob account key + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -139,14 +139,14 @@ def create( "api/storages/export/azure", method="POST", json={ + "account_key": account_key, + "account_name": account_name, "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, "container": container, + "description": description, "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -168,6 +168,96 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific Azure export storage connection. + + Parameters + ---------- + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + Azure blob prefix name + + project : typing.Optional[int] + Project ID + + title : typing.Optional[str] + Storage title + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.export_storage.azure.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/export/azure/validate", + method="POST", + json={ + "account_key": account_key, + "account_name": account_name, + "can_delete_objects": can_delete_objects, + "container": container, + "description": description, + "id": id, + "prefix": prefix, + "project": project, + "title": title, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> AzureBlobExportStorage: """ Get a specific Azure export storage connection. @@ -257,14 +347,14 @@ def update( self, id: int, *, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AzureBlobExportStorage: """ @@ -274,29 +364,29 @@ def update( ---------- id : int + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled - title : typing.Optional[str] - Storage title + container : typing.Optional[str] + Azure blob container description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - - container : typing.Optional[str] - Azure blob container - prefix : typing.Optional[str] Azure blob prefix name - account_name : typing.Optional[str] - Azure Blob account name + project : typing.Optional[int] + Project ID - account_key : typing.Optional[str] - Azure Blob account key + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -321,14 +411,14 @@ def update( f"api/storages/export/azure/{jsonable_encoder(id)}", method="PATCH", json={ + "account_key": account_key, + "account_name": account_name, "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, "container": container, + "description": description, "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -396,125 +486,125 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncAzureClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[AzureBlobExportStorage]: """ - Validate a specific Azure export storage connection. + Get a list of all Azure export storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name - - account_name : typing.Optional[str] - Azure Blob account name - - account_key : typing.Optional[str] - Azure Blob account key - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[AzureBlobExportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.export_storage.azure.validate() + + + async def main() -> None: + await client.export_storage.azure.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/export/azure/validate", - method="POST", - json={ - "id": id, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/export/azure", + method="GET", + params={ + "ordering": ordering, "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[AzureBlobExportStorage], + construct_type( + type_=typing.List[AzureBlobExportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncAzureClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[AzureBlobExportStorage]: + ) -> AzureBlobExportStorage: """ - Get a list of all Azure export storage connections. + Create a new Azure export storage connection to store annotations. Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + Azure blob prefix name project : typing.Optional[int] Project ID + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[AzureBlobExportStorage] + AzureBlobExportStorage Examples @@ -529,26 +619,36 @@ async def list( async def main() -> None: - await client.export_storage.azure.list() + await client.export_storage.azure.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/export/azure", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "account_key": account_key, + "account_name": account_name, + "can_delete_objects": can_delete_objects, + "container": container, + "description": description, + "prefix": prefix, "project": project, + "title": title, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[AzureBlobExportStorage], + AzureBlobExportStorage, construct_type( - type_=typing.List[AzureBlobExportStorage], # type: ignore + type_=AzureBlobExportStorage, # type: ignore object_=_response.json(), ), ) @@ -557,55 +657,58 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> AzureBlobExportStorage: + ) -> None: """ - Create a new Azure export storage connection to store annotations. + Validate a specific Azure export storage connection. Parameters ---------- + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled - title : typing.Optional[str] - Storage title + container : typing.Optional[str] + Azure blob container description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - - container : typing.Optional[str] - Azure blob container + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated prefix : typing.Optional[str] Azure blob prefix name - account_name : typing.Optional[str] - Azure Blob account name + project : typing.Optional[int] + Project ID - account_key : typing.Optional[str] - Azure Blob account key + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AzureBlobExportStorage - + None Examples -------- @@ -619,23 +722,24 @@ async def create( async def main() -> None: - await client.export_storage.azure.create() + await client.export_storage.azure.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/azure", + "api/storages/export/azure/validate", method="POST", json={ + "account_key": account_key, + "account_name": account_name, "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, "container": container, + "description": description, + "id": id, "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -645,13 +749,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - AzureBlobExportStorage, - construct_type( - type_=AzureBlobExportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -762,14 +860,14 @@ async def update( self, id: int, *, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AzureBlobExportStorage: """ @@ -779,29 +877,29 @@ async def update( ---------- id : int + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled - title : typing.Optional[str] - Storage title + container : typing.Optional[str] + Azure blob container description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - - container : typing.Optional[str] - Azure blob container - prefix : typing.Optional[str] Azure blob prefix name - account_name : typing.Optional[str] - Azure Blob account name + project : typing.Optional[int] + Project ID - account_key : typing.Optional[str] - Azure Blob account key + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -834,14 +932,14 @@ async def main() -> None: f"api/storages/export/azure/{jsonable_encoder(id)}", method="PATCH", json={ + "account_key": account_key, + "account_name": account_name, "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, "container": container, + "description": description, "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -916,101 +1014,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific Azure export storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name - - account_name : typing.Optional[str] - Azure Blob account name - - account_key : typing.Optional[str] - Azure Blob account key - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.export_storage.azure.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/azure/validate", - method="POST", - json={ - "id": id, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/export_storage/gcs/client.py b/src/label_studio_sdk/export_storage/gcs/client.py index 32304e433..1ce654e97 100644 --- a/src/label_studio_sdk/export_storage/gcs/client.py +++ b/src/label_studio_sdk/export_storage/gcs/client.py @@ -79,14 +79,14 @@ def list( def create( self, *, + bucket: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GcsExportStorage: """ @@ -94,29 +94,29 @@ def create( Parameters ---------- + bucket : typing.Optional[str] + GCS bucket name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - bucket : typing.Optional[str] - GCS bucket name + google_project_id : typing.Optional[str] + Google project ID prefix : typing.Optional[str] GCS bucket prefix - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + project : typing.Optional[int] + Project ID - google_project_id : typing.Optional[str] - Google project ID + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -139,14 +139,14 @@ def create( "api/storages/export/gcs", method="POST", json={ + "bucket": bucket, "can_delete_objects": can_delete_objects, - "title": title, "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "prefix": prefix, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -168,6 +168,96 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + google_application_credentials: typing.Optional[str] = OMIT, + google_project_id: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific GCS export storage connection. + + Parameters + ---------- + bucket : typing.Optional[str] + GCS bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + GCS bucket prefix + + project : typing.Optional[int] + Project ID + + title : typing.Optional[str] + Storage title + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.export_storage.gcs.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/export/gcs/validate", + method="POST", + json={ + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "google_application_credentials": google_application_credentials, + "google_project_id": google_project_id, + "id": id, + "prefix": prefix, + "project": project, + "title": title, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> GcsExportStorage: """ Get a specific GCS export storage connection. @@ -257,14 +347,14 @@ def update( self, id: int, *, + bucket: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GcsExportStorage: """ @@ -274,29 +364,29 @@ def update( ---------- id : int + bucket : typing.Optional[str] + GCS bucket name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - bucket : typing.Optional[str] - GCS bucket name + google_project_id : typing.Optional[str] + Google project ID prefix : typing.Optional[str] GCS bucket prefix - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + project : typing.Optional[int] + Project ID - google_project_id : typing.Optional[str] - Google project ID + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -321,14 +411,14 @@ def update( f"api/storages/export/gcs/{jsonable_encoder(id)}", method="PATCH", json={ + "bucket": bucket, "can_delete_objects": can_delete_objects, - "title": title, "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "prefix": prefix, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -396,125 +486,125 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncGcsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[GcsExportStorage]: """ - Validate a specific GCS export storage connection. + Get a list of all GCS export storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix - - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - - google_project_id : typing.Optional[str] - Google project ID - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[GcsExportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.export_storage.gcs.validate() + + + async def main() -> None: + await client.export_storage.gcs.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/export/gcs/validate", - method="POST", - json={ - "id": id, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/export/gcs", + method="GET", + params={ + "ordering": ordering, "project": project, - "bucket": bucket, - "prefix": prefix, - "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[GcsExportStorage], + construct_type( + type_=typing.List[GcsExportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncGcsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + google_application_credentials: typing.Optional[str] = OMIT, + google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[GcsExportStorage]: + ) -> GcsExportStorage: """ - Get a list of all GCS export storage connections. + Create a new GCS export storage connection to store annotations. Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + bucket : typing.Optional[str] + GCS bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + prefix : typing.Optional[str] + GCS bucket prefix project : typing.Optional[int] Project ID + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[GcsExportStorage] + GcsExportStorage Examples @@ -529,26 +619,36 @@ async def list( async def main() -> None: - await client.export_storage.gcs.list() + await client.export_storage.gcs.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/export/gcs", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "google_application_credentials": google_application_credentials, + "google_project_id": google_project_id, + "prefix": prefix, "project": project, + "title": title, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[GcsExportStorage], + GcsExportStorage, construct_type( - type_=typing.List[GcsExportStorage], # type: ignore + type_=GcsExportStorage, # type: ignore object_=_response.json(), ), ) @@ -557,55 +657,58 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, + bucket: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> GcsExportStorage: + ) -> None: """ - Create a new GCS export storage connection to store annotations. + Validate a specific GCS export storage connection. Parameters ---------- + bucket : typing.Optional[str] + GCS bucket name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - bucket : typing.Optional[str] - GCS bucket name + google_project_id : typing.Optional[str] + Google project ID + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated prefix : typing.Optional[str] GCS bucket prefix - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + project : typing.Optional[int] + Project ID - google_project_id : typing.Optional[str] - Google project ID + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - GcsExportStorage - + None Examples -------- @@ -619,23 +722,24 @@ async def create( async def main() -> None: - await client.export_storage.gcs.create() + await client.export_storage.gcs.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/gcs", + "api/storages/export/gcs/validate", method="POST", json={ + "bucket": bucket, "can_delete_objects": can_delete_objects, - "title": title, "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "id": id, + "prefix": prefix, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -645,13 +749,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - GcsExportStorage, - construct_type( - type_=GcsExportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -762,14 +860,14 @@ async def update( self, id: int, *, + bucket: typing.Optional[str] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GcsExportStorage: """ @@ -779,29 +877,29 @@ async def update( ---------- id : int + bucket : typing.Optional[str] + GCS bucket name + can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - bucket : typing.Optional[str] - GCS bucket name + google_project_id : typing.Optional[str] + Google project ID prefix : typing.Optional[str] GCS bucket prefix - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + project : typing.Optional[int] + Project ID - google_project_id : typing.Optional[str] - Google project ID + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -834,14 +932,14 @@ async def main() -> None: f"api/storages/export/gcs/{jsonable_encoder(id)}", method="PATCH", json={ + "bucket": bucket, "can_delete_objects": can_delete_objects, - "title": title, "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "prefix": prefix, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -916,101 +1014,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific GCS export storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix - - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - - google_project_id : typing.Optional[str] - Google project ID - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.export_storage.gcs.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/gcs/validate", - method="POST", - json={ - "id": id, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, - "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/export_storage/local/client.py b/src/label_studio_sdk/export_storage/local/client.py index e6e7e1e81..ae55c6fe3 100644 --- a/src/label_studio_sdk/export_storage/local/client.py +++ b/src/label_studio_sdk/export_storage/local/client.py @@ -79,11 +79,11 @@ def list( def create( self, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LocalFilesExportStorage: @@ -92,21 +92,21 @@ def create( Parameters ---------- - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -131,11 +131,11 @@ def create( "api/storages/export/localfiles", method="POST", json={ - "title": title, "description": description, - "project": project, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -158,6 +158,86 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific local file export storage connection. + + Parameters + ---------- + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + path : typing.Optional[str] + Path to local directory + + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Regex for filtering objects + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.export_storage.local.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/export/localfiles/validate", + method="POST", + json={ + "description": description, + "id": id, + "path": path, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LocalFilesExportStorage: """ Get a specific local file export storage connection. @@ -247,11 +327,11 @@ def update( self, id: int, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LocalFilesExportStorage: @@ -262,21 +342,21 @@ def update( ---------- id : int - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -303,11 +383,11 @@ def update( f"api/storages/export/localfiles/{jsonable_encoder(id)}", method="PATCH", json={ - "title": title, "description": description, - "project": project, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -376,115 +456,117 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncLocalClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[LocalFilesExportStorage]: """ - Validate a specific local file export storage connection. + Get a list of all local file export storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - path : typing.Optional[str] - Path to local directory - - regex_filter : typing.Optional[str] - Regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[LocalFilesExportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.export_storage.local.validate() + + + async def main() -> None: + await client.export_storage.local.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/export/localfiles/validate", - method="POST", - json={ - "id": id, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/export/localfiles", + method="GET", + params={ + "ordering": ordering, "project": project, - "path": path, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[LocalFilesExportStorage], + construct_type( + type_=typing.List[LocalFilesExportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncLocalClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + description: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LocalFilesExportStorage]: + ) -> LocalFilesExportStorage: """ - Get a list of all local file export storage connections. + Create a new local file export storage connection to store annotations. Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + description : typing.Optional[str] + Storage description + + path : typing.Optional[str] + Path to local directory project : typing.Optional[int] Project ID + regex_filter : typing.Optional[str] + Regex for filtering objects + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[LocalFilesExportStorage] + LocalFilesExportStorage Examples @@ -499,26 +581,34 @@ async def list( async def main() -> None: - await client.export_storage.local.list() + await client.export_storage.local.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/export/localfiles", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "description": description, + "path": path, "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[LocalFilesExportStorage], + LocalFilesExportStorage, construct_type( - type_=typing.List[LocalFilesExportStorage], # type: ignore + type_=LocalFilesExportStorage, # type: ignore object_=_response.json(), ), ) @@ -527,37 +617,41 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, + id: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> LocalFilesExportStorage: + ) -> None: """ - Create a new local file export storage connection to store annotations. + Validate a specific local file export storage connection. Parameters ---------- - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -566,8 +660,7 @@ async def create( Returns ------- - LocalFilesExportStorage - + None Examples -------- @@ -581,20 +674,21 @@ async def create( async def main() -> None: - await client.export_storage.local.create() + await client.export_storage.local.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/localfiles", + "api/storages/export/localfiles/validate", method="POST", json={ - "title": title, "description": description, - "project": project, + "id": id, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -605,13 +699,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - LocalFilesExportStorage, - construct_type( - type_=LocalFilesExportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -722,11 +810,11 @@ async def update( self, id: int, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LocalFilesExportStorage: @@ -737,21 +825,21 @@ async def update( ---------- id : int - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -786,11 +874,11 @@ async def main() -> None: f"api/storages/export/localfiles/{jsonable_encoder(id)}", method="PATCH", json={ - "title": title, "description": description, - "project": project, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -868,91 +956,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific local file export storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - path : typing.Optional[str] - Path to local directory - - regex_filter : typing.Optional[str] - Regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.export_storage.local.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/localfiles/validate", - method="POST", - json={ - "id": id, - "title": title, - "description": description, - "project": project, - "path": path, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/export_storage/redis/client.py b/src/label_studio_sdk/export_storage/redis/client.py index f8d7ae5de..30684bc96 100644 --- a/src/label_studio_sdk/export_storage/redis/client.py +++ b/src/label_studio_sdk/export_storage/redis/client.py @@ -79,15 +79,15 @@ def list( def create( self, *, - db: typing.Optional[int] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, + db: typing.Optional[int] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RedisExportStorage: """ @@ -95,32 +95,32 @@ def create( Parameters ---------- - db : typing.Optional[int] - Database ID of database to use - can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title + db : typing.Optional[int] + Database ID of database to use description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -143,15 +143,15 @@ def create( "api/storages/export/redis", method="POST", json={ - "db": db, "can_delete_objects": can_delete_objects, - "title": title, + "db": db, "description": description, - "project": project, - "path": path, "host": host, - "port": port, "password": password, + "path": path, + "port": port, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -173,6 +173,101 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + can_delete_objects: typing.Optional[bool] = OMIT, + db: typing.Optional[int] = OMIT, + description: typing.Optional[str] = OMIT, + host: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific Redis export storage connection. + + Parameters + ---------- + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + db : typing.Optional[int] + Database ID of database to use + + description : typing.Optional[str] + Storage description + + host : typing.Optional[str] + Server Host IP (optional) + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + password : typing.Optional[str] + Server Password (optional) + + path : typing.Optional[str] + Storage prefix (optional) + + port : typing.Optional[str] + Server Port (optional) + + project : typing.Optional[int] + Project ID + + title : typing.Optional[str] + Storage title + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.export_storage.redis.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/export/redis/validate", + method="POST", + json={ + "can_delete_objects": can_delete_objects, + "db": db, + "description": description, + "host": host, + "id": id, + "password": password, + "path": path, + "port": port, + "project": project, + "title": title, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> RedisExportStorage: """ Get a specific Redis export storage connection. @@ -262,15 +357,15 @@ def update( self, id: int, *, - db: typing.Optional[int] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, + db: typing.Optional[int] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RedisExportStorage: """ @@ -280,32 +375,32 @@ def update( ---------- id : int - db : typing.Optional[int] - Database ID of database to use - can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title + db : typing.Optional[int] + Database ID of database to use description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -330,15 +425,15 @@ def update( f"api/storages/export/redis/{jsonable_encoder(id)}", method="PATCH", json={ - "db": db, "can_delete_objects": can_delete_objects, - "title": title, + "db": db, "description": description, - "project": project, - "path": path, "host": host, - "port": port, "password": password, + "path": path, + "port": port, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -406,130 +501,129 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncRedisClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - db: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[RedisExportStorage]: """ - Validate a specific Redis export storage connection. + Get a list of all Redis export storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - db : typing.Optional[int] - Database ID of database to use - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - path : typing.Optional[str] - Storage prefix (optional) - - host : typing.Optional[str] - Server Host IP (optional) - - port : typing.Optional[str] - Server Port (optional) - - password : typing.Optional[str] - Server Password (optional) - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[RedisExportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.export_storage.redis.validate() + + + async def main() -> None: + await client.export_storage.redis.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/export/redis/validate", - method="POST", - json={ - "id": id, - "db": db, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/export/redis", + method="GET", + params={ + "ordering": ordering, "project": project, - "path": path, - "host": host, - "port": port, - "password": password, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[RedisExportStorage], + construct_type( + type_=typing.List[RedisExportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncRedisClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + can_delete_objects: typing.Optional[bool] = OMIT, + db: typing.Optional[int] = OMIT, + description: typing.Optional[str] = OMIT, + host: typing.Optional[str] = OMIT, + password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[RedisExportStorage]: + ) -> RedisExportStorage: """ - Get a list of all Redis export storage connections. + Create a new Redis export storage connection to store annotations. + + Parameters + ---------- + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + db : typing.Optional[int] + Database ID of database to use + + description : typing.Optional[str] + Storage description + + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) - Parameters - ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + path : typing.Optional[str] + Storage prefix (optional) + + port : typing.Optional[str] + Server Port (optional) project : typing.Optional[int] Project ID + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[RedisExportStorage] + RedisExportStorage Examples @@ -544,26 +638,37 @@ async def list( async def main() -> None: - await client.export_storage.redis.list() + await client.export_storage.redis.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/export/redis", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "can_delete_objects": can_delete_objects, + "db": db, + "description": description, + "host": host, + "password": password, + "path": path, + "port": port, "project": project, + "title": title, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[RedisExportStorage], + RedisExportStorage, construct_type( - type_=typing.List[RedisExportStorage], # type: ignore + type_=RedisExportStorage, # type: ignore object_=_response.json(), ), ) @@ -572,59 +677,62 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, - db: typing.Optional[int] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, + db: typing.Optional[int] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> RedisExportStorage: + ) -> None: """ - Create a new Redis export storage connection to store annotations. + Validate a specific Redis export storage connection. Parameters ---------- - db : typing.Optional[int] - Database ID of database to use - can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title + db : typing.Optional[int] + Database ID of database to use description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - RedisExportStorage - + None Examples -------- @@ -638,24 +746,25 @@ async def create( async def main() -> None: - await client.export_storage.redis.create() + await client.export_storage.redis.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/redis", + "api/storages/export/redis/validate", method="POST", json={ - "db": db, "can_delete_objects": can_delete_objects, - "title": title, + "db": db, "description": description, - "project": project, - "path": path, "host": host, - "port": port, + "id": id, "password": password, + "path": path, + "port": port, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -665,13 +774,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - RedisExportStorage, - construct_type( - type_=RedisExportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -782,15 +885,15 @@ async def update( self, id: int, *, - db: typing.Optional[int] = OMIT, can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, + db: typing.Optional[int] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RedisExportStorage: """ @@ -800,32 +903,32 @@ async def update( ---------- id : int - db : typing.Optional[int] - Database ID of database to use - can_delete_objects : typing.Optional[bool] Deletion from storage enabled. - title : typing.Optional[str] - Storage title + db : typing.Optional[int] + Database ID of database to use description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + title : typing.Optional[str] + Storage title request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -858,15 +961,15 @@ async def main() -> None: f"api/storages/export/redis/{jsonable_encoder(id)}", method="PATCH", json={ - "db": db, "can_delete_objects": can_delete_objects, - "title": title, + "db": db, "description": description, - "project": project, - "path": path, "host": host, - "port": port, "password": password, + "path": path, + "port": port, + "project": project, + "title": title, }, headers={ "content-type": "application/json", @@ -941,106 +1044,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - db: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific Redis export storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - db : typing.Optional[int] - Database ID of database to use - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - path : typing.Optional[str] - Storage prefix (optional) - - host : typing.Optional[str] - Server Host IP (optional) - - port : typing.Optional[str] - Server Port (optional) - - password : typing.Optional[str] - Server Password (optional) - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.export_storage.redis.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/redis/validate", - method="POST", - json={ - "id": id, - "db": db, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "path": path, - "host": host, - "port": port, - "password": password, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/export_storage/s3/client.py b/src/label_studio_sdk/export_storage/s3/client.py index f3e9d5cc9..1f72b5258 100644 --- a/src/label_studio_sdk/export_storage/s3/client.py +++ b/src/label_studio_sdk/export_storage/s3/client.py @@ -79,18 +79,18 @@ def list( def create( self, *, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> S3ExportStorage: """ @@ -98,24 +98,6 @@ def create( Parameters ---------- - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - aws_access_key_id : typing.Optional[str] AWS_ACCESS_KEY_ID @@ -128,12 +110,30 @@ def create( aws_sse_kms_key_id : typing.Optional[str] AWS SSE KMS Key ID + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + S3 bucket prefix + + project : typing.Optional[int] + Project ID + region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -155,18 +155,18 @@ def create( "api/storages/export/s3", method="POST", json={ - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "prefix": prefix, + "project": project, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, }, headers={ "content-type": "application/json", @@ -188,6 +188,116 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific S3 export storage connection. + + Parameters + ---------- + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID + + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + S3 bucket prefix + + project : typing.Optional[int] + Project ID + + region_name : typing.Optional[str] + AWS Region + + s3endpoint : typing.Optional[str] + S3 Endpoint + + title : typing.Optional[str] + Storage title + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.export_storage.s3.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/export/s3/validate", + method="POST", + json={ + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "id": id, + "prefix": prefix, + "project": project, + "region_name": region_name, + "s3_endpoint": s3endpoint, + "title": title, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> S3ExportStorage: """ Get a specific S3 export storage connection. @@ -277,18 +387,18 @@ def update( self, id: int, *, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> S3ExportStorage: """ @@ -298,24 +408,6 @@ def update( ---------- id : int - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - aws_access_key_id : typing.Optional[str] AWS_ACCESS_KEY_ID @@ -328,12 +420,30 @@ def update( aws_sse_kms_key_id : typing.Optional[str] AWS SSE KMS Key ID + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + S3 bucket prefix + + project : typing.Optional[int] + Project ID + region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -357,18 +467,18 @@ def update( f"api/storages/export/s3/{jsonable_encoder(id)}", method="PATCH", json={ - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "prefix": prefix, + "project": project, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, }, headers={ "content-type": "application/json", @@ -436,145 +546,141 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncS3Client: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[S3ExportStorage]: """ - Validate a specific S3 export storage connection. + Get a list of all S3 export storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - - region_name : typing.Optional[str] - AWS Region - - s3endpoint : typing.Optional[str] - S3 Endpoint - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[S3ExportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.export_storage.s3.validate() + + + async def main() -> None: + await client.export_storage.s3.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/export/s3/validate", - method="POST", - json={ - "id": id, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/export/s3", + method="GET", + params={ + "ordering": ordering, "project": project, - "bucket": bucket, - "prefix": prefix, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[S3ExportStorage], + construct_type( + type_=typing.List[S3ExportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncS3Client: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[S3ExportStorage]: + ) -> S3ExportStorage: """ - Get a list of all S3 export storage connections. + Create a new S3 export storage connection to store annotations. Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID + + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + S3 bucket prefix project : typing.Optional[int] Project ID + region_name : typing.Optional[str] + AWS Region + + s3endpoint : typing.Optional[str] + S3 Endpoint + + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[S3ExportStorage] + S3ExportStorage Examples @@ -589,26 +695,40 @@ async def list( async def main() -> None: - await client.export_storage.s3.list() + await client.export_storage.s3.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/export/s3", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "prefix": prefix, "project": project, + "region_name": region_name, + "s3_endpoint": s3endpoint, + "title": title, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[S3ExportStorage], + S3ExportStorage, construct_type( - type_=typing.List[S3ExportStorage], # type: ignore + type_=S3ExportStorage, # type: ignore object_=_response.json(), ), ) @@ -617,46 +737,29 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> S3ExportStorage: + ) -> None: """ - Create a new S3 export storage connection to store annotations. + Validate a specific S3 export storage connection. Parameters ---------- - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - aws_access_key_id : typing.Optional[str] AWS_ACCESS_KEY_ID @@ -669,19 +772,39 @@ async def create( aws_sse_kms_key_id : typing.Optional[str] AWS SSE KMS Key ID + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + S3 bucket prefix + + project : typing.Optional[int] + Project ID + region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - S3ExportStorage - + None Examples -------- @@ -695,27 +818,28 @@ async def create( async def main() -> None: - await client.export_storage.s3.create() + await client.export_storage.s3.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/s3", + "api/storages/export/s3/validate", method="POST", json={ - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "id": id, + "prefix": prefix, + "project": project, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, }, headers={ "content-type": "application/json", @@ -725,13 +849,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - S3ExportStorage, - construct_type( - type_=S3ExportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -842,18 +960,18 @@ async def update( self, id: int, *, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> S3ExportStorage: """ @@ -863,24 +981,6 @@ async def update( ---------- id : int - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - aws_access_key_id : typing.Optional[str] AWS_ACCESS_KEY_ID @@ -893,12 +993,30 @@ async def update( aws_sse_kms_key_id : typing.Optional[str] AWS SSE KMS Key ID + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled. + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + S3 bucket prefix + + project : typing.Optional[int] + Project ID + region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -930,18 +1048,18 @@ async def main() -> None: f"api/storages/export/s3/{jsonable_encoder(id)}", method="PATCH", json={ - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "prefix": prefix, + "project": project, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, }, headers={ "content-type": "application/json", @@ -1016,121 +1134,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific S3 export storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - - region_name : typing.Optional[str] - AWS Region - - s3endpoint : typing.Optional[str] - S3 Endpoint - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.export_storage.s3.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/s3/validate", - method="POST", - json={ - "id": id, - "can_delete_objects": can_delete_objects, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/export_storage/s3s/client.py b/src/label_studio_sdk/export_storage/s3s/client.py index 33a0078ca..e2c3e18ff 100644 --- a/src/label_studio_sdk/export_storage/s3s/client.py +++ b/src/label_studio_sdk/export_storage/s3s/client.py @@ -81,30 +81,30 @@ def list( def create( self, *, - role_arn: str, project: int, - synchronizable: typing.Optional[bool] = OMIT, + role_arn: str, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, last_sync: typing.Optional[dt.datetime] = OMIT, last_sync_count: typing.Optional[int] = OMIT, last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - bucket: typing.Optional[str] = OMIT, prefix: typing.Optional[str] = OMIT, regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseS3ExportStorage: """ @@ -112,13 +112,35 @@ def create( Parameters ---------- + project : int + A unique integer value identifying this project. + role_arn : str AWS RoleArn - project : int - A unique integer value identifying this project. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - synchronizable : typing.Optional[bool] + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId last_sync : typing.Optional[dt.datetime] Last sync finished time @@ -129,56 +151,34 @@ def create( last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix regex_filter : typing.Optional[str] Cloud storage regex for filtering objects - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId + status : typing.Optional[StatusC5AEnum] - legacy_auth : typing.Optional[bool] + synchronizable : typing.Optional[bool] + + title : typing.Optional[str] + Cloud storage title + + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -196,38 +196,38 @@ def create( api_key="YOUR_API_KEY", ) client.export_storage.s3s.create( - role_arn="role_arn", project=1, + role_arn="role_arn", ) """ _response = self._client_wrapper.httpx_client.request( "api/storages/export/s3s", method="POST", json={ - "synchronizable": synchronizable, + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "external_id": external_id, "last_sync": last_sync, "last_sync_count": last_sync_count, "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, + "legacy_auth": legacy_auth, "meta": meta, - "title": title, - "description": description, - "can_delete_objects": can_delete_objects, - "bucket": bucket, "prefix": prefix, + "project": project, "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, "region_name": region_name, - "s3_endpoint": s3endpoint, - "external_id": external_id, "role_arn": role_arn, - "legacy_auth": legacy_auth, - "project": project, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, }, request_options=request_options, omit=OMIT, @@ -246,21 +246,114 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage: + def validate( + self, + *, + project: int, + role_arn: str, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: """ - Get a specific S3 export storage connection that was set up with IAM role access. + Validate a specific S3 export storage connection that was set up with IAM role access. Parameters ---------- - id : int + project : int + A unique integer value identifying this project. + + role_arn : str + AWS RoleArn + + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID + + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId + + last_sync : typing.Optional[dt.datetime] + Last sync finished time + + last_sync_count : typing.Optional[int] + Count of tasks synced last time + + last_sync_job : typing.Optional[str] + Last sync job ID + + legacy_auth : typing.Optional[bool] + + meta : typing.Optional[typing.Optional[typing.Any]] + + prefix : typing.Optional[str] + S3 bucket prefix + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects + + region_name : typing.Optional[str] + AWS Region + + s3endpoint : typing.Optional[str] + S3 Endpoint + + status : typing.Optional[StatusC5AEnum] + + synchronizable : typing.Optional[bool] + + title : typing.Optional[str] + Cloud storage title + + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - LseS3ExportStorage - + None Examples -------- @@ -269,21 +362,89 @@ def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = Non client = LabelStudio( api_key="YOUR_API_KEY", ) - client.export_storage.s3s.get( - id=1, + client.export_storage.s3s.validate( + project=1, + role_arn="role_arn", ) """ _response = self._client_wrapper.httpx_client.request( - f"api/storages/export/s3s/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - LseS3ExportStorage, - construct_type( - type_=LseS3ExportStorage, # type: ignore + "api/storages/export/s3s/validate", + method="POST", + json={ + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "external_id": external_id, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, + "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "project": project, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage: + """ + Get a specific S3 export storage connection that was set up with IAM role access. + + Parameters + ---------- + id : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + LseS3ExportStorage + + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.export_storage.s3s.get( + id=1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"api/storages/export/s3s/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + LseS3ExportStorage, + construct_type( + type_=LseS3ExportStorage, # type: ignore object_=_response.json(), ), ) @@ -335,30 +496,30 @@ def update( self, id: int, *, - synchronizable: typing.Optional[bool] = OMIT, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, last_sync: typing.Optional[dt.datetime] = OMIT, last_sync_count: typing.Optional[int] = OMIT, last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - bucket: typing.Optional[str] = OMIT, prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, role_arn: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, - project: typing.Optional[int] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseS3ExportStorage: """ @@ -368,7 +529,29 @@ def update( ---------- id : int - synchronizable : typing.Optional[bool] + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID + + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId last_sync : typing.Optional[dt.datetime] Last sync finished time @@ -379,62 +562,40 @@ def update( last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix + project : typing.Optional[int] + A unique integer value identifying this project. + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - region_name : typing.Optional[str] AWS Region + role_arn : typing.Optional[str] + AWS RoleArn + s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId + status : typing.Optional[StatusC5AEnum] - role_arn : typing.Optional[str] - AWS RoleArn + synchronizable : typing.Optional[bool] - legacy_auth : typing.Optional[bool] + title : typing.Optional[str] + Cloud storage title - project : typing.Optional[int] - A unique integer value identifying this project. + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -459,30 +620,30 @@ def update( f"api/storages/export/s3s/{jsonable_encoder(id)}", method="PATCH", json={ - "synchronizable": synchronizable, + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "external_id": external_id, "last_sync": last_sync, "last_sync_count": last_sync_count, "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, + "legacy_auth": legacy_auth, "meta": meta, - "title": title, - "description": description, - "can_delete_objects": can_delete_objects, - "bucket": bucket, "prefix": prefix, + "project": project, "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, "region_name": region_name, - "s3_endpoint": s3endpoint, - "external_id": external_id, "role_arn": role_arn, - "legacy_auth": legacy_auth, - "project": project, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -550,181 +711,20 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncS3SClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - role_arn: str, - project: int, - synchronizable: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[LseS3ExportStorage]: """ - Validate a specific S3 export storage connection that was set up with IAM role access. - - Parameters - ---------- - role_arn : str - AWS RoleArn - - project : int - A unique integer value identifying this project. - - synchronizable : typing.Optional[bool] - - last_sync : typing.Optional[dt.datetime] - Last sync finished time - - last_sync_count : typing.Optional[int] - Count of tasks synced last time - - last_sync_job : typing.Optional[str] - Last sync job ID - - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync - - meta : typing.Optional[typing.Optional[typing.Any]] - - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - - region_name : typing.Optional[str] - AWS Region - - s3endpoint : typing.Optional[str] - S3 Endpoint - - external_id : typing.Optional[str] - AWS ExternalId - - legacy_auth : typing.Optional[bool] - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - from label_studio_sdk import LabelStudio - - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.export_storage.s3s.validate( - role_arn="role_arn", - project=1, - ) - """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/export/s3s/validate", - method="POST", - json={ - "synchronizable": synchronizable, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "can_delete_objects": can_delete_objects, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, - "external_id": external_id, - "role_arn": role_arn, - "legacy_auth": legacy_auth, - "project": project, - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncS3SClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( - self, - *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LseS3ExportStorage]: - """ - Get a list of all S3 export storage connections that were set up with IAM role access. + Get a list of all S3 export storage connections that were set up with IAM role access. Parameters ---------- @@ -785,30 +785,30 @@ async def main() -> None: async def create( self, *, - role_arn: str, project: int, - synchronizable: typing.Optional[bool] = OMIT, + role_arn: str, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, last_sync: typing.Optional[dt.datetime] = OMIT, last_sync_count: typing.Optional[int] = OMIT, last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - bucket: typing.Optional[str] = OMIT, prefix: typing.Optional[str] = OMIT, regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseS3ExportStorage: """ @@ -816,13 +816,35 @@ async def create( Parameters ---------- + project : int + A unique integer value identifying this project. + role_arn : str AWS RoleArn - project : int - A unique integer value identifying this project. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - synchronizable : typing.Optional[bool] + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId last_sync : typing.Optional[dt.datetime] Last sync finished time @@ -833,56 +855,34 @@ async def create( last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix regex_filter : typing.Optional[str] Cloud storage regex for filtering objects - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId + status : typing.Optional[StatusC5AEnum] - legacy_auth : typing.Optional[bool] + synchronizable : typing.Optional[bool] + + title : typing.Optional[str] + Cloud storage title + + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -905,8 +905,8 @@ async def create( async def main() -> None: await client.export_storage.s3s.create( - role_arn="role_arn", project=1, + role_arn="role_arn", ) @@ -916,30 +916,30 @@ async def main() -> None: "api/storages/export/s3s", method="POST", json={ - "synchronizable": synchronizable, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "can_delete_objects": can_delete_objects, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, "external_id": external_id, - "role_arn": role_arn, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, "project": project, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, }, request_options=request_options, omit=OMIT, @@ -958,67 +958,107 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage: + async def validate( + self, + *, + project: int, + role_arn: str, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: """ - Get a specific S3 export storage connection that was set up with IAM role access. + Validate a specific S3 export storage connection that was set up with IAM role access. Parameters ---------- - id : int + project : int + A unique integer value identifying this project. - request_options : typing.Optional[RequestOptions] - Request-specific configuration. + role_arn : str + AWS RoleArn - Returns - ------- - LseS3ExportStorage + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - Examples - -------- - import asyncio + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN - from label_studio_sdk import AsyncLabelStudio + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) + bucket : typing.Optional[str] + S3 bucket name + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled - async def main() -> None: - await client.export_storage.s3s.get( - id=1, - ) + description : typing.Optional[str] + Cloud storage description + external_id : typing.Optional[str] + AWS ExternalId - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - f"api/storages/export/s3s/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - LseS3ExportStorage, - construct_type( - type_=LseS3ExportStorage, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + last_sync : typing.Optional[dt.datetime] + Last sync finished time - async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: - """ - Delete a specific S3 export storage connection that was set up with IAM role access. + last_sync_count : typing.Optional[int] + Count of tasks synced last time - Parameters - ---------- - id : int + last_sync_job : typing.Optional[str] + Last sync job ID + + legacy_auth : typing.Optional[bool] + + meta : typing.Optional[typing.Optional[typing.Any]] + + prefix : typing.Optional[str] + S3 bucket prefix + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects + + region_name : typing.Optional[str] + AWS Region + + s3endpoint : typing.Optional[str] + S3 Endpoint + + status : typing.Optional[StatusC5AEnum] + + synchronizable : typing.Optional[bool] + + title : typing.Optional[str] + Cloud storage title + + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1039,17 +1079,45 @@ async def delete(self, id: int, *, request_options: typing.Optional[RequestOptio async def main() -> None: - await client.export_storage.s3s.delete( - id=1, + await client.export_storage.s3s.validate( + project=1, + role_arn="role_arn", ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/storages/export/s3s/{jsonable_encoder(id)}", - method="DELETE", + "api/storages/export/s3s/validate", + method="POST", + json={ + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "external_id": external_id, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, + "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "project": project, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -1059,111 +1127,14 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def update( - self, - id: int, - *, - synchronizable: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - role_arn: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, - project: typing.Optional[int] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> LseS3ExportStorage: + async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage: """ - Update a specific S3 export storage connection that was set up with IAM role access. + Get a specific S3 export storage connection that was set up with IAM role access. Parameters ---------- id : int - synchronizable : typing.Optional[bool] - - last_sync : typing.Optional[dt.datetime] - Last sync finished time - - last_sync_count : typing.Optional[int] - Count of tasks synced last time - - last_sync_job : typing.Optional[str] - Last sync job ID - - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync - - meta : typing.Optional[typing.Optional[typing.Any]] - - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - - region_name : typing.Optional[str] - AWS Region - - s3endpoint : typing.Optional[str] - S3 Endpoint - - external_id : typing.Optional[str] - AWS ExternalId - - role_arn : typing.Optional[str] - AWS RoleArn - - legacy_auth : typing.Optional[bool] - - project : typing.Optional[int] - A unique integer value identifying this project. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1184,47 +1155,17 @@ async def update( async def main() -> None: - await client.export_storage.s3s.update( + await client.export_storage.s3s.get( id=1, ) - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - f"api/storages/export/s3s/{jsonable_encoder(id)}", - method="PATCH", - json={ - "synchronizable": synchronizable, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "can_delete_objects": can_delete_objects, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, - "external_id": external_id, - "role_arn": role_arn, - "legacy_auth": legacy_auth, - "project": project, - }, - headers={ - "content-type": "application/json", - }, + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"api/storages/export/s3s/{jsonable_encoder(id)}", + method="GET", request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -1240,9 +1181,9 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage: + async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Sync tasks from an S3 export storage. + Delete a specific S3 export storage connection that was set up with IAM role access. Parameters ---------- @@ -1253,8 +1194,7 @@ async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions Returns ------- - LseS3ExportStorage - + None Examples -------- @@ -1268,7 +1208,7 @@ async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions async def main() -> None: - await client.export_storage.s3s.sync( + await client.export_storage.s3s.delete( id=1, ) @@ -1276,65 +1216,78 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/storages/export/s3s/{jsonable_encoder(id)}/sync", - method="POST", + f"api/storages/export/s3s/{jsonable_encoder(id)}", + method="DELETE", request_options=request_options, ) try: if 200 <= _response.status_code < 300: - return typing.cast( - LseS3ExportStorage, - construct_type( - type_=LseS3ExportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def validate( + async def update( self, + id: int, *, - role_arn: str, - project: int, - synchronizable: typing.Optional[bool] = OMIT, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + can_delete_objects: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, last_sync: typing.Optional[dt.datetime] = OMIT, last_sync_count: typing.Optional[int] = OMIT, last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - can_delete_objects: typing.Optional[bool] = OMIT, - bucket: typing.Optional[str] = OMIT, prefix: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, + role_arn: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> LseS3ExportStorage: """ - Validate a specific S3 export storage connection that was set up with IAM role access. + Update a specific S3 export storage connection that was set up with IAM role access. Parameters ---------- - role_arn : str - AWS RoleArn + id : int - project : int - A unique integer value identifying this project. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - synchronizable : typing.Optional[bool] + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + can_delete_objects : typing.Optional[bool] + Deletion from storage enabled + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId last_sync : typing.Optional[dt.datetime] Last sync finished time @@ -1345,63 +1298,48 @@ async def validate( last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - can_delete_objects : typing.Optional[bool] - Deletion from storage enabled - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix + project : typing.Optional[int] + A unique integer value identifying this project. + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - region_name : typing.Optional[str] AWS Region + role_arn : typing.Optional[str] + AWS RoleArn + s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId + status : typing.Optional[StatusC5AEnum] - legacy_auth : typing.Optional[bool] + synchronizable : typing.Optional[bool] + + title : typing.Optional[str] + Cloud storage title + + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + LseS3ExportStorage + Examples -------- @@ -1415,49 +1353,111 @@ async def validate( async def main() -> None: - await client.export_storage.s3s.validate( - role_arn="role_arn", - project=1, + await client.export_storage.s3s.update( + id=1, ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/export/s3s/validate", - method="POST", + f"api/storages/export/s3s/{jsonable_encoder(id)}", + method="PATCH", json={ - "synchronizable": synchronizable, + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "can_delete_objects": can_delete_objects, + "description": description, + "external_id": external_id, "last_sync": last_sync, "last_sync_count": last_sync_count, "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, + "legacy_auth": legacy_auth, "meta": meta, - "title": title, - "description": description, - "can_delete_objects": can_delete_objects, - "bucket": bucket, "prefix": prefix, + "project": project, "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, "region_name": region_name, - "s3_endpoint": s3endpoint, - "external_id": external_id, "role_arn": role_arn, - "legacy_auth": legacy_auth, - "project": project, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + LseS3ExportStorage, + construct_type( + type_=LseS3ExportStorage, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage: + """ + Sync tasks from an S3 export storage. + + Parameters + ---------- + id : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + LseS3ExportStorage + + + Examples + -------- + import asyncio + + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.export_storage.s3s.sync( + id=1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"api/storages/export/s3s/{jsonable_encoder(id)}/sync", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + LseS3ExportStorage, + construct_type( + type_=LseS3ExportStorage, # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) diff --git a/src/label_studio_sdk/import_storage/azure/client.py b/src/label_studio_sdk/import_storage/azure/client.py index 6db727250..bf31f88bd 100644 --- a/src/label_studio_sdk/import_storage/azure/client.py +++ b/src/label_studio_sdk/import_storage/azure/client.py @@ -79,17 +79,17 @@ def list( def create( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AzureBlobImportStorage: """ @@ -97,11 +97,20 @@ def create( Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + account_key : typing.Optional[str] + Azure Blob account key - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + account_name : typing.Optional[str] + Azure Blob account name + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + Azure blob prefix name presign : typing.Optional[bool] Presign URLs for direct download @@ -109,26 +118,17 @@ def create( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - account_name : typing.Optional[str] - Azure Blob account name + title : typing.Optional[str] + Storage title - account_key : typing.Optional[str] - Azure Blob account key + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -151,17 +151,17 @@ def create( "api/storages/azure/", method="POST", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, + "account_key": account_key, + "account_name": account_name, + "container": container, + "description": description, + "prefix": prefix, "presign": presign, "presign_ttl": presign_ttl, - "title": title, - "description": description, "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -183,6 +183,111 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific Azure import storage connection. + + Parameters + ---------- + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + Azure blob prefix name + + presign : typing.Optional[bool] + Presign URLs for direct download + + presign_ttl : typing.Optional[int] + Presign TTL in minutes + + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.import_storage.azure.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/azure/validate", + method="POST", + json={ + "account_key": account_key, + "account_name": account_name, + "container": container, + "description": description, + "id": id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> AzureBlobImportStorage: """ Get a specific Azure import storage connection. @@ -272,17 +377,17 @@ def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AzureBlobImportStorage: """ @@ -292,11 +397,20 @@ def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + account_key : typing.Optional[str] + Azure Blob account key - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + account_name : typing.Optional[str] + Azure Blob account name + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + Azure blob prefix name presign : typing.Optional[bool] Presign URLs for direct download @@ -304,26 +418,17 @@ def update( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - account_name : typing.Optional[str] - Azure Blob account name + title : typing.Optional[str] + Storage title - account_key : typing.Optional[str] - Azure Blob account key + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -348,17 +453,17 @@ def update( f"api/storages/azure/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, + "account_key": account_key, + "account_name": account_name, + "container": container, + "description": description, + "prefix": prefix, "presign": presign, "presign_ttl": presign_ttl, - "title": title, - "description": description, "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -427,140 +532,137 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncAzureClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[AzureBlobImportStorage]: """ - Validate a specific Azure import storage connection. + Get list of all Azure import storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - presign : typing.Optional[bool] - Presign URLs for direct download - - presign_ttl : typing.Optional[int] - Presign TTL in minutes - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name - - account_name : typing.Optional[str] - Azure Blob account name - - account_key : typing.Optional[str] - Azure Blob account key - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[AzureBlobImportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.azure.validate() + + + async def main() -> None: + await client.import_storage.azure.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/azure/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/azure/", + method="GET", + params={ + "ordering": ordering, "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[AzureBlobImportStorage], + construct_type( + type_=typing.List[AzureBlobImportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncAzureClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[AzureBlobImportStorage]: + ) -> AzureBlobImportStorage: """ - Get list of all Azure import storage connections. + Create new Azure import storage Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + account_key : typing.Optional[str] + Azure Blob account key + + account_name : typing.Optional[str] + Azure Blob account name + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + Azure blob prefix name + + presign : typing.Optional[bool] + Presign URLs for direct download + + presign_ttl : typing.Optional[int] + Presign TTL in minutes project : typing.Optional[int] Project ID + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[AzureBlobImportStorage] + AzureBlobImportStorage Examples @@ -575,26 +677,39 @@ async def list( async def main() -> None: - await client.import_storage.azure.list() + await client.import_storage.azure.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/azure/", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "account_key": account_key, + "account_name": account_name, + "container": container, + "description": description, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[AzureBlobImportStorage], + AzureBlobImportStorage, construct_type( - type_=typing.List[AzureBlobImportStorage], # type: ignore + type_=AzureBlobImportStorage, # type: ignore object_=_response.json(), ), ) @@ -603,32 +718,45 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> AzureBlobImportStorage: + ) -> None: """ - Create new Azure import storage + Validate a specific Azure import storage connection. Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + account_key : typing.Optional[str] + Azure Blob account key - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + account_name : typing.Optional[str] + Azure Blob account name + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + Azure blob prefix name presign : typing.Optional[bool] Presign URLs for direct download @@ -636,34 +764,24 @@ async def create( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - account_name : typing.Optional[str] - Azure Blob account name + title : typing.Optional[str] + Storage title - account_key : typing.Optional[str] - Azure Blob account key + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AzureBlobImportStorage - + None Examples -------- @@ -677,26 +795,27 @@ async def create( async def main() -> None: - await client.import_storage.azure.create() + await client.import_storage.azure.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/azure/", + "api/storages/azure/validate", method="POST", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, + "account_key": account_key, + "account_name": account_name, + "container": container, + "description": description, + "id": id, + "prefix": prefix, "presign": presign, "presign_ttl": presign_ttl, - "title": title, - "description": description, "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -706,13 +825,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - AzureBlobImportStorage, - construct_type( - type_=AzureBlobImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -823,17 +936,17 @@ async def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + account_key: typing.Optional[str] = OMIT, + account_name: typing.Optional[str] = OMIT, + container: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AzureBlobImportStorage: """ @@ -843,11 +956,20 @@ async def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + account_key : typing.Optional[str] + Azure Blob account key - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + account_name : typing.Optional[str] + Azure Blob account name + + container : typing.Optional[str] + Azure blob container + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + Azure blob prefix name presign : typing.Optional[bool] Presign URLs for direct download @@ -855,26 +977,17 @@ async def update( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - account_name : typing.Optional[str] - Azure Blob account name + title : typing.Optional[str] + Storage title - account_key : typing.Optional[str] - Azure Blob account key + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -907,17 +1020,17 @@ async def main() -> None: f"api/storages/azure/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, + "account_key": account_key, + "account_name": account_name, + "container": container, + "description": description, + "prefix": prefix, "presign": presign, "presign_ttl": presign_ttl, - "title": title, - "description": description, "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -993,116 +1106,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - container: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - account_name: typing.Optional[str] = OMIT, - account_key: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific Azure import storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - presign : typing.Optional[bool] - Presign URLs for direct download - - presign_ttl : typing.Optional[int] - Presign TTL in minutes - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - container : typing.Optional[str] - Azure blob container - - prefix : typing.Optional[str] - Azure blob prefix name - - account_name : typing.Optional[str] - Azure Blob account name - - account_key : typing.Optional[str] - Azure Blob account key - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.import_storage.azure.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/azure/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, - "project": project, - "container": container, - "prefix": prefix, - "account_name": account_name, - "account_key": account_key, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/import_storage/gcs/client.py b/src/label_studio_sdk/import_storage/gcs/client.py index a2ddafd77..08c63bdf8 100644 --- a/src/label_studio_sdk/import_storage/gcs/client.py +++ b/src/label_studio_sdk/import_storage/gcs/client.py @@ -79,17 +79,17 @@ def list( def create( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GcsImportStorage: """ @@ -97,11 +97,20 @@ def create( Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + bucket : typing.Optional[str] + GCS bucket name - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + prefix : typing.Optional[str] + GCS bucket prefix presign : typing.Optional[bool] Presign URLs for direct download @@ -109,26 +118,17 @@ def create( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + title : typing.Optional[str] + Storage title - google_project_id : typing.Optional[str] - Google project ID + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -151,17 +151,17 @@ def create( "api/storages/gcs/", method="POST", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, - "project": project, "bucket": bucket, - "prefix": prefix, + "description": description, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -183,6 +183,111 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + google_application_credentials: typing.Optional[str] = OMIT, + google_project_id: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific GCS import storage connection. + + Parameters + ---------- + bucket : typing.Optional[str] + GCS bucket name + + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + GCS bucket prefix + + presign : typing.Optional[bool] + Presign URLs for direct download + + presign_ttl : typing.Optional[int] + Presign TTL in minutes + + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.import_storage.gcs.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/gcs/validate", + method="POST", + json={ + "bucket": bucket, + "description": description, + "google_application_credentials": google_application_credentials, + "google_project_id": google_project_id, + "id": id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> GcsImportStorage: """ Get a specific GCS import storage connection. @@ -272,17 +377,17 @@ def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GcsImportStorage: """ @@ -292,11 +397,20 @@ def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + bucket : typing.Optional[str] + GCS bucket name - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + prefix : typing.Optional[str] + GCS bucket prefix presign : typing.Optional[bool] Presign URLs for direct download @@ -304,26 +418,17 @@ def update( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + title : typing.Optional[str] + Storage title - google_project_id : typing.Optional[str] - Google project ID + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -348,17 +453,17 @@ def update( f"api/storages/gcs/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, - "project": project, "bucket": bucket, - "prefix": prefix, + "description": description, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -427,140 +532,137 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncGcsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[GcsImportStorage]: """ - Validate a specific GCS import storage connection. + Get a list of all GCS import storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - presign : typing.Optional[bool] - Presign URLs for direct download - - presign_ttl : typing.Optional[int] - Presign TTL in minutes - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix - - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - - google_project_id : typing.Optional[str] - Google project ID - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[GcsImportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.gcs.validate() + + + async def main() -> None: + await client.import_storage.gcs.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/gcs/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/gcs/", + method="GET", + params={ + "ordering": ordering, "project": project, - "bucket": bucket, - "prefix": prefix, - "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[GcsImportStorage], + construct_type( + type_=typing.List[GcsImportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncGcsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + google_application_credentials: typing.Optional[str] = OMIT, + google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[GcsImportStorage]: + ) -> GcsImportStorage: """ - Get a list of all GCS import storage connections. + Create a new GCS import storage connection. Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + bucket : typing.Optional[str] + GCS bucket name + + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + prefix : typing.Optional[str] + GCS bucket prefix + + presign : typing.Optional[bool] + Presign URLs for direct download + + presign_ttl : typing.Optional[int] + Presign TTL in minutes project : typing.Optional[int] Project ID + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[GcsImportStorage] + GcsImportStorage Examples @@ -575,26 +677,39 @@ async def list( async def main() -> None: - await client.import_storage.gcs.list() + await client.import_storage.gcs.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/gcs/", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "bucket": bucket, + "description": description, + "google_application_credentials": google_application_credentials, + "google_project_id": google_project_id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[GcsImportStorage], + GcsImportStorage, construct_type( - type_=typing.List[GcsImportStorage], # type: ignore + type_=GcsImportStorage, # type: ignore object_=_response.json(), ), ) @@ -603,32 +718,45 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> GcsImportStorage: + ) -> None: """ - Create a new GCS import storage connection. + Validate a specific GCS import storage connection. Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + bucket : typing.Optional[str] + GCS bucket name - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + GCS bucket prefix presign : typing.Optional[bool] Presign URLs for direct download @@ -636,34 +764,24 @@ async def create( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + title : typing.Optional[str] + Storage title - google_project_id : typing.Optional[str] - Google project ID + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - GcsImportStorage - + None Examples -------- @@ -677,26 +795,27 @@ async def create( async def main() -> None: - await client.import_storage.gcs.create() + await client.import_storage.gcs.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/gcs/", + "api/storages/gcs/validate", method="POST", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, - "project": project, "bucket": bucket, - "prefix": prefix, + "description": description, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "id": id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -706,13 +825,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - GcsImportStorage, - construct_type( - type_=GcsImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -823,17 +936,17 @@ async def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, google_project_id: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GcsImportStorage: """ @@ -843,11 +956,20 @@ async def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + bucket : typing.Optional[str] + GCS bucket name - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + description : typing.Optional[str] + Storage description + + google_application_credentials : typing.Optional[str] + The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + + google_project_id : typing.Optional[str] + Google project ID + + prefix : typing.Optional[str] + GCS bucket prefix presign : typing.Optional[bool] Presign URLs for direct download @@ -855,26 +977,17 @@ async def update( presign_ttl : typing.Optional[int] Presign TTL in minutes - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - project : typing.Optional[int] Project ID - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. + title : typing.Optional[str] + Storage title - google_project_id : typing.Optional[str] - Google project ID + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -907,17 +1020,17 @@ async def main() -> None: f"api/storages/gcs/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, - "project": project, "bucket": bucket, - "prefix": prefix, + "description": description, "google_application_credentials": google_application_credentials, "google_project_id": google_project_id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -993,116 +1106,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific GCS import storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - presign : typing.Optional[bool] - Presign URLs for direct download - - presign_ttl : typing.Optional[int] - Presign TTL in minutes - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - GCS bucket name - - prefix : typing.Optional[str] - GCS bucket prefix - - google_application_credentials : typing.Optional[str] - The content of GOOGLE_APPLICATION_CREDENTIALS json file. Check official Google Cloud Authentication documentation for more details. - - google_project_id : typing.Optional[str] - Google project ID - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.import_storage.gcs.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/gcs/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, - "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/import_storage/local/client.py b/src/label_studio_sdk/import_storage/local/client.py index 14481e78d..94bbd5ff6 100644 --- a/src/label_studio_sdk/import_storage/local/client.py +++ b/src/label_studio_sdk/import_storage/local/client.py @@ -79,11 +79,11 @@ def list( def create( self, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LocalFilesImportStorage: @@ -92,21 +92,21 @@ def create( Parameters ---------- - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -131,11 +131,11 @@ def create( "api/storages/localfiles/", method="POST", json={ - "title": title, "description": description, - "project": project, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -158,6 +158,86 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific local file import storage connection. + + Parameters + ---------- + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + path : typing.Optional[str] + Path to local directory + + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Regex for filtering objects + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.import_storage.local.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/localfiles/validate", + method="POST", + json={ + "description": description, + "id": id, + "path": path, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LocalFilesImportStorage: """ Get a specific local file import storage connection. @@ -247,11 +327,11 @@ def update( self, id: int, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LocalFilesImportStorage: @@ -262,21 +342,21 @@ def update( ---------- id : int - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -303,11 +383,11 @@ def update( f"api/storages/localfiles/{jsonable_encoder(id)}", method="PATCH", json={ - "title": title, "description": description, - "project": project, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -377,115 +457,117 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncLocalClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[LocalFilesImportStorage]: """ - Validate a specific local file import storage connection. + Get a list of all local file import storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - path : typing.Optional[str] - Path to local directory - - regex_filter : typing.Optional[str] - Regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[LocalFilesImportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.local.validate() + + + async def main() -> None: + await client.import_storage.local.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/localfiles/validate", - method="POST", - json={ - "id": id, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/localfiles/", + method="GET", + params={ + "ordering": ordering, "project": project, - "path": path, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[LocalFilesImportStorage], + construct_type( + type_=typing.List[LocalFilesImportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncLocalClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + description: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[LocalFilesImportStorage]: + ) -> LocalFilesImportStorage: """ - Get a list of all local file import storage connections. + Create a new local file import storage connection. Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + description : typing.Optional[str] + Storage description + + path : typing.Optional[str] + Path to local directory project : typing.Optional[int] Project ID + regex_filter : typing.Optional[str] + Regex for filtering objects + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[LocalFilesImportStorage] + LocalFilesImportStorage Examples @@ -500,26 +582,34 @@ async def list( async def main() -> None: - await client.import_storage.local.list() + await client.import_storage.local.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/localfiles/", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "description": description, + "path": path, "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[LocalFilesImportStorage], + LocalFilesImportStorage, construct_type( - type_=typing.List[LocalFilesImportStorage], # type: ignore + type_=LocalFilesImportStorage, # type: ignore object_=_response.json(), ), ) @@ -528,37 +618,41 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, + id: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> LocalFilesImportStorage: + ) -> None: """ - Create a new local file import storage connection. + Validate a specific local file import storage connection. Parameters ---------- - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -567,8 +661,7 @@ async def create( Returns ------- - LocalFilesImportStorage - + None Examples -------- @@ -582,20 +675,21 @@ async def create( async def main() -> None: - await client.import_storage.local.create() + await client.import_storage.local.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/localfiles/", + "api/storages/localfiles/validate", method="POST", json={ - "title": title, "description": description, - "project": project, + "id": id, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -606,13 +700,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - LocalFilesImportStorage, - construct_type( - type_=LocalFilesImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -723,11 +811,11 @@ async def update( self, id: int, *, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, path: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LocalFilesImportStorage: @@ -738,21 +826,21 @@ async def update( ---------- id : int - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - path : typing.Optional[str] Path to local directory + project : typing.Optional[int] + Project ID + regex_filter : typing.Optional[str] Regex for filtering objects + title : typing.Optional[str] + Storage title + use_blob_urls : typing.Optional[bool] Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. @@ -787,11 +875,11 @@ async def main() -> None: f"api/storages/localfiles/{jsonable_encoder(id)}", method="PATCH", json={ - "title": title, "description": description, - "project": project, "path": path, + "project": project, "regex_filter": regex_filter, + "title": title, "use_blob_urls": use_blob_urls, }, headers={ @@ -870,91 +958,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific local file import storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - path : typing.Optional[str] - Path to local directory - - regex_filter : typing.Optional[str] - Regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your directory contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.import_storage.local.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/localfiles/validate", - method="POST", - json={ - "id": id, - "title": title, - "description": description, - "project": project, - "path": path, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/import_storage/redis/client.py b/src/label_studio_sdk/import_storage/redis/client.py index c95e985d6..c3d44bd64 100644 --- a/src/label_studio_sdk/import_storage/redis/client.py +++ b/src/label_studio_sdk/import_storage/redis/client.py @@ -79,15 +79,15 @@ def list( def create( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RedisImportStorage: """ @@ -95,32 +95,32 @@ def create( Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -143,15 +143,15 @@ def create( "api/storages/redis/", method="POST", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "title": title, "description": description, - "project": project, - "path": path, "host": host, - "port": port, "password": password, + "path": path, + "port": port, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -173,6 +173,101 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def validate( + self, + *, + description: typing.Optional[str] = OMIT, + host: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific Redis import storage connection. + + Parameters + ---------- + description : typing.Optional[str] + Storage description + + host : typing.Optional[str] + Server Host IP (optional) + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + password : typing.Optional[str] + Server Password (optional) + + path : typing.Optional[str] + Storage prefix (optional) + + port : typing.Optional[str] + Server Port (optional) + + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.import_storage.redis.validate() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/redis/validate", + method="POST", + json={ + "description": description, + "host": host, + "id": id, + "password": password, + "path": path, + "port": port, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> RedisImportStorage: """ Get a specific Redis import storage connection. @@ -262,15 +357,15 @@ def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RedisImportStorage: """ @@ -280,32 +375,32 @@ def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -330,15 +425,15 @@ def update( f"api/storages/redis/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "title": title, "description": description, - "project": project, - "path": path, "host": host, - "port": port, "password": password, + "path": path, + "port": port, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -407,130 +502,129 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( + +class AsyncRedisClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( self, *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, + ordering: typing.Optional[str] = None, + project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> typing.List[RedisImportStorage]: """ - Validate a specific Redis import storage connection. + Get a list of all Redis import storage connections. Parameters ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description + ordering : typing.Optional[str] + Which field to use when ordering the results. project : typing.Optional[int] Project ID - path : typing.Optional[str] - Storage prefix (optional) - - host : typing.Optional[str] - Server Host IP (optional) - - port : typing.Optional[str] - Server Port (optional) - - password : typing.Optional[str] - Server Password (optional) - request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + typing.List[RedisImportStorage] + Examples -------- - from label_studio_sdk import LabelStudio + import asyncio - client = LabelStudio( + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.redis.validate() + + + async def main() -> None: + await client.import_storage.redis.list() + + + asyncio.run(main()) """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/redis/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "title": title, - "description": description, + _response = await self._client_wrapper.httpx_client.request( + "api/storages/redis/", + method="GET", + params={ + "ordering": ordering, "project": project, - "path": path, - "host": host, - "port": port, - "password": password, - }, - headers={ - "content-type": "application/json", }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + typing.List[RedisImportStorage], + construct_type( + type_=typing.List[RedisImportStorage], # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - -class AsyncRedisClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + async def create( self, *, - ordering: typing.Optional[str] = None, - project: typing.Optional[int] = None, + description: typing.Optional[str] = OMIT, + host: typing.Optional[str] = OMIT, + password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> typing.List[RedisImportStorage]: + ) -> RedisImportStorage: """ - Get a list of all Redis import storage connections. + Create a new Redis import storage connection. Parameters ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. + description : typing.Optional[str] + Storage description + + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) + + path : typing.Optional[str] + Storage prefix (optional) + + port : typing.Optional[str] + Server Port (optional) project : typing.Optional[int] Project ID + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - typing.List[RedisImportStorage] + RedisImportStorage Examples @@ -545,26 +639,37 @@ async def list( async def main() -> None: - await client.import_storage.redis.list() + await client.import_storage.redis.create() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( "api/storages/redis/", - method="GET", - params={ - "ordering": ordering, + method="POST", + json={ + "description": description, + "host": host, + "password": password, + "path": path, + "port": port, "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: return typing.cast( - typing.List[RedisImportStorage], + RedisImportStorage, construct_type( - type_=typing.List[RedisImportStorage], # type: ignore + type_=RedisImportStorage, # type: ignore object_=_response.json(), ), ) @@ -573,59 +678,62 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create( + async def validate( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> RedisImportStorage: + ) -> None: """ - Create a new Redis import storage connection. + Validate a specific Redis import storage connection. Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - RedisImportStorage - + None Examples -------- @@ -639,24 +747,25 @@ async def create( async def main() -> None: - await client.import_storage.redis.create() + await client.import_storage.redis.validate() asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/redis/", + "api/storages/redis/validate", method="POST", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "title": title, "description": description, - "project": project, - "path": path, "host": host, - "port": port, + "id": id, "password": password, + "path": path, + "port": port, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -666,13 +775,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - RedisImportStorage, - construct_type( - type_=RedisImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -783,15 +886,15 @@ async def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, password: typing.Optional[str] = OMIT, + path: typing.Optional[str] = OMIT, + port: typing.Optional[str] = OMIT, + project: typing.Optional[int] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RedisImportStorage: """ @@ -801,32 +904,32 @@ async def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - title : typing.Optional[str] - Storage title - description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID + host : typing.Optional[str] + Server Host IP (optional) + + password : typing.Optional[str] + Server Password (optional) path : typing.Optional[str] Storage prefix (optional) - host : typing.Optional[str] - Server Host IP (optional) - port : typing.Optional[str] Server Port (optional) - password : typing.Optional[str] - Server Password (optional) + project : typing.Optional[int] + Project ID + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -859,15 +962,15 @@ async def main() -> None: f"api/storages/redis/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "title": title, "description": description, - "project": project, - "path": path, "host": host, - "port": port, "password": password, + "path": path, + "port": port, + "project": project, + "regex_filter": regex_filter, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -943,106 +1046,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - path: typing.Optional[str] = OMIT, - host: typing.Optional[str] = OMIT, - port: typing.Optional[str] = OMIT, - password: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific Redis import storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - path : typing.Optional[str] - Storage prefix (optional) - - host : typing.Optional[str] - Server Host IP (optional) - - port : typing.Optional[str] - Server Port (optional) - - password : typing.Optional[str] - Server Password (optional) - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.import_storage.redis.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/redis/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "title": title, - "description": description, - "project": project, - "path": path, - "host": host, - "port": port, - "password": password, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/import_storage/s3/client.py b/src/label_studio_sdk/import_storage/s3/client.py index db62d1b09..045afea0a 100644 --- a/src/label_studio_sdk/import_storage/s3/client.py +++ b/src/label_studio_sdk/import_storage/s3/client.py @@ -79,22 +79,22 @@ def list( def create( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> S3ImportStorage: """ @@ -102,11 +102,26 @@ def create( Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + S3 bucket prefix presign : typing.Optional[bool] Presign URLs for download @@ -114,24 +129,112 @@ def create( presign_ttl : typing.Optional[int] Presign TTL in minutes + project : typing.Optional[int] + Project ID + recursive_scan : typing.Optional[bool] Scan recursively + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + region_name : typing.Optional[str] + AWS Region + + s3endpoint : typing.Optional[str] + S3 Endpoint + title : typing.Optional[str] Storage title - description : typing.Optional[str] - Storage description + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - project : typing.Optional[int] - Project ID + request_options : typing.Optional[RequestOptions] + Request-specific configuration. - bucket : typing.Optional[str] - S3 bucket name + Returns + ------- + S3ImportStorage - prefix : typing.Optional[str] - S3 bucket prefix + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.import_storage.s3.create() + """ + _response = self._client_wrapper.httpx_client.request( + "api/storages/s3/", + method="POST", + json={ + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "description": description, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "s3_endpoint": s3endpoint, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + S3ImportStorage, + construct_type( + type_=S3ImportStorage, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def validate( + self, + *, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific S3 import storage connection. + + Parameters + ---------- aws_access_key_id : typing.Optional[str] AWS_ACCESS_KEY_ID @@ -144,19 +247,51 @@ def create( aws_sse_kms_key_id : typing.Optional[str] AWS SSE KMS Key ID + bucket : typing.Optional[str] + S3 bucket name + + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + S3 bucket prefix + + presign : typing.Optional[bool] + Presign URLs for download + + presign_ttl : typing.Optional[int] + Presign TTL in minutes + + project : typing.Optional[int] + Project ID + + recursive_scan : typing.Optional[bool] + Scan recursively + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - S3ImportStorage - + None Examples -------- @@ -165,28 +300,29 @@ def create( client = LabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.s3.create() + client.import_storage.s3.validate() """ _response = self._client_wrapper.httpx_client.request( - "api/storages/s3/", + "api/storages/s3/validate", method="POST", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "description": description, + "id": id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -196,13 +332,7 @@ def create( ) try: if 200 <= _response.status_code < 300: - return typing.cast( - S3ImportStorage, - construct_type( - type_=S3ImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -297,22 +427,22 @@ def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> S3ImportStorage: """ @@ -322,47 +452,41 @@ def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - presign : typing.Optional[bool] - Presign URLs for download + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN - presign_ttl : typing.Optional[int] - Presign TTL in minutes + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID - recursive_scan : typing.Optional[bool] - Scan recursively - - title : typing.Optional[str] - Storage title + bucket : typing.Optional[str] + S3 bucket name description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID + presign : typing.Optional[bool] + Presign URLs for download - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY + presign_ttl : typing.Optional[int] + Presign TTL in minutes - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN + project : typing.Optional[int] + Project ID - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID + recursive_scan : typing.Optional[bool] + Scan recursively + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. region_name : typing.Optional[str] AWS Region @@ -370,6 +494,12 @@ def update( s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -393,22 +523,22 @@ def update( f"api/storages/s3/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "description": description, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -477,136 +607,6 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( - self, - *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific S3 import storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - presign : typing.Optional[bool] - Presign URLs for download - - presign_ttl : typing.Optional[int] - Presign TTL in minutes - - recursive_scan : typing.Optional[bool] - Scan recursively - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - - region_name : typing.Optional[str] - AWS Region - - s3endpoint : typing.Optional[str] - S3 Endpoint - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - from label_studio_sdk import LabelStudio - - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.import_storage.s3.validate() - """ - _response = self._client_wrapper.httpx_client.request( - "api/storages/s3/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - class AsyncS3Client: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -681,22 +681,22 @@ async def main() -> None: async def create( self, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> S3ImportStorage: """ @@ -704,11 +704,26 @@ async def create( Parameters ---------- - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY + + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + description : typing.Optional[str] + Storage description + + prefix : typing.Optional[str] + S3 bucket prefix presign : typing.Optional[bool] Presign URLs for download @@ -716,24 +731,120 @@ async def create( presign_ttl : typing.Optional[int] Presign TTL in minutes + project : typing.Optional[int] + Project ID + recursive_scan : typing.Optional[bool] Scan recursively + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + + region_name : typing.Optional[str] + AWS Region + + s3endpoint : typing.Optional[str] + S3 Endpoint + title : typing.Optional[str] Storage title - description : typing.Optional[str] - Storage description + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - project : typing.Optional[int] - Project ID + request_options : typing.Optional[RequestOptions] + Request-specific configuration. - bucket : typing.Optional[str] - S3 bucket name + Returns + ------- + S3ImportStorage - prefix : typing.Optional[str] - S3 bucket prefix + Examples + -------- + import asyncio + + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.import_storage.s3.create() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "api/storages/s3/", + method="POST", + json={ + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "description": description, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "s3_endpoint": s3endpoint, + "title": title, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + S3ImportStorage, + construct_type( + type_=S3ImportStorage, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def validate( + self, + *, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Validate a specific S3 import storage connection. + + Parameters + ---------- aws_access_key_id : typing.Optional[str] AWS_ACCESS_KEY_ID @@ -746,19 +857,51 @@ async def create( aws_sse_kms_key_id : typing.Optional[str] AWS SSE KMS Key ID + bucket : typing.Optional[str] + S3 bucket name + + description : typing.Optional[str] + Storage description + + id : typing.Optional[int] + Storage ID. If set, storage with specified ID will be updated + + prefix : typing.Optional[str] + S3 bucket prefix + + presign : typing.Optional[bool] + Presign URLs for download + + presign_ttl : typing.Optional[int] + Presign TTL in minutes + + project : typing.Optional[int] + Project ID + + recursive_scan : typing.Optional[bool] + Scan recursively + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. + region_name : typing.Optional[str] AWS Region s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - S3ImportStorage - + None Examples -------- @@ -772,31 +915,32 @@ async def create( async def main() -> None: - await client.import_storage.s3.create() + await client.import_storage.s3.validate() asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/s3/", - method="POST", - json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, + """ + _response = await self._client_wrapper.httpx_client.request( + "api/storages/s3/validate", + method="POST", + json={ "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "description": description, + "id": id, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -806,13 +950,7 @@ async def main() -> None: ) try: if 200 <= _response.status_code < 300: - return typing.cast( - S3ImportStorage, - construct_type( - type_=S3ImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -923,22 +1061,22 @@ async def update( self, id: int, *, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, region_name: typing.Optional[str] = OMIT, s3endpoint: typing.Optional[str] = OMIT, + title: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> S3ImportStorage: """ @@ -948,47 +1086,41 @@ async def update( ---------- id : int - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - presign : typing.Optional[bool] - Presign URLs for download + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - presign_ttl : typing.Optional[int] - Presign TTL in minutes + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN - recursive_scan : typing.Optional[bool] - Scan recursively + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID - title : typing.Optional[str] - Storage title + bucket : typing.Optional[str] + S3 bucket name description : typing.Optional[str] Storage description - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID + presign : typing.Optional[bool] + Presign URLs for download - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY + presign_ttl : typing.Optional[int] + Presign TTL in minutes - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN + project : typing.Optional[int] + Project ID - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID + recursive_scan : typing.Optional[bool] + Scan recursively + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. region_name : typing.Optional[str] AWS Region @@ -996,6 +1128,12 @@ async def update( s3endpoint : typing.Optional[str] S3 Endpoint + title : typing.Optional[str] + Storage title + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1027,22 +1165,22 @@ async def main() -> None: f"api/storages/s3/{jsonable_encoder(id)}", method="PATCH", json={ - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "description": description, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, "region_name": region_name, "s3_endpoint": s3endpoint, + "title": title, + "use_blob_urls": use_blob_urls, }, headers={ "content-type": "application/json", @@ -1118,141 +1256,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def validate( - self, - *, - id: typing.Optional[int] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: - """ - Validate a specific S3 import storage connection. - - Parameters - ---------- - id : typing.Optional[int] - Storage ID. If set, storage with specified ID will be updated - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects. You must specify it otherwise no objects will be imported. - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs. For example, if your bucket contains images, you can use this option to generate URLs for these images. If set to False, it will read the content of the file and load it into Label Studio. - - presign : typing.Optional[bool] - Presign URLs for download - - presign_ttl : typing.Optional[int] - Presign TTL in minutes - - recursive_scan : typing.Optional[bool] - Scan recursively - - title : typing.Optional[str] - Storage title - - description : typing.Optional[str] - Storage description - - project : typing.Optional[int] - Project ID - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - - region_name : typing.Optional[str] - AWS Region - - s3endpoint : typing.Optional[str] - S3 Endpoint - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.import_storage.s3.validate() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/storages/s3/validate", - method="POST", - json={ - "id": id, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "presign": presign, - "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, - "title": title, - "description": description, - "project": project, - "bucket": bucket, - "prefix": prefix, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/import_storage/s3s/client.py b/src/label_studio_sdk/import_storage/s3s/client.py index 67d5ba01f..90706b349 100644 --- a/src/label_studio_sdk/import_storage/s3s/client.py +++ b/src/label_studio_sdk/import_storage/s3s/client.py @@ -81,32 +81,32 @@ def list( def create( self, *, - role_arn: str, project: int, - synchronizable: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + role_arn: str, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseS3ImportStorage: """ @@ -114,15 +114,32 @@ def create( Parameters ---------- + project : int + A unique integer value identifying this project. + role_arn : str AWS RoleArn - project : int - A unique integer value identifying this project. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - synchronizable : typing.Optional[bool] + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - presign : typing.Optional[bool] + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId last_sync : typing.Optional[dt.datetime] Last sync finished time @@ -133,42 +150,23 @@ def create( last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID + presign : typing.Optional[bool] - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY + presign_ttl : typing.Optional[int] + Presigned URLs TTL (in minutes) - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects region_name : typing.Optional[str] AWS Region @@ -176,16 +174,18 @@ def create( s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId + status : typing.Optional[StatusC5AEnum] - legacy_auth : typing.Optional[bool] + synchronizable : typing.Optional[bool] - presign_ttl : typing.Optional[int] - Presigned URLs TTL (in minutes) + title : typing.Optional[str] + Cloud storage title - recursive_scan : typing.Optional[bool] - Perform recursive scan over the bucket content + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -203,40 +203,40 @@ def create( api_key="YOUR_API_KEY", ) client.import_storage.s3s.create( - role_arn="role_arn", project=1, + role_arn="role_arn", ) """ _response = self._client_wrapper.httpx_client.request( "api/storages/s3s/", method="POST", json={ - "synchronizable": synchronizable, - "presign": presign, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, + "bucket": bucket, + "description": description, "external_id": external_id, - "role_arn": role_arn, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "presign": presign, "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, }, request_options=request_options, omit=OMIT, @@ -255,179 +255,95 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: + def validate( + self, + *, + project: int, + role_arn: str, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: """ - Get a specific S3 import storage connection that was set up with IAM role access. + Validate a specific S3 import storage connection that was set up with IAM role access. Parameters ---------- - id : int + project : int + A unique integer value identifying this project. - request_options : typing.Optional[RequestOptions] - Request-specific configuration. + role_arn : str + AWS RoleArn - Returns - ------- - LseS3ImportStorage + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - Examples - -------- - from label_studio_sdk import LabelStudio + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.import_storage.s3s.get( - id=1, - ) - """ - _response = self._client_wrapper.httpx_client.request( - f"api/storages/s3s/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - LseS3ImportStorage, - construct_type( - type_=LseS3ImportStorage, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID - def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: - """ - Delete a specific S3 import storage connection that was set up with IAM role access. + bucket : typing.Optional[str] + S3 bucket name - Parameters - ---------- - id : int + description : typing.Optional[str] + Cloud storage description - request_options : typing.Optional[RequestOptions] - Request-specific configuration. + external_id : typing.Optional[str] + AWS ExternalId - Returns - ------- - None + last_sync : typing.Optional[dt.datetime] + Last sync finished time - Examples - -------- - from label_studio_sdk import LabelStudio - - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.import_storage.s3s.delete( - id=1, - ) - """ - _response = self._client_wrapper.httpx_client.request( - f"api/storages/s3s/{jsonable_encoder(id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def update( - self, - id: int, - *, - synchronizable: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - role_arn: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - project: typing.Optional[int] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> LseS3ImportStorage: - """ - Update a specific S3 import storage connection that was set up with IAM role access. - - Parameters - ---------- - id : int - - synchronizable : typing.Optional[bool] - - presign : typing.Optional[bool] - - last_sync : typing.Optional[dt.datetime] - Last sync finished time - - last_sync_count : typing.Optional[int] - Count of tasks synced last time + last_sync_count : typing.Optional[int] + Count of tasks synced last time last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID + presign : typing.Optional[bool] - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY + presign_ttl : typing.Optional[int] + Presigned URLs TTL (in minutes) - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects region_name : typing.Optional[str] AWS Region @@ -435,30 +351,25 @@ def update( s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId - - role_arn : typing.Optional[str] - AWS RoleArn + status : typing.Optional[StatusC5AEnum] - legacy_auth : typing.Optional[bool] + synchronizable : typing.Optional[bool] - presign_ttl : typing.Optional[int] - Presigned URLs TTL (in minutes) + title : typing.Optional[str] + Cloud storage title - recursive_scan : typing.Optional[bool] - Perform recursive scan over the bucket content + traceback : typing.Optional[str] + Traceback report for the last failed sync - project : typing.Optional[int] - A unique integer value identifying this project. + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - LseS3ImportStorage - + None Examples -------- @@ -467,64 +378,56 @@ def update( client = LabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.s3s.update( - id=1, + client.import_storage.s3s.validate( + project=1, + role_arn="role_arn", ) """ _response = self._client_wrapper.httpx_client.request( - f"api/storages/s3s/{jsonable_encoder(id)}", - method="PATCH", + "api/storages/s3s/validate", + method="POST", json={ - "synchronizable": synchronizable, - "presign": presign, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, + "bucket": bucket, + "description": description, "external_id": external_id, - "role_arn": role_arn, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "presign": presign, "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, "project": project, - }, - headers={ - "content-type": "application/json", + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, }, request_options=request_options, omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return typing.cast( - LseS3ImportStorage, - construct_type( - type_=LseS3ImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: """ - Sync tasks from an S3 import storage connection that was set up with IAM role access. + Get a specific S3 import storage connection that was set up with IAM role access. Parameters ---------- @@ -545,13 +448,13 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No client = LabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.s3s.sync( + client.import_storage.s3s.get( id=1, ) """ _response = self._client_wrapper.httpx_client.request( - f"api/storages/s3s/{jsonable_encoder(id)}/sync", - method="POST", + f"api/storages/s3s/{jsonable_encoder(id)}", + method="GET", request_options=request_options, ) try: @@ -568,85 +471,83 @@ def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def validate( - self, - *, - role_arn: str, - project: int, - synchronizable: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> None: + def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Validate a specific S3 import storage connection that was set up with IAM role access. + Delete a specific S3 import storage connection that was set up with IAM role access. Parameters ---------- - role_arn : str - AWS RoleArn - - project : int - A unique integer value identifying this project. - - synchronizable : typing.Optional[bool] - - presign : typing.Optional[bool] - - last_sync : typing.Optional[dt.datetime] - Last sync finished time - - last_sync_count : typing.Optional[int] - Count of tasks synced last time - - last_sync_job : typing.Optional[str] - Last sync job ID + id : int - status : typing.Optional[StatusC5AEnum] + request_options : typing.Optional[RequestOptions] + Request-specific configuration. - traceback : typing.Optional[str] - Traceback report for the last failed sync + Returns + ------- + None - meta : typing.Optional[typing.Optional[typing.Any]] + Examples + -------- + from label_studio_sdk import LabelStudio - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.import_storage.s3s.delete( + id=1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"api/storages/s3s/{jsonable_encoder(id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects + def update( + self, + id: int, + *, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + role_arn: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> LseS3ImportStorage: + """ + Update a specific S3 import storage connection that was set up with IAM role access. - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs + Parameters + ---------- + id : int aws_access_key_id : typing.Optional[str] AWS_ACCESS_KEY_ID @@ -660,29 +561,74 @@ def validate( aws_sse_kms_key_id : typing.Optional[str] AWS SSE KMS Key ID - region_name : typing.Optional[str] - AWS Region + bucket : typing.Optional[str] + S3 bucket name - s3endpoint : typing.Optional[str] - S3 Endpoint + description : typing.Optional[str] + Cloud storage description external_id : typing.Optional[str] AWS ExternalId + last_sync : typing.Optional[dt.datetime] + Last sync finished time + + last_sync_count : typing.Optional[int] + Count of tasks synced last time + + last_sync_job : typing.Optional[str] + Last sync job ID + legacy_auth : typing.Optional[bool] + meta : typing.Optional[typing.Optional[typing.Any]] + + prefix : typing.Optional[str] + S3 bucket prefix + + presign : typing.Optional[bool] + presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) + project : typing.Optional[int] + A unique integer value identifying this project. + recursive_scan : typing.Optional[bool] Perform recursive scan over the bucket content + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects + + region_name : typing.Optional[str] + AWS Region + + role_arn : typing.Optional[str] + AWS RoleArn + + s3endpoint : typing.Optional[str] + S3 Endpoint + + status : typing.Optional[StatusC5AEnum] + + synchronizable : typing.Optional[bool] + + title : typing.Optional[str] + Cloud storage title + + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs + request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + LseS3ImportStorage + Examples -------- @@ -691,48 +637,102 @@ def validate( client = LabelStudio( api_key="YOUR_API_KEY", ) - client.import_storage.s3s.validate( - role_arn="role_arn", - project=1, + client.import_storage.s3s.update( + id=1, ) """ _response = self._client_wrapper.httpx_client.request( - "api/storages/s3s/validate", - method="POST", + f"api/storages/s3s/{jsonable_encoder(id)}", + method="PATCH", json={ - "synchronizable": synchronizable, - "presign": presign, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, + "bucket": bucket, + "description": description, "external_id": external_id, - "role_arn": role_arn, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "presign": presign, "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + LseS3ImportStorage, + construct_type( + type_=LseS3ImportStorage, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: + """ + Sync tasks from an S3 import storage connection that was set up with IAM role access. + + Parameters + ---------- + id : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + LseS3ImportStorage + + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.import_storage.s3s.sync( + id=1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"api/storages/s3s/{jsonable_encoder(id)}/sync", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + LseS3ImportStorage, + construct_type( + type_=LseS3ImportStorage, # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -812,48 +812,65 @@ async def main() -> None: async def create( self, *, - role_arn: str, project: int, - synchronizable: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, + role_arn: str, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, recursive_scan: typing.Optional[bool] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> LseS3ImportStorage: - """ - Create S3 import storage with IAM role access. + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> LseS3ImportStorage: + """ + Create S3 import storage with IAM role access. Parameters ---------- + project : int + A unique integer value identifying this project. + role_arn : str AWS RoleArn - project : int - A unique integer value identifying this project. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - synchronizable : typing.Optional[bool] + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - presign : typing.Optional[bool] + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId last_sync : typing.Optional[dt.datetime] Last sync finished time @@ -864,42 +881,23 @@ async def create( last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID + presign : typing.Optional[bool] - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY + presign_ttl : typing.Optional[int] + Presigned URLs TTL (in minutes) - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects region_name : typing.Optional[str] AWS Region @@ -907,16 +905,18 @@ async def create( s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId + status : typing.Optional[StatusC5AEnum] - legacy_auth : typing.Optional[bool] + synchronizable : typing.Optional[bool] - presign_ttl : typing.Optional[int] - Presigned URLs TTL (in minutes) + title : typing.Optional[str] + Cloud storage title - recursive_scan : typing.Optional[bool] - Perform recursive scan over the bucket content + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -939,8 +939,8 @@ async def create( async def main() -> None: await client.import_storage.s3s.create( - role_arn="role_arn", project=1, + role_arn="role_arn", ) @@ -950,32 +950,32 @@ async def main() -> None: "api/storages/s3s/", method="POST", json={ - "synchronizable": synchronizable, - "presign": presign, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, + "bucket": bucket, + "description": description, "external_id": external_id, - "role_arn": role_arn, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "presign": presign, "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, }, request_options=request_options, omit=OMIT, @@ -994,67 +994,114 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: + async def validate( + self, + *, + project: int, + role_arn: str, + aws_access_key_id: typing.Optional[str] = OMIT, + aws_secret_access_key: typing.Optional[str] = OMIT, + aws_session_token: typing.Optional[str] = OMIT, + aws_sse_kms_key_id: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, + legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, + presign_ttl: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: """ - Get a specific S3 import storage connection that was set up with IAM role access. + Validate a specific S3 import storage connection that was set up with IAM role access. Parameters ---------- - id : int + project : int + A unique integer value identifying this project. - request_options : typing.Optional[RequestOptions] - Request-specific configuration. + role_arn : str + AWS RoleArn - Returns - ------- - LseS3ImportStorage + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - Examples - -------- - import asyncio + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN - from label_studio_sdk import AsyncLabelStudio + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) + bucket : typing.Optional[str] + S3 bucket name + description : typing.Optional[str] + Cloud storage description - async def main() -> None: - await client.import_storage.s3s.get( - id=1, - ) + external_id : typing.Optional[str] + AWS ExternalId + last_sync : typing.Optional[dt.datetime] + Last sync finished time - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - f"api/storages/s3s/{jsonable_encoder(id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - LseS3ImportStorage, - construct_type( - type_=LseS3ImportStorage, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + last_sync_count : typing.Optional[int] + Count of tasks synced last time - async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: - """ - Delete a specific S3 import storage connection that was set up with IAM role access. + last_sync_job : typing.Optional[str] + Last sync job ID - Parameters - ---------- - id : int + legacy_auth : typing.Optional[bool] + + meta : typing.Optional[typing.Optional[typing.Any]] + + prefix : typing.Optional[str] + S3 bucket prefix + + presign : typing.Optional[bool] + + presign_ttl : typing.Optional[int] + Presigned URLs TTL (in minutes) + + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content + + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects + + region_name : typing.Optional[str] + AWS Region + + s3endpoint : typing.Optional[str] + S3 Endpoint + + status : typing.Optional[StatusC5AEnum] + + synchronizable : typing.Optional[bool] + + title : typing.Optional[str] + Cloud storage title + + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1075,17 +1122,47 @@ async def delete(self, id: int, *, request_options: typing.Optional[RequestOptio async def main() -> None: - await client.import_storage.s3s.delete( - id=1, + await client.import_storage.s3s.validate( + project=1, + role_arn="role_arn", ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/storages/s3s/{jsonable_encoder(id)}", - method="DELETE", + "api/storages/s3s/validate", + method="POST", + json={ + "aws_access_key_id": aws_access_key_id, + "aws_secret_access_key": aws_secret_access_key, + "aws_session_token": aws_session_token, + "aws_sse_kms_key_id": aws_sse_kms_key_id, + "bucket": bucket, + "description": description, + "external_id": external_id, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, + "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "presign": presign, + "presign_ttl": presign_ttl, + "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -1095,118 +1172,14 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def update( - self, - id: int, - *, - synchronizable: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, - aws_access_key_id: typing.Optional[str] = OMIT, - aws_secret_access_key: typing.Optional[str] = OMIT, - aws_session_token: typing.Optional[str] = OMIT, - aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, - external_id: typing.Optional[str] = OMIT, - role_arn: typing.Optional[str] = OMIT, - legacy_auth: typing.Optional[bool] = OMIT, - presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, - project: typing.Optional[int] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> LseS3ImportStorage: + async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: """ - Update a specific S3 import storage connection that was set up with IAM role access. + Get a specific S3 import storage connection that was set up with IAM role access. Parameters ---------- id : int - synchronizable : typing.Optional[bool] - - presign : typing.Optional[bool] - - last_sync : typing.Optional[dt.datetime] - Last sync finished time - - last_sync_count : typing.Optional[int] - Count of tasks synced last time - - last_sync_job : typing.Optional[str] - Last sync job ID - - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync - - meta : typing.Optional[typing.Optional[typing.Any]] - - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - bucket : typing.Optional[str] - S3 bucket name - - prefix : typing.Optional[str] - S3 bucket prefix - - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs - - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID - - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY - - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN - - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID - - region_name : typing.Optional[str] - AWS Region - - s3endpoint : typing.Optional[str] - S3 Endpoint - - external_id : typing.Optional[str] - AWS ExternalId - - role_arn : typing.Optional[str] - AWS RoleArn - - legacy_auth : typing.Optional[bool] - - presign_ttl : typing.Optional[int] - Presigned URLs TTL (in minutes) - - recursive_scan : typing.Optional[bool] - Perform recursive scan over the bucket content - - project : typing.Optional[int] - A unique integer value identifying this project. - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1227,7 +1200,7 @@ async def update( async def main() -> None: - await client.import_storage.s3s.update( + await client.import_storage.s3s.get( id=1, ) @@ -1236,40 +1209,8 @@ async def main() -> None: """ _response = await self._client_wrapper.httpx_client.request( f"api/storages/s3s/{jsonable_encoder(id)}", - method="PATCH", - json={ - "synchronizable": synchronizable, - "presign": presign, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, - "aws_access_key_id": aws_access_key_id, - "aws_secret_access_key": aws_secret_access_key, - "aws_session_token": aws_session_token, - "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, - "external_id": external_id, - "role_arn": role_arn, - "legacy_auth": legacy_auth, - "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, - "project": project, - }, - headers={ - "content-type": "application/json", - }, + method="GET", request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -1285,9 +1226,9 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: + async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Sync tasks from an S3 import storage connection that was set up with IAM role access. + Delete a specific S3 import storage connection that was set up with IAM role access. Parameters ---------- @@ -1298,8 +1239,7 @@ async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions Returns ------- - LseS3ImportStorage - + None Examples -------- @@ -1313,7 +1253,7 @@ async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions async def main() -> None: - await client.import_storage.s3s.sync( + await client.import_storage.s3s.delete( id=1, ) @@ -1321,69 +1261,77 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/storages/s3s/{jsonable_encoder(id)}/sync", - method="POST", + f"api/storages/s3s/{jsonable_encoder(id)}", + method="DELETE", request_options=request_options, ) try: if 200 <= _response.status_code < 300: - return typing.cast( - LseS3ImportStorage, - construct_type( - type_=LseS3ImportStorage, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def validate( + async def update( self, + id: int, *, - role_arn: str, - project: int, - synchronizable: typing.Optional[bool] = OMIT, - presign: typing.Optional[bool] = OMIT, - last_sync: typing.Optional[dt.datetime] = OMIT, - last_sync_count: typing.Optional[int] = OMIT, - last_sync_job: typing.Optional[str] = OMIT, - status: typing.Optional[StatusC5AEnum] = OMIT, - traceback: typing.Optional[str] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, - bucket: typing.Optional[str] = OMIT, - prefix: typing.Optional[str] = OMIT, - regex_filter: typing.Optional[str] = OMIT, - use_blob_urls: typing.Optional[bool] = OMIT, aws_access_key_id: typing.Optional[str] = OMIT, aws_secret_access_key: typing.Optional[str] = OMIT, aws_session_token: typing.Optional[str] = OMIT, aws_sse_kms_key_id: typing.Optional[str] = OMIT, - region_name: typing.Optional[str] = OMIT, - s3endpoint: typing.Optional[str] = OMIT, + bucket: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, external_id: typing.Optional[str] = OMIT, + last_sync: typing.Optional[dt.datetime] = OMIT, + last_sync_count: typing.Optional[int] = OMIT, + last_sync_job: typing.Optional[str] = OMIT, legacy_auth: typing.Optional[bool] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + prefix: typing.Optional[str] = OMIT, + presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, recursive_scan: typing.Optional[bool] = OMIT, + regex_filter: typing.Optional[str] = OMIT, + region_name: typing.Optional[str] = OMIT, + role_arn: typing.Optional[str] = OMIT, + s3endpoint: typing.Optional[str] = OMIT, + status: typing.Optional[StatusC5AEnum] = OMIT, + synchronizable: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, + traceback: typing.Optional[str] = OMIT, + use_blob_urls: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> None: + ) -> LseS3ImportStorage: """ - Validate a specific S3 import storage connection that was set up with IAM role access. + Update a specific S3 import storage connection that was set up with IAM role access. Parameters ---------- - role_arn : str - AWS RoleArn + id : int - project : int - A unique integer value identifying this project. + aws_access_key_id : typing.Optional[str] + AWS_ACCESS_KEY_ID - synchronizable : typing.Optional[bool] + aws_secret_access_key : typing.Optional[str] + AWS_SECRET_ACCESS_KEY - presign : typing.Optional[bool] + aws_session_token : typing.Optional[str] + AWS_SESSION_TOKEN + + aws_sse_kms_key_id : typing.Optional[str] + AWS SSE KMS Key ID + + bucket : typing.Optional[str] + S3 bucket name + + description : typing.Optional[str] + Cloud storage description + + external_id : typing.Optional[str] + AWS ExternalId last_sync : typing.Optional[dt.datetime] Last sync finished time @@ -1394,66 +1342,56 @@ async def validate( last_sync_job : typing.Optional[str] Last sync job ID - status : typing.Optional[StatusC5AEnum] - - traceback : typing.Optional[str] - Traceback report for the last failed sync + legacy_auth : typing.Optional[bool] meta : typing.Optional[typing.Optional[typing.Any]] - title : typing.Optional[str] - Cloud storage title - - description : typing.Optional[str] - Cloud storage description - - bucket : typing.Optional[str] - S3 bucket name - prefix : typing.Optional[str] S3 bucket prefix - regex_filter : typing.Optional[str] - Cloud storage regex for filtering objects - - use_blob_urls : typing.Optional[bool] - Interpret objects as BLOBs and generate URLs + presign : typing.Optional[bool] - aws_access_key_id : typing.Optional[str] - AWS_ACCESS_KEY_ID + presign_ttl : typing.Optional[int] + Presigned URLs TTL (in minutes) - aws_secret_access_key : typing.Optional[str] - AWS_SECRET_ACCESS_KEY + project : typing.Optional[int] + A unique integer value identifying this project. - aws_session_token : typing.Optional[str] - AWS_SESSION_TOKEN + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content - aws_sse_kms_key_id : typing.Optional[str] - AWS SSE KMS Key ID + regex_filter : typing.Optional[str] + Cloud storage regex for filtering objects region_name : typing.Optional[str] AWS Region + role_arn : typing.Optional[str] + AWS RoleArn + s3endpoint : typing.Optional[str] S3 Endpoint - external_id : typing.Optional[str] - AWS ExternalId + status : typing.Optional[StatusC5AEnum] - legacy_auth : typing.Optional[bool] + synchronizable : typing.Optional[bool] - presign_ttl : typing.Optional[int] - Presigned URLs TTL (in minutes) + title : typing.Optional[str] + Cloud storage title - recursive_scan : typing.Optional[bool] - Perform recursive scan over the bucket content + traceback : typing.Optional[str] + Traceback report for the last failed sync + + use_blob_urls : typing.Optional[bool] + Interpret objects as BLOBs and generate URLs request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - None + LseS3ImportStorage + Examples -------- @@ -1467,51 +1405,113 @@ async def validate( async def main() -> None: - await client.import_storage.s3s.validate( - role_arn="role_arn", - project=1, + await client.import_storage.s3s.update( + id=1, ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/storages/s3s/validate", - method="POST", + f"api/storages/s3s/{jsonable_encoder(id)}", + method="PATCH", json={ - "synchronizable": synchronizable, - "presign": presign, - "last_sync": last_sync, - "last_sync_count": last_sync_count, - "last_sync_job": last_sync_job, - "status": status, - "traceback": traceback, - "meta": meta, - "title": title, - "description": description, - "bucket": bucket, - "prefix": prefix, - "regex_filter": regex_filter, - "use_blob_urls": use_blob_urls, "aws_access_key_id": aws_access_key_id, "aws_secret_access_key": aws_secret_access_key, "aws_session_token": aws_session_token, "aws_sse_kms_key_id": aws_sse_kms_key_id, - "region_name": region_name, - "s3_endpoint": s3endpoint, + "bucket": bucket, + "description": description, "external_id": external_id, - "role_arn": role_arn, + "last_sync": last_sync, + "last_sync_count": last_sync_count, + "last_sync_job": last_sync_job, "legacy_auth": legacy_auth, + "meta": meta, + "prefix": prefix, + "presign": presign, "presign_ttl": presign_ttl, - "recursive_scan": recursive_scan, "project": project, + "recursive_scan": recursive_scan, + "regex_filter": regex_filter, + "region_name": region_name, + "role_arn": role_arn, + "s3_endpoint": s3endpoint, + "status": status, + "synchronizable": synchronizable, + "title": title, + "traceback": traceback, + "use_blob_urls": use_blob_urls, + }, + headers={ + "content-type": "application/json", }, request_options=request_options, omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + LseS3ImportStorage, + construct_type( + type_=LseS3ImportStorage, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ImportStorage: + """ + Sync tasks from an S3 import storage connection that was set up with IAM role access. + + Parameters + ---------- + id : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + LseS3ImportStorage + + + Examples + -------- + import asyncio + + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.import_storage.s3s.sync( + id=1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"api/storages/s3s/{jsonable_encoder(id)}/sync", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + LseS3ImportStorage, + construct_type( + type_=LseS3ImportStorage, # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) diff --git a/src/label_studio_sdk/jwt_settings/client.py b/src/label_studio_sdk/jwt_settings/client.py index 53e49a881..42084ca1d 100644 --- a/src/label_studio_sdk/jwt_settings/client.py +++ b/src/label_studio_sdk/jwt_settings/client.py @@ -62,9 +62,9 @@ def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> Lse def update( self, *, + api_token_ttl_days: typing.Optional[int] = OMIT, api_tokens_enabled: typing.Optional[bool] = OMIT, legacy_api_tokens_enabled: typing.Optional[bool] = OMIT, - api_token_ttl_days: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LsejwtSettings: """ @@ -72,15 +72,15 @@ def update( Parameters ---------- + api_token_ttl_days : typing.Optional[int] + Number of days before JWT API tokens expire + api_tokens_enabled : typing.Optional[bool] Enable JWT API token authentication for this organization legacy_api_tokens_enabled : typing.Optional[bool] Enable legacy API token authentication for this organization - api_token_ttl_days : typing.Optional[int] - Number of days before JWT API tokens expire - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -102,9 +102,9 @@ def update( "api/jwt/settings", method="POST", json={ + "api_token_ttl_days": api_token_ttl_days, "api_tokens_enabled": api_tokens_enabled, "legacy_api_tokens_enabled": legacy_api_tokens_enabled, - "api_token_ttl_days": api_token_ttl_days, }, headers={ "content-type": "application/json", @@ -184,9 +184,9 @@ async def main() -> None: async def update( self, *, + api_token_ttl_days: typing.Optional[int] = OMIT, api_tokens_enabled: typing.Optional[bool] = OMIT, legacy_api_tokens_enabled: typing.Optional[bool] = OMIT, - api_token_ttl_days: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LsejwtSettings: """ @@ -194,15 +194,15 @@ async def update( Parameters ---------- + api_token_ttl_days : typing.Optional[int] + Number of days before JWT API tokens expire + api_tokens_enabled : typing.Optional[bool] Enable JWT API token authentication for this organization legacy_api_tokens_enabled : typing.Optional[bool] Enable legacy API token authentication for this organization - api_token_ttl_days : typing.Optional[int] - Number of days before JWT API tokens expire - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -232,9 +232,9 @@ async def main() -> None: "api/jwt/settings", method="POST", json={ + "api_token_ttl_days": api_token_ttl_days, "api_tokens_enabled": api_tokens_enabled, "legacy_api_tokens_enabled": legacy_api_tokens_enabled, - "api_token_ttl_days": api_token_ttl_days, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/ml/client.py b/src/label_studio_sdk/ml/client.py index 6cbce077e..9cc9443e6 100644 --- a/src/label_studio_sdk/ml/client.py +++ b/src/label_studio_sdk/ml/client.py @@ -80,16 +80,16 @@ def list( def create( self, *, - url: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - is_interactive: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, auth_method: typing.Optional[MlCreateRequestAuthMethod] = OMIT, - basic_auth_user: typing.Optional[str] = OMIT, basic_auth_pass: typing.Optional[str] = OMIT, + basic_auth_user: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, extra_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + is_interactive: typing.Optional[bool] = OMIT, + project: typing.Optional[int] = OMIT, timeout: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, + url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MlBackend: """ @@ -103,36 +103,36 @@ def create( Parameters ---------- - url : typing.Optional[str] - ML backend URL - - project : typing.Optional[int] - Project ID - - is_interactive : typing.Optional[bool] - Is interactive - - title : typing.Optional[str] - Title - - description : typing.Optional[str] - Description - auth_method : typing.Optional[MlCreateRequestAuthMethod] Auth method + basic_auth_pass : typing.Optional[str] + Basic auth password + basic_auth_user : typing.Optional[str] Basic auth user - basic_auth_pass : typing.Optional[str] - Basic auth password + description : typing.Optional[str] + Description extra_params : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] Extra parameters + is_interactive : typing.Optional[bool] + Is interactive + + project : typing.Optional[int] + Project ID + timeout : typing.Optional[int] Response model timeout + title : typing.Optional[str] + Title + + url : typing.Optional[str] + ML backend URL + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -154,16 +154,16 @@ def create( "api/ml/", method="POST", json={ - "url": url, - "project": project, - "is_interactive": is_interactive, - "title": title, - "description": description, "auth_method": auth_method, - "basic_auth_user": basic_auth_user, "basic_auth_pass": basic_auth_pass, + "basic_auth_user": basic_auth_user, + "description": description, "extra_params": extra_params, + "is_interactive": is_interactive, + "project": project, "timeout": timeout, + "title": title, + "url": url, }, headers={ "content-type": "application/json", @@ -284,16 +284,16 @@ def update( self, id: int, *, - url: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - is_interactive: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, auth_method: typing.Optional[MlUpdateRequestAuthMethod] = OMIT, - basic_auth_user: typing.Optional[str] = OMIT, basic_auth_pass: typing.Optional[str] = OMIT, + basic_auth_user: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, extra_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + is_interactive: typing.Optional[bool] = OMIT, + project: typing.Optional[int] = OMIT, timeout: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, + url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MlBackend: """ @@ -308,36 +308,36 @@ def update( ---------- id : int - url : typing.Optional[str] - ML backend URL - - project : typing.Optional[int] - Project ID - - is_interactive : typing.Optional[bool] - Is interactive - - title : typing.Optional[str] - Title - - description : typing.Optional[str] - Description - auth_method : typing.Optional[MlUpdateRequestAuthMethod] Auth method + basic_auth_pass : typing.Optional[str] + Basic auth password + basic_auth_user : typing.Optional[str] Basic auth user - basic_auth_pass : typing.Optional[str] - Basic auth password + description : typing.Optional[str] + Description extra_params : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] Extra parameters + is_interactive : typing.Optional[bool] + Is interactive + + project : typing.Optional[int] + Project ID + timeout : typing.Optional[int] Response model timeout + title : typing.Optional[str] + Title + + url : typing.Optional[str] + ML backend URL + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -361,16 +361,16 @@ def update( f"api/ml/{jsonable_encoder(id)}", method="PATCH", json={ - "url": url, - "project": project, - "is_interactive": is_interactive, - "title": title, - "description": description, "auth_method": auth_method, - "basic_auth_user": basic_auth_user, "basic_auth_pass": basic_auth_pass, + "basic_auth_user": basic_auth_user, + "description": description, "extra_params": extra_params, + "is_interactive": is_interactive, + "project": project, "timeout": timeout, + "title": title, + "url": url, }, headers={ "content-type": "application/json", @@ -440,8 +440,8 @@ def predict_interactive( f"api/ml/{jsonable_encoder(id)}/interactive-annotating", method="POST", json={ - "task": task, "context": context, + "task": task, }, headers={ "content-type": "application/json", @@ -647,16 +647,16 @@ async def main() -> None: async def create( self, *, - url: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - is_interactive: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, auth_method: typing.Optional[MlCreateRequestAuthMethod] = OMIT, - basic_auth_user: typing.Optional[str] = OMIT, basic_auth_pass: typing.Optional[str] = OMIT, + basic_auth_user: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, extra_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + is_interactive: typing.Optional[bool] = OMIT, + project: typing.Optional[int] = OMIT, timeout: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, + url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MlBackend: """ @@ -670,36 +670,36 @@ async def create( Parameters ---------- - url : typing.Optional[str] - ML backend URL - - project : typing.Optional[int] - Project ID - - is_interactive : typing.Optional[bool] - Is interactive - - title : typing.Optional[str] - Title - - description : typing.Optional[str] - Description - auth_method : typing.Optional[MlCreateRequestAuthMethod] Auth method + basic_auth_pass : typing.Optional[str] + Basic auth password + basic_auth_user : typing.Optional[str] Basic auth user - basic_auth_pass : typing.Optional[str] - Basic auth password + description : typing.Optional[str] + Description extra_params : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] Extra parameters + is_interactive : typing.Optional[bool] + Is interactive + + project : typing.Optional[int] + Project ID + timeout : typing.Optional[int] Response model timeout + title : typing.Optional[str] + Title + + url : typing.Optional[str] + ML backend URL + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -729,16 +729,16 @@ async def main() -> None: "api/ml/", method="POST", json={ - "url": url, - "project": project, - "is_interactive": is_interactive, - "title": title, - "description": description, "auth_method": auth_method, - "basic_auth_user": basic_auth_user, "basic_auth_pass": basic_auth_pass, + "basic_auth_user": basic_auth_user, + "description": description, "extra_params": extra_params, + "is_interactive": is_interactive, + "project": project, "timeout": timeout, + "title": title, + "url": url, }, headers={ "content-type": "application/json", @@ -875,16 +875,16 @@ async def update( self, id: int, *, - url: typing.Optional[str] = OMIT, - project: typing.Optional[int] = OMIT, - is_interactive: typing.Optional[bool] = OMIT, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, auth_method: typing.Optional[MlUpdateRequestAuthMethod] = OMIT, - basic_auth_user: typing.Optional[str] = OMIT, basic_auth_pass: typing.Optional[str] = OMIT, + basic_auth_user: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, extra_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + is_interactive: typing.Optional[bool] = OMIT, + project: typing.Optional[int] = OMIT, timeout: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, + url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> MlBackend: """ @@ -899,36 +899,36 @@ async def update( ---------- id : int - url : typing.Optional[str] - ML backend URL - - project : typing.Optional[int] - Project ID - - is_interactive : typing.Optional[bool] - Is interactive - - title : typing.Optional[str] - Title - - description : typing.Optional[str] - Description - auth_method : typing.Optional[MlUpdateRequestAuthMethod] Auth method + basic_auth_pass : typing.Optional[str] + Basic auth password + basic_auth_user : typing.Optional[str] Basic auth user - basic_auth_pass : typing.Optional[str] - Basic auth password + description : typing.Optional[str] + Description extra_params : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] Extra parameters + is_interactive : typing.Optional[bool] + Is interactive + + project : typing.Optional[int] + Project ID + timeout : typing.Optional[int] Response model timeout + title : typing.Optional[str] + Title + + url : typing.Optional[str] + ML backend URL + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -960,16 +960,16 @@ async def main() -> None: f"api/ml/{jsonable_encoder(id)}", method="PATCH", json={ - "url": url, - "project": project, - "is_interactive": is_interactive, - "title": title, - "description": description, "auth_method": auth_method, - "basic_auth_user": basic_auth_user, "basic_auth_pass": basic_auth_pass, + "basic_auth_user": basic_auth_user, + "description": description, "extra_params": extra_params, + "is_interactive": is_interactive, + "project": project, "timeout": timeout, + "title": title, + "url": url, }, headers={ "content-type": "application/json", @@ -1047,8 +1047,8 @@ async def main() -> None: f"api/ml/{jsonable_encoder(id)}/interactive-annotating", method="POST", json={ - "task": task, "context": context, + "task": task, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/ml/types/ml_list_model_versions_response.py b/src/label_studio_sdk/ml/types/ml_list_model_versions_response.py index 16633ba69..3539a3c26 100644 --- a/src/label_studio_sdk/ml/types/ml_list_model_versions_response.py +++ b/src/label_studio_sdk/ml/types/ml_list_model_versions_response.py @@ -7,8 +7,8 @@ class MlListModelVersionsResponse(UncheckedBaseModel): - versions: typing.Optional[typing.List[str]] = None message: typing.Optional[str] = None + versions: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/model_providers/client.py b/src/label_studio_sdk/model_providers/client.py index 876a623b1..8aea3731a 100644 --- a/src/label_studio_sdk/model_providers/client.py +++ b/src/label_studio_sdk/model_providers/client.py @@ -9,8 +9,8 @@ from ..core.api_error import ApiError from ..types.provider_enum import ProviderEnum from ..types.scope_enum import ScopeEnum -from ..core.jsonable_encoder import jsonable_encoder from .types.model_providers_list_model_provider_choices_response import ModelProvidersListModelProviderChoicesResponse +from ..core.jsonable_encoder import jsonable_encoder from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters @@ -74,18 +74,18 @@ def list( def create( self, *, - provider: typing.Optional[ProviderEnum] = OMIT, api_key: typing.Optional[str] = OMIT, auth_token: typing.Optional[str] = OMIT, + budget_alert_threshold: typing.Optional[float] = OMIT, + cached_available_models: typing.Optional[str] = OMIT, deployment_name: typing.Optional[str] = OMIT, endpoint: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, google_location: typing.Optional[str] = OMIT, - cached_available_models: typing.Optional[str] = OMIT, - scope: typing.Optional[ScopeEnum] = OMIT, + google_project_id: typing.Optional[str] = OMIT, is_internal: typing.Optional[bool] = OMIT, - budget_alert_threshold: typing.Optional[float] = OMIT, + provider: typing.Optional[ProviderEnum] = OMIT, + scope: typing.Optional[ScopeEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelProviderConnection: """ @@ -93,14 +93,18 @@ def create( Parameters ---------- - provider : typing.Optional[ProviderEnum] - api_key : typing.Optional[str] Model provider API key auth_token : typing.Optional[str] Model provider Auth token + budget_alert_threshold : typing.Optional[float] + Budget alert threshold for the given provider connection + + cached_available_models : typing.Optional[str] + List of available models from the provider + deployment_name : typing.Optional[str] Azure OpenAI deployment name @@ -110,22 +114,18 @@ def create( google_application_credentials : typing.Optional[str] The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id : typing.Optional[str] - Google project ID - google_location : typing.Optional[str] Google project location - cached_available_models : typing.Optional[str] - List of available models from the provider - - scope : typing.Optional[ScopeEnum] + google_project_id : typing.Optional[str] + Google project ID is_internal : typing.Optional[bool] Whether the model provider connection is internal, not visible to the user - budget_alert_threshold : typing.Optional[float] - Budget alert threshold for the given provider connection + provider : typing.Optional[ProviderEnum] + + scope : typing.Optional[ScopeEnum] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -148,18 +148,18 @@ def create( "api/model-provider-connections/", method="POST", json={ - "provider": provider, "api_key": api_key, "auth_token": auth_token, + "budget_alert_threshold": budget_alert_threshold, + "cached_available_models": cached_available_models, "deployment_name": deployment_name, "endpoint": endpoint, "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, "google_location": google_location, - "cached_available_models": cached_available_models, - "scope": scope, + "google_project_id": google_project_id, "is_internal": is_internal, - "budget_alert_threshold": budget_alert_threshold, + "provider": provider, + "scope": scope, }, request_options=request_options, omit=OMIT, @@ -178,6 +178,50 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def list_model_provider_choices( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> ModelProvidersListModelProviderChoicesResponse: + """ + List all possible model provider choices + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ModelProvidersListModelProviderChoicesResponse + List of model provider choices + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.model_providers.list_model_provider_choices() + """ + _response = self._client_wrapper.httpx_client.request( + "api/model-provider-connections/provider-choices", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ModelProvidersListModelProviderChoicesResponse, + construct_type( + type_=ModelProvidersListModelProviderChoicesResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ModelProviderConnection: """ Retrieve a specific model provider connection. @@ -267,18 +311,18 @@ def update( self, id: str, *, - provider: typing.Optional[ProviderEnum] = OMIT, api_key: typing.Optional[str] = OMIT, auth_token: typing.Optional[str] = OMIT, + budget_alert_threshold: typing.Optional[float] = OMIT, + cached_available_models: typing.Optional[str] = OMIT, deployment_name: typing.Optional[str] = OMIT, endpoint: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, google_location: typing.Optional[str] = OMIT, - cached_available_models: typing.Optional[str] = OMIT, - scope: typing.Optional[ScopeEnum] = OMIT, + google_project_id: typing.Optional[str] = OMIT, is_internal: typing.Optional[bool] = OMIT, - budget_alert_threshold: typing.Optional[float] = OMIT, + provider: typing.Optional[ProviderEnum] = OMIT, + scope: typing.Optional[ScopeEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelProviderConnection: """ @@ -288,14 +332,18 @@ def update( ---------- id : str - provider : typing.Optional[ProviderEnum] - api_key : typing.Optional[str] Model provider API key auth_token : typing.Optional[str] Model provider Auth token + budget_alert_threshold : typing.Optional[float] + Budget alert threshold for the given provider connection + + cached_available_models : typing.Optional[str] + List of available models from the provider + deployment_name : typing.Optional[str] Azure OpenAI deployment name @@ -305,22 +353,18 @@ def update( google_application_credentials : typing.Optional[str] The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id : typing.Optional[str] - Google project ID - google_location : typing.Optional[str] Google project location - cached_available_models : typing.Optional[str] - List of available models from the provider - - scope : typing.Optional[ScopeEnum] + google_project_id : typing.Optional[str] + Google project ID is_internal : typing.Optional[bool] Whether the model provider connection is internal, not visible to the user - budget_alert_threshold : typing.Optional[float] - Budget alert threshold for the given provider connection + provider : typing.Optional[ProviderEnum] + + scope : typing.Optional[ScopeEnum] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -345,18 +389,18 @@ def update( f"api/model-provider-connections/{jsonable_encoder(id)}/", method="PATCH", json={ - "provider": provider, "api_key": api_key, "auth_token": auth_token, + "budget_alert_threshold": budget_alert_threshold, + "cached_available_models": cached_available_models, "deployment_name": deployment_name, "endpoint": endpoint, "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, "google_location": google_location, - "cached_available_models": cached_available_models, - "scope": scope, + "google_project_id": google_project_id, "is_internal": is_internal, - "budget_alert_threshold": budget_alert_threshold, + "provider": provider, + "scope": scope, }, headers={ "content-type": "application/json", @@ -378,50 +422,6 @@ def update( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def list_model_provider_choices( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> ModelProvidersListModelProviderChoicesResponse: - """ - List all possible model provider choices - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - ModelProvidersListModelProviderChoicesResponse - List of model provider choices - - Examples - -------- - from label_studio_sdk import LabelStudio - - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.model_providers.list_model_provider_choices() - """ - _response = self._client_wrapper.httpx_client.request( - "api/model-provider-connections/provider-choices", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ModelProvidersListModelProviderChoicesResponse, - construct_type( - type_=ModelProvidersListModelProviderChoicesResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - class AsyncModelProvidersClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -488,18 +488,18 @@ async def main() -> None: async def create( self, *, - provider: typing.Optional[ProviderEnum] = OMIT, api_key: typing.Optional[str] = OMIT, auth_token: typing.Optional[str] = OMIT, + budget_alert_threshold: typing.Optional[float] = OMIT, + cached_available_models: typing.Optional[str] = OMIT, deployment_name: typing.Optional[str] = OMIT, endpoint: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, google_location: typing.Optional[str] = OMIT, - cached_available_models: typing.Optional[str] = OMIT, - scope: typing.Optional[ScopeEnum] = OMIT, + google_project_id: typing.Optional[str] = OMIT, is_internal: typing.Optional[bool] = OMIT, - budget_alert_threshold: typing.Optional[float] = OMIT, + provider: typing.Optional[ProviderEnum] = OMIT, + scope: typing.Optional[ScopeEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelProviderConnection: """ @@ -507,14 +507,18 @@ async def create( Parameters ---------- - provider : typing.Optional[ProviderEnum] - api_key : typing.Optional[str] Model provider API key auth_token : typing.Optional[str] Model provider Auth token + budget_alert_threshold : typing.Optional[float] + Budget alert threshold for the given provider connection + + cached_available_models : typing.Optional[str] + List of available models from the provider + deployment_name : typing.Optional[str] Azure OpenAI deployment name @@ -524,22 +528,18 @@ async def create( google_application_credentials : typing.Optional[str] The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id : typing.Optional[str] - Google project ID - google_location : typing.Optional[str] Google project location - cached_available_models : typing.Optional[str] - List of available models from the provider - - scope : typing.Optional[ScopeEnum] + google_project_id : typing.Optional[str] + Google project ID is_internal : typing.Optional[bool] Whether the model provider connection is internal, not visible to the user - budget_alert_threshold : typing.Optional[float] - Budget alert threshold for the given provider connection + provider : typing.Optional[ProviderEnum] + + scope : typing.Optional[ScopeEnum] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -570,18 +570,18 @@ async def main() -> None: "api/model-provider-connections/", method="POST", json={ - "provider": provider, "api_key": api_key, "auth_token": auth_token, + "budget_alert_threshold": budget_alert_threshold, + "cached_available_models": cached_available_models, "deployment_name": deployment_name, "endpoint": endpoint, "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, "google_location": google_location, - "cached_available_models": cached_available_models, - "scope": scope, + "google_project_id": google_project_id, "is_internal": is_internal, - "budget_alert_threshold": budget_alert_threshold, + "provider": provider, + "scope": scope, }, request_options=request_options, omit=OMIT, @@ -600,6 +600,58 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def list_model_provider_choices( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> ModelProvidersListModelProviderChoicesResponse: + """ + List all possible model provider choices + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ModelProvidersListModelProviderChoicesResponse + List of model provider choices + + Examples + -------- + import asyncio + + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.model_providers.list_model_provider_choices() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "api/model-provider-connections/provider-choices", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ModelProvidersListModelProviderChoicesResponse, + construct_type( + type_=ModelProvidersListModelProviderChoicesResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ModelProviderConnection: """ Retrieve a specific model provider connection. @@ -705,18 +757,18 @@ async def update( self, id: str, *, - provider: typing.Optional[ProviderEnum] = OMIT, api_key: typing.Optional[str] = OMIT, auth_token: typing.Optional[str] = OMIT, + budget_alert_threshold: typing.Optional[float] = OMIT, + cached_available_models: typing.Optional[str] = OMIT, deployment_name: typing.Optional[str] = OMIT, endpoint: typing.Optional[str] = OMIT, google_application_credentials: typing.Optional[str] = OMIT, - google_project_id: typing.Optional[str] = OMIT, google_location: typing.Optional[str] = OMIT, - cached_available_models: typing.Optional[str] = OMIT, - scope: typing.Optional[ScopeEnum] = OMIT, + google_project_id: typing.Optional[str] = OMIT, is_internal: typing.Optional[bool] = OMIT, - budget_alert_threshold: typing.Optional[float] = OMIT, + provider: typing.Optional[ProviderEnum] = OMIT, + scope: typing.Optional[ScopeEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelProviderConnection: """ @@ -726,14 +778,18 @@ async def update( ---------- id : str - provider : typing.Optional[ProviderEnum] - api_key : typing.Optional[str] Model provider API key auth_token : typing.Optional[str] Model provider Auth token + budget_alert_threshold : typing.Optional[float] + Budget alert threshold for the given provider connection + + cached_available_models : typing.Optional[str] + List of available models from the provider + deployment_name : typing.Optional[str] Azure OpenAI deployment name @@ -743,22 +799,18 @@ async def update( google_application_credentials : typing.Optional[str] The content of GOOGLE_APPLICATION_CREDENTIALS json file - google_project_id : typing.Optional[str] - Google project ID - google_location : typing.Optional[str] Google project location - cached_available_models : typing.Optional[str] - List of available models from the provider - - scope : typing.Optional[ScopeEnum] + google_project_id : typing.Optional[str] + Google project ID is_internal : typing.Optional[bool] Whether the model provider connection is internal, not visible to the user - budget_alert_threshold : typing.Optional[float] - Budget alert threshold for the given provider connection + provider : typing.Optional[ProviderEnum] + + scope : typing.Optional[ScopeEnum] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -791,18 +843,18 @@ async def main() -> None: f"api/model-provider-connections/{jsonable_encoder(id)}/", method="PATCH", json={ - "provider": provider, "api_key": api_key, "auth_token": auth_token, + "budget_alert_threshold": budget_alert_threshold, + "cached_available_models": cached_available_models, "deployment_name": deployment_name, "endpoint": endpoint, "google_application_credentials": google_application_credentials, - "google_project_id": google_project_id, "google_location": google_location, - "cached_available_models": cached_available_models, - "scope": scope, + "google_project_id": google_project_id, "is_internal": is_internal, - "budget_alert_threshold": budget_alert_threshold, + "provider": provider, + "scope": scope, }, headers={ "content-type": "application/json", @@ -823,55 +875,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def list_model_provider_choices( - self, *, request_options: typing.Optional[RequestOptions] = None - ) -> ModelProvidersListModelProviderChoicesResponse: - """ - List all possible model provider choices - - Parameters - ---------- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - ModelProvidersListModelProviderChoicesResponse - List of model provider choices - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.model_providers.list_model_provider_choices() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/model-provider-connections/provider-choices", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - ModelProvidersListModelProviderChoicesResponse, - construct_type( - type_=ModelProvidersListModelProviderChoicesResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/organizations/members/client.py b/src/label_studio_sdk/organizations/members/client.py index 4e4604d38..f89c51114 100644 --- a/src/label_studio_sdk/organizations/members/client.py +++ b/src/label_studio_sdk/organizations/members/client.py @@ -112,8 +112,8 @@ def update( self, id: int, *, - user_id: typing.Optional[int] = OMIT, role: typing.Optional[Role9E7Enum] = OMIT, + user_id: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseOrganizationMemberList: """ @@ -136,10 +136,10 @@ def update( id : int A unique integer value identifying this organization. - user_id : typing.Optional[int] - role : typing.Optional[Role9E7Enum] + user_id : typing.Optional[int] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -163,8 +163,8 @@ def update( f"api/organizations/{jsonable_encoder(id)}/memberships", method="PATCH", json={ - "user_id": user_id, "role": role, + "user_id": user_id, }, headers={ "content-type": "application/json", @@ -412,8 +412,8 @@ async def update( self, id: int, *, - user_id: typing.Optional[int] = OMIT, role: typing.Optional[Role9E7Enum] = OMIT, + user_id: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseOrganizationMemberList: """ @@ -436,10 +436,10 @@ async def update( id : int A unique integer value identifying this organization. - user_id : typing.Optional[int] - role : typing.Optional[Role9E7Enum] + user_id : typing.Optional[int] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -471,8 +471,8 @@ async def main() -> None: f"api/organizations/{jsonable_encoder(id)}/memberships", method="PATCH", json={ - "user_id": user_id, "role": role, + "user_id": user_id, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/predictions/client.py b/src/label_studio_sdk/predictions/client.py index d729544c6..a154988af 100644 --- a/src/label_studio_sdk/predictions/client.py +++ b/src/label_studio_sdk/predictions/client.py @@ -79,10 +79,10 @@ def list( def create( self, *, - task: typing.Optional[int] = OMIT, + model_version: typing.Optional[str] = OMIT, result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, score: typing.Optional[float] = OMIT, - model_version: typing.Optional[str] = OMIT, + task: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Prediction: """ @@ -90,8 +90,8 @@ def create( Parameters ---------- - task : typing.Optional[int] - Task ID for which the prediction is created + model_version : typing.Optional[str] + Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) @@ -99,8 +99,8 @@ def create( score : typing.Optional[float] Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. - model_version : typing.Optional[str] - Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + task : typing.Optional[int] + Task ID for which the prediction is created request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -118,36 +118,36 @@ def create( api_key="YOUR_API_KEY", ) client.predictions.create( + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) """ _response = self._client_wrapper.httpx_client.request( "api/predictions/", method="POST", json={ - "task": task, + "model_version": model_version, "result": result, "score": score, - "model_version": model_version, + "task": task, }, headers={ "content-type": "application/json", @@ -260,10 +260,10 @@ def update( self, id: int, *, - task: typing.Optional[int] = OMIT, + model_version: typing.Optional[str] = OMIT, result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, score: typing.Optional[float] = OMIT, - model_version: typing.Optional[str] = OMIT, + task: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Prediction: """ @@ -274,8 +274,8 @@ def update( id : int Prediction ID - task : typing.Optional[int] - Task ID for which the prediction is created + model_version : typing.Optional[str] + Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) @@ -283,8 +283,8 @@ def update( score : typing.Optional[float] Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. - model_version : typing.Optional[str] - Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + task : typing.Optional[int] + Task ID for which the prediction is created request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -303,36 +303,36 @@ def update( ) client.predictions.update( id=1, + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) """ _response = self._client_wrapper.httpx_client.request( f"api/predictions/{jsonable_encoder(id)}/", method="PATCH", json={ - "task": task, + "model_version": model_version, "result": result, "score": score, - "model_version": model_version, + "task": task, }, headers={ "content-type": "application/json", @@ -428,10 +428,10 @@ async def main() -> None: async def create( self, *, - task: typing.Optional[int] = OMIT, + model_version: typing.Optional[str] = OMIT, result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, score: typing.Optional[float] = OMIT, - model_version: typing.Optional[str] = OMIT, + task: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Prediction: """ @@ -439,8 +439,8 @@ async def create( Parameters ---------- - task : typing.Optional[int] - Task ID for which the prediction is created + model_version : typing.Optional[str] + Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) @@ -448,8 +448,8 @@ async def create( score : typing.Optional[float] Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. - model_version : typing.Optional[str] - Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + task : typing.Optional[int] + Task ID for which the prediction is created request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -472,26 +472,26 @@ async def create( async def main() -> None: await client.predictions.create( + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) @@ -501,10 +501,10 @@ async def main() -> None: "api/predictions/", method="POST", json={ - "task": task, + "model_version": model_version, "result": result, "score": score, - "model_version": model_version, + "task": task, }, headers={ "content-type": "application/json", @@ -633,10 +633,10 @@ async def update( self, id: int, *, - task: typing.Optional[int] = OMIT, + model_version: typing.Optional[str] = OMIT, result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, score: typing.Optional[float] = OMIT, - model_version: typing.Optional[str] = OMIT, + task: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Prediction: """ @@ -647,8 +647,8 @@ async def update( id : int Prediction ID - task : typing.Optional[int] - Task ID for which the prediction is created + model_version : typing.Optional[str] + Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions) @@ -656,8 +656,8 @@ async def update( score : typing.Optional[float] Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first. - model_version : typing.Optional[str] - Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + task : typing.Optional[int] + Task ID for which the prediction is created request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -681,26 +681,26 @@ async def update( async def main() -> None: await client.predictions.update( id=1, + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) @@ -710,10 +710,10 @@ async def main() -> None: f"api/predictions/{jsonable_encoder(id)}/", method="PATCH", json={ - "task": task, + "model_version": model_version, "result": result, "score": score, - "model_version": model_version, + "task": task, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/projects/client.py b/src/label_studio_sdk/projects/client.py index 931f58019..641311068 100644 --- a/src/label_studio_sdk/projects/client.py +++ b/src/label_studio_sdk/projects/client.py @@ -14,17 +14,17 @@ from json.decoder import JSONDecodeError from ..core.api_error import ApiError from ..types.user_simple_request import UserSimpleRequest +import datetime as dt from .types.lse_project_create_request_sampling import LseProjectCreateRequestSampling from .types.lse_project_create_request_skip_queue import LseProjectCreateRequestSkipQueue -import datetime as dt from ..types.lse_project_create import LseProjectCreate from ..core.serialization import convert_and_respect_annotation_metadata from ..types.project import Project from ..core.jsonable_encoder import jsonable_encoder +from ..types.assignment_settings_request import AssignmentSettingsRequest +from ..types.review_settings_request import ReviewSettingsRequest from .types.patched_lse_project_update_request_sampling import PatchedLseProjectUpdateRequestSampling from .types.patched_lse_project_update_request_skip_queue import PatchedLseProjectUpdateRequestSkipQueue -from ..types.review_settings_request import ReviewSettingsRequest -from ..types.assignment_settings_request import AssignmentSettingsRequest from ..types.lse_project_update import LseProjectUpdate from ..types.mode_enum import ModeEnum from .types.projects_duplicate_response import ProjectsDuplicateResponse @@ -166,34 +166,34 @@ def list( def create( self, *, - title: typing.Optional[str] = OMIT, + color: typing.Optional[str] = OMIT, + control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, + created_by: typing.Optional[UserSimpleRequest] = OMIT, description: typing.Optional[str] = OMIT, - label_config: typing.Optional[str] = OMIT, - expert_instruction: typing.Optional[str] = OMIT, - show_instruction: typing.Optional[bool] = OMIT, - show_skip_button: typing.Optional[bool] = OMIT, enable_empty_annotation: typing.Optional[bool] = OMIT, - show_annotation_history: typing.Optional[bool] = OMIT, - organization: typing.Optional[int] = OMIT, - color: typing.Optional[str] = OMIT, - maximum_annotations: typing.Optional[int] = OMIT, - is_published: typing.Optional[bool] = OMIT, - model_version: typing.Optional[str] = OMIT, + evaluate_predictions_automatically: typing.Optional[bool] = OMIT, + expert_instruction: typing.Optional[str] = OMIT, is_draft: typing.Optional[bool] = OMIT, - created_by: typing.Optional[UserSimpleRequest] = OMIT, + is_published: typing.Optional[bool] = OMIT, + label_config: typing.Optional[str] = OMIT, + maximum_annotations: typing.Optional[int] = OMIT, min_annotations_to_start_training: typing.Optional[int] = OMIT, - show_collab_predictions: typing.Optional[bool] = OMIT, + model_version: typing.Optional[str] = OMIT, + organization: typing.Optional[int] = OMIT, + overlap_cohort_percentage: typing.Optional[int] = OMIT, + pinned_at: typing.Optional[dt.datetime] = OMIT, + reveal_preannotations_interactively: typing.Optional[bool] = OMIT, sampling: typing.Optional[LseProjectCreateRequestSampling] = OMIT, + show_annotation_history: typing.Optional[bool] = OMIT, + show_collab_predictions: typing.Optional[bool] = OMIT, show_ground_truth_first: typing.Optional[bool] = OMIT, + show_instruction: typing.Optional[bool] = OMIT, show_overlap_first: typing.Optional[bool] = OMIT, - overlap_cohort_percentage: typing.Optional[int] = OMIT, + show_skip_button: typing.Optional[bool] = OMIT, + skip_queue: typing.Optional[LseProjectCreateRequestSkipQueue] = OMIT, task_data_login: typing.Optional[str] = OMIT, task_data_password: typing.Optional[str] = OMIT, - control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, - evaluate_predictions_automatically: typing.Optional[bool] = OMIT, - skip_queue: typing.Optional[LseProjectCreateRequestSkipQueue] = OMIT, - reveal_preannotations_interactively: typing.Optional[bool] = OMIT, - pinned_at: typing.Optional[dt.datetime] = OMIT, + title: typing.Optional[str] = OMIT, workspace: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseProjectCreate: @@ -202,62 +202,72 @@ def create( Parameters ---------- - title : typing.Optional[str] - Project name. Must be between 3 and 50 characters long. + color : typing.Optional[str] + + control_weights : typing.Optional[typing.Optional[typing.Any]] + + created_by : typing.Optional[UserSimpleRequest] + Project owner description : typing.Optional[str] Project description - label_config : typing.Optional[str] - Label config in XML format. See more about it in documentation + enable_empty_annotation : typing.Optional[bool] + Allow annotators to submit empty annotations + + evaluate_predictions_automatically : typing.Optional[bool] + Retrieve and display predictions when loading a task expert_instruction : typing.Optional[str] Labeling instructions in HTML format - show_instruction : typing.Optional[bool] - Show instructions to the annotator before they start - - show_skip_button : typing.Optional[bool] - Show a skip button in interface and allow annotators to skip the task - - enable_empty_annotation : typing.Optional[bool] - Allow annotators to submit empty annotations - - show_annotation_history : typing.Optional[bool] - Show annotation history to annotator + is_draft : typing.Optional[bool] + Whether or not the project is in the middle of being created - organization : typing.Optional[int] + is_published : typing.Optional[bool] + Whether or not the project is published to annotators - color : typing.Optional[str] + label_config : typing.Optional[str] + Label config in XML format. See more about it in documentation maximum_annotations : typing.Optional[int] Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) - is_published : typing.Optional[bool] - Whether or not the project is published to annotators + min_annotations_to_start_training : typing.Optional[int] + Minimum number of completed tasks after which model training is started model_version : typing.Optional[str] Machine learning model version - is_draft : typing.Optional[bool] - Whether or not the project is in the middle of being created + organization : typing.Optional[int] - created_by : typing.Optional[UserSimpleRequest] - Project owner + overlap_cohort_percentage : typing.Optional[int] - min_annotations_to_start_training : typing.Optional[int] - Minimum number of completed tasks after which model training is started + pinned_at : typing.Optional[dt.datetime] + Pinned date and time - show_collab_predictions : typing.Optional[bool] - If set, the annotator can view model predictions + reveal_preannotations_interactively : typing.Optional[bool] + Reveal pre-annotations interactively sampling : typing.Optional[LseProjectCreateRequestSampling] + show_annotation_history : typing.Optional[bool] + Show annotation history to annotator + + show_collab_predictions : typing.Optional[bool] + If set, the annotator can view model predictions + show_ground_truth_first : typing.Optional[bool] + show_instruction : typing.Optional[bool] + Show instructions to the annotator before they start + show_overlap_first : typing.Optional[bool] - overlap_cohort_percentage : typing.Optional[int] + show_skip_button : typing.Optional[bool] + Show a skip button in interface and allow annotators to skip the task + + skip_queue : typing.Optional[LseProjectCreateRequestSkipQueue] task_data_login : typing.Optional[str] Task data credentials: login @@ -265,18 +275,8 @@ def create( task_data_password : typing.Optional[str] Task data credentials: password - control_weights : typing.Optional[typing.Optional[typing.Any]] - - evaluate_predictions_automatically : typing.Optional[bool] - Retrieve and display predictions when loading a task - - skip_queue : typing.Optional[LseProjectCreateRequestSkipQueue] - - reveal_preannotations_interactively : typing.Optional[bool] - Reveal pre-annotations interactively - - pinned_at : typing.Optional[dt.datetime] - Pinned date and time + title : typing.Optional[str] + Project name. Must be between 3 and 50 characters long. workspace : typing.Optional[int] @@ -301,40 +301,40 @@ def create( "api/projects/", method="POST", json={ - "title": title, - "description": description, - "label_config": label_config, - "expert_instruction": expert_instruction, - "show_instruction": show_instruction, - "show_skip_button": show_skip_button, - "enable_empty_annotation": enable_empty_annotation, - "show_annotation_history": show_annotation_history, - "organization": organization, "color": color, - "maximum_annotations": maximum_annotations, - "is_published": is_published, - "model_version": model_version, - "is_draft": is_draft, + "control_weights": control_weights, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), + "description": description, + "enable_empty_annotation": enable_empty_annotation, + "evaluate_predictions_automatically": evaluate_predictions_automatically, + "expert_instruction": expert_instruction, + "is_draft": is_draft, + "is_published": is_published, + "label_config": label_config, + "maximum_annotations": maximum_annotations, "min_annotations_to_start_training": min_annotations_to_start_training, - "show_collab_predictions": show_collab_predictions, + "model_version": model_version, + "organization": organization, + "overlap_cohort_percentage": overlap_cohort_percentage, + "pinned_at": pinned_at, + "reveal_preannotations_interactively": reveal_preannotations_interactively, "sampling": convert_and_respect_annotation_metadata( object_=sampling, annotation=LseProjectCreateRequestSampling, direction="write" ), + "show_annotation_history": show_annotation_history, + "show_collab_predictions": show_collab_predictions, "show_ground_truth_first": show_ground_truth_first, + "show_instruction": show_instruction, "show_overlap_first": show_overlap_first, - "overlap_cohort_percentage": overlap_cohort_percentage, - "task_data_login": task_data_login, - "task_data_password": task_data_password, - "control_weights": control_weights, - "evaluate_predictions_automatically": evaluate_predictions_automatically, + "show_skip_button": show_skip_button, "skip_queue": convert_and_respect_annotation_metadata( object_=skip_queue, annotation=LseProjectCreateRequestSkipQueue, direction="write" ), - "reveal_preannotations_interactively": reveal_preannotations_interactively, - "pinned_at": pinned_at, + "task_data_login": task_data_login, + "task_data_password": task_data_password, + "title": title, "workspace": workspace, }, headers={ @@ -446,46 +446,46 @@ def update( self, id: int, *, - title: typing.Optional[str] = OMIT, + annotation_limit_count: typing.Optional[int] = OMIT, + annotation_limit_percent: typing.Optional[str] = OMIT, + annotator_evaluation_minimum_score: typing.Optional[str] = OMIT, + annotator_evaluation_minimum_tasks: typing.Optional[int] = OMIT, + assignment_settings: typing.Optional[AssignmentSettingsRequest] = OMIT, + color: typing.Optional[str] = OMIT, + comment_classification_config: typing.Optional[str] = OMIT, + control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, + created_by: typing.Optional[UserSimpleRequest] = OMIT, + custom_script: typing.Optional[str] = OMIT, + custom_task_lock_ttl: typing.Optional[int] = OMIT, description: typing.Optional[str] = OMIT, - label_config: typing.Optional[str] = OMIT, - expert_instruction: typing.Optional[str] = OMIT, - show_instruction: typing.Optional[bool] = OMIT, - show_skip_button: typing.Optional[bool] = OMIT, enable_empty_annotation: typing.Optional[bool] = OMIT, - show_annotation_history: typing.Optional[bool] = OMIT, - organization: typing.Optional[int] = OMIT, - color: typing.Optional[str] = OMIT, - maximum_annotations: typing.Optional[int] = OMIT, - is_published: typing.Optional[bool] = OMIT, - model_version: typing.Optional[str] = OMIT, + evaluate_predictions_automatically: typing.Optional[bool] = OMIT, + expert_instruction: typing.Optional[str] = OMIT, is_draft: typing.Optional[bool] = OMIT, - created_by: typing.Optional[UserSimpleRequest] = OMIT, + is_published: typing.Optional[bool] = OMIT, + label_config: typing.Optional[str] = OMIT, + maximum_annotations: typing.Optional[int] = OMIT, min_annotations_to_start_training: typing.Optional[int] = OMIT, - show_collab_predictions: typing.Optional[bool] = OMIT, + model_version: typing.Optional[str] = OMIT, + organization: typing.Optional[int] = OMIT, + overlap_cohort_percentage: typing.Optional[int] = OMIT, + pause_on_failed_annotator_evaluation: typing.Optional[bool] = OMIT, + pinned_at: typing.Optional[dt.datetime] = OMIT, + require_comment_on_skip: typing.Optional[bool] = OMIT, + reveal_preannotations_interactively: typing.Optional[bool] = OMIT, + review_settings: typing.Optional[ReviewSettingsRequest] = OMIT, sampling: typing.Optional[PatchedLseProjectUpdateRequestSampling] = OMIT, + show_annotation_history: typing.Optional[bool] = OMIT, + show_collab_predictions: typing.Optional[bool] = OMIT, show_ground_truth_first: typing.Optional[bool] = OMIT, + show_instruction: typing.Optional[bool] = OMIT, show_overlap_first: typing.Optional[bool] = OMIT, - overlap_cohort_percentage: typing.Optional[int] = OMIT, + show_skip_button: typing.Optional[bool] = OMIT, + skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT, task_data_login: typing.Optional[str] = OMIT, task_data_password: typing.Optional[str] = OMIT, - control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, - evaluate_predictions_automatically: typing.Optional[bool] = OMIT, - skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT, - reveal_preannotations_interactively: typing.Optional[bool] = OMIT, - pinned_at: typing.Optional[dt.datetime] = OMIT, + title: typing.Optional[str] = OMIT, workspace: typing.Optional[int] = OMIT, - review_settings: typing.Optional[ReviewSettingsRequest] = OMIT, - assignment_settings: typing.Optional[AssignmentSettingsRequest] = OMIT, - custom_script: typing.Optional[str] = OMIT, - comment_classification_config: typing.Optional[str] = OMIT, - require_comment_on_skip: typing.Optional[bool] = OMIT, - custom_task_lock_ttl: typing.Optional[int] = OMIT, - annotation_limit_count: typing.Optional[int] = OMIT, - annotation_limit_percent: typing.Optional[str] = OMIT, - pause_on_failed_annotator_evaluation: typing.Optional[bool] = OMIT, - annotator_evaluation_minimum_score: typing.Optional[str] = OMIT, - annotator_evaluation_minimum_tasks: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseProjectUpdate: """ @@ -495,106 +495,106 @@ def update( ---------- id : int - title : typing.Optional[str] - Project name. Must be between 3 and 50 characters long. + annotation_limit_count : typing.Optional[int] - description : typing.Optional[str] - Project description + annotation_limit_percent : typing.Optional[str] - label_config : typing.Optional[str] - Label config in XML format. See more about it in documentation + annotator_evaluation_minimum_score : typing.Optional[str] - expert_instruction : typing.Optional[str] - Labeling instructions in HTML format + annotator_evaluation_minimum_tasks : typing.Optional[int] - show_instruction : typing.Optional[bool] - Show instructions to the annotator before they start + assignment_settings : typing.Optional[AssignmentSettingsRequest] - show_skip_button : typing.Optional[bool] - Show a skip button in interface and allow annotators to skip the task + color : typing.Optional[str] - enable_empty_annotation : typing.Optional[bool] - Allow annotators to submit empty annotations + comment_classification_config : typing.Optional[str] - show_annotation_history : typing.Optional[bool] - Show annotation history to annotator + control_weights : typing.Optional[typing.Optional[typing.Any]] - organization : typing.Optional[int] + created_by : typing.Optional[UserSimpleRequest] + Project owner - color : typing.Optional[str] + custom_script : typing.Optional[str] - maximum_annotations : typing.Optional[int] - Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + custom_task_lock_ttl : typing.Optional[int] + TTL in seconds for task reservations, on new and existing tasks - is_published : typing.Optional[bool] - Whether or not the project is published to annotators + description : typing.Optional[str] + Project description - model_version : typing.Optional[str] - Machine learning model version + enable_empty_annotation : typing.Optional[bool] + Allow annotators to submit empty annotations + + evaluate_predictions_automatically : typing.Optional[bool] + Retrieve and display predictions when loading a task + + expert_instruction : typing.Optional[str] + Labeling instructions in HTML format is_draft : typing.Optional[bool] Whether or not the project is in the middle of being created - created_by : typing.Optional[UserSimpleRequest] - Project owner + is_published : typing.Optional[bool] + Whether or not the project is published to annotators - min_annotations_to_start_training : typing.Optional[int] - Minimum number of completed tasks after which model training is started + label_config : typing.Optional[str] + Label config in XML format. See more about it in documentation - show_collab_predictions : typing.Optional[bool] - If set, the annotator can view model predictions + maximum_annotations : typing.Optional[int] + Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) - sampling : typing.Optional[PatchedLseProjectUpdateRequestSampling] + min_annotations_to_start_training : typing.Optional[int] + Minimum number of completed tasks after which model training is started - show_ground_truth_first : typing.Optional[bool] + model_version : typing.Optional[str] + Machine learning model version - show_overlap_first : typing.Optional[bool] + organization : typing.Optional[int] overlap_cohort_percentage : typing.Optional[int] - task_data_login : typing.Optional[str] - Task data credentials: login - - task_data_password : typing.Optional[str] - Task data credentials: password - - control_weights : typing.Optional[typing.Optional[typing.Any]] + pause_on_failed_annotator_evaluation : typing.Optional[bool] - evaluate_predictions_automatically : typing.Optional[bool] - Retrieve and display predictions when loading a task + pinned_at : typing.Optional[dt.datetime] + Pinned date and time - skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] + require_comment_on_skip : typing.Optional[bool] reveal_preannotations_interactively : typing.Optional[bool] Reveal pre-annotations interactively - pinned_at : typing.Optional[dt.datetime] - Pinned date and time + review_settings : typing.Optional[ReviewSettingsRequest] - workspace : typing.Optional[int] + sampling : typing.Optional[PatchedLseProjectUpdateRequestSampling] - review_settings : typing.Optional[ReviewSettingsRequest] + show_annotation_history : typing.Optional[bool] + Show annotation history to annotator - assignment_settings : typing.Optional[AssignmentSettingsRequest] + show_collab_predictions : typing.Optional[bool] + If set, the annotator can view model predictions - custom_script : typing.Optional[str] + show_ground_truth_first : typing.Optional[bool] - comment_classification_config : typing.Optional[str] + show_instruction : typing.Optional[bool] + Show instructions to the annotator before they start - require_comment_on_skip : typing.Optional[bool] + show_overlap_first : typing.Optional[bool] - custom_task_lock_ttl : typing.Optional[int] - TTL in seconds for task reservations, on new and existing tasks + show_skip_button : typing.Optional[bool] + Show a skip button in interface and allow annotators to skip the task - annotation_limit_count : typing.Optional[int] + skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] - annotation_limit_percent : typing.Optional[str] + task_data_login : typing.Optional[str] + Task data credentials: login - pause_on_failed_annotator_evaluation : typing.Optional[bool] + task_data_password : typing.Optional[str] + Task data credentials: password - annotator_evaluation_minimum_score : typing.Optional[str] + title : typing.Optional[str] + Project name. Must be between 3 and 50 characters long. - annotator_evaluation_minimum_tasks : typing.Optional[int] + workspace : typing.Optional[int] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -619,56 +619,56 @@ def update( f"api/projects/{jsonable_encoder(id)}/", method="PATCH", json={ - "title": title, - "description": description, - "label_config": label_config, - "expert_instruction": expert_instruction, - "show_instruction": show_instruction, - "show_skip_button": show_skip_button, - "enable_empty_annotation": enable_empty_annotation, - "show_annotation_history": show_annotation_history, - "organization": organization, + "annotation_limit_count": annotation_limit_count, + "annotation_limit_percent": annotation_limit_percent, + "annotator_evaluation_minimum_score": annotator_evaluation_minimum_score, + "annotator_evaluation_minimum_tasks": annotator_evaluation_minimum_tasks, + "assignment_settings": convert_and_respect_annotation_metadata( + object_=assignment_settings, annotation=AssignmentSettingsRequest, direction="write" + ), "color": color, - "maximum_annotations": maximum_annotations, - "is_published": is_published, - "model_version": model_version, - "is_draft": is_draft, + "comment_classification_config": comment_classification_config, + "control_weights": control_weights, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), + "custom_script": custom_script, + "custom_task_lock_ttl": custom_task_lock_ttl, + "description": description, + "enable_empty_annotation": enable_empty_annotation, + "evaluate_predictions_automatically": evaluate_predictions_automatically, + "expert_instruction": expert_instruction, + "is_draft": is_draft, + "is_published": is_published, + "label_config": label_config, + "maximum_annotations": maximum_annotations, "min_annotations_to_start_training": min_annotations_to_start_training, - "show_collab_predictions": show_collab_predictions, + "model_version": model_version, + "organization": organization, + "overlap_cohort_percentage": overlap_cohort_percentage, + "pause_on_failed_annotator_evaluation": pause_on_failed_annotator_evaluation, + "pinned_at": pinned_at, + "require_comment_on_skip": require_comment_on_skip, + "reveal_preannotations_interactively": reveal_preannotations_interactively, + "review_settings": convert_and_respect_annotation_metadata( + object_=review_settings, annotation=ReviewSettingsRequest, direction="write" + ), "sampling": convert_and_respect_annotation_metadata( object_=sampling, annotation=PatchedLseProjectUpdateRequestSampling, direction="write" ), + "show_annotation_history": show_annotation_history, + "show_collab_predictions": show_collab_predictions, "show_ground_truth_first": show_ground_truth_first, + "show_instruction": show_instruction, "show_overlap_first": show_overlap_first, - "overlap_cohort_percentage": overlap_cohort_percentage, - "task_data_login": task_data_login, - "task_data_password": task_data_password, - "control_weights": control_weights, - "evaluate_predictions_automatically": evaluate_predictions_automatically, + "show_skip_button": show_skip_button, "skip_queue": convert_and_respect_annotation_metadata( object_=skip_queue, annotation=PatchedLseProjectUpdateRequestSkipQueue, direction="write" ), - "reveal_preannotations_interactively": reveal_preannotations_interactively, - "pinned_at": pinned_at, + "task_data_login": task_data_login, + "task_data_password": task_data_password, + "title": title, "workspace": workspace, - "review_settings": convert_and_respect_annotation_metadata( - object_=review_settings, annotation=ReviewSettingsRequest, direction="write" - ), - "assignment_settings": convert_and_respect_annotation_metadata( - object_=assignment_settings, annotation=AssignmentSettingsRequest, direction="write" - ), - "custom_script": custom_script, - "comment_classification_config": comment_classification_config, - "require_comment_on_skip": require_comment_on_skip, - "custom_task_lock_ttl": custom_task_lock_ttl, - "annotation_limit_count": annotation_limit_count, - "annotation_limit_percent": annotation_limit_percent, - "pause_on_failed_annotator_evaluation": pause_on_failed_annotator_evaluation, - "annotator_evaluation_minimum_score": annotator_evaluation_minimum_score, - "annotator_evaluation_minimum_tasks": annotator_evaluation_minimum_tasks, }, headers={ "content-type": "application/json", @@ -695,8 +695,8 @@ def duplicate( id: int, *, mode: ModeEnum, - workspace: int, title: str, + workspace: int, description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ProjectsDuplicateResponse: @@ -713,12 +713,12 @@ def duplicate( * `settings` - Only settings * `settings,data` - Settings and tasks - workspace : int - Workspace, where to place duplicated project - title : str Title of duplicated project + workspace : int + Workspace, where to place duplicated project + description : typing.Optional[str] Description of duplicated project @@ -740,18 +740,18 @@ def duplicate( client.projects.duplicate( id=1, mode="settings", - workspace=1, title="title", + workspace=1, ) """ _response = self._client_wrapper.httpx_client.request( f"api/projects/{jsonable_encoder(id)}/duplicate/", method="POST", json={ + "description": description, "mode": mode, - "workspace": workspace, "title": title, - "description": description, + "workspace": workspace, }, headers={ "content-type": "application/json", @@ -1101,34 +1101,34 @@ async def main() -> None: async def create( self, *, - title: typing.Optional[str] = OMIT, + color: typing.Optional[str] = OMIT, + control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, + created_by: typing.Optional[UserSimpleRequest] = OMIT, description: typing.Optional[str] = OMIT, - label_config: typing.Optional[str] = OMIT, - expert_instruction: typing.Optional[str] = OMIT, - show_instruction: typing.Optional[bool] = OMIT, - show_skip_button: typing.Optional[bool] = OMIT, enable_empty_annotation: typing.Optional[bool] = OMIT, - show_annotation_history: typing.Optional[bool] = OMIT, - organization: typing.Optional[int] = OMIT, - color: typing.Optional[str] = OMIT, - maximum_annotations: typing.Optional[int] = OMIT, - is_published: typing.Optional[bool] = OMIT, - model_version: typing.Optional[str] = OMIT, + evaluate_predictions_automatically: typing.Optional[bool] = OMIT, + expert_instruction: typing.Optional[str] = OMIT, is_draft: typing.Optional[bool] = OMIT, - created_by: typing.Optional[UserSimpleRequest] = OMIT, + is_published: typing.Optional[bool] = OMIT, + label_config: typing.Optional[str] = OMIT, + maximum_annotations: typing.Optional[int] = OMIT, min_annotations_to_start_training: typing.Optional[int] = OMIT, - show_collab_predictions: typing.Optional[bool] = OMIT, + model_version: typing.Optional[str] = OMIT, + organization: typing.Optional[int] = OMIT, + overlap_cohort_percentage: typing.Optional[int] = OMIT, + pinned_at: typing.Optional[dt.datetime] = OMIT, + reveal_preannotations_interactively: typing.Optional[bool] = OMIT, sampling: typing.Optional[LseProjectCreateRequestSampling] = OMIT, + show_annotation_history: typing.Optional[bool] = OMIT, + show_collab_predictions: typing.Optional[bool] = OMIT, show_ground_truth_first: typing.Optional[bool] = OMIT, + show_instruction: typing.Optional[bool] = OMIT, show_overlap_first: typing.Optional[bool] = OMIT, - overlap_cohort_percentage: typing.Optional[int] = OMIT, + show_skip_button: typing.Optional[bool] = OMIT, + skip_queue: typing.Optional[LseProjectCreateRequestSkipQueue] = OMIT, task_data_login: typing.Optional[str] = OMIT, task_data_password: typing.Optional[str] = OMIT, - control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, - evaluate_predictions_automatically: typing.Optional[bool] = OMIT, - skip_queue: typing.Optional[LseProjectCreateRequestSkipQueue] = OMIT, - reveal_preannotations_interactively: typing.Optional[bool] = OMIT, - pinned_at: typing.Optional[dt.datetime] = OMIT, + title: typing.Optional[str] = OMIT, workspace: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseProjectCreate: @@ -1137,62 +1137,72 @@ async def create( Parameters ---------- - title : typing.Optional[str] - Project name. Must be between 3 and 50 characters long. + color : typing.Optional[str] + + control_weights : typing.Optional[typing.Optional[typing.Any]] + + created_by : typing.Optional[UserSimpleRequest] + Project owner description : typing.Optional[str] Project description - label_config : typing.Optional[str] - Label config in XML format. See more about it in documentation + enable_empty_annotation : typing.Optional[bool] + Allow annotators to submit empty annotations + + evaluate_predictions_automatically : typing.Optional[bool] + Retrieve and display predictions when loading a task expert_instruction : typing.Optional[str] Labeling instructions in HTML format - show_instruction : typing.Optional[bool] - Show instructions to the annotator before they start - - show_skip_button : typing.Optional[bool] - Show a skip button in interface and allow annotators to skip the task - - enable_empty_annotation : typing.Optional[bool] - Allow annotators to submit empty annotations - - show_annotation_history : typing.Optional[bool] - Show annotation history to annotator + is_draft : typing.Optional[bool] + Whether or not the project is in the middle of being created - organization : typing.Optional[int] + is_published : typing.Optional[bool] + Whether or not the project is published to annotators - color : typing.Optional[str] + label_config : typing.Optional[str] + Label config in XML format. See more about it in documentation maximum_annotations : typing.Optional[int] Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) - is_published : typing.Optional[bool] - Whether or not the project is published to annotators + min_annotations_to_start_training : typing.Optional[int] + Minimum number of completed tasks after which model training is started model_version : typing.Optional[str] Machine learning model version - is_draft : typing.Optional[bool] - Whether or not the project is in the middle of being created + organization : typing.Optional[int] - created_by : typing.Optional[UserSimpleRequest] - Project owner + overlap_cohort_percentage : typing.Optional[int] - min_annotations_to_start_training : typing.Optional[int] - Minimum number of completed tasks after which model training is started + pinned_at : typing.Optional[dt.datetime] + Pinned date and time - show_collab_predictions : typing.Optional[bool] - If set, the annotator can view model predictions + reveal_preannotations_interactively : typing.Optional[bool] + Reveal pre-annotations interactively sampling : typing.Optional[LseProjectCreateRequestSampling] + show_annotation_history : typing.Optional[bool] + Show annotation history to annotator + + show_collab_predictions : typing.Optional[bool] + If set, the annotator can view model predictions + show_ground_truth_first : typing.Optional[bool] + show_instruction : typing.Optional[bool] + Show instructions to the annotator before they start + show_overlap_first : typing.Optional[bool] - overlap_cohort_percentage : typing.Optional[int] + show_skip_button : typing.Optional[bool] + Show a skip button in interface and allow annotators to skip the task + + skip_queue : typing.Optional[LseProjectCreateRequestSkipQueue] task_data_login : typing.Optional[str] Task data credentials: login @@ -1200,18 +1210,8 @@ async def create( task_data_password : typing.Optional[str] Task data credentials: password - control_weights : typing.Optional[typing.Optional[typing.Any]] - - evaluate_predictions_automatically : typing.Optional[bool] - Retrieve and display predictions when loading a task - - skip_queue : typing.Optional[LseProjectCreateRequestSkipQueue] - - reveal_preannotations_interactively : typing.Optional[bool] - Reveal pre-annotations interactively - - pinned_at : typing.Optional[dt.datetime] - Pinned date and time + title : typing.Optional[str] + Project name. Must be between 3 and 50 characters long. workspace : typing.Optional[int] @@ -1244,40 +1244,40 @@ async def main() -> None: "api/projects/", method="POST", json={ - "title": title, - "description": description, - "label_config": label_config, - "expert_instruction": expert_instruction, - "show_instruction": show_instruction, - "show_skip_button": show_skip_button, - "enable_empty_annotation": enable_empty_annotation, - "show_annotation_history": show_annotation_history, - "organization": organization, "color": color, - "maximum_annotations": maximum_annotations, - "is_published": is_published, - "model_version": model_version, - "is_draft": is_draft, + "control_weights": control_weights, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), + "description": description, + "enable_empty_annotation": enable_empty_annotation, + "evaluate_predictions_automatically": evaluate_predictions_automatically, + "expert_instruction": expert_instruction, + "is_draft": is_draft, + "is_published": is_published, + "label_config": label_config, + "maximum_annotations": maximum_annotations, "min_annotations_to_start_training": min_annotations_to_start_training, - "show_collab_predictions": show_collab_predictions, + "model_version": model_version, + "organization": organization, + "overlap_cohort_percentage": overlap_cohort_percentage, + "pinned_at": pinned_at, + "reveal_preannotations_interactively": reveal_preannotations_interactively, "sampling": convert_and_respect_annotation_metadata( object_=sampling, annotation=LseProjectCreateRequestSampling, direction="write" ), + "show_annotation_history": show_annotation_history, + "show_collab_predictions": show_collab_predictions, "show_ground_truth_first": show_ground_truth_first, + "show_instruction": show_instruction, "show_overlap_first": show_overlap_first, - "overlap_cohort_percentage": overlap_cohort_percentage, - "task_data_login": task_data_login, - "task_data_password": task_data_password, - "control_weights": control_weights, - "evaluate_predictions_automatically": evaluate_predictions_automatically, + "show_skip_button": show_skip_button, "skip_queue": convert_and_respect_annotation_metadata( object_=skip_queue, annotation=LseProjectCreateRequestSkipQueue, direction="write" ), - "reveal_preannotations_interactively": reveal_preannotations_interactively, - "pinned_at": pinned_at, + "task_data_login": task_data_login, + "task_data_password": task_data_password, + "title": title, "workspace": workspace, }, headers={ @@ -1405,46 +1405,46 @@ async def update( self, id: int, *, - title: typing.Optional[str] = OMIT, + annotation_limit_count: typing.Optional[int] = OMIT, + annotation_limit_percent: typing.Optional[str] = OMIT, + annotator_evaluation_minimum_score: typing.Optional[str] = OMIT, + annotator_evaluation_minimum_tasks: typing.Optional[int] = OMIT, + assignment_settings: typing.Optional[AssignmentSettingsRequest] = OMIT, + color: typing.Optional[str] = OMIT, + comment_classification_config: typing.Optional[str] = OMIT, + control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, + created_by: typing.Optional[UserSimpleRequest] = OMIT, + custom_script: typing.Optional[str] = OMIT, + custom_task_lock_ttl: typing.Optional[int] = OMIT, description: typing.Optional[str] = OMIT, - label_config: typing.Optional[str] = OMIT, - expert_instruction: typing.Optional[str] = OMIT, - show_instruction: typing.Optional[bool] = OMIT, - show_skip_button: typing.Optional[bool] = OMIT, enable_empty_annotation: typing.Optional[bool] = OMIT, - show_annotation_history: typing.Optional[bool] = OMIT, - organization: typing.Optional[int] = OMIT, - color: typing.Optional[str] = OMIT, - maximum_annotations: typing.Optional[int] = OMIT, - is_published: typing.Optional[bool] = OMIT, - model_version: typing.Optional[str] = OMIT, + evaluate_predictions_automatically: typing.Optional[bool] = OMIT, + expert_instruction: typing.Optional[str] = OMIT, is_draft: typing.Optional[bool] = OMIT, - created_by: typing.Optional[UserSimpleRequest] = OMIT, + is_published: typing.Optional[bool] = OMIT, + label_config: typing.Optional[str] = OMIT, + maximum_annotations: typing.Optional[int] = OMIT, min_annotations_to_start_training: typing.Optional[int] = OMIT, - show_collab_predictions: typing.Optional[bool] = OMIT, + model_version: typing.Optional[str] = OMIT, + organization: typing.Optional[int] = OMIT, + overlap_cohort_percentage: typing.Optional[int] = OMIT, + pause_on_failed_annotator_evaluation: typing.Optional[bool] = OMIT, + pinned_at: typing.Optional[dt.datetime] = OMIT, + require_comment_on_skip: typing.Optional[bool] = OMIT, + reveal_preannotations_interactively: typing.Optional[bool] = OMIT, + review_settings: typing.Optional[ReviewSettingsRequest] = OMIT, sampling: typing.Optional[PatchedLseProjectUpdateRequestSampling] = OMIT, + show_annotation_history: typing.Optional[bool] = OMIT, + show_collab_predictions: typing.Optional[bool] = OMIT, show_ground_truth_first: typing.Optional[bool] = OMIT, + show_instruction: typing.Optional[bool] = OMIT, show_overlap_first: typing.Optional[bool] = OMIT, - overlap_cohort_percentage: typing.Optional[int] = OMIT, + show_skip_button: typing.Optional[bool] = OMIT, + skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT, task_data_login: typing.Optional[str] = OMIT, task_data_password: typing.Optional[str] = OMIT, - control_weights: typing.Optional[typing.Optional[typing.Any]] = OMIT, - evaluate_predictions_automatically: typing.Optional[bool] = OMIT, - skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT, - reveal_preannotations_interactively: typing.Optional[bool] = OMIT, - pinned_at: typing.Optional[dt.datetime] = OMIT, + title: typing.Optional[str] = OMIT, workspace: typing.Optional[int] = OMIT, - review_settings: typing.Optional[ReviewSettingsRequest] = OMIT, - assignment_settings: typing.Optional[AssignmentSettingsRequest] = OMIT, - custom_script: typing.Optional[str] = OMIT, - comment_classification_config: typing.Optional[str] = OMIT, - require_comment_on_skip: typing.Optional[bool] = OMIT, - custom_task_lock_ttl: typing.Optional[int] = OMIT, - annotation_limit_count: typing.Optional[int] = OMIT, - annotation_limit_percent: typing.Optional[str] = OMIT, - pause_on_failed_annotator_evaluation: typing.Optional[bool] = OMIT, - annotator_evaluation_minimum_score: typing.Optional[str] = OMIT, - annotator_evaluation_minimum_tasks: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseProjectUpdate: """ @@ -1454,106 +1454,106 @@ async def update( ---------- id : int - title : typing.Optional[str] - Project name. Must be between 3 and 50 characters long. + annotation_limit_count : typing.Optional[int] - description : typing.Optional[str] - Project description + annotation_limit_percent : typing.Optional[str] - label_config : typing.Optional[str] - Label config in XML format. See more about it in documentation + annotator_evaluation_minimum_score : typing.Optional[str] - expert_instruction : typing.Optional[str] - Labeling instructions in HTML format + annotator_evaluation_minimum_tasks : typing.Optional[int] - show_instruction : typing.Optional[bool] - Show instructions to the annotator before they start + assignment_settings : typing.Optional[AssignmentSettingsRequest] - show_skip_button : typing.Optional[bool] - Show a skip button in interface and allow annotators to skip the task + color : typing.Optional[str] - enable_empty_annotation : typing.Optional[bool] - Allow annotators to submit empty annotations + comment_classification_config : typing.Optional[str] - show_annotation_history : typing.Optional[bool] - Show annotation history to annotator + control_weights : typing.Optional[typing.Optional[typing.Any]] - organization : typing.Optional[int] + created_by : typing.Optional[UserSimpleRequest] + Project owner - color : typing.Optional[str] + custom_script : typing.Optional[str] - maximum_annotations : typing.Optional[int] - Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + custom_task_lock_ttl : typing.Optional[int] + TTL in seconds for task reservations, on new and existing tasks - is_published : typing.Optional[bool] - Whether or not the project is published to annotators + description : typing.Optional[str] + Project description - model_version : typing.Optional[str] - Machine learning model version + enable_empty_annotation : typing.Optional[bool] + Allow annotators to submit empty annotations + + evaluate_predictions_automatically : typing.Optional[bool] + Retrieve and display predictions when loading a task + + expert_instruction : typing.Optional[str] + Labeling instructions in HTML format is_draft : typing.Optional[bool] Whether or not the project is in the middle of being created - created_by : typing.Optional[UserSimpleRequest] - Project owner + is_published : typing.Optional[bool] + Whether or not the project is published to annotators - min_annotations_to_start_training : typing.Optional[int] - Minimum number of completed tasks after which model training is started + label_config : typing.Optional[str] + Label config in XML format. See more about it in documentation - show_collab_predictions : typing.Optional[bool] - If set, the annotator can view model predictions + maximum_annotations : typing.Optional[int] + Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) - sampling : typing.Optional[PatchedLseProjectUpdateRequestSampling] + min_annotations_to_start_training : typing.Optional[int] + Minimum number of completed tasks after which model training is started - show_ground_truth_first : typing.Optional[bool] + model_version : typing.Optional[str] + Machine learning model version - show_overlap_first : typing.Optional[bool] + organization : typing.Optional[int] overlap_cohort_percentage : typing.Optional[int] - task_data_login : typing.Optional[str] - Task data credentials: login - - task_data_password : typing.Optional[str] - Task data credentials: password - - control_weights : typing.Optional[typing.Optional[typing.Any]] + pause_on_failed_annotator_evaluation : typing.Optional[bool] - evaluate_predictions_automatically : typing.Optional[bool] - Retrieve and display predictions when loading a task + pinned_at : typing.Optional[dt.datetime] + Pinned date and time - skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] + require_comment_on_skip : typing.Optional[bool] reveal_preannotations_interactively : typing.Optional[bool] Reveal pre-annotations interactively - pinned_at : typing.Optional[dt.datetime] - Pinned date and time + review_settings : typing.Optional[ReviewSettingsRequest] - workspace : typing.Optional[int] + sampling : typing.Optional[PatchedLseProjectUpdateRequestSampling] - review_settings : typing.Optional[ReviewSettingsRequest] + show_annotation_history : typing.Optional[bool] + Show annotation history to annotator - assignment_settings : typing.Optional[AssignmentSettingsRequest] + show_collab_predictions : typing.Optional[bool] + If set, the annotator can view model predictions - custom_script : typing.Optional[str] + show_ground_truth_first : typing.Optional[bool] - comment_classification_config : typing.Optional[str] + show_instruction : typing.Optional[bool] + Show instructions to the annotator before they start - require_comment_on_skip : typing.Optional[bool] + show_overlap_first : typing.Optional[bool] - custom_task_lock_ttl : typing.Optional[int] - TTL in seconds for task reservations, on new and existing tasks + show_skip_button : typing.Optional[bool] + Show a skip button in interface and allow annotators to skip the task - annotation_limit_count : typing.Optional[int] + skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] - annotation_limit_percent : typing.Optional[str] + task_data_login : typing.Optional[str] + Task data credentials: login - pause_on_failed_annotator_evaluation : typing.Optional[bool] + task_data_password : typing.Optional[str] + Task data credentials: password - annotator_evaluation_minimum_score : typing.Optional[str] + title : typing.Optional[str] + Project name. Must be between 3 and 50 characters long. - annotator_evaluation_minimum_tasks : typing.Optional[int] + workspace : typing.Optional[int] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1586,56 +1586,56 @@ async def main() -> None: f"api/projects/{jsonable_encoder(id)}/", method="PATCH", json={ - "title": title, - "description": description, - "label_config": label_config, - "expert_instruction": expert_instruction, - "show_instruction": show_instruction, - "show_skip_button": show_skip_button, - "enable_empty_annotation": enable_empty_annotation, - "show_annotation_history": show_annotation_history, - "organization": organization, + "annotation_limit_count": annotation_limit_count, + "annotation_limit_percent": annotation_limit_percent, + "annotator_evaluation_minimum_score": annotator_evaluation_minimum_score, + "annotator_evaluation_minimum_tasks": annotator_evaluation_minimum_tasks, + "assignment_settings": convert_and_respect_annotation_metadata( + object_=assignment_settings, annotation=AssignmentSettingsRequest, direction="write" + ), "color": color, - "maximum_annotations": maximum_annotations, - "is_published": is_published, - "model_version": model_version, - "is_draft": is_draft, + "comment_classification_config": comment_classification_config, + "control_weights": control_weights, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), + "custom_script": custom_script, + "custom_task_lock_ttl": custom_task_lock_ttl, + "description": description, + "enable_empty_annotation": enable_empty_annotation, + "evaluate_predictions_automatically": evaluate_predictions_automatically, + "expert_instruction": expert_instruction, + "is_draft": is_draft, + "is_published": is_published, + "label_config": label_config, + "maximum_annotations": maximum_annotations, "min_annotations_to_start_training": min_annotations_to_start_training, - "show_collab_predictions": show_collab_predictions, + "model_version": model_version, + "organization": organization, + "overlap_cohort_percentage": overlap_cohort_percentage, + "pause_on_failed_annotator_evaluation": pause_on_failed_annotator_evaluation, + "pinned_at": pinned_at, + "require_comment_on_skip": require_comment_on_skip, + "reveal_preannotations_interactively": reveal_preannotations_interactively, + "review_settings": convert_and_respect_annotation_metadata( + object_=review_settings, annotation=ReviewSettingsRequest, direction="write" + ), "sampling": convert_and_respect_annotation_metadata( object_=sampling, annotation=PatchedLseProjectUpdateRequestSampling, direction="write" ), + "show_annotation_history": show_annotation_history, + "show_collab_predictions": show_collab_predictions, "show_ground_truth_first": show_ground_truth_first, + "show_instruction": show_instruction, "show_overlap_first": show_overlap_first, - "overlap_cohort_percentage": overlap_cohort_percentage, - "task_data_login": task_data_login, - "task_data_password": task_data_password, - "control_weights": control_weights, - "evaluate_predictions_automatically": evaluate_predictions_automatically, + "show_skip_button": show_skip_button, "skip_queue": convert_and_respect_annotation_metadata( object_=skip_queue, annotation=PatchedLseProjectUpdateRequestSkipQueue, direction="write" ), - "reveal_preannotations_interactively": reveal_preannotations_interactively, - "pinned_at": pinned_at, + "task_data_login": task_data_login, + "task_data_password": task_data_password, + "title": title, "workspace": workspace, - "review_settings": convert_and_respect_annotation_metadata( - object_=review_settings, annotation=ReviewSettingsRequest, direction="write" - ), - "assignment_settings": convert_and_respect_annotation_metadata( - object_=assignment_settings, annotation=AssignmentSettingsRequest, direction="write" - ), - "custom_script": custom_script, - "comment_classification_config": comment_classification_config, - "require_comment_on_skip": require_comment_on_skip, - "custom_task_lock_ttl": custom_task_lock_ttl, - "annotation_limit_count": annotation_limit_count, - "annotation_limit_percent": annotation_limit_percent, - "pause_on_failed_annotator_evaluation": pause_on_failed_annotator_evaluation, - "annotator_evaluation_minimum_score": annotator_evaluation_minimum_score, - "annotator_evaluation_minimum_tasks": annotator_evaluation_minimum_tasks, }, headers={ "content-type": "application/json", @@ -1662,8 +1662,8 @@ async def duplicate( id: int, *, mode: ModeEnum, - workspace: int, title: str, + workspace: int, description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ProjectsDuplicateResponse: @@ -1680,12 +1680,12 @@ async def duplicate( * `settings` - Only settings * `settings,data` - Settings and tasks - workspace : int - Workspace, where to place duplicated project - title : str Title of duplicated project + workspace : int + Workspace, where to place duplicated project + description : typing.Optional[str] Description of duplicated project @@ -1712,8 +1712,8 @@ async def main() -> None: await client.projects.duplicate( id=1, mode="settings", - workspace=1, title="title", + workspace=1, ) @@ -1723,10 +1723,10 @@ async def main() -> None: f"api/projects/{jsonable_encoder(id)}/duplicate/", method="POST", json={ + "description": description, "mode": mode, - "workspace": workspace, "title": title, - "description": description, + "workspace": workspace, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/projects/exports/client.py b/src/label_studio_sdk/projects/exports/client.py index f43ebb424..1a2e6d360 100644 --- a/src/label_studio_sdk/projects/exports/client.py +++ b/src/label_studio_sdk/projects/exports/client.py @@ -8,13 +8,13 @@ from ...core.api_error import ApiError from ...core.unchecked_base_model import construct_type from ...types.export import Export +from ...types.lse_annotation_filter_options_request import LseAnnotationFilterOptionsRequest +from ...types.converted_format_request import ConvertedFormatRequest from ...types.user_simple_request import UserSimpleRequest import datetime as dt +from ...types.serialization_options_request import SerializationOptionsRequest from ...types.status7bf_enum import Status7BfEnum -from ...types.converted_format_request import ConvertedFormatRequest from ...types.lse_task_filter_options_request import LseTaskFilterOptionsRequest -from ...types.lse_annotation_filter_options_request import LseAnnotationFilterOptionsRequest -from ...types.serialization_options_request import SerializationOptionsRequest from ...types.lse_export_create import LseExportCreate from ...core.serialization import convert_and_respect_annotation_metadata from .types.exports_convert_response import ExportsConvertResponse @@ -212,16 +212,16 @@ def create( self, id: int, *, - title: typing.Optional[str] = OMIT, + annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT, + converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT, + counters: typing.Optional[typing.Optional[typing.Any]] = OMIT, created_by: typing.Optional[UserSimpleRequest] = OMIT, finished_at: typing.Optional[dt.datetime] = OMIT, - status: typing.Optional[Status7BfEnum] = OMIT, md5: typing.Optional[str] = OMIT, - counters: typing.Optional[typing.Optional[typing.Any]] = OMIT, - converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT, - task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT, - annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT, serialization_options: typing.Optional[SerializationOptionsRequest] = OMIT, + status: typing.Optional[Status7BfEnum] = OMIT, + task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseExportCreate: """ @@ -232,26 +232,26 @@ def create( id : int A unique integer value identifying this project. - title : typing.Optional[str] + annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest] + + converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]] + + counters : typing.Optional[typing.Optional[typing.Any]] created_by : typing.Optional[UserSimpleRequest] finished_at : typing.Optional[dt.datetime] Complete or fail time - status : typing.Optional[Status7BfEnum] - md5 : typing.Optional[str] - counters : typing.Optional[typing.Optional[typing.Any]] + serialization_options : typing.Optional[SerializationOptionsRequest] - converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]] + status : typing.Optional[Status7BfEnum] task_filter_options : typing.Optional[LseTaskFilterOptionsRequest] - annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest] - - serialization_options : typing.Optional[SerializationOptionsRequest] + title : typing.Optional[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -276,26 +276,26 @@ def create( f"api/projects/{jsonable_encoder(id)}/exports/", method="POST", json={ - "title": title, + "annotation_filter_options": convert_and_respect_annotation_metadata( + object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write" + ), + "converted_formats": convert_and_respect_annotation_metadata( + object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write" + ), + "counters": counters, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), "finished_at": finished_at, - "status": status, "md5": md5, - "counters": counters, - "converted_formats": convert_and_respect_annotation_metadata( - object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write" + "serialization_options": convert_and_respect_annotation_metadata( + object_=serialization_options, annotation=SerializationOptionsRequest, direction="write" ), + "status": status, "task_filter_options": convert_and_respect_annotation_metadata( object_=task_filter_options, annotation=LseTaskFilterOptionsRequest, direction="write" ), - "annotation_filter_options": convert_and_respect_annotation_metadata( - object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write" - ), - "serialization_options": convert_and_respect_annotation_metadata( - object_=serialization_options, annotation=SerializationOptionsRequest, direction="write" - ), + "title": title, }, headers={ "content-type": "application/json", @@ -463,8 +463,8 @@ def convert( f"api/projects/{jsonable_encoder(id)}/exports/{jsonable_encoder(export_pk)}/convert", method="POST", json={ - "export_type": export_type, "download_resources": download_resources, + "export_type": export_type, }, headers={ "content-type": "application/json", @@ -750,16 +750,16 @@ async def create( self, id: int, *, - title: typing.Optional[str] = OMIT, + annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT, + converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT, + counters: typing.Optional[typing.Optional[typing.Any]] = OMIT, created_by: typing.Optional[UserSimpleRequest] = OMIT, finished_at: typing.Optional[dt.datetime] = OMIT, - status: typing.Optional[Status7BfEnum] = OMIT, md5: typing.Optional[str] = OMIT, - counters: typing.Optional[typing.Optional[typing.Any]] = OMIT, - converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT, - task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT, - annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT, serialization_options: typing.Optional[SerializationOptionsRequest] = OMIT, + status: typing.Optional[Status7BfEnum] = OMIT, + task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseExportCreate: """ @@ -770,26 +770,26 @@ async def create( id : int A unique integer value identifying this project. - title : typing.Optional[str] + annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest] + + converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]] + + counters : typing.Optional[typing.Optional[typing.Any]] created_by : typing.Optional[UserSimpleRequest] finished_at : typing.Optional[dt.datetime] Complete or fail time - status : typing.Optional[Status7BfEnum] - md5 : typing.Optional[str] - counters : typing.Optional[typing.Optional[typing.Any]] + serialization_options : typing.Optional[SerializationOptionsRequest] - converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]] + status : typing.Optional[Status7BfEnum] task_filter_options : typing.Optional[LseTaskFilterOptionsRequest] - annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest] - - serialization_options : typing.Optional[SerializationOptionsRequest] + title : typing.Optional[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -822,26 +822,26 @@ async def main() -> None: f"api/projects/{jsonable_encoder(id)}/exports/", method="POST", json={ - "title": title, + "annotation_filter_options": convert_and_respect_annotation_metadata( + object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write" + ), + "converted_formats": convert_and_respect_annotation_metadata( + object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write" + ), + "counters": counters, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), "finished_at": finished_at, - "status": status, "md5": md5, - "counters": counters, - "converted_formats": convert_and_respect_annotation_metadata( - object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write" + "serialization_options": convert_and_respect_annotation_metadata( + object_=serialization_options, annotation=SerializationOptionsRequest, direction="write" ), + "status": status, "task_filter_options": convert_and_respect_annotation_metadata( object_=task_filter_options, annotation=LseTaskFilterOptionsRequest, direction="write" ), - "annotation_filter_options": convert_and_respect_annotation_metadata( - object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write" - ), - "serialization_options": convert_and_respect_annotation_metadata( - object_=serialization_options, annotation=SerializationOptionsRequest, direction="write" - ), + "title": title, }, headers={ "content-type": "application/json", @@ -1033,8 +1033,8 @@ async def main() -> None: f"api/projects/{jsonable_encoder(id)}/exports/{jsonable_encoder(export_pk)}/convert", method="POST", json={ - "export_type": export_type, "download_resources": download_resources, + "export_type": export_type, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/projects/exports/types/exports_convert_response.py b/src/label_studio_sdk/projects/exports/types/exports_convert_response.py index 371df9f88..f58204f35 100644 --- a/src/label_studio_sdk/projects/exports/types/exports_convert_response.py +++ b/src/label_studio_sdk/projects/exports/types/exports_convert_response.py @@ -7,8 +7,8 @@ class ExportsConvertResponse(UncheckedBaseModel): - export_type: typing.Optional[str] = None converted_format: typing.Optional[int] = None + export_type: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/projects/stats/types/stats_iaa_response.py b/src/label_studio_sdk/projects/stats/types/stats_iaa_response.py index 69c8af879..86b1b485e 100644 --- a/src/label_studio_sdk/projects/stats/types/stats_iaa_response.py +++ b/src/label_studio_sdk/projects/stats/types/stats_iaa_response.py @@ -6,8 +6,8 @@ from .stats_iaa_response_iaa import StatsIaaResponseIaa from ....core.serialization import FieldMetadata import pydantic -from .stats_iaa_response_std import StatsIaaResponseStd from .stats_iaa_response_common_tasks import StatsIaaResponseCommonTasks +from .stats_iaa_response_std import StatsIaaResponseStd from ....core.pydantic_utilities import IS_PYDANTIC_V2 @@ -19,9 +19,9 @@ class StatsIaaResponse(UncheckedBaseModel): Inter-Annotator Agreement matrix - 2D array when per_label=false, object with label keys when per_label=true """ - users: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) + common_tasks: typing.Optional[StatsIaaResponseCommonTasks] = pydantic.Field(default=None) """ - List of users in the matrix + Common tasks matrix - 2D array when per_label=false, object with label keys when per_label=true """ std: typing.Optional[StatsIaaResponseStd] = pydantic.Field(default=None) @@ -29,9 +29,9 @@ class StatsIaaResponse(UncheckedBaseModel): Standard deviation - number when per_label=false, object with label keys when per_label=true """ - common_tasks: typing.Optional[StatsIaaResponseCommonTasks] = pydantic.Field(default=None) + users: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) """ - Common tasks matrix - 2D array when per_label=false, object with label keys when per_label=true + List of users in the matrix """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/projects/types/projects_import_tasks_response.py b/src/label_studio_sdk/projects/types/projects_import_tasks_response.py index acfdbf33f..2d5632dbf 100644 --- a/src/label_studio_sdk/projects/types/projects_import_tasks_response.py +++ b/src/label_studio_sdk/projects/types/projects_import_tasks_response.py @@ -11,19 +11,19 @@ class ProjectsImportTasksResponse(UncheckedBaseModel): Task creation response """ - task_count: typing.Optional[int] = pydantic.Field(default=None) + annotation_count: typing.Optional[int] = pydantic.Field(default=None) """ - Number of tasks added + Number of annotations added """ - annotation_count: typing.Optional[int] = pydantic.Field(default=None) + could_be_tasks_list: typing.Optional[bool] = pydantic.Field(default=None) """ - Number of annotations added + Whether uploaded files can contain lists of tasks, like CSV/TSV files """ - predictions_count: typing.Optional[int] = pydantic.Field(default=None) + data_columns: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ - Number of predictions added + The list of found data columns """ duration: typing.Optional[float] = pydantic.Field(default=None) @@ -36,19 +36,19 @@ class ProjectsImportTasksResponse(UncheckedBaseModel): Database IDs of uploaded files """ - could_be_tasks_list: typing.Optional[bool] = pydantic.Field(default=None) + found_formats: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ - Whether uploaded files can contain lists of tasks, like CSV/TSV files + The list of found file formats """ - found_formats: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + predictions_count: typing.Optional[int] = pydantic.Field(default=None) """ - The list of found file formats + Number of predictions added """ - data_columns: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + task_count: typing.Optional[int] = pydantic.Field(default=None) """ - The list of found data columns + Number of tasks added """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/prompts/client.py b/src/label_studio_sdk/prompts/client.py index 6ef82c6f9..15852d99c 100644 --- a/src/label_studio_sdk/prompts/client.py +++ b/src/label_studio_sdk/prompts/client.py @@ -16,9 +16,9 @@ from ..types.skill_name_enum import SkillNameEnum from ..types.model_interface import ModelInterface from ..core.serialization import convert_and_respect_annotation_metadata -from ..core.jsonable_encoder import jsonable_encoder from .types.prompts_compatible_projects_request_project_type import PromptsCompatibleProjectsRequestProjectType from ..types.paginated_all_roles_project_list_list import PaginatedAllRolesProjectListList +from ..core.jsonable_encoder import jsonable_encoder from ..core.client_wrapper import AsyncClientWrapper from .indicators.client import AsyncIndicatorsClient from .versions.client import AsyncVersionsClient @@ -85,8 +85,8 @@ def batch_failed_predictions( "num_failed_predictions": num_failed_predictions, }, json={ - "job_id": job_id, "failed_predictions": failed_predictions, + "job_id": job_id, "modelrun_id": modelrun_id, }, headers={ @@ -112,8 +112,8 @@ def batch_failed_predictions( def batch_predictions( self, *, - results: typing.Sequence[typing.Optional[typing.Any]], modelrun_id: int, + results: typing.Sequence[typing.Optional[typing.Any]], num_predictions: typing.Optional[int] = None, job_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -123,10 +123,10 @@ def batch_predictions( Parameters ---------- - results : typing.Sequence[typing.Optional[typing.Any]] - modelrun_id : int + results : typing.Sequence[typing.Optional[typing.Any]] + num_predictions : typing.Optional[int] Number of predictions being sent (for telemetry only, has no effect) @@ -148,8 +148,8 @@ def batch_predictions( api_key="YOUR_API_KEY", ) client.prompts.batch_predictions( - results=[], modelrun_id=1, + results=[], ) """ _response = self._client_wrapper.httpx_client.request( @@ -160,8 +160,8 @@ def batch_predictions( }, json={ "job_id": job_id, - "results": results, "modelrun_id": modelrun_id, + "results": results, }, headers={ "content-type": "application/json", @@ -237,13 +237,13 @@ def create( self, *, title: str, + associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, created_by: typing.Optional[UserSimpleRequest] = OMIT, - skill_name: typing.Optional[SkillNameEnum] = OMIT, description: typing.Optional[str] = OMIT, input_fields: typing.Optional[typing.Optional[typing.Any]] = OMIT, - output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, organization: typing.Optional[int] = OMIT, - associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, + output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, + skill_name: typing.Optional[SkillNameEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelInterface: """ @@ -254,21 +254,21 @@ def create( title : str Model name + associated_projects : typing.Optional[typing.Sequence[int]] + created_by : typing.Optional[UserSimpleRequest] User who created Dataset - skill_name : typing.Optional[SkillNameEnum] - description : typing.Optional[str] Model description input_fields : typing.Optional[typing.Optional[typing.Any]] - output_classes : typing.Optional[typing.Optional[typing.Any]] - organization : typing.Optional[int] - associated_projects : typing.Optional[typing.Sequence[int]] + output_classes : typing.Optional[typing.Optional[typing.Any]] + + skill_name : typing.Optional[SkillNameEnum] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -293,16 +293,16 @@ def create( "api/prompts/", method="POST", json={ + "associated_projects": associated_projects, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), - "skill_name": skill_name, - "title": title, "description": description, "input_fields": input_fields, - "output_classes": output_classes, "organization": organization, - "associated_projects": associated_projects, + "output_classes": output_classes, + "skill_name": skill_name, + "title": title, }, request_options=request_options, omit=OMIT, @@ -321,6 +321,74 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def compatible_projects( + self, + *, + ordering: typing.Optional[str] = None, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + project_type: typing.Optional[PromptsCompatibleProjectsRequestProjectType] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedAllRolesProjectListList: + """ + Retrieve a list of compatible project for prompt. + + Parameters + ---------- + ordering : typing.Optional[str] + Which field to use when ordering the results. + + page : typing.Optional[int] + A page number within the paginated result set. + + page_size : typing.Optional[int] + Number of results to return per page. + + project_type : typing.Optional[PromptsCompatibleProjectsRequestProjectType] + Skill to filter by + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedAllRolesProjectListList + + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.prompts.compatible_projects() + """ + _response = self._client_wrapper.httpx_client.request( + "api/prompts/compatible-projects", + method="GET", + params={ + "ordering": ordering, + "page": page, + "page_size": page_size, + "project_type": project_type, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + PaginatedAllRolesProjectListList, + construct_type( + type_=PaginatedAllRolesProjectListList, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ModelInterfaceSerializerGet: """ Retrieve a specific prompt. @@ -410,14 +478,14 @@ def update( self, id: str, *, + associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, created_by: typing.Optional[UserSimpleRequest] = OMIT, - skill_name: typing.Optional[SkillNameEnum] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, input_fields: typing.Optional[typing.Optional[typing.Any]] = OMIT, - output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, organization: typing.Optional[int] = OMIT, - associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, + output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, + skill_name: typing.Optional[SkillNameEnum] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelInterface: """ @@ -427,24 +495,24 @@ def update( ---------- id : str + associated_projects : typing.Optional[typing.Sequence[int]] + created_by : typing.Optional[UserSimpleRequest] User who created Dataset - skill_name : typing.Optional[SkillNameEnum] - - title : typing.Optional[str] - Model name - description : typing.Optional[str] Model description input_fields : typing.Optional[typing.Optional[typing.Any]] + organization : typing.Optional[int] + output_classes : typing.Optional[typing.Optional[typing.Any]] - organization : typing.Optional[int] + skill_name : typing.Optional[SkillNameEnum] - associated_projects : typing.Optional[typing.Sequence[int]] + title : typing.Optional[str] + Model name request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -469,16 +537,16 @@ def update( f"api/prompts/{jsonable_encoder(id)}/", method="PATCH", json={ + "associated_projects": associated_projects, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), - "skill_name": skill_name, - "title": title, "description": description, "input_fields": input_fields, - "output_classes": output_classes, "organization": organization, - "associated_projects": associated_projects, + "output_classes": output_classes, + "skill_name": skill_name, + "title": title, }, headers={ "content-type": "application/json", @@ -500,74 +568,6 @@ def update( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def compatible_projects( - self, - *, - ordering: typing.Optional[str] = None, - page: typing.Optional[int] = None, - page_size: typing.Optional[int] = None, - project_type: typing.Optional[PromptsCompatibleProjectsRequestProjectType] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedAllRolesProjectListList: - """ - Retrieve a list of compatible project for prompt. - - Parameters - ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. - - page : typing.Optional[int] - A page number within the paginated result set. - - page_size : typing.Optional[int] - Number of results to return per page. - - project_type : typing.Optional[PromptsCompatibleProjectsRequestProjectType] - Skill to filter by - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - PaginatedAllRolesProjectListList - - - Examples - -------- - from label_studio_sdk import LabelStudio - - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.prompts.compatible_projects() - """ - _response = self._client_wrapper.httpx_client.request( - "api/prompts/compatible-projects", - method="GET", - params={ - "ordering": ordering, - "page": page, - "page_size": page_size, - "project_type": project_type, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PaginatedAllRolesProjectListList, - construct_type( - type_=PaginatedAllRolesProjectListList, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - class AsyncPromptsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -634,8 +634,8 @@ async def main() -> None: "num_failed_predictions": num_failed_predictions, }, json={ - "job_id": job_id, "failed_predictions": failed_predictions, + "job_id": job_id, "modelrun_id": modelrun_id, }, headers={ @@ -661,8 +661,8 @@ async def main() -> None: async def batch_predictions( self, *, - results: typing.Sequence[typing.Optional[typing.Any]], modelrun_id: int, + results: typing.Sequence[typing.Optional[typing.Any]], num_predictions: typing.Optional[int] = None, job_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -672,10 +672,10 @@ async def batch_predictions( Parameters ---------- - results : typing.Sequence[typing.Optional[typing.Any]] - modelrun_id : int + results : typing.Sequence[typing.Optional[typing.Any]] + num_predictions : typing.Optional[int] Number of predictions being sent (for telemetry only, has no effect) @@ -702,8 +702,8 @@ async def batch_predictions( async def main() -> None: await client.prompts.batch_predictions( - results=[], modelrun_id=1, + results=[], ) @@ -717,8 +717,8 @@ async def main() -> None: }, json={ "job_id": job_id, - "results": results, "modelrun_id": modelrun_id, + "results": results, }, headers={ "content-type": "application/json", @@ -802,13 +802,13 @@ async def create( self, *, title: str, + associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, created_by: typing.Optional[UserSimpleRequest] = OMIT, - skill_name: typing.Optional[SkillNameEnum] = OMIT, description: typing.Optional[str] = OMIT, input_fields: typing.Optional[typing.Optional[typing.Any]] = OMIT, - output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, organization: typing.Optional[int] = OMIT, - associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, + output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, + skill_name: typing.Optional[SkillNameEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelInterface: """ @@ -819,21 +819,21 @@ async def create( title : str Model name + associated_projects : typing.Optional[typing.Sequence[int]] + created_by : typing.Optional[UserSimpleRequest] User who created Dataset - skill_name : typing.Optional[SkillNameEnum] - description : typing.Optional[str] Model description input_fields : typing.Optional[typing.Optional[typing.Any]] - output_classes : typing.Optional[typing.Optional[typing.Any]] - organization : typing.Optional[int] - associated_projects : typing.Optional[typing.Sequence[int]] + output_classes : typing.Optional[typing.Optional[typing.Any]] + + skill_name : typing.Optional[SkillNameEnum] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -866,16 +866,16 @@ async def main() -> None: "api/prompts/", method="POST", json={ + "associated_projects": associated_projects, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), - "skill_name": skill_name, - "title": title, "description": description, "input_fields": input_fields, - "output_classes": output_classes, "organization": organization, - "associated_projects": associated_projects, + "output_classes": output_classes, + "skill_name": skill_name, + "title": title, }, request_options=request_options, omit=OMIT, @@ -894,6 +894,82 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def compatible_projects( + self, + *, + ordering: typing.Optional[str] = None, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + project_type: typing.Optional[PromptsCompatibleProjectsRequestProjectType] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedAllRolesProjectListList: + """ + Retrieve a list of compatible project for prompt. + + Parameters + ---------- + ordering : typing.Optional[str] + Which field to use when ordering the results. + + page : typing.Optional[int] + A page number within the paginated result set. + + page_size : typing.Optional[int] + Number of results to return per page. + + project_type : typing.Optional[PromptsCompatibleProjectsRequestProjectType] + Skill to filter by + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PaginatedAllRolesProjectListList + + + Examples + -------- + import asyncio + + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.prompts.compatible_projects() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "api/prompts/compatible-projects", + method="GET", + params={ + "ordering": ordering, + "page": page, + "page_size": page_size, + "project_type": project_type, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + PaginatedAllRolesProjectListList, + construct_type( + type_=PaginatedAllRolesProjectListList, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def get( self, id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> ModelInterfaceSerializerGet: @@ -1001,14 +1077,14 @@ async def update( self, id: str, *, + associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, created_by: typing.Optional[UserSimpleRequest] = OMIT, - skill_name: typing.Optional[SkillNameEnum] = OMIT, - title: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, input_fields: typing.Optional[typing.Optional[typing.Any]] = OMIT, - output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, organization: typing.Optional[int] = OMIT, - associated_projects: typing.Optional[typing.Sequence[int]] = OMIT, + output_classes: typing.Optional[typing.Optional[typing.Any]] = OMIT, + skill_name: typing.Optional[SkillNameEnum] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelInterface: """ @@ -1018,24 +1094,24 @@ async def update( ---------- id : str + associated_projects : typing.Optional[typing.Sequence[int]] + created_by : typing.Optional[UserSimpleRequest] User who created Dataset - skill_name : typing.Optional[SkillNameEnum] - - title : typing.Optional[str] - Model name - description : typing.Optional[str] Model description input_fields : typing.Optional[typing.Optional[typing.Any]] + organization : typing.Optional[int] + output_classes : typing.Optional[typing.Optional[typing.Any]] - organization : typing.Optional[int] + skill_name : typing.Optional[SkillNameEnum] - associated_projects : typing.Optional[typing.Sequence[int]] + title : typing.Optional[str] + Model name request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1068,16 +1144,16 @@ async def main() -> None: f"api/prompts/{jsonable_encoder(id)}/", method="PATCH", json={ + "associated_projects": associated_projects, "created_by": convert_and_respect_annotation_metadata( object_=created_by, annotation=UserSimpleRequest, direction="write" ), - "skill_name": skill_name, - "title": title, "description": description, "input_fields": input_fields, - "output_classes": output_classes, "organization": organization, - "associated_projects": associated_projects, + "output_classes": output_classes, + "skill_name": skill_name, + "title": title, }, headers={ "content-type": "application/json", @@ -1098,79 +1174,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def compatible_projects( - self, - *, - ordering: typing.Optional[str] = None, - page: typing.Optional[int] = None, - page_size: typing.Optional[int] = None, - project_type: typing.Optional[PromptsCompatibleProjectsRequestProjectType] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> PaginatedAllRolesProjectListList: - """ - Retrieve a list of compatible project for prompt. - - Parameters - ---------- - ordering : typing.Optional[str] - Which field to use when ordering the results. - - page : typing.Optional[int] - A page number within the paginated result set. - - page_size : typing.Optional[int] - Number of results to return per page. - - project_type : typing.Optional[PromptsCompatibleProjectsRequestProjectType] - Skill to filter by - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - PaginatedAllRolesProjectListList - - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.prompts.compatible_projects() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/prompts/compatible-projects", - method="GET", - params={ - "ordering": ordering, - "page": page, - "page_size": page_size, - "project_type": project_type, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - PaginatedAllRolesProjectListList, - construct_type( - type_=PaginatedAllRolesProjectListList, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/prompts/runs/client.py b/src/label_studio_sdk/prompts/runs/client.py index 9a98434ed..3fdf84074 100644 --- a/src/label_studio_sdk/prompts/runs/client.py +++ b/src/label_studio_sdk/prompts/runs/client.py @@ -9,8 +9,8 @@ from ...core.unchecked_base_model import construct_type from json.decoder import JSONDecodeError from ...core.api_error import ApiError -from ...types.project_subset_enum import ProjectSubsetEnum import datetime as dt +from ...types.project_subset_enum import ProjectSubsetEnum from ...core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters @@ -104,13 +104,13 @@ def create( version_id: int, *, project: int, - project_subset: typing.Optional[ProjectSubsetEnum] = OMIT, job_id: typing.Optional[str] = OMIT, - total_predictions: typing.Optional[int] = OMIT, + organization: typing.Optional[int] = OMIT, + predictions_updated_at: typing.Optional[dt.datetime] = OMIT, + project_subset: typing.Optional[ProjectSubsetEnum] = OMIT, total_correct_predictions: typing.Optional[int] = OMIT, + total_predictions: typing.Optional[int] = OMIT, total_tasks: typing.Optional[int] = OMIT, - predictions_updated_at: typing.Optional[dt.datetime] = OMIT, - organization: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelRun: """ @@ -124,20 +124,20 @@ def create( project : int - project_subset : typing.Optional[ProjectSubsetEnum] - job_id : typing.Optional[str] Job ID for inference job for a ModelRun e.g. Adala job ID - total_predictions : typing.Optional[int] + organization : typing.Optional[int] - total_correct_predictions : typing.Optional[int] + predictions_updated_at : typing.Optional[dt.datetime] - total_tasks : typing.Optional[int] + project_subset : typing.Optional[ProjectSubsetEnum] - predictions_updated_at : typing.Optional[dt.datetime] + total_correct_predictions : typing.Optional[int] - organization : typing.Optional[int] + total_predictions : typing.Optional[int] + + total_tasks : typing.Optional[int] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -164,14 +164,14 @@ def create( f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/inference-runs", method="POST", json={ - "project_subset": project_subset, "job_id": job_id, - "total_predictions": total_predictions, - "total_correct_predictions": total_correct_predictions, - "total_tasks": total_tasks, - "predictions_updated_at": predictions_updated_at, "organization": organization, + "predictions_updated_at": predictions_updated_at, "project": project, + "project_subset": project_subset, + "total_correct_predictions": total_correct_predictions, + "total_predictions": total_predictions, + "total_tasks": total_tasks, }, headers={ "content-type": "application/json", @@ -289,13 +289,13 @@ async def create( version_id: int, *, project: int, - project_subset: typing.Optional[ProjectSubsetEnum] = OMIT, job_id: typing.Optional[str] = OMIT, - total_predictions: typing.Optional[int] = OMIT, + organization: typing.Optional[int] = OMIT, + predictions_updated_at: typing.Optional[dt.datetime] = OMIT, + project_subset: typing.Optional[ProjectSubsetEnum] = OMIT, total_correct_predictions: typing.Optional[int] = OMIT, + total_predictions: typing.Optional[int] = OMIT, total_tasks: typing.Optional[int] = OMIT, - predictions_updated_at: typing.Optional[dt.datetime] = OMIT, - organization: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ModelRun: """ @@ -309,20 +309,20 @@ async def create( project : int - project_subset : typing.Optional[ProjectSubsetEnum] - job_id : typing.Optional[str] Job ID for inference job for a ModelRun e.g. Adala job ID - total_predictions : typing.Optional[int] + organization : typing.Optional[int] - total_correct_predictions : typing.Optional[int] + predictions_updated_at : typing.Optional[dt.datetime] - total_tasks : typing.Optional[int] + project_subset : typing.Optional[ProjectSubsetEnum] - predictions_updated_at : typing.Optional[dt.datetime] + total_correct_predictions : typing.Optional[int] - organization : typing.Optional[int] + total_predictions : typing.Optional[int] + + total_tasks : typing.Optional[int] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -357,14 +357,14 @@ async def main() -> None: f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/inference-runs", method="POST", json={ - "project_subset": project_subset, "job_id": job_id, - "total_predictions": total_predictions, - "total_correct_predictions": total_correct_predictions, - "total_tasks": total_tasks, - "predictions_updated_at": predictions_updated_at, "organization": organization, + "predictions_updated_at": predictions_updated_at, "project": project, + "project_subset": project_subset, + "total_correct_predictions": total_correct_predictions, + "total_predictions": total_predictions, + "total_tasks": total_tasks, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/prompts/versions/client.py b/src/label_studio_sdk/prompts/versions/client.py index de5a87039..641b8b08d 100644 --- a/src/label_studio_sdk/prompts/versions/client.py +++ b/src/label_studio_sdk/prompts/versions/client.py @@ -128,13 +128,13 @@ def create( self, prompt_id: int, *, - title: str, prompt: str, provider_model_id: str, - parent_model: typing.Optional[int] = OMIT, - provider: typing.Optional[ProviderEnum] = OMIT, + title: str, model_provider_connection: typing.Optional[int] = OMIT, organization: typing.Optional[int] = OMIT, + parent_model: typing.Optional[int] = OMIT, + provider: typing.Optional[ProviderEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ThirdPartyModelVersion: """ @@ -144,15 +144,19 @@ def create( ---------- prompt_id : int - title : str - Model name - prompt : str Prompt to execute provider_model_id : str The model ID to use within the given provider, e.g. gpt-3.5 + title : str + Model name + + model_provider_connection : typing.Optional[int] + + organization : typing.Optional[int] + parent_model : typing.Optional[int] Parent model interface ID @@ -167,10 +171,6 @@ def create( * `Anthropic` - Anthropic * `Custom` - Custom - model_provider_connection : typing.Optional[int] - - organization : typing.Optional[int] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -188,22 +188,22 @@ def create( ) client.prompts.versions.create( prompt_id=1, - title="title", prompt="prompt", provider_model_id="provider_model_id", + title="title", ) """ _response = self._client_wrapper.httpx_client.request( f"api/prompts/{jsonable_encoder(prompt_id)}/versions", method="POST", json={ + "model_provider_connection": model_provider_connection, + "organization": organization, "parent_model": parent_model, - "title": title, "prompt": prompt, "provider": provider, "provider_model_id": provider_model_id, - "model_provider_connection": model_provider_connection, - "organization": organization, + "title": title, }, request_options=request_options, omit=OMIT, @@ -322,13 +322,13 @@ def update( prompt_id: int, version_id: int, *, + model_provider_connection: typing.Optional[int] = OMIT, + organization: typing.Optional[int] = OMIT, parent_model: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, prompt: typing.Optional[str] = OMIT, provider: typing.Optional[ProviderEnum] = OMIT, provider_model_id: typing.Optional[str] = OMIT, - model_provider_connection: typing.Optional[int] = OMIT, - organization: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ThirdPartyModelVersion: """ @@ -340,12 +340,13 @@ def update( version_id : int + model_provider_connection : typing.Optional[int] + + organization : typing.Optional[int] + parent_model : typing.Optional[int] Parent model interface ID - title : typing.Optional[str] - Model name - prompt : typing.Optional[str] Prompt to execute @@ -363,9 +364,8 @@ def update( provider_model_id : typing.Optional[str] The model ID to use within the given provider, e.g. gpt-3.5 - model_provider_connection : typing.Optional[int] - - organization : typing.Optional[int] + title : typing.Optional[str] + Model name request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -391,13 +391,13 @@ def update( f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}", method="PATCH", json={ + "model_provider_connection": model_provider_connection, + "organization": organization, "parent_model": parent_model, - "title": title, "prompt": prompt, "provider": provider, "provider_model_id": provider_model_id, - "model_provider_connection": model_provider_connection, - "organization": organization, + "title": title, }, headers={ "content-type": "application/json", @@ -537,9 +537,9 @@ def refine_prompt( prompt_id: int, version_id: int, *, - teacher_model_provider_connection_id: int, - teacher_model_name: str, project_id: int, + teacher_model_name: str, + teacher_model_provider_connection_id: int, async_: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> RefinedPromptResponse: @@ -552,14 +552,14 @@ def refine_prompt( version_id : int - teacher_model_provider_connection_id : int - Model Provider Connection ID to use to refine the prompt + project_id : int + Project ID to target the refined prompt for teacher_model_name : str Name of the model to use to refine the prompt - project_id : int - Project ID to target the refined prompt for + teacher_model_provider_connection_id : int + Model Provider Connection ID to use to refine the prompt async_ : typing.Optional[bool] Whether to run the refinement asynchronously @@ -582,9 +582,9 @@ def refine_prompt( client.prompts.versions.refine_prompt( prompt_id=1, version_id=1, - teacher_model_provider_connection_id=1, - teacher_model_name="teacher_model_name", project_id=1, + teacher_model_name="teacher_model_name", + teacher_model_provider_connection_id=1, ) """ _response = self._client_wrapper.httpx_client.request( @@ -594,9 +594,9 @@ def refine_prompt( "async": async_, }, json={ - "teacher_model_provider_connection_id": teacher_model_provider_connection_id, - "teacher_model_name": teacher_model_name, "project_id": project_id, + "teacher_model_name": teacher_model_name, + "teacher_model_provider_connection_id": teacher_model_provider_connection_id, }, headers={ "content-type": "application/json", @@ -748,13 +748,13 @@ async def create( self, prompt_id: int, *, - title: str, prompt: str, provider_model_id: str, - parent_model: typing.Optional[int] = OMIT, - provider: typing.Optional[ProviderEnum] = OMIT, + title: str, model_provider_connection: typing.Optional[int] = OMIT, organization: typing.Optional[int] = OMIT, + parent_model: typing.Optional[int] = OMIT, + provider: typing.Optional[ProviderEnum] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ThirdPartyModelVersion: """ @@ -764,15 +764,19 @@ async def create( ---------- prompt_id : int - title : str - Model name - prompt : str Prompt to execute provider_model_id : str The model ID to use within the given provider, e.g. gpt-3.5 + title : str + Model name + + model_provider_connection : typing.Optional[int] + + organization : typing.Optional[int] + parent_model : typing.Optional[int] Parent model interface ID @@ -787,10 +791,6 @@ async def create( * `Anthropic` - Anthropic * `Custom` - Custom - model_provider_connection : typing.Optional[int] - - organization : typing.Optional[int] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -813,9 +813,9 @@ async def create( async def main() -> None: await client.prompts.versions.create( prompt_id=1, - title="title", prompt="prompt", provider_model_id="provider_model_id", + title="title", ) @@ -825,13 +825,13 @@ async def main() -> None: f"api/prompts/{jsonable_encoder(prompt_id)}/versions", method="POST", json={ + "model_provider_connection": model_provider_connection, + "organization": organization, "parent_model": parent_model, - "title": title, "prompt": prompt, "provider": provider, "provider_model_id": provider_model_id, - "model_provider_connection": model_provider_connection, - "organization": organization, + "title": title, }, request_options=request_options, omit=OMIT, @@ -966,13 +966,13 @@ async def update( prompt_id: int, version_id: int, *, + model_provider_connection: typing.Optional[int] = OMIT, + organization: typing.Optional[int] = OMIT, parent_model: typing.Optional[int] = OMIT, - title: typing.Optional[str] = OMIT, prompt: typing.Optional[str] = OMIT, provider: typing.Optional[ProviderEnum] = OMIT, provider_model_id: typing.Optional[str] = OMIT, - model_provider_connection: typing.Optional[int] = OMIT, - organization: typing.Optional[int] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ThirdPartyModelVersion: """ @@ -984,12 +984,13 @@ async def update( version_id : int + model_provider_connection : typing.Optional[int] + + organization : typing.Optional[int] + parent_model : typing.Optional[int] Parent model interface ID - title : typing.Optional[str] - Model name - prompt : typing.Optional[str] Prompt to execute @@ -1007,9 +1008,8 @@ async def update( provider_model_id : typing.Optional[str] The model ID to use within the given provider, e.g. gpt-3.5 - model_provider_connection : typing.Optional[int] - - organization : typing.Optional[int] + title : typing.Optional[str] + Model name request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1043,13 +1043,13 @@ async def main() -> None: f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}", method="PATCH", json={ + "model_provider_connection": model_provider_connection, + "organization": organization, "parent_model": parent_model, - "title": title, "prompt": prompt, "provider": provider, "provider_model_id": provider_model_id, - "model_provider_connection": model_provider_connection, - "organization": organization, + "title": title, }, headers={ "content-type": "application/json", @@ -1205,9 +1205,9 @@ async def refine_prompt( prompt_id: int, version_id: int, *, - teacher_model_provider_connection_id: int, - teacher_model_name: str, project_id: int, + teacher_model_name: str, + teacher_model_provider_connection_id: int, async_: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> RefinedPromptResponse: @@ -1220,14 +1220,14 @@ async def refine_prompt( version_id : int - teacher_model_provider_connection_id : int - Model Provider Connection ID to use to refine the prompt + project_id : int + Project ID to target the refined prompt for teacher_model_name : str Name of the model to use to refine the prompt - project_id : int - Project ID to target the refined prompt for + teacher_model_provider_connection_id : int + Model Provider Connection ID to use to refine the prompt async_ : typing.Optional[bool] Whether to run the refinement asynchronously @@ -1255,9 +1255,9 @@ async def main() -> None: await client.prompts.versions.refine_prompt( prompt_id=1, version_id=1, - teacher_model_provider_connection_id=1, - teacher_model_name="teacher_model_name", project_id=1, + teacher_model_name="teacher_model_name", + teacher_model_provider_connection_id=1, ) @@ -1270,9 +1270,9 @@ async def main() -> None: "async": async_, }, json={ - "teacher_model_provider_connection_id": teacher_model_provider_connection_id, - "teacher_model_name": teacher_model_name, "project_id": project_id, + "teacher_model_name": teacher_model_name, + "teacher_model_provider_connection_id": teacher_model_provider_connection_id, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/tasks/client.py b/src/label_studio_sdk/tasks/client.py index afae661e3..0583af903 100644 --- a/src/label_studio_sdk/tasks/client.py +++ b/src/label_studio_sdk/tasks/client.py @@ -289,21 +289,21 @@ def list( def create( self, *, + cancelled_annotations: typing.Optional[int] = OMIT, + comment_authors: typing.Optional[typing.Sequence[int]] = OMIT, + comment_count: typing.Optional[int] = OMIT, data: typing.Optional[typing.Any] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + file_upload: typing.Optional[int] = OMIT, + inner_id: typing.Optional[int] = OMIT, is_labeled: typing.Optional[bool] = OMIT, + last_comment_updated_at: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, overlap: typing.Optional[int] = OMIT, - inner_id: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, total_annotations: typing.Optional[int] = OMIT, - cancelled_annotations: typing.Optional[int] = OMIT, total_predictions: typing.Optional[int] = OMIT, - comment_count: typing.Optional[int] = OMIT, unresolved_comment_count: typing.Optional[int] = OMIT, - last_comment_updated_at: typing.Optional[dt.datetime] = OMIT, - project: typing.Optional[int] = OMIT, updated_by: typing.Optional[int] = OMIT, - file_upload: typing.Optional[int] = OMIT, - comment_authors: typing.Optional[typing.Sequence[int]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseTask: """ @@ -311,49 +311,49 @@ def create( Parameters ---------- + cancelled_annotations : typing.Optional[int] + Number of total cancelled annotations for the current task + + comment_authors : typing.Optional[typing.Sequence[int]] + Users who wrote comments + + comment_count : typing.Optional[int] + Number of comments in the task including all annotations + data : typing.Optional[typing.Any] - meta : typing.Optional[typing.Optional[typing.Any]] + file_upload : typing.Optional[int] + Uploaded file used as data source for this task + + inner_id : typing.Optional[int] + Internal task ID in the project, starts with 1 is_labeled : typing.Optional[bool] True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + last_comment_updated_at : typing.Optional[dt.datetime] + When the last comment was updated + + meta : typing.Optional[typing.Optional[typing.Any]] + overlap : typing.Optional[int] Number of distinct annotators that processed the current task - inner_id : typing.Optional[int] - Internal task ID in the project, starts with 1 + project : typing.Optional[int] + Project ID for this task total_annotations : typing.Optional[int] Number of total annotations for the current task except cancelled annotations - cancelled_annotations : typing.Optional[int] - Number of total cancelled annotations for the current task - total_predictions : typing.Optional[int] Number of total predictions for the current task - comment_count : typing.Optional[int] - Number of comments in the task including all annotations - unresolved_comment_count : typing.Optional[int] Number of unresolved comments in the task including all annotations - last_comment_updated_at : typing.Optional[dt.datetime] - When the last comment was updated - - project : typing.Optional[int] - Project ID for this task - updated_by : typing.Optional[int] Last annotator or reviewer who updated this task - file_upload : typing.Optional[int] - Uploaded file used as data source for this task - - comment_authors : typing.Optional[typing.Sequence[int]] - Users who wrote comments - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -377,21 +377,21 @@ def create( "api/tasks/", method="POST", json={ + "cancelled_annotations": cancelled_annotations, + "comment_authors": comment_authors, + "comment_count": comment_count, "data": data, - "meta": meta, + "file_upload": file_upload, + "inner_id": inner_id, "is_labeled": is_labeled, + "last_comment_updated_at": last_comment_updated_at, + "meta": meta, "overlap": overlap, - "inner_id": inner_id, + "project": project, "total_annotations": total_annotations, - "cancelled_annotations": cancelled_annotations, "total_predictions": total_predictions, - "comment_count": comment_count, "unresolved_comment_count": unresolved_comment_count, - "last_comment_updated_at": last_comment_updated_at, - "project": project, "updated_by": updated_by, - "file_upload": file_upload, - "comment_authors": comment_authors, }, headers={ "content-type": "application/json", @@ -504,26 +504,26 @@ def update( self, id: str, *, - inner_id: typing.Optional[int] = OMIT, + avg_lead_time: typing.Optional[float] = OMIT, cancelled_annotations: typing.Optional[int] = OMIT, - total_annotations: typing.Optional[int] = OMIT, - total_predictions: typing.Optional[int] = OMIT, + comment_count: typing.Optional[int] = OMIT, completed_at: typing.Optional[dt.datetime] = OMIT, - predictions_score: typing.Optional[float] = OMIT, - avg_lead_time: typing.Optional[float] = OMIT, + data: typing.Optional[typing.Optional[typing.Any]] = OMIT, draft_exists: typing.Optional[bool] = OMIT, - reviewed: typing.Optional[bool] = OMIT, - reviews_accepted: typing.Optional[int] = OMIT, - reviews_rejected: typing.Optional[int] = OMIT, ground_truth: typing.Optional[bool] = OMIT, - data: typing.Optional[typing.Optional[typing.Any]] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + inner_id: typing.Optional[int] = OMIT, is_labeled: typing.Optional[bool] = OMIT, - overlap: typing.Optional[int] = OMIT, - comment_count: typing.Optional[int] = OMIT, - unresolved_comment_count: typing.Optional[int] = OMIT, last_comment_updated_at: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + overlap: typing.Optional[int] = OMIT, + predictions_score: typing.Optional[float] = OMIT, project: typing.Optional[int] = OMIT, + reviewed: typing.Optional[bool] = OMIT, + reviews_accepted: typing.Optional[int] = OMIT, + reviews_rejected: typing.Optional[int] = OMIT, + total_annotations: typing.Optional[int] = OMIT, + total_predictions: typing.Optional[int] = OMIT, + unresolved_comment_count: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RoleBasedTask: """ @@ -534,52 +534,52 @@ def update( id : str Task ID - inner_id : typing.Optional[int] + avg_lead_time : typing.Optional[float] cancelled_annotations : typing.Optional[int] - total_annotations : typing.Optional[int] - - total_predictions : typing.Optional[int] + comment_count : typing.Optional[int] + Number of comments in the task including all annotations completed_at : typing.Optional[dt.datetime] - predictions_score : typing.Optional[float] - - avg_lead_time : typing.Optional[float] + data : typing.Optional[typing.Optional[typing.Any]] draft_exists : typing.Optional[bool] - reviewed : typing.Optional[bool] - - reviews_accepted : typing.Optional[int] - - reviews_rejected : typing.Optional[int] - ground_truth : typing.Optional[bool] - data : typing.Optional[typing.Optional[typing.Any]] - - meta : typing.Optional[typing.Optional[typing.Any]] + inner_id : typing.Optional[int] is_labeled : typing.Optional[bool] True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project - overlap : typing.Optional[int] - Number of distinct annotators that processed the current task + last_comment_updated_at : typing.Optional[dt.datetime] + When the last comment was updated - comment_count : typing.Optional[int] - Number of comments in the task including all annotations + meta : typing.Optional[typing.Optional[typing.Any]] - unresolved_comment_count : typing.Optional[int] - Number of unresolved comments in the task including all annotations + overlap : typing.Optional[int] + Number of distinct annotators that processed the current task - last_comment_updated_at : typing.Optional[dt.datetime] - When the last comment was updated + predictions_score : typing.Optional[float] project : typing.Optional[int] Project ID for this task + reviewed : typing.Optional[bool] + + reviews_accepted : typing.Optional[int] + + reviews_rejected : typing.Optional[int] + + total_annotations : typing.Optional[int] + + total_predictions : typing.Optional[int] + + unresolved_comment_count : typing.Optional[int] + Number of unresolved comments in the task including all annotations + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -603,26 +603,26 @@ def update( f"api/tasks/{jsonable_encoder(id)}/", method="PATCH", json={ - "inner_id": inner_id, + "avg_lead_time": avg_lead_time, "cancelled_annotations": cancelled_annotations, - "total_annotations": total_annotations, - "total_predictions": total_predictions, + "comment_count": comment_count, "completed_at": completed_at, - "predictions_score": predictions_score, - "avg_lead_time": avg_lead_time, + "data": data, "draft_exists": draft_exists, - "reviewed": reviewed, - "reviews_accepted": reviews_accepted, - "reviews_rejected": reviews_rejected, "ground_truth": ground_truth, - "data": data, - "meta": meta, + "inner_id": inner_id, "is_labeled": is_labeled, - "overlap": overlap, - "comment_count": comment_count, - "unresolved_comment_count": unresolved_comment_count, "last_comment_updated_at": last_comment_updated_at, + "meta": meta, + "overlap": overlap, + "predictions_score": predictions_score, "project": project, + "reviewed": reviewed, + "reviews_accepted": reviews_accepted, + "reviews_rejected": reviews_rejected, + "total_annotations": total_annotations, + "total_predictions": total_predictions, + "unresolved_comment_count": unresolved_comment_count, }, headers={ "content-type": "application/json", @@ -934,21 +934,21 @@ async def main() -> None: async def create( self, *, + cancelled_annotations: typing.Optional[int] = OMIT, + comment_authors: typing.Optional[typing.Sequence[int]] = OMIT, + comment_count: typing.Optional[int] = OMIT, data: typing.Optional[typing.Any] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + file_upload: typing.Optional[int] = OMIT, + inner_id: typing.Optional[int] = OMIT, is_labeled: typing.Optional[bool] = OMIT, + last_comment_updated_at: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, overlap: typing.Optional[int] = OMIT, - inner_id: typing.Optional[int] = OMIT, + project: typing.Optional[int] = OMIT, total_annotations: typing.Optional[int] = OMIT, - cancelled_annotations: typing.Optional[int] = OMIT, total_predictions: typing.Optional[int] = OMIT, - comment_count: typing.Optional[int] = OMIT, unresolved_comment_count: typing.Optional[int] = OMIT, - last_comment_updated_at: typing.Optional[dt.datetime] = OMIT, - project: typing.Optional[int] = OMIT, updated_by: typing.Optional[int] = OMIT, - file_upload: typing.Optional[int] = OMIT, - comment_authors: typing.Optional[typing.Sequence[int]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseTask: """ @@ -956,49 +956,49 @@ async def create( Parameters ---------- + cancelled_annotations : typing.Optional[int] + Number of total cancelled annotations for the current task + + comment_authors : typing.Optional[typing.Sequence[int]] + Users who wrote comments + + comment_count : typing.Optional[int] + Number of comments in the task including all annotations + data : typing.Optional[typing.Any] - meta : typing.Optional[typing.Optional[typing.Any]] + file_upload : typing.Optional[int] + Uploaded file used as data source for this task + + inner_id : typing.Optional[int] + Internal task ID in the project, starts with 1 is_labeled : typing.Optional[bool] True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project + last_comment_updated_at : typing.Optional[dt.datetime] + When the last comment was updated + + meta : typing.Optional[typing.Optional[typing.Any]] + overlap : typing.Optional[int] Number of distinct annotators that processed the current task - inner_id : typing.Optional[int] - Internal task ID in the project, starts with 1 + project : typing.Optional[int] + Project ID for this task total_annotations : typing.Optional[int] Number of total annotations for the current task except cancelled annotations - cancelled_annotations : typing.Optional[int] - Number of total cancelled annotations for the current task - total_predictions : typing.Optional[int] Number of total predictions for the current task - comment_count : typing.Optional[int] - Number of comments in the task including all annotations - unresolved_comment_count : typing.Optional[int] Number of unresolved comments in the task including all annotations - last_comment_updated_at : typing.Optional[dt.datetime] - When the last comment was updated - - project : typing.Optional[int] - Project ID for this task - updated_by : typing.Optional[int] Last annotator or reviewer who updated this task - file_upload : typing.Optional[int] - Uploaded file used as data source for this task - - comment_authors : typing.Optional[typing.Sequence[int]] - Users who wrote comments - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1030,21 +1030,21 @@ async def main() -> None: "api/tasks/", method="POST", json={ + "cancelled_annotations": cancelled_annotations, + "comment_authors": comment_authors, + "comment_count": comment_count, "data": data, - "meta": meta, + "file_upload": file_upload, + "inner_id": inner_id, "is_labeled": is_labeled, + "last_comment_updated_at": last_comment_updated_at, + "meta": meta, "overlap": overlap, - "inner_id": inner_id, + "project": project, "total_annotations": total_annotations, - "cancelled_annotations": cancelled_annotations, "total_predictions": total_predictions, - "comment_count": comment_count, "unresolved_comment_count": unresolved_comment_count, - "last_comment_updated_at": last_comment_updated_at, - "project": project, "updated_by": updated_by, - "file_upload": file_upload, - "comment_authors": comment_authors, }, headers={ "content-type": "application/json", @@ -1173,26 +1173,26 @@ async def update( self, id: str, *, - inner_id: typing.Optional[int] = OMIT, + avg_lead_time: typing.Optional[float] = OMIT, cancelled_annotations: typing.Optional[int] = OMIT, - total_annotations: typing.Optional[int] = OMIT, - total_predictions: typing.Optional[int] = OMIT, + comment_count: typing.Optional[int] = OMIT, completed_at: typing.Optional[dt.datetime] = OMIT, - predictions_score: typing.Optional[float] = OMIT, - avg_lead_time: typing.Optional[float] = OMIT, + data: typing.Optional[typing.Optional[typing.Any]] = OMIT, draft_exists: typing.Optional[bool] = OMIT, - reviewed: typing.Optional[bool] = OMIT, - reviews_accepted: typing.Optional[int] = OMIT, - reviews_rejected: typing.Optional[int] = OMIT, ground_truth: typing.Optional[bool] = OMIT, - data: typing.Optional[typing.Optional[typing.Any]] = OMIT, - meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + inner_id: typing.Optional[int] = OMIT, is_labeled: typing.Optional[bool] = OMIT, - overlap: typing.Optional[int] = OMIT, - comment_count: typing.Optional[int] = OMIT, - unresolved_comment_count: typing.Optional[int] = OMIT, last_comment_updated_at: typing.Optional[dt.datetime] = OMIT, + meta: typing.Optional[typing.Optional[typing.Any]] = OMIT, + overlap: typing.Optional[int] = OMIT, + predictions_score: typing.Optional[float] = OMIT, project: typing.Optional[int] = OMIT, + reviewed: typing.Optional[bool] = OMIT, + reviews_accepted: typing.Optional[int] = OMIT, + reviews_rejected: typing.Optional[int] = OMIT, + total_annotations: typing.Optional[int] = OMIT, + total_predictions: typing.Optional[int] = OMIT, + unresolved_comment_count: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> RoleBasedTask: """ @@ -1203,52 +1203,52 @@ async def update( id : str Task ID - inner_id : typing.Optional[int] + avg_lead_time : typing.Optional[float] cancelled_annotations : typing.Optional[int] - total_annotations : typing.Optional[int] - - total_predictions : typing.Optional[int] + comment_count : typing.Optional[int] + Number of comments in the task including all annotations completed_at : typing.Optional[dt.datetime] - predictions_score : typing.Optional[float] - - avg_lead_time : typing.Optional[float] + data : typing.Optional[typing.Optional[typing.Any]] draft_exists : typing.Optional[bool] - reviewed : typing.Optional[bool] - - reviews_accepted : typing.Optional[int] - - reviews_rejected : typing.Optional[int] - ground_truth : typing.Optional[bool] - data : typing.Optional[typing.Optional[typing.Any]] - - meta : typing.Optional[typing.Optional[typing.Any]] + inner_id : typing.Optional[int] is_labeled : typing.Optional[bool] True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project - overlap : typing.Optional[int] - Number of distinct annotators that processed the current task + last_comment_updated_at : typing.Optional[dt.datetime] + When the last comment was updated - comment_count : typing.Optional[int] - Number of comments in the task including all annotations + meta : typing.Optional[typing.Optional[typing.Any]] - unresolved_comment_count : typing.Optional[int] - Number of unresolved comments in the task including all annotations + overlap : typing.Optional[int] + Number of distinct annotators that processed the current task - last_comment_updated_at : typing.Optional[dt.datetime] - When the last comment was updated + predictions_score : typing.Optional[float] project : typing.Optional[int] Project ID for this task + reviewed : typing.Optional[bool] + + reviews_accepted : typing.Optional[int] + + reviews_rejected : typing.Optional[int] + + total_annotations : typing.Optional[int] + + total_predictions : typing.Optional[int] + + unresolved_comment_count : typing.Optional[int] + Number of unresolved comments in the task including all annotations + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1280,26 +1280,26 @@ async def main() -> None: f"api/tasks/{jsonable_encoder(id)}/", method="PATCH", json={ - "inner_id": inner_id, + "avg_lead_time": avg_lead_time, "cancelled_annotations": cancelled_annotations, - "total_annotations": total_annotations, - "total_predictions": total_predictions, + "comment_count": comment_count, "completed_at": completed_at, - "predictions_score": predictions_score, - "avg_lead_time": avg_lead_time, + "data": data, "draft_exists": draft_exists, - "reviewed": reviewed, - "reviews_accepted": reviews_accepted, - "reviews_rejected": reviews_rejected, "ground_truth": ground_truth, - "data": data, - "meta": meta, + "inner_id": inner_id, "is_labeled": is_labeled, - "overlap": overlap, - "comment_count": comment_count, - "unresolved_comment_count": unresolved_comment_count, "last_comment_updated_at": last_comment_updated_at, + "meta": meta, + "overlap": overlap, + "predictions_score": predictions_score, "project": project, + "reviewed": reviewed, + "reviews_accepted": reviews_accepted, + "reviews_rejected": reviews_rejected, + "total_annotations": total_annotations, + "total_predictions": total_predictions, + "unresolved_comment_count": unresolved_comment_count, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/types/all_roles_project_list.py b/src/label_studio_sdk/types/all_roles_project_list.py index 28362e3d6..17eee5c24 100644 --- a/src/label_studio_sdk/types/all_roles_project_list.py +++ b/src/label_studio_sdk/types/all_roles_project_list.py @@ -2,14 +2,14 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .assignment_settings import AssignmentSettings +from .blueprint_list import BlueprintList import pydantic import datetime as dt from .user_simple import UserSimple -from .blueprint_list import BlueprintList +from .review_settings import ReviewSettings from .all_roles_project_list_sampling import AllRolesProjectListSampling from .all_roles_project_list_skip_queue import AllRolesProjectListSkipQueue -from .review_settings import ReviewSettings -from .assignment_settings import AssignmentSettings from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -19,78 +19,78 @@ class AllRolesProjectList(UncheckedBaseModel): make sure, that you use correct one(Project.objects.with_counts()) """ - control_weights: typing.Optional[typing.Optional[typing.Any]] = None - start_training_on_annotation_update: bool = pydantic.Field() + allow_stream: str + annotation_limit_count: typing.Optional[int] = None + annotation_limit_percent: typing.Optional[str] = None + annotator_evaluation_minimum_score: typing.Optional[str] = None + annotator_evaluation_minimum_tasks: typing.Optional[int] = None + assignment_settings: AssignmentSettings + blueprints: typing.List[BlueprintList] + color: typing.Optional[str] = None + comment_classification_config: typing.Optional[str] = None + config_has_control_tags: bool = pydantic.Field() """ - Start model training after any annotations are submitted or updated + Flag to detect is project ready for labeling """ - id: int - ground_truth_number: int = pydantic.Field() + config_suitable_for_bulk_annotation: bool = pydantic.Field() """ - Honeypot annotation number in project + Flag to detect is project ready for bulk annotation """ - config_has_control_tags: bool = pydantic.Field() + control_weights: typing.Optional[typing.Optional[typing.Any]] = None + created_at: dt.datetime + created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) """ - Flag to detect is project ready for labeling + Project owner """ - annotation_limit_percent: typing.Optional[str] = None - duplication_done: typing.Optional[bool] = None - finished_task_number: int - members: str - total_annotations_number: str - members_count: int - enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) + custom_script: typing.Optional[str] = None + custom_task_lock_ttl: typing.Optional[int] = pydantic.Field(default=None) """ - Allow annotators to submit empty annotations + TTL in seconds for task reservations, on new and existing tasks """ - config_suitable_for_bulk_annotation: bool = pydantic.Field() + data_types: typing.Optional[typing.Any] = None + description: typing.Optional[str] = pydantic.Field(default=None) """ - Flag to detect is project ready for bulk annotation + Project description """ - task_number: int = pydantic.Field() + description_short: str + duplication_done: typing.Optional[bool] = None + duplication_status: typing.Optional[str] = None + enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) """ - Total task number in project + Allow annotators to submit empty annotations """ - workspace_title: str - total_predictions_number: int - is_published: typing.Optional[bool] = pydantic.Field(default=None) + evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether or not the project is published to annotators + Retrieve and display predictions when loading a task """ - is_draft: typing.Optional[bool] = pydantic.Field(default=None) + expert_instruction: typing.Optional[str] = pydantic.Field(default=None) """ - Whether or not the project is in the middle of being created + Labeling instructions in HTML format """ - description: typing.Optional[str] = pydantic.Field(default=None) + finished_task_number: int + ground_truth_number: int = pydantic.Field() """ - Project description + Honeypot annotation number in project """ - rejected: str - custom_script: typing.Optional[str] = None - workspace: str - show_ground_truth_first: typing.Optional[bool] = None - expert_instruction: typing.Optional[str] = pydantic.Field(default=None) + has_blueprints: str + id: int + is_draft: typing.Optional[bool] = pydantic.Field(default=None) """ - Labeling instructions in HTML format + Whether or not the project is in the middle of being created """ - allow_stream: str - reviewer_queue_total: str - created_at: dt.datetime - annotator_evaluation_minimum_tasks: typing.Optional[int] = None - review_total_tasks: str - min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) + is_published: typing.Optional[bool] = pydantic.Field(default=None) """ - Minimum number of completed tasks after which model training is started + Whether or not the project is published to annotators """ label_config: typing.Optional[str] = pydantic.Field(default=None) @@ -98,94 +98,94 @@ class AllRolesProjectList(UncheckedBaseModel): Label config in XML format. See more about it in documentation """ - created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) - """ - Project owner - """ - maximum_annotations: typing.Optional[int] = pydantic.Field(default=None) """ Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) """ - evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) + members: str + members_count: int + min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) """ - Retrieve and display predictions when loading a task + Minimum number of completed tasks after which model training is started """ - annotator_evaluation_minimum_score: typing.Optional[str] = None model_version: typing.Optional[str] = pydantic.Field(default=None) """ Machine learning model version """ - useful_annotation_number: str - has_blueprints: str + num_tasks_with_annotations: str + organization: typing.Optional[int] = None + overlap_cohort_percentage: typing.Optional[int] = None + parsed_label_config: typing.Optional[typing.Any] = None pause_on_failed_annotator_evaluation: typing.Optional[bool] = None - show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Show instructions to the annotator before they start + Pinned date and time """ + prompts: str + queue_done: str queue_left: str - custom_task_lock_ttl: typing.Optional[int] = pydantic.Field(default=None) + queue_total: str + ready: str + rejected: str + require_comment_on_skip: typing.Optional[bool] = None + reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) """ - TTL in seconds for task reservations, on new and existing tasks + Reveal pre-annotations interactively """ - pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + review_settings: ReviewSettings + review_total_tasks: str + reviewed_number: str + reviewer_queue_total: str + sampling: typing.Optional[AllRolesProjectListSampling] = None + show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) """ - Pinned date and time + Show annotation history to annotator """ - ready: str - description_short: str - show_overlap_first: typing.Optional[bool] = None - reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) + show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) """ - Reveal pre-annotations interactively + If set, the annotator can view model predictions """ - comment_classification_config: typing.Optional[str] = None + show_ground_truth_first: typing.Optional[bool] = None + show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + """ + Show instructions to the annotator before they start + """ + + show_overlap_first: typing.Optional[bool] = None show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) """ Show a skip button in interface and allow annotators to skip the task """ - data_types: typing.Optional[typing.Any] = None - organization: typing.Optional[int] = None - show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) + skip_queue: typing.Optional[AllRolesProjectListSkipQueue] = None + skipped_annotations_number: str + start_training_on_annotation_update: bool = pydantic.Field() """ - If set, the annotator can view model predictions + Start model training after any annotations are submitted or updated """ - reviewed_number: str - prompts: str - overlap_cohort_percentage: typing.Optional[int] = None - duplication_status: typing.Optional[str] = None - skipped_annotations_number: str - blueprints: typing.List[BlueprintList] - sampling: typing.Optional[AllRolesProjectListSampling] = None - color: typing.Optional[str] = None - title: typing.Optional[str] = pydantic.Field(default=None) + task_number: int = pydantic.Field() """ - Project name. Must be between 3 and 50 characters long. + Total task number in project """ - skip_queue: typing.Optional[AllRolesProjectListSkipQueue] = None - review_settings: ReviewSettings - num_tasks_with_annotations: str - assignment_settings: AssignmentSettings - require_comment_on_skip: typing.Optional[bool] = None - annotation_limit_count: typing.Optional[int] = None - queue_done: str - show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) + title: typing.Optional[str] = pydantic.Field(default=None) """ - Show annotation history to annotator + Project name. Must be between 3 and 50 characters long. """ - queue_total: str - parsed_label_config: typing.Optional[typing.Any] = None + total_annotations_number: str + total_predictions_number: int + useful_annotation_number: str + workspace: str + workspace_title: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/annotation.py b/src/label_studio_sdk/types/annotation.py index a031852f6..c800b8abd 100644 --- a/src/label_studio_sdk/types/annotation.py +++ b/src/label_studio_sdk/types/annotation.py @@ -9,41 +9,25 @@ class Annotation(UncheckedBaseModel): - id: int - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) - """ - List of annotation results for the task - """ - - created_username: str = pydantic.Field() + bulk_created: typing.Optional[bool] = pydantic.Field(default=None) """ - Username string + Annotation was created in bulk mode """ + completed_by: typing.Optional[int] = None created_ago: str = pydantic.Field() """ Time delta from creation time """ - completed_by: typing.Optional[int] = None - was_cancelled: typing.Optional[bool] = pydantic.Field(default=None) - """ - User skipped the task - """ - - ground_truth: typing.Optional[bool] = pydantic.Field(default=None) - """ - This annotation is a Ground Truth (ground_truth) - """ - created_at: dt.datetime = pydantic.Field() """ Creation time """ - updated_at: dt.datetime = pydantic.Field() + created_username: str = pydantic.Field() """ - Last updated time + Username string """ draft_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) @@ -51,11 +35,12 @@ class Annotation(UncheckedBaseModel): Draft creation time """ - lead_time: typing.Optional[float] = pydantic.Field(default=None) + ground_truth: typing.Optional[bool] = pydantic.Field(default=None) """ - How much time it took to annotate the task + This annotation is a Ground Truth (ground_truth) """ + id: int import_id: typing.Optional[int] = pydantic.Field(default=None) """ Original annotation ID that was at the import step or NULL if this annotation wasn't imported @@ -77,14 +62,24 @@ class Annotation(UncheckedBaseModel): * `deleted_review` - Deleted review """ - bulk_created: typing.Optional[bool] = pydantic.Field(default=None) + last_created_by: typing.Optional[int] = pydantic.Field(default=None) """ - Annotation was created in bulk mode + User who created the last annotation history item """ - task: typing.Optional[int] = pydantic.Field(default=None) + lead_time: typing.Optional[float] = pydantic.Field(default=None) """ - Corresponding task for this annotation + How much time it took to annotate the task + """ + + parent_annotation: typing.Optional[int] = pydantic.Field(default=None) + """ + Points to the parent annotation from which this annotation was created + """ + + parent_prediction: typing.Optional[int] = pydantic.Field(default=None) + """ + Points to the prediction from which this annotation was created """ project: typing.Optional[int] = pydantic.Field(default=None) @@ -92,24 +87,29 @@ class Annotation(UncheckedBaseModel): Project ID for this annotation """ - updated_by: typing.Optional[int] = pydantic.Field(default=None) + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) """ - Last user who updated this annotation + List of annotation results for the task """ - parent_prediction: typing.Optional[int] = pydantic.Field(default=None) + task: typing.Optional[int] = pydantic.Field(default=None) """ - Points to the prediction from which this annotation was created + Corresponding task for this annotation """ - parent_annotation: typing.Optional[int] = pydantic.Field(default=None) + updated_at: dt.datetime = pydantic.Field() """ - Points to the parent annotation from which this annotation was created + Last updated time """ - last_created_by: typing.Optional[int] = pydantic.Field(default=None) + updated_by: typing.Optional[int] = pydantic.Field(default=None) """ - User who created the last annotation history item + Last user who updated this annotation + """ + + was_cancelled: typing.Optional[bool] = pydantic.Field(default=None) + """ + User skipped the task """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/annotation_request.py b/src/label_studio_sdk/types/annotation_request.py index 8db9b8080..d0d87ece0 100644 --- a/src/label_studio_sdk/types/annotation_request.py +++ b/src/label_studio_sdk/types/annotation_request.py @@ -9,31 +9,20 @@ class AnnotationRequest(UncheckedBaseModel): - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) + bulk_created: typing.Optional[bool] = pydantic.Field(default=None) """ - List of annotation results for the task + Annotation was created in bulk mode """ completed_by: typing.Optional[int] = None - unique_id: typing.Optional[str] = None - was_cancelled: typing.Optional[bool] = pydantic.Field(default=None) - """ - User skipped the task - """ - - ground_truth: typing.Optional[bool] = pydantic.Field(default=None) - """ - This annotation is a Ground Truth (ground_truth) - """ - draft_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Draft creation time """ - lead_time: typing.Optional[float] = pydantic.Field(default=None) + ground_truth: typing.Optional[bool] = pydantic.Field(default=None) """ - How much time it took to annotate the task + This annotation is a Ground Truth (ground_truth) """ import_id: typing.Optional[int] = pydantic.Field(default=None) @@ -57,14 +46,24 @@ class AnnotationRequest(UncheckedBaseModel): * `deleted_review` - Deleted review """ - bulk_created: typing.Optional[bool] = pydantic.Field(default=None) + last_created_by: typing.Optional[int] = pydantic.Field(default=None) """ - Annotation was created in bulk mode + User who created the last annotation history item """ - task: typing.Optional[int] = pydantic.Field(default=None) + lead_time: typing.Optional[float] = pydantic.Field(default=None) """ - Corresponding task for this annotation + How much time it took to annotate the task + """ + + parent_annotation: typing.Optional[int] = pydantic.Field(default=None) + """ + Points to the parent annotation from which this annotation was created + """ + + parent_prediction: typing.Optional[int] = pydantic.Field(default=None) + """ + Points to the prediction from which this annotation was created """ project: typing.Optional[int] = pydantic.Field(default=None) @@ -72,24 +71,25 @@ class AnnotationRequest(UncheckedBaseModel): Project ID for this annotation """ - updated_by: typing.Optional[int] = pydantic.Field(default=None) + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None) """ - Last user who updated this annotation + List of annotation results for the task """ - parent_prediction: typing.Optional[int] = pydantic.Field(default=None) + task: typing.Optional[int] = pydantic.Field(default=None) """ - Points to the prediction from which this annotation was created + Corresponding task for this annotation """ - parent_annotation: typing.Optional[int] = pydantic.Field(default=None) + unique_id: typing.Optional[str] = None + updated_by: typing.Optional[int] = pydantic.Field(default=None) """ - Points to the parent annotation from which this annotation was created + Last user who updated this annotation """ - last_created_by: typing.Optional[int] = pydantic.Field(default=None) + was_cancelled: typing.Optional[bool] = pydantic.Field(default=None) """ - User who created the last annotation history item + User skipped the task """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/azure_blob_export_storage.py b/src/label_studio_sdk/types/azure_blob_export_storage.py index 50f361852..df189ac36 100644 --- a/src/label_studio_sdk/types/azure_blob_export_storage.py +++ b/src/label_studio_sdk/types/azure_blob_export_storage.py @@ -9,39 +9,37 @@ class AzureBlobExportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - container: typing.Optional[str] = pydantic.Field(default=None) + account_key: typing.Optional[str] = pydantic.Field(default=None) """ - Azure blob container + Azure Blob account key """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + account_name: typing.Optional[str] = pydantic.Field(default=None) """ - Azure blob prefix name + Azure Blob account name """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Deletion from storage enabled """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + container: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Azure blob container """ - account_name: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Azure Blob account name + Creation time """ - account_key: typing.Optional[str] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Azure Blob account key + Cloud storage description """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -57,36 +55,38 @@ class AzureBlobExportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + Azure blob prefix name """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - Cloud storage title + A unique integer value identifying this project. """ - description: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + Cloud storage regex for filtering objects """ - created_at: dt.datetime = pydantic.Field() + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + Cloud storage title """ - can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - Deletion from storage enabled + Traceback report for the last failed sync """ - project: int = pydantic.Field() + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/azure_blob_import_storage.py b/src/label_studio_sdk/types/azure_blob_import_storage.py index 0fcbf683a..65cf56cb4 100644 --- a/src/label_studio_sdk/types/azure_blob_import_storage.py +++ b/src/label_studio_sdk/types/azure_blob_import_storage.py @@ -9,40 +9,32 @@ class AzureBlobImportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - presign: typing.Optional[bool] = None - container: typing.Optional[str] = pydantic.Field(default=None) - """ - Azure blob container - """ - - prefix: typing.Optional[str] = pydantic.Field(default=None) + account_key: typing.Optional[str] = pydantic.Field(default=None) """ - Azure blob prefix name + Azure Blob account key """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + account_name: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Azure Blob account name """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + container: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Azure blob container """ - account_name: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Azure Blob account name + Creation time """ - account_key: typing.Optional[str] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Azure Blob account key + Cloud storage description """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -58,36 +50,44 @@ class AzureBlobImportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + Azure blob prefix name """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + presign: typing.Optional[bool] = None + presign_ttl: typing.Optional[int] = pydantic.Field(default=None) """ - Cloud storage title + Presigned URLs TTL (in minutes) """ - description: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - Cloud storage description + A unique integer value identifying this project. """ - created_at: dt.datetime = pydantic.Field() + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + Cloud storage regex for filtering objects """ - presign_ttl: typing.Optional[int] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Presigned URLs TTL (in minutes) + Cloud storage title """ - project: int = pydantic.Field() + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Traceback report for the last failed sync + """ + + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + """ + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/batch_failed_predictions.py b/src/label_studio_sdk/types/batch_failed_predictions.py index 3c18bac44..248c3e4ba 100644 --- a/src/label_studio_sdk/types/batch_failed_predictions.py +++ b/src/label_studio_sdk/types/batch_failed_predictions.py @@ -7,8 +7,8 @@ class BatchFailedPredictions(UncheckedBaseModel): - job_id: str failed_predictions: typing.List[typing.Optional[typing.Any]] + job_id: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/billing_checks.py b/src/label_studio_sdk/types/billing_checks.py index a45a8a158..ccb210e57 100644 --- a/src/label_studio_sdk/types/billing_checks.py +++ b/src/label_studio_sdk/types/billing_checks.py @@ -9,25 +9,25 @@ class BillingChecks(UncheckedBaseModel): - users: CountLimit - projects: CountLimit - results: CountLimit - trial_days: int - organization_is_active: bool - license_issued: typing.Optional[str] = None - license_warning: typing.Optional[str] = None + export_storages: CountLimit + import_storages: CountLimit + is_license_expired: bool is_license_warning: bool + is_prompts_expire: bool + is_prompts_warning: bool license_expires: typing.Optional[str] = None - is_license_expired: bool + license_issued: typing.Optional[str] = None + license_warning: typing.Optional[str] = None + organization_is_active: bool + projects: CountLimit + prompts_api_keys_enabled: bool prompts_enabled: bool + prompts_expire: typing.Optional[str] = None prompts_status: PromptsStatusEnum prompts_warning: typing.Optional[str] = None - is_prompts_warning: bool - prompts_expire: typing.Optional[str] = None - is_prompts_expire: bool - prompts_api_keys_enabled: bool - import_storages: CountLimit - export_storages: CountLimit + results: CountLimit + trial_days: int + users: CountLimit if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/billing_flags.py b/src/label_studio_sdk/types/billing_flags.py index 980902f5e..2b818143f 100644 --- a/src/label_studio_sdk/types/billing_flags.py +++ b/src/label_studio_sdk/types/billing_flags.py @@ -9,30 +9,30 @@ class BillingFlags(UncheckedBaseModel): activated_at: typing.Optional[dt.datetime] = None - cloud_instance: bool allow_activity_log: bool - allow_invite_project_experts: bool - allow_sso: bool - white_label_id: typing.Optional[str] = None + allow_ai: bool + allow_ask_ai: bool allow_data_credentials: bool + allow_invite_people: bool + allow_invite_project_experts: bool allow_organization_webhooks: bool + allow_sso: bool + allow_storage_proxy: bool + automax_enabled: bool + automax_token_exists: bool + cloud_instance: bool disable_members_page: bool - secure_mode: bool - manual_workspace_management: bool - manual_role_management: bool - hide_storage_settings_for_manager: bool disable_project_imports: bool - automax_token_exists: bool - automax_enabled: bool - storage_persistence: bool - allow_ai: bool early_adopter: bool - allow_ask_ai: bool - allow_invite_people: bool - allow_storage_proxy: bool - embed_enabled: bool embed_domains: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None + embed_enabled: bool embed_settings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + hide_storage_settings_for_manager: bool + manual_role_management: bool + manual_workspace_management: bool + secure_mode: bool + storage_persistence: bool + white_label_id: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/blueprint_list.py b/src/label_studio_sdk/types/blueprint_list.py index 354c1a745..1a8435be0 100644 --- a/src/label_studio_sdk/types/blueprint_list.py +++ b/src/label_studio_sdk/types/blueprint_list.py @@ -1,13 +1,19 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel +import datetime as dt import typing import pydantic -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 class BlueprintList(UncheckedBaseModel): + created_at: dt.datetime + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Project description + """ + id: int share_id: str short_url: str @@ -16,13 +22,6 @@ class BlueprintList(UncheckedBaseModel): Blueprint name. Must be between 3 and 50 characters long. """ - description: typing.Optional[str] = pydantic.Field(default=None) - """ - Project description - """ - - created_at: dt.datetime - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/child_filter.py b/src/label_studio_sdk/types/child_filter.py index 33d9ca027..62485b9e7 100644 --- a/src/label_studio_sdk/types/child_filter.py +++ b/src/label_studio_sdk/types/child_filter.py @@ -1,26 +1,21 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -import typing import pydantic +import typing from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ChildFilter(UncheckedBaseModel): - id: int - index: typing.Optional[int] = pydantic.Field(default=None) - """ - Display order among root filters only - """ - column: str = pydantic.Field() """ Field name """ - type: str = pydantic.Field() + id: int + index: typing.Optional[int] = pydantic.Field(default=None) """ - Field type + Display order among root filters only """ operator: str = pydantic.Field() @@ -28,12 +23,18 @@ class ChildFilter(UncheckedBaseModel): Filter operator """ - value: typing.Optional[typing.Optional[typing.Any]] = None parent: typing.Optional[int] = pydantic.Field(default=None) """ Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) """ + type: str = pydantic.Field() + """ + Field type + """ + + value: typing.Optional[typing.Optional[typing.Any]] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/comment.py b/src/label_studio_sdk/types/comment.py index 09085dbfa..53923fa2d 100644 --- a/src/label_studio_sdk/types/comment.py +++ b/src/label_studio_sdk/types/comment.py @@ -2,47 +2,47 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import pydantic import datetime as dt +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 class Comment(UncheckedBaseModel): - id: int - region_ref: typing.Optional[typing.Optional[typing.Any]] = None + annotation: typing.Optional[int] = None classifications: typing.Optional[typing.Optional[typing.Any]] = None - text: typing.Optional[str] = pydantic.Field(default=None) - """ - Reviewer or annotator comment - """ - created_at: dt.datetime = pydantic.Field() """ Creation time """ - updated_at: dt.datetime = pydantic.Field() + created_by: int = pydantic.Field() """ - Last updated time + User who made this comment """ + draft: typing.Optional[int] = None + id: int is_resolved: typing.Optional[bool] = pydantic.Field(default=None) """ True if the comment is resolved """ + project: typing.Optional[int] = None + region_ref: typing.Optional[typing.Optional[typing.Any]] = None resolved_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Resolving time """ - project: typing.Optional[int] = None task: typing.Optional[int] = None - draft: typing.Optional[int] = None - annotation: typing.Optional[int] = None - created_by: int = pydantic.Field() + text: typing.Optional[str] = pydantic.Field(default=None) """ - User who made this comment + Reviewer or annotator comment + """ + + updated_at: dt.datetime = pydantic.Field() + """ + Last updated time """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/comment_request.py b/src/label_studio_sdk/types/comment_request.py index 037caa96a..d2435f1b0 100644 --- a/src/label_studio_sdk/types/comment_request.py +++ b/src/label_studio_sdk/types/comment_request.py @@ -7,20 +7,19 @@ class CommentRequest(UncheckedBaseModel): - region_ref: typing.Optional[typing.Optional[typing.Any]] = None + annotation: typing.Optional[int] = None classifications: typing.Optional[typing.Optional[typing.Any]] = None - text: typing.Optional[str] = pydantic.Field(default=None) - """ - Reviewer or annotator comment - """ - + draft: typing.Optional[int] = None is_resolved: typing.Optional[bool] = pydantic.Field(default=None) """ True if the comment is resolved """ - draft: typing.Optional[int] = None - annotation: typing.Optional[int] = None + region_ref: typing.Optional[typing.Optional[typing.Any]] = None + text: typing.Optional[str] = pydantic.Field(default=None) + """ + Reviewer or annotator comment + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/comment_serializer_with_expanded_user.py b/src/label_studio_sdk/types/comment_serializer_with_expanded_user.py index 3e3594ccf..a9a1e8157 100644 --- a/src/label_studio_sdk/types/comment_serializer_with_expanded_user.py +++ b/src/label_studio_sdk/types/comment_serializer_with_expanded_user.py @@ -1,47 +1,46 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -from .lse_user import LseUser import typing -import pydantic import datetime as dt +import pydantic +from .lse_user import LseUser from ..core.pydantic_utilities import IS_PYDANTIC_V2 class CommentSerializerWithExpandedUser(UncheckedBaseModel): - id: int - created_by: LseUser - region_ref: typing.Optional[typing.Optional[typing.Any]] = None + annotation: typing.Optional[int] = None classifications: typing.Optional[typing.Optional[typing.Any]] = None - text: typing.Optional[str] = pydantic.Field(default=None) - """ - Reviewer or annotator comment - """ - created_at: dt.datetime = pydantic.Field() """ Creation time """ - updated_at: dt.datetime = pydantic.Field() - """ - Last updated time - """ - + created_by: LseUser + draft: typing.Optional[int] = None + id: int is_resolved: typing.Optional[bool] = pydantic.Field(default=None) """ True if the comment is resolved """ + project: typing.Optional[int] = None + region_ref: typing.Optional[typing.Optional[typing.Any]] = None resolved_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Resolving time """ - project: typing.Optional[int] = None task: typing.Optional[int] = None - draft: typing.Optional[int] = None - annotation: typing.Optional[int] = None + text: typing.Optional[str] = pydantic.Field(default=None) + """ + Reviewer or annotator comment + """ + + updated_at: dt.datetime = pydantic.Field() + """ + Last updated time + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/converted_format.py b/src/label_studio_sdk/types/converted_format.py index d307bc7fb..ff2c4f926 100644 --- a/src/label_studio_sdk/types/converted_format.py +++ b/src/label_studio_sdk/types/converted_format.py @@ -8,9 +8,9 @@ class ConvertedFormat(UncheckedBaseModel): + export_type: str id: int status: typing.Optional[Status7BfEnum] = None - export_type: str traceback: typing.Optional[str] = pydantic.Field(default=None) """ Traceback report in case of errors diff --git a/src/label_studio_sdk/types/converted_format_request.py b/src/label_studio_sdk/types/converted_format_request.py index 3a5920684..7c2b1852a 100644 --- a/src/label_studio_sdk/types/converted_format_request.py +++ b/src/label_studio_sdk/types/converted_format_request.py @@ -8,8 +8,8 @@ class ConvertedFormatRequest(UncheckedBaseModel): - status: typing.Optional[Status7BfEnum] = None export_type: str + status: typing.Optional[Status7BfEnum] = None traceback: typing.Optional[str] = pydantic.Field(default=None) """ Traceback report in case of errors diff --git a/src/label_studio_sdk/types/export.py b/src/label_studio_sdk/types/export.py index 708e7caf4..d899951e1 100644 --- a/src/label_studio_sdk/types/export.py +++ b/src/label_studio_sdk/types/export.py @@ -2,32 +2,32 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .user_simple import UserSimple +from .converted_format import ConvertedFormat import datetime as dt import pydantic +from .user_simple import UserSimple from .status7bf_enum import Status7BfEnum -from .converted_format import ConvertedFormat from ..core.pydantic_utilities import IS_PYDANTIC_V2 class Export(UncheckedBaseModel): - title: typing.Optional[str] = None - id: int - created_by: typing.Optional[UserSimple] = None + converted_formats: typing.Optional[typing.List[ConvertedFormat]] = None + counters: typing.Optional[typing.Optional[typing.Any]] = None created_at: dt.datetime = pydantic.Field() """ Creation time """ + created_by: typing.Optional[UserSimple] = None finished_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Complete or fail time """ - status: typing.Optional[Status7BfEnum] = None + id: int md5: typing.Optional[str] = None - counters: typing.Optional[typing.Optional[typing.Any]] = None - converted_formats: typing.Optional[typing.List[ConvertedFormat]] = None + status: typing.Optional[Status7BfEnum] = None + title: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/file_upload.py b/src/label_studio_sdk/types/file_upload.py index 2c00d35ca..b461b7b78 100644 --- a/src/label_studio_sdk/types/file_upload.py +++ b/src/label_studio_sdk/types/file_upload.py @@ -7,8 +7,8 @@ class FileUpload(UncheckedBaseModel): - id: int file: str + id: int if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/filter.py b/src/label_studio_sdk/types/filter.py index 7e66698bb..d9ad66688 100644 --- a/src/label_studio_sdk/types/filter.py +++ b/src/label_studio_sdk/types/filter.py @@ -8,21 +8,16 @@ class Filter(UncheckedBaseModel): - id: int child_filter: typing.Optional[ChildFilter] = None - index: typing.Optional[int] = pydantic.Field(default=None) - """ - Display order among root filters only - """ - column: str = pydantic.Field() """ Field name """ - type: str = pydantic.Field() + id: int + index: typing.Optional[int] = pydantic.Field(default=None) """ - Field type + Display order among root filters only """ operator: str = pydantic.Field() @@ -30,12 +25,18 @@ class Filter(UncheckedBaseModel): Filter operator """ - value: typing.Optional[typing.Optional[typing.Any]] = None parent: typing.Optional[int] = pydantic.Field(default=None) """ Optional parent filter to create one-level hierarchy (child filters are AND-merged with parent) """ + type: str = pydantic.Field() + """ + Field type + """ + + value: typing.Optional[typing.Optional[typing.Any]] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/filter_group.py b/src/label_studio_sdk/types/filter_group.py index 4f8331cf8..c2c25bafa 100644 --- a/src/label_studio_sdk/types/filter_group.py +++ b/src/label_studio_sdk/types/filter_group.py @@ -1,20 +1,21 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel +import pydantic import typing from .filter import Filter -import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 class FilterGroup(UncheckedBaseModel): - id: int - filters: typing.List[Filter] conjunction: str = pydantic.Field() """ Type of conjunction """ + filters: typing.List[Filter] + id: int + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/gcs_export_storage.py b/src/label_studio_sdk/types/gcs_export_storage.py index 86005e4fa..cb9625a95 100644 --- a/src/label_studio_sdk/types/gcs_export_storage.py +++ b/src/label_studio_sdk/types/gcs_export_storage.py @@ -9,27 +9,24 @@ class GcsExportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None bucket: typing.Optional[str] = pydantic.Field(default=None) """ GCS bucket name """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) """ - GCS bucket prefix + Deletion from storage enabled """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Cloud storage regex for filtering objects + Creation time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Cloud storage description """ google_application_credentials: typing.Optional[str] = pydantic.Field(default=None) @@ -42,6 +39,7 @@ class GcsExportStorage(UncheckedBaseModel): Google project ID """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -57,36 +55,38 @@ class GcsExportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + GCS bucket prefix """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - Cloud storage title + A unique integer value identifying this project. """ - description: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + Cloud storage regex for filtering objects """ - created_at: dt.datetime = pydantic.Field() + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + Cloud storage title """ - can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - Deletion from storage enabled + Traceback report for the last failed sync """ - project: int = pydantic.Field() + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/gcs_import_storage.py b/src/label_studio_sdk/types/gcs_import_storage.py index 5b5c4fcaa..9b5700f3e 100644 --- a/src/label_studio_sdk/types/gcs_import_storage.py +++ b/src/label_studio_sdk/types/gcs_import_storage.py @@ -9,28 +9,19 @@ class GcsImportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - presign: typing.Optional[bool] = None bucket: typing.Optional[str] = pydantic.Field(default=None) """ GCS bucket name """ - prefix: typing.Optional[str] = pydantic.Field(default=None) - """ - GCS bucket prefix - """ - - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Cloud storage regex for filtering objects + Creation time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Cloud storage description """ google_application_credentials: typing.Optional[str] = pydantic.Field(default=None) @@ -43,6 +34,7 @@ class GcsImportStorage(UncheckedBaseModel): Google project ID """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -58,36 +50,44 @@ class GcsImportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + GCS bucket prefix """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + presign: typing.Optional[bool] = None + presign_ttl: typing.Optional[int] = pydantic.Field(default=None) """ - Cloud storage title + Presigned URLs TTL (in minutes) """ - description: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - Cloud storage description + A unique integer value identifying this project. """ - created_at: dt.datetime = pydantic.Field() + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + Cloud storage regex for filtering objects """ - presign_ttl: typing.Optional[int] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Presigned URLs TTL (in minutes) + Cloud storage title """ - project: int = pydantic.Field() + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Traceback report for the last failed sync + """ + + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + """ + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/import_api_request.py b/src/label_studio_sdk/types/import_api_request.py index e6b791fc2..31432dace 100644 --- a/src/label_studio_sdk/types/import_api_request.py +++ b/src/label_studio_sdk/types/import_api_request.py @@ -3,9 +3,9 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing from .annotation_request import AnnotationRequest -from .prediction_request import PredictionRequest import pydantic import datetime as dt +from .prediction_request import PredictionRequest from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -15,62 +15,62 @@ class ImportApiRequest(UncheckedBaseModel): """ annotations: typing.Optional[typing.List[AnnotationRequest]] = None - predictions: typing.Optional[typing.List[PredictionRequest]] = None - data: typing.Optional[typing.Any] = None - meta: typing.Optional[typing.Optional[typing.Any]] = None - overlap: typing.Optional[int] = pydantic.Field(default=None) + cancelled_annotations: typing.Optional[int] = pydantic.Field(default=None) """ - Number of distinct annotators that processed the current task + Number of total cancelled annotations for the current task """ - inner_id: typing.Optional[int] = pydantic.Field(default=None) + comment_authors: typing.Optional[typing.List[int]] = pydantic.Field(default=None) """ - Internal task ID in the project, starts with 1 + Users who wrote comments """ - total_annotations: typing.Optional[int] = pydantic.Field(default=None) + comment_count: typing.Optional[int] = pydantic.Field(default=None) """ - Number of total annotations for the current task except cancelled annotations + Number of comments in the task including all annotations """ - cancelled_annotations: typing.Optional[int] = pydantic.Field(default=None) + data: typing.Optional[typing.Any] = None + file_upload: typing.Optional[int] = pydantic.Field(default=None) """ - Number of total cancelled annotations for the current task + Uploaded file used as data source for this task """ - total_predictions: typing.Optional[int] = pydantic.Field(default=None) + inner_id: typing.Optional[int] = pydantic.Field(default=None) """ - Number of total predictions for the current task + Internal task ID in the project, starts with 1 """ - comment_count: typing.Optional[int] = pydantic.Field(default=None) + last_comment_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Number of comments in the task including all annotations + When the last comment was updated """ - unresolved_comment_count: typing.Optional[int] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + overlap: typing.Optional[int] = pydantic.Field(default=None) """ - Number of unresolved comments in the task including all annotations + Number of distinct annotators that processed the current task """ - last_comment_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + predictions: typing.Optional[typing.List[PredictionRequest]] = None + total_annotations: typing.Optional[int] = pydantic.Field(default=None) """ - When the last comment was updated + Number of total annotations for the current task except cancelled annotations """ - updated_by: typing.Optional[int] = pydantic.Field(default=None) + total_predictions: typing.Optional[int] = pydantic.Field(default=None) """ - Last annotator or reviewer who updated this task + Number of total predictions for the current task """ - file_upload: typing.Optional[int] = pydantic.Field(default=None) + unresolved_comment_count: typing.Optional[int] = pydantic.Field(default=None) """ - Uploaded file used as data source for this task + Number of unresolved comments in the task including all annotations """ - comment_authors: typing.Optional[typing.List[int]] = pydantic.Field(default=None) + updated_by: typing.Optional[int] = pydantic.Field(default=None) """ - Users who wrote comments + Last annotator or reviewer who updated this task """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/inference_run_cost_estimate.py b/src/label_studio_sdk/types/inference_run_cost_estimate.py index 366b985f1..e84bec8e5 100644 --- a/src/label_studio_sdk/types/inference_run_cost_estimate.py +++ b/src/label_studio_sdk/types/inference_run_cost_estimate.py @@ -7,19 +7,19 @@ class InferenceRunCostEstimate(UncheckedBaseModel): - prompt_cost_usd: typing.Optional[str] = pydantic.Field(default=None) + completion_cost_usd: typing.Optional[str] = pydantic.Field(default=None) """ - Cost of the prompt (in USD) + Cost of the completion (in USD) """ - completion_cost_usd: typing.Optional[str] = pydantic.Field(default=None) + error_message: typing.Optional[str] = pydantic.Field(default=None) """ - Cost of the completion (in USD) + Error message details """ - total_cost_usd: typing.Optional[str] = pydantic.Field(default=None) + error_type: typing.Optional[str] = pydantic.Field(default=None) """ - Total cost of the inference (in USD) + Type of error (e.g. "Timeout", "Rate Limit", etc) """ is_error: typing.Optional[bool] = pydantic.Field(default=None) @@ -27,14 +27,14 @@ class InferenceRunCostEstimate(UncheckedBaseModel): Whether an error occurred or not """ - error_type: typing.Optional[str] = pydantic.Field(default=None) + prompt_cost_usd: typing.Optional[str] = pydantic.Field(default=None) """ - Type of error (e.g. "Timeout", "Rate Limit", etc) + Cost of the prompt (in USD) """ - error_message: typing.Optional[str] = pydantic.Field(default=None) + total_cost_usd: typing.Optional[str] = pydantic.Field(default=None) """ - Error message details + Total cost of the inference (in USD) """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/local_files_export_storage.py b/src/label_studio_sdk/types/local_files_export_storage.py index 73b2b63eb..bdcbaf607 100644 --- a/src/label_studio_sdk/types/local_files_export_storage.py +++ b/src/label_studio_sdk/types/local_files_export_storage.py @@ -9,24 +9,22 @@ class LocalFilesExportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - path: typing.Optional[str] = pydantic.Field(default=None) + can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) """ - Local path + Deletion from storage enabled """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Regex for filtering objects + Creation time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Cloud storage description """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -42,36 +40,38 @@ class LocalFilesExportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + path: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + Local path """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - Cloud storage title + A unique integer value identifying this project. """ - description: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + Regex for filtering objects """ - created_at: dt.datetime = pydantic.Field() + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + Cloud storage title """ - can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - Deletion from storage enabled + Traceback report for the last failed sync """ - project: int = pydantic.Field() + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/local_files_import_storage.py b/src/label_studio_sdk/types/local_files_import_storage.py index b4aa92c9e..4e3cd4f9e 100644 --- a/src/label_studio_sdk/types/local_files_import_storage.py +++ b/src/label_studio_sdk/types/local_files_import_storage.py @@ -1,32 +1,25 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -import typing -import pydantic import datetime as dt +import pydantic +import typing from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LocalFilesImportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - path: typing.Optional[str] = pydantic.Field(default=None) - """ - Local path - """ - - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Regex for filtering objects + Creation time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Cloud storage description """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -42,31 +35,38 @@ class LocalFilesImportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + path: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + Local path """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - Cloud storage title + A unique integer value identifying this project. """ - description: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + Regex for filtering objects """ - created_at: dt.datetime = pydantic.Field() + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + Cloud storage title """ - project: int = pydantic.Field() + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Traceback report for the last failed sync + """ + + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + """ + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_annotation_filter_options.py b/src/label_studio_sdk/types/lse_annotation_filter_options.py index c1a3862f4..fce7b0389 100644 --- a/src/label_studio_sdk/types/lse_annotation_filter_options.py +++ b/src/label_studio_sdk/types/lse_annotation_filter_options.py @@ -8,21 +8,11 @@ class LseAnnotationFilterOptions(UncheckedBaseModel): - usual: typing.Optional[bool] = pydantic.Field(default=None) - """ - Include not skipped and not ground truth annotations - """ - ground_truth: typing.Optional[bool] = pydantic.Field(default=None) """ Include ground truth annotations """ - skipped: typing.Optional[bool] = pydantic.Field(default=None) - """ - Include skipped annotations - """ - reviewed: typing.Optional[LseAnnotationFilterOptionsReviewed] = pydantic.Field(default=None) """ `only` - include all tasks with at least one not reviewed annotation
    `exclude` - exclude with at least one not reviewed annotation @@ -32,6 +22,16 @@ class LseAnnotationFilterOptions(UncheckedBaseModel): * `None` - None """ + skipped: typing.Optional[bool] = pydantic.Field(default=None) + """ + Include skipped annotations + """ + + usual: typing.Optional[bool] = pydantic.Field(default=None) + """ + Include not skipped and not ground truth annotations + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/lse_annotation_filter_options_request.py b/src/label_studio_sdk/types/lse_annotation_filter_options_request.py index 693ca3974..e0321d976 100644 --- a/src/label_studio_sdk/types/lse_annotation_filter_options_request.py +++ b/src/label_studio_sdk/types/lse_annotation_filter_options_request.py @@ -8,21 +8,11 @@ class LseAnnotationFilterOptionsRequest(UncheckedBaseModel): - usual: typing.Optional[bool] = pydantic.Field(default=None) - """ - Include not skipped and not ground truth annotations - """ - ground_truth: typing.Optional[bool] = pydantic.Field(default=None) """ Include ground truth annotations """ - skipped: typing.Optional[bool] = pydantic.Field(default=None) - """ - Include skipped annotations - """ - reviewed: typing.Optional[LseAnnotationFilterOptionsRequestReviewed] = pydantic.Field(default=None) """ `only` - include all tasks with at least one not reviewed annotation
    `exclude` - exclude with at least one not reviewed annotation @@ -32,6 +22,16 @@ class LseAnnotationFilterOptionsRequest(UncheckedBaseModel): * `None` - None """ + skipped: typing.Optional[bool] = pydantic.Field(default=None) + """ + Include skipped annotations + """ + + usual: typing.Optional[bool] = pydantic.Field(default=None) + """ + Include not skipped and not ground truth annotations + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/lse_export_create.py b/src/label_studio_sdk/types/lse_export_create.py index 0b22efe18..868209daf 100644 --- a/src/label_studio_sdk/types/lse_export_create.py +++ b/src/label_studio_sdk/types/lse_export_create.py @@ -2,38 +2,38 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .user_simple import UserSimple +from .lse_annotation_filter_options import LseAnnotationFilterOptions +from .converted_format import ConvertedFormat import datetime as dt import pydantic +from .user_simple import UserSimple +from .serialization_options import SerializationOptions from .status7bf_enum import Status7BfEnum -from .converted_format import ConvertedFormat from .lse_task_filter_options import LseTaskFilterOptions -from .lse_annotation_filter_options import LseAnnotationFilterOptions -from .serialization_options import SerializationOptions from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseExportCreate(UncheckedBaseModel): - title: typing.Optional[str] = None - id: int - created_by: typing.Optional[UserSimple] = None + annotation_filter_options: typing.Optional[LseAnnotationFilterOptions] = None + converted_formats: typing.Optional[typing.List[ConvertedFormat]] = None + counters: typing.Optional[typing.Optional[typing.Any]] = None created_at: dt.datetime = pydantic.Field() """ Creation time """ + created_by: typing.Optional[UserSimple] = None finished_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Complete or fail time """ - status: typing.Optional[Status7BfEnum] = None + id: int md5: typing.Optional[str] = None - counters: typing.Optional[typing.Optional[typing.Any]] = None - converted_formats: typing.Optional[typing.List[ConvertedFormat]] = None - task_filter_options: typing.Optional[LseTaskFilterOptions] = None - annotation_filter_options: typing.Optional[LseAnnotationFilterOptions] = None serialization_options: typing.Optional[SerializationOptions] = None + status: typing.Optional[Status7BfEnum] = None + task_filter_options: typing.Optional[LseTaskFilterOptions] = None + title: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lse_fields.py b/src/label_studio_sdk/types/lse_fields.py index 4fd5e9fc3..4341b945b 100644 --- a/src/label_studio_sdk/types/lse_fields.py +++ b/src/label_studio_sdk/types/lse_fields.py @@ -3,27 +3,18 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing import datetime as dt -from .lse_fields_trial_role import LseFieldsTrialRole -import pydantic from .lse_fields_onboarding_state import LseFieldsOnboardingState +import pydantic +from .lse_fields_trial_role import LseFieldsTrialRole from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseFields(UncheckedBaseModel): + email_notification_settings: str + invite_activated: typing.Optional[bool] = None invite_expired: str invite_expired_at: str invited_at: typing.Optional[dt.datetime] = None - invite_activated: typing.Optional[bool] = None - trial_company: typing.Optional[str] = None - trial_role: typing.Optional[LseFieldsTrialRole] = None - trial_models_in_production: typing.Optional[str] = None - trial_experience_labeling: typing.Optional[str] = None - trial_license_enterprise: typing.Optional[bool] = None - social_auth_finished: typing.Optional[bool] = pydantic.Field(default=None) - """ - Is user finished social authentication - """ - invited_by: typing.Optional[int] = None onboarding_state: typing.Optional[LseFieldsOnboardingState] = pydantic.Field(default=None) """ @@ -37,7 +28,16 @@ class LseFields(UncheckedBaseModel): * `complete` - Complete """ - email_notification_settings: str + social_auth_finished: typing.Optional[bool] = pydantic.Field(default=None) + """ + Is user finished social authentication + """ + + trial_company: typing.Optional[str] = None + trial_experience_labeling: typing.Optional[str] = None + trial_license_enterprise: typing.Optional[bool] = None + trial_models_in_production: typing.Optional[str] = None + trial_role: typing.Optional[LseFieldsTrialRole] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lse_organization.py b/src/label_studio_sdk/types/lse_organization.py index e744a1acf..cfd182c7c 100644 --- a/src/label_studio_sdk/types/lse_organization.py +++ b/src/label_studio_sdk/types/lse_organization.py @@ -1,24 +1,27 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel +from .organization_billing import OrganizationBilling +import datetime as dt import typing +from .lse_organization_custom_scripts_editable_by import LseOrganizationCustomScriptsEditableBy import pydantic from .default_role_enum import DefaultRoleEnum -import datetime as dt -from .organization_billing import OrganizationBilling -from .lse_organization_custom_scripts_editable_by import LseOrganizationCustomScriptsEditableBy from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseOrganization(UncheckedBaseModel): - id: int - external_id: typing.Optional[str] = pydantic.Field(default=None) + billing: OrganizationBilling + created_at: dt.datetime + custom_scripts_editable_by: typing.Optional[LseOrganizationCustomScriptsEditableBy] = pydantic.Field(default=None) """ - External ID to uniquely identify this organization + Set the minimum user role that can edit custom scripts in the UI. + + * `AD` - Administrator + * `MA` - Manager """ - title: str - token: str + custom_scripts_enabled: str default_role: typing.Optional[DefaultRoleEnum] = pydantic.Field(default=None) """ Default membership role for invited users @@ -32,20 +35,17 @@ class LseOrganization(UncheckedBaseModel): * `NO` - Not Activated """ - created_at: dt.datetime - billing: OrganizationBilling + email_notification_settings: str embed_domains: typing.Optional[typing.Optional[typing.Any]] = None embed_settings: typing.Optional[typing.Optional[typing.Any]] = None - custom_scripts_enabled: str - custom_scripts_editable_by: typing.Optional[LseOrganizationCustomScriptsEditableBy] = pydantic.Field(default=None) + external_id: typing.Optional[str] = pydantic.Field(default=None) """ - Set the minimum user role that can edit custom scripts in the UI. - - * `AD` - Administrator - * `MA` - Manager + External ID to uniquely identify this organization """ - email_notification_settings: str + id: int + title: str + token: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lse_organization_member_list.py b/src/label_studio_sdk/types/lse_organization_member_list.py index bce1303bb..d33d0ee9f 100644 --- a/src/label_studio_sdk/types/lse_organization_member_list.py +++ b/src/label_studio_sdk/types/lse_organization_member_list.py @@ -19,8 +19,8 @@ class LseOrganizationMemberList(UncheckedBaseModel): Organization ID """ - user: LseUserOrganizationMemberList role: str + user: LseUserOrganizationMemberList if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lse_project_create.py b/src/label_studio_sdk/types/lse_project_create.py index 28c8502a8..5072f749c 100644 --- a/src/label_studio_sdk/types/lse_project_create.py +++ b/src/label_studio_sdk/types/lse_project_create.py @@ -3,8 +3,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing import pydantic -from .user_simple import UserSimple import datetime as dt +from .user_simple import UserSimple from .lse_project_create_sampling import LseProjectCreateSampling from .lse_project_create_skip_queue import LseProjectCreateSkipQueue from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -16,10 +16,22 @@ class LseProjectCreate(UncheckedBaseModel): make sure, that you use correct one(Project.objects.with_counts()) """ - id: int - title: typing.Optional[str] = pydantic.Field(default=None) + color: typing.Optional[str] = None + config_has_control_tags: bool = pydantic.Field() """ - Project name. Must be between 3 and 50 characters long. + Flag to detect is project ready for labeling + """ + + config_suitable_for_bulk_annotation: bool = pydantic.Field() + """ + Flag to detect is project ready for bulk annotation + """ + + control_weights: typing.Optional[typing.Optional[typing.Any]] = None + created_at: dt.datetime + created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) + """ + Project owner """ description: typing.Optional[str] = pydantic.Field(default=None) @@ -27,9 +39,14 @@ class LseProjectCreate(UncheckedBaseModel): Project description """ - label_config: typing.Optional[str] = pydantic.Field(default=None) + enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) """ - Label config in XML format. See more about it in documentation + Allow annotators to submit empty annotations + """ + + evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) + """ + Retrieve and display predictions when loading a task """ expert_instruction: typing.Optional[str] = pydantic.Field(default=None) @@ -37,36 +54,40 @@ class LseProjectCreate(UncheckedBaseModel): Labeling instructions in HTML format """ - show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + finished_task_number: int = pydantic.Field() """ - Show instructions to the annotator before they start + Finished tasks """ - show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) + ground_truth_number: int = pydantic.Field() """ - Show a skip button in interface and allow annotators to skip the task + Honeypot annotation number in project """ - enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) + id: int + is_draft: typing.Optional[bool] = pydantic.Field(default=None) """ - Allow annotators to submit empty annotations + Whether or not the project is in the middle of being created """ - show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) + is_published: typing.Optional[bool] = pydantic.Field(default=None) """ - Show annotation history to annotator + Whether or not the project is published to annotators + """ + + label_config: typing.Optional[str] = pydantic.Field(default=None) + """ + Label config in XML format. See more about it in documentation """ - organization: typing.Optional[int] = None - color: typing.Optional[str] = None maximum_annotations: typing.Optional[int] = pydantic.Field(default=None) """ Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) """ - is_published: typing.Optional[bool] = pydantic.Field(default=None) + min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) """ - Whether or not the project is published to annotators + Minimum number of completed tasks after which model training is started """ model_version: typing.Optional[str] = pydantic.Field(default=None) @@ -74,25 +95,30 @@ class LseProjectCreate(UncheckedBaseModel): Machine learning model version """ - is_draft: typing.Optional[bool] = pydantic.Field(default=None) + num_tasks_with_annotations: int = pydantic.Field() """ - Whether or not the project is in the middle of being created + Tasks with annotations count """ - created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) + organization: typing.Optional[int] = None + overlap_cohort_percentage: typing.Optional[int] = None + parsed_label_config: typing.Optional[typing.Any] = None + pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Project owner + Pinned date and time """ - created_at: dt.datetime - min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) + queue_done: int + queue_total: int + reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) """ - Minimum number of completed tasks after which model training is started + Reveal pre-annotations interactively """ - start_training_on_annotation_update: bool = pydantic.Field() + sampling: typing.Optional[LseProjectCreateSampling] = None + show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) """ - Start model training after any annotations are submitted or updated + Show annotation history to annotator """ show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) @@ -100,45 +126,29 @@ class LseProjectCreate(UncheckedBaseModel): If set, the annotator can view model predictions """ - num_tasks_with_annotations: int = pydantic.Field() - """ - Tasks with annotations count - """ - - task_number: int = pydantic.Field() - """ - Total task number in project - """ - - useful_annotation_number: int = pydantic.Field() + show_ground_truth_first: typing.Optional[bool] = None + show_instruction: typing.Optional[bool] = pydantic.Field(default=None) """ - Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number + Show instructions to the annotator before they start """ - ground_truth_number: int = pydantic.Field() + show_overlap_first: typing.Optional[bool] = None + show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) """ - Honeypot annotation number in project + Show a skip button in interface and allow annotators to skip the task """ + skip_queue: typing.Optional[LseProjectCreateSkipQueue] = None skipped_annotations_number: int = pydantic.Field() """ Skipped by collaborators annotation number in project """ - total_annotations_number: int = pydantic.Field() - """ - Total annotations number in project including skipped_annotations_number and ground_truth_number. - """ - - total_predictions_number: int = pydantic.Field() + start_training_on_annotation_update: bool = pydantic.Field() """ - Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. + Start model training after any annotations are submitted or updated """ - sampling: typing.Optional[LseProjectCreateSampling] = None - show_ground_truth_first: typing.Optional[bool] = None - show_overlap_first: typing.Optional[bool] = None - overlap_cohort_percentage: typing.Optional[int] = None task_data_login: typing.Optional[str] = pydantic.Field(default=None) """ Task data credentials: login @@ -149,39 +159,29 @@ class LseProjectCreate(UncheckedBaseModel): Task data credentials: password """ - control_weights: typing.Optional[typing.Optional[typing.Any]] = None - parsed_label_config: typing.Optional[typing.Any] = None - evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) - """ - Retrieve and display predictions when loading a task - """ - - config_has_control_tags: bool = pydantic.Field() + task_number: int = pydantic.Field() """ - Flag to detect is project ready for labeling + Total task number in project """ - skip_queue: typing.Optional[LseProjectCreateSkipQueue] = None - reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) + title: typing.Optional[str] = pydantic.Field(default=None) """ - Reveal pre-annotations interactively + Project name. Must be between 3 and 50 characters long. """ - pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + total_annotations_number: int = pydantic.Field() """ - Pinned date and time + Total annotations number in project including skipped_annotations_number and ground_truth_number. """ - finished_task_number: int = pydantic.Field() + total_predictions_number: int = pydantic.Field() """ - Finished tasks + Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. """ - queue_total: int - queue_done: int - config_suitable_for_bulk_annotation: bool = pydantic.Field() + useful_annotation_number: int = pydantic.Field() """ - Flag to detect is project ready for bulk annotation + Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number """ workspace: typing.Optional[int] = None diff --git a/src/label_studio_sdk/types/lse_project_update.py b/src/label_studio_sdk/types/lse_project_update.py index 371e5ab64..66e60f4eb 100644 --- a/src/label_studio_sdk/types/lse_project_update.py +++ b/src/label_studio_sdk/types/lse_project_update.py @@ -2,13 +2,13 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .assignment_settings import AssignmentSettings import pydantic -from .user_simple import UserSimple import datetime as dt +from .user_simple import UserSimple +from .review_settings import ReviewSettings from .lse_project_update_sampling import LseProjectUpdateSampling from .lse_project_update_skip_queue import LseProjectUpdateSkipQueue -from .review_settings import ReviewSettings -from .assignment_settings import AssignmentSettings from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -18,35 +18,39 @@ class LseProjectUpdate(UncheckedBaseModel): make sure, that you use correct one(Project.objects.with_counts()) """ - id: int - title: typing.Optional[str] = pydantic.Field(default=None) - """ - Project name. Must be between 3 and 50 characters long. - """ - - description: typing.Optional[str] = pydantic.Field(default=None) + annotation_limit_count: typing.Optional[int] = None + annotation_limit_percent: typing.Optional[str] = None + annotator_evaluation_minimum_score: typing.Optional[str] = None + annotator_evaluation_minimum_tasks: typing.Optional[int] = None + assignment_settings: AssignmentSettings + color: typing.Optional[str] = None + comment_classification_config: typing.Optional[str] = None + config_has_control_tags: bool = pydantic.Field() """ - Project description + Flag to detect is project ready for labeling """ - label_config: typing.Optional[str] = pydantic.Field(default=None) + config_suitable_for_bulk_annotation: bool = pydantic.Field() """ - Label config in XML format. See more about it in documentation + Flag to detect is project ready for bulk annotation """ - expert_instruction: typing.Optional[str] = pydantic.Field(default=None) + control_weights: typing.Optional[typing.Optional[typing.Any]] = None + created_at: dt.datetime + created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) """ - Labeling instructions in HTML format + Project owner """ - show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + custom_script: typing.Optional[str] = None + custom_task_lock_ttl: typing.Optional[int] = pydantic.Field(default=None) """ - Show instructions to the annotator before they start + TTL in seconds for task reservations, on new and existing tasks """ - show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Show a skip button in interface and allow annotators to skip the task + Project description """ enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) @@ -54,52 +58,55 @@ class LseProjectUpdate(UncheckedBaseModel): Allow annotators to submit empty annotations """ - show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) + evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) """ - Show annotation history to annotator + Retrieve and display predictions when loading a task """ - organization: typing.Optional[int] = None - color: typing.Optional[str] = None - maximum_annotations: typing.Optional[int] = pydantic.Field(default=None) + expert_instruction: typing.Optional[str] = pydantic.Field(default=None) """ - Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + Labeling instructions in HTML format """ - is_published: typing.Optional[bool] = pydantic.Field(default=None) + finished_task_number: int = pydantic.Field() """ - Whether or not the project is published to annotators + Finished tasks """ - model_version: typing.Optional[str] = pydantic.Field(default=None) + ground_truth_number: int = pydantic.Field() """ - Machine learning model version + Honeypot annotation number in project """ + id: int is_draft: typing.Optional[bool] = pydantic.Field(default=None) """ Whether or not the project is in the middle of being created """ - created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) + is_published: typing.Optional[bool] = pydantic.Field(default=None) """ - Project owner + Whether or not the project is published to annotators """ - created_at: dt.datetime - min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) + label_config: typing.Optional[str] = pydantic.Field(default=None) """ - Minimum number of completed tasks after which model training is started + Label config in XML format. See more about it in documentation """ - start_training_on_annotation_update: bool = pydantic.Field() + maximum_annotations: typing.Optional[int] = pydantic.Field(default=None) """ - Start model training after any annotations are submitted or updated + Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) """ - show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) + min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) """ - If set, the annotator can view model predictions + Minimum number of completed tasks after which model training is started + """ + + model_version: typing.Optional[str] = pydantic.Field(default=None) + """ + Machine learning model version """ num_tasks_with_annotations: int = pydantic.Field() @@ -107,102 +114,95 @@ class LseProjectUpdate(UncheckedBaseModel): Tasks with annotations count """ - task_number: int = pydantic.Field() + organization: typing.Optional[int] = None + overlap_cohort_percentage: typing.Optional[int] = None + parsed_label_config: typing.Optional[typing.Any] = None + pause_on_failed_annotator_evaluation: typing.Optional[bool] = None + pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Total task number in project + Pinned date and time """ - useful_annotation_number: int = pydantic.Field() + prompts: str + queue_done: int + queue_total: int + require_comment_on_skip: typing.Optional[bool] = None + reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) """ - Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number + Reveal pre-annotations interactively """ - ground_truth_number: int = pydantic.Field() + review_settings: ReviewSettings + sampling: typing.Optional[LseProjectUpdateSampling] = None + show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) """ - Honeypot annotation number in project + Show annotation history to annotator """ - skipped_annotations_number: int = pydantic.Field() + show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) """ - Skipped by collaborators annotation number in project + If set, the annotator can view model predictions """ - total_annotations_number: int = pydantic.Field() + show_ground_truth_first: typing.Optional[bool] = None + show_instruction: typing.Optional[bool] = pydantic.Field(default=None) """ - Total annotations number in project including skipped_annotations_number and ground_truth_number. + Show instructions to the annotator before they start """ - total_predictions_number: int = pydantic.Field() + show_overlap_first: typing.Optional[bool] = None + show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) """ - Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. + Show a skip button in interface and allow annotators to skip the task """ - sampling: typing.Optional[LseProjectUpdateSampling] = None - show_ground_truth_first: typing.Optional[bool] = None - show_overlap_first: typing.Optional[bool] = None - overlap_cohort_percentage: typing.Optional[int] = None - task_data_login: typing.Optional[str] = pydantic.Field(default=None) + skip_queue: typing.Optional[LseProjectUpdateSkipQueue] = None + skipped_annotations_number: int = pydantic.Field() """ - Task data credentials: login + Skipped by collaborators annotation number in project """ - task_data_password: typing.Optional[str] = pydantic.Field(default=None) + start_training_on_annotation_update: bool = pydantic.Field() """ - Task data credentials: password + Start model training after any annotations are submitted or updated """ - control_weights: typing.Optional[typing.Optional[typing.Any]] = None - parsed_label_config: typing.Optional[typing.Any] = None - evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) + task_data_login: typing.Optional[str] = pydantic.Field(default=None) """ - Retrieve and display predictions when loading a task + Task data credentials: login """ - config_has_control_tags: bool = pydantic.Field() + task_data_password: typing.Optional[str] = pydantic.Field(default=None) """ - Flag to detect is project ready for labeling + Task data credentials: password """ - skip_queue: typing.Optional[LseProjectUpdateSkipQueue] = None - reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) + task_number: int = pydantic.Field() """ - Reveal pre-annotations interactively + Total task number in project """ - pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + title: typing.Optional[str] = pydantic.Field(default=None) """ - Pinned date and time + Project name. Must be between 3 and 50 characters long. """ - finished_task_number: int = pydantic.Field() + total_annotations_number: int = pydantic.Field() """ - Finished tasks + Total annotations number in project including skipped_annotations_number and ground_truth_number. """ - queue_total: int - queue_done: int - config_suitable_for_bulk_annotation: bool = pydantic.Field() + total_predictions_number: int = pydantic.Field() """ - Flag to detect is project ready for bulk annotation + Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. """ - workspace: int - review_settings: ReviewSettings - assignment_settings: AssignmentSettings - custom_script: typing.Optional[str] = None - comment_classification_config: typing.Optional[str] = None - require_comment_on_skip: typing.Optional[bool] = None - custom_task_lock_ttl: typing.Optional[int] = pydantic.Field(default=None) + useful_annotation_number: int = pydantic.Field() """ - TTL in seconds for task reservations, on new and existing tasks + Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number """ - prompts: str - annotation_limit_count: typing.Optional[int] = None - annotation_limit_percent: typing.Optional[str] = None - pause_on_failed_annotator_evaluation: typing.Optional[bool] = None - annotator_evaluation_minimum_score: typing.Optional[str] = None - annotator_evaluation_minimum_tasks: typing.Optional[int] = None + workspace: int workspace_title: str if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_s3export_storage.py b/src/label_studio_sdk/types/lse_s3export_storage.py index 8a56a3efd..56668be01 100644 --- a/src/label_studio_sdk/types/lse_s3export_storage.py +++ b/src/label_studio_sdk/types/lse_s3export_storage.py @@ -2,48 +2,43 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic -from .status_c5a_enum import StatusC5AEnum +import datetime as dt import typing_extensions from ..core.serialization import FieldMetadata +from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseS3ExportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) + aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync finished time + AWS_ACCESS_KEY_ID """ - last_sync_count: typing.Optional[int] = pydantic.Field(default=None) + aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) """ - Count of tasks synced last time + AWS_SECRET_ACCESS_KEY """ - last_sync_job: typing.Optional[str] = pydantic.Field(default=None) + aws_session_token: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync job ID + AWS_SESSION_TOKEN """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + AWS SSE KMS Key ID """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + bucket: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + S3 bucket name """ - description: typing.Optional[str] = pydantic.Field(default=None) + can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) """ - Cloud storage description + Deletion from storage enabled """ created_at: dt.datetime = pydantic.Field() @@ -51,54 +46,57 @@ class LseS3ExportStorage(UncheckedBaseModel): Creation time """ - can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Deletion from storage enabled + Cloud storage description """ - bucket: typing.Optional[str] = pydantic.Field(default=None) + external_id: typing.Optional[str] = pydantic.Field(default=None) """ - S3 bucket name + AWS ExternalId """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + id: int + last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - S3 bucket prefix + Last sync finished time """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + last_sync_count: typing.Optional[int] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Count of tasks synced last time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + last_sync_job: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Last sync job ID """ - aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) + legacy_auth: typing.Optional[bool] = None + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - AWS_ACCESS_KEY_ID + S3 bucket prefix """ - aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - AWS_SECRET_ACCESS_KEY + A unique integer value identifying this project. """ - aws_session_token: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - AWS_SESSION_TOKEN + Cloud storage regex for filtering objects """ - aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) + region_name: typing.Optional[str] = pydantic.Field(default=None) """ - AWS SSE KMS Key ID + AWS Region """ - region_name: typing.Optional[str] = pydantic.Field(default=None) + role_arn: str = pydantic.Field() """ - AWS Region + AWS RoleArn """ s3endpoint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_endpoint")] = pydantic.Field( @@ -108,20 +106,22 @@ class LseS3ExportStorage(UncheckedBaseModel): S3 Endpoint """ - external_id: typing.Optional[str] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - AWS ExternalId + Cloud storage title """ - role_arn: str = pydantic.Field() + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - AWS RoleArn + Traceback report for the last failed sync """ - legacy_auth: typing.Optional[bool] = None - project: int = pydantic.Field() + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_s3export_storage_request.py b/src/label_studio_sdk/types/lse_s3export_storage_request.py index 6f8d9eb55..10c3789a3 100644 --- a/src/label_studio_sdk/types/lse_s3export_storage_request.py +++ b/src/label_studio_sdk/types/lse_s3export_storage_request.py @@ -2,46 +2,38 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic -from .status_c5a_enum import StatusC5AEnum +import datetime as dt import typing_extensions from ..core.serialization import FieldMetadata +from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseS3ExportStorageRequest(UncheckedBaseModel): - synchronizable: typing.Optional[bool] = None - last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - Last sync finished time - """ - - last_sync_count: typing.Optional[int] = pydantic.Field(default=None) + aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Count of tasks synced last time + AWS_ACCESS_KEY_ID """ - last_sync_job: typing.Optional[str] = pydantic.Field(default=None) + aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync job ID + AWS_SECRET_ACCESS_KEY """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + aws_session_token: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + AWS_SESSION_TOKEN """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + AWS SSE KMS Key ID """ - description: typing.Optional[str] = pydantic.Field(default=None) + bucket: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + S3 bucket name """ can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) @@ -49,44 +41,46 @@ class LseS3ExportStorageRequest(UncheckedBaseModel): Deletion from storage enabled """ - bucket: typing.Optional[str] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - S3 bucket name + Cloud storage description """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + external_id: typing.Optional[str] = pydantic.Field(default=None) """ - S3 bucket prefix + AWS ExternalId """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Last sync finished time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + last_sync_count: typing.Optional[int] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Count of tasks synced last time """ - aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) + last_sync_job: typing.Optional[str] = pydantic.Field(default=None) """ - AWS_ACCESS_KEY_ID + Last sync job ID """ - aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) + legacy_auth: typing.Optional[bool] = None + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - AWS_SECRET_ACCESS_KEY + S3 bucket prefix """ - aws_session_token: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - AWS_SESSION_TOKEN + A unique integer value identifying this project. """ - aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - AWS SSE KMS Key ID + Cloud storage regex for filtering objects """ region_name: typing.Optional[str] = pydantic.Field(default=None) @@ -94,6 +88,11 @@ class LseS3ExportStorageRequest(UncheckedBaseModel): AWS Region """ + role_arn: str = pydantic.Field() + """ + AWS RoleArn + """ + s3endpoint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_endpoint")] = pydantic.Field( default=None ) @@ -101,20 +100,21 @@ class LseS3ExportStorageRequest(UncheckedBaseModel): S3 Endpoint """ - external_id: typing.Optional[str] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - AWS ExternalId + Cloud storage title """ - role_arn: str = pydantic.Field() + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - AWS RoleArn + Traceback report for the last failed sync """ - legacy_auth: typing.Optional[bool] = None - project: int = pydantic.Field() + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_s3import_storage.py b/src/label_studio_sdk/types/lse_s3import_storage.py index 9998eeb2d..cd0fc73cf 100644 --- a/src/label_studio_sdk/types/lse_s3import_storage.py +++ b/src/label_studio_sdk/types/lse_s3import_storage.py @@ -2,44 +2,43 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic -from .status_c5a_enum import StatusC5AEnum +import datetime as dt import typing_extensions from ..core.serialization import FieldMetadata +from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseS3ImportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - presign: typing.Optional[bool] = None - last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) + aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync finished time + AWS_ACCESS_KEY_ID """ - last_sync_count: typing.Optional[int] = pydantic.Field(default=None) + aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) """ - Count of tasks synced last time + AWS_SECRET_ACCESS_KEY """ - last_sync_job: typing.Optional[str] = pydantic.Field(default=None) + aws_session_token: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync job ID + AWS_SESSION_TOKEN """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + AWS SSE KMS Key ID """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + bucket: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + S3 bucket name + """ + + created_at: dt.datetime = pydantic.Field() + """ + Creation time """ description: typing.Optional[str] = pydantic.Field(default=None) @@ -47,49 +46,53 @@ class LseS3ImportStorage(UncheckedBaseModel): Cloud storage description """ - created_at: dt.datetime = pydantic.Field() + external_id: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + AWS ExternalId """ - bucket: typing.Optional[str] = pydantic.Field(default=None) + id: int + last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - S3 bucket name + Last sync finished time """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + last_sync_count: typing.Optional[int] = pydantic.Field(default=None) """ - S3 bucket prefix + Count of tasks synced last time """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + last_sync_job: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Last sync job ID """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + legacy_auth: typing.Optional[bool] = None + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + S3 bucket prefix """ - aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) + presign: typing.Optional[bool] = None + presign_ttl: typing.Optional[int] = pydantic.Field(default=None) """ - AWS_ACCESS_KEY_ID + Presigned URLs TTL (in minutes) """ - aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - AWS_SECRET_ACCESS_KEY + A unique integer value identifying this project. """ - aws_session_token: typing.Optional[str] = pydantic.Field(default=None) + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) """ - AWS_SESSION_TOKEN + Perform recursive scan over the bucket content """ - aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - AWS SSE KMS Key ID + Cloud storage regex for filtering objects """ region_name: typing.Optional[str] = pydantic.Field(default=None) @@ -97,6 +100,11 @@ class LseS3ImportStorage(UncheckedBaseModel): AWS Region """ + role_arn: str = pydantic.Field() + """ + AWS RoleArn + """ + s3endpoint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_endpoint")] = pydantic.Field( default=None ) @@ -104,30 +112,22 @@ class LseS3ImportStorage(UncheckedBaseModel): S3 Endpoint """ - external_id: typing.Optional[str] = pydantic.Field(default=None) - """ - AWS ExternalId - """ - - role_arn: str = pydantic.Field() - """ - AWS RoleArn - """ - - legacy_auth: typing.Optional[bool] = None - presign_ttl: typing.Optional[int] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Presigned URLs TTL (in minutes) + Cloud storage title """ - recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - Perform recursive scan over the bucket content + Traceback report for the last failed sync """ - project: int = pydantic.Field() + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_s3import_storage_request.py b/src/label_studio_sdk/types/lse_s3import_storage_request.py index 5c8d781d9..cb7024414 100644 --- a/src/label_studio_sdk/types/lse_s3import_storage_request.py +++ b/src/label_studio_sdk/types/lse_s3import_storage_request.py @@ -2,42 +2,38 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic -from .status_c5a_enum import StatusC5AEnum +import datetime as dt import typing_extensions from ..core.serialization import FieldMetadata +from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseS3ImportStorageRequest(UncheckedBaseModel): - synchronizable: typing.Optional[bool] = None - presign: typing.Optional[bool] = None - last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) + aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync finished time + AWS_ACCESS_KEY_ID """ - last_sync_count: typing.Optional[int] = pydantic.Field(default=None) + aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) """ - Count of tasks synced last time + AWS_SECRET_ACCESS_KEY """ - last_sync_job: typing.Optional[str] = pydantic.Field(default=None) + aws_session_token: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync job ID + AWS_SESSION_TOKEN """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + AWS SSE KMS Key ID """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + bucket: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + S3 bucket name """ description: typing.Optional[str] = pydantic.Field(default=None) @@ -45,82 +41,86 @@ class LseS3ImportStorageRequest(UncheckedBaseModel): Cloud storage description """ - bucket: typing.Optional[str] = pydantic.Field(default=None) + external_id: typing.Optional[str] = pydantic.Field(default=None) """ - S3 bucket name + AWS ExternalId """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - S3 bucket prefix + Last sync finished time """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + last_sync_count: typing.Optional[int] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Count of tasks synced last time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + last_sync_job: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Last sync job ID """ - aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) + legacy_auth: typing.Optional[bool] = None + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - AWS_ACCESS_KEY_ID + S3 bucket prefix """ - aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) + presign: typing.Optional[bool] = None + presign_ttl: typing.Optional[int] = pydantic.Field(default=None) """ - AWS_SECRET_ACCESS_KEY + Presigned URLs TTL (in minutes) """ - aws_session_token: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - AWS_SESSION_TOKEN + A unique integer value identifying this project. """ - aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) """ - AWS SSE KMS Key ID + Perform recursive scan over the bucket content """ - region_name: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - AWS Region + Cloud storage regex for filtering objects """ - s3endpoint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_endpoint")] = pydantic.Field( - default=None - ) + region_name: typing.Optional[str] = pydantic.Field(default=None) """ - S3 Endpoint + AWS Region """ - external_id: typing.Optional[str] = pydantic.Field(default=None) + role_arn: str = pydantic.Field() """ - AWS ExternalId + AWS RoleArn """ - role_arn: str = pydantic.Field() + s3endpoint: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_endpoint")] = pydantic.Field( + default=None + ) """ - AWS RoleArn + S3 Endpoint """ - legacy_auth: typing.Optional[bool] = None - presign_ttl: typing.Optional[int] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Presigned URLs TTL (in minutes) + Cloud storage title """ - recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - Perform recursive scan over the bucket content + Traceback report for the last failed sync """ - project: int = pydantic.Field() + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task.py b/src/label_studio_sdk/types/lse_task.py index 4b7a7f62a..01388034c 100644 --- a/src/label_studio_sdk/types/lse_task.py +++ b/src/label_studio_sdk/types/lse_task.py @@ -2,10 +2,10 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .lse_task_predictions_item import LseTaskPredictionsItem import pydantic -from .lse_task_drafts_item import LseTaskDraftsItem import datetime as dt +from .lse_task_drafts_item import LseTaskDraftsItem +from .lse_task_predictions_item import LseTaskPredictionsItem from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -14,97 +14,97 @@ class LseTask(UncheckedBaseModel): Task Serializer with project scheme configs validation """ - id: int agreement: str - predictions: typing.List[LseTaskPredictionsItem] = pydantic.Field() - """ - Predictions for this task - """ - annotations: str - drafts: typing.List[LseTaskDraftsItem] = pydantic.Field() - """ - Drafts for this task - """ - + annotations_ids: str + annotations_results: str annotators: typing.List[int] = pydantic.Field() """ Annotators IDs who annotated this task """ - inner_id: typing.Optional[int] = None - cancelled_annotations: typing.Optional[int] = None - total_annotations: typing.Optional[int] = None - total_predictions: typing.Optional[int] = None - completed_at: typing.Optional[dt.datetime] = None - annotations_results: str - predictions_results: str - predictions_score: typing.Optional[float] = None - file_upload: str - storage_filename: str - annotations_ids: str - predictions_model_versions: str - avg_lead_time: typing.Optional[float] = None - draft_exists: typing.Optional[bool] = None - updated_by: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() + annotators_count: int = pydantic.Field() """ - User IDs who updated this task + The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. """ - reviewers: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] - comments: str + avg_lead_time: typing.Optional[float] = None + cancelled_annotations: typing.Optional[int] = None comment_authors: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] - reviewed: typing.Optional[bool] = None - reviews_accepted: typing.Optional[int] = None - reviews_rejected: typing.Optional[int] = None - ground_truth: typing.Optional[bool] = None - annotators_count: int = pydantic.Field() + comment_authors_count: int + comment_count: typing.Optional[int] = pydantic.Field(default=None) """ - The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. + Number of comments in the task including all annotations """ - reviewers_count: int - comment_authors_count: int - data: typing.Optional[typing.Any] = None - meta: typing.Optional[typing.Optional[typing.Any]] = None + comments: str + completed_at: typing.Optional[dt.datetime] = None created_at: dt.datetime = pydantic.Field() """ Time a task was created """ - updated_at: dt.datetime = pydantic.Field() + data: typing.Optional[typing.Any] = None + draft_exists: typing.Optional[bool] = None + drafts: typing.List[LseTaskDraftsItem] = pydantic.Field() """ - Last time a task was updated + Drafts for this task """ + file_upload: str + ground_truth: typing.Optional[bool] = None + id: int + inner_id: typing.Optional[int] = None is_labeled: typing.Optional[bool] = pydantic.Field(default=None) """ True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project """ + last_comment_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the last comment was updated + """ + + meta: typing.Optional[typing.Optional[typing.Any]] = None overlap: typing.Optional[int] = pydantic.Field(default=None) """ Number of distinct annotators that processed the current task """ - comment_count: typing.Optional[int] = pydantic.Field(default=None) + predictions: typing.List[LseTaskPredictionsItem] = pydantic.Field() """ - Number of comments in the task including all annotations + Predictions for this task """ + predictions_model_versions: str + predictions_results: str + predictions_score: typing.Optional[float] = None + project: typing.Optional[int] = pydantic.Field(default=None) + """ + Project ID for this task + """ + + reviewed: typing.Optional[bool] = None + reviewers: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] + reviewers_count: int + reviews_accepted: typing.Optional[int] = None + reviews_rejected: typing.Optional[int] = None + storage_filename: str + total_annotations: typing.Optional[int] = None + total_predictions: typing.Optional[int] = None unresolved_comment_count: typing.Optional[int] = pydantic.Field(default=None) """ Number of unresolved comments in the task including all annotations """ - last_comment_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + updated_at: dt.datetime = pydantic.Field() """ - When the last comment was updated + Last time a task was updated """ - project: typing.Optional[int] = pydantic.Field(default=None) + updated_by: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() """ - Project ID for this task + User IDs who updated this task """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task_drafts_item.py b/src/label_studio_sdk/types/lse_task_drafts_item.py index 147a7ee4c..b66892a8f 100644 --- a/src/label_studio_sdk/types/lse_task_drafts_item.py +++ b/src/label_studio_sdk/types/lse_task_drafts_item.py @@ -8,8 +8,8 @@ class LseTaskDraftsItem(UncheckedBaseModel): - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None created_at: typing.Optional[dt.datetime] = None + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None updated_at: typing.Optional[dt.datetime] = None if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task_filter_options.py b/src/label_studio_sdk/types/lse_task_filter_options.py index 49aff5de7..fa6d189c6 100644 --- a/src/label_studio_sdk/types/lse_task_filter_options.py +++ b/src/label_studio_sdk/types/lse_task_filter_options.py @@ -2,23 +2,18 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .lse_task_filter_options_annotated import LseTaskFilterOptionsAnnotated import pydantic -from .lse_task_filter_options_skipped import LseTaskFilterOptionsSkipped from .lse_task_filter_options_finished import LseTaskFilterOptionsFinished -from .lse_task_filter_options_annotated import LseTaskFilterOptionsAnnotated from .lse_task_filter_options_reviewed import LseTaskFilterOptionsReviewed +from .lse_task_filter_options_skipped import LseTaskFilterOptionsSkipped from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseTaskFilterOptions(UncheckedBaseModel): - view: typing.Optional[int] = pydantic.Field(default=None) - """ - Apply filters from the view ID (a tab from the Data Manager) - """ - - skipped: typing.Optional[LseTaskFilterOptionsSkipped] = pydantic.Field(default=None) + annotated: typing.Optional[LseTaskFilterOptionsAnnotated] = pydantic.Field(default=None) """ - `only` - include all tasks with skipped annotations
    `exclude` - exclude all tasks with skipped annotations + `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation * `only` - only * `exclude` - exclude @@ -34,25 +29,30 @@ class LseTaskFilterOptions(UncheckedBaseModel): * `None` - None """ - annotated: typing.Optional[LseTaskFilterOptionsAnnotated] = pydantic.Field(default=None) + only_with_annotations: typing.Optional[bool] = None + reviewed: typing.Optional[LseTaskFilterOptionsReviewed] = pydantic.Field(default=None) """ - `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation + `only` - include all reviewed tasks
    `exclude` - exclude all reviewed tasks * `only` - only * `exclude` - exclude * `None` - None """ - only_with_annotations: typing.Optional[bool] = None - reviewed: typing.Optional[LseTaskFilterOptionsReviewed] = pydantic.Field(default=None) + skipped: typing.Optional[LseTaskFilterOptionsSkipped] = pydantic.Field(default=None) """ - `only` - include all reviewed tasks
    `exclude` - exclude all reviewed tasks + `only` - include all tasks with skipped annotations
    `exclude` - exclude all tasks with skipped annotations * `only` - only * `exclude` - exclude * `None` - None """ + view: typing.Optional[int] = pydantic.Field(default=None) + """ + Apply filters from the view ID (a tab from the Data Manager) + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/lse_task_filter_options_request.py b/src/label_studio_sdk/types/lse_task_filter_options_request.py index ab7c298d5..5e10ab730 100644 --- a/src/label_studio_sdk/types/lse_task_filter_options_request.py +++ b/src/label_studio_sdk/types/lse_task_filter_options_request.py @@ -2,23 +2,18 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .lse_task_filter_options_request_annotated import LseTaskFilterOptionsRequestAnnotated import pydantic -from .lse_task_filter_options_request_skipped import LseTaskFilterOptionsRequestSkipped from .lse_task_filter_options_request_finished import LseTaskFilterOptionsRequestFinished -from .lse_task_filter_options_request_annotated import LseTaskFilterOptionsRequestAnnotated from .lse_task_filter_options_request_reviewed import LseTaskFilterOptionsRequestReviewed +from .lse_task_filter_options_request_skipped import LseTaskFilterOptionsRequestSkipped from ..core.pydantic_utilities import IS_PYDANTIC_V2 class LseTaskFilterOptionsRequest(UncheckedBaseModel): - view: typing.Optional[int] = pydantic.Field(default=None) - """ - Apply filters from the view ID (a tab from the Data Manager) - """ - - skipped: typing.Optional[LseTaskFilterOptionsRequestSkipped] = pydantic.Field(default=None) + annotated: typing.Optional[LseTaskFilterOptionsRequestAnnotated] = pydantic.Field(default=None) """ - `only` - include all tasks with skipped annotations
    `exclude` - exclude all tasks with skipped annotations + `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation * `only` - only * `exclude` - exclude @@ -34,25 +29,30 @@ class LseTaskFilterOptionsRequest(UncheckedBaseModel): * `None` - None """ - annotated: typing.Optional[LseTaskFilterOptionsRequestAnnotated] = pydantic.Field(default=None) + only_with_annotations: typing.Optional[bool] = None + reviewed: typing.Optional[LseTaskFilterOptionsRequestReviewed] = pydantic.Field(default=None) """ - `only` - include all tasks with at least one not skipped annotation
    `exclude` - exclude all tasks with at least one not skipped annotation + `only` - include all reviewed tasks
    `exclude` - exclude all reviewed tasks * `only` - only * `exclude` - exclude * `None` - None """ - only_with_annotations: typing.Optional[bool] = None - reviewed: typing.Optional[LseTaskFilterOptionsRequestReviewed] = pydantic.Field(default=None) + skipped: typing.Optional[LseTaskFilterOptionsRequestSkipped] = pydantic.Field(default=None) """ - `only` - include all reviewed tasks
    `exclude` - exclude all reviewed tasks + `only` - include all tasks with skipped annotations
    `exclude` - exclude all tasks with skipped annotations * `only` - only * `exclude` - exclude * `None` - None """ + view: typing.Optional[int] = pydantic.Field(default=None) + """ + Apply filters from the view ID (a tab from the Data Manager) + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/lse_task_predictions_item.py b/src/label_studio_sdk/types/lse_task_predictions_item.py index 4fd7c824a..ff79e8db5 100644 --- a/src/label_studio_sdk/types/lse_task_predictions_item.py +++ b/src/label_studio_sdk/types/lse_task_predictions_item.py @@ -8,14 +8,14 @@ class LseTaskPredictionsItem(UncheckedBaseModel): - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None - score: typing.Optional[float] = None - model_version: typing.Optional[str] = None + created_at: typing.Optional[dt.datetime] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None model_run: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None - task: typing.Optional[int] = None + model_version: typing.Optional[str] = None project: typing.Optional[int] = None - created_at: typing.Optional[dt.datetime] = None + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None + score: typing.Optional[float] = None + task: typing.Optional[int] = None updated_at: typing.Optional[dt.datetime] = None if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task_serializer_for_annotators.py b/src/label_studio_sdk/types/lse_task_serializer_for_annotators.py index 08864babe..1771d45f3 100644 --- a/src/label_studio_sdk/types/lse_task_serializer_for_annotators.py +++ b/src/label_studio_sdk/types/lse_task_serializer_for_annotators.py @@ -14,35 +14,35 @@ class LseTaskSerializerForAnnotators(UncheckedBaseModel): Task Serializer with project scheme configs validation """ - id: int - data: typing.Optional[typing.Any] = None + annotations: str + annotations_results: str + cancelled_annotations: typing.Optional[int] = None + comment_count: str + comments: str created_at: dt.datetime = pydantic.Field() """ Time a task was created """ - annotations: str + data: typing.Optional[typing.Any] = None + draft_exists: typing.Optional[bool] = None drafts: typing.List[LseTaskSerializerForAnnotatorsDraftsItem] = pydantic.Field() """ Drafts for this task """ - total_annotations: typing.Optional[int] = None - cancelled_annotations: typing.Optional[int] = None - annotations_results: str + id: int predictions: typing.List[LseTaskSerializerForAnnotatorsPredictionsItem] = pydantic.Field() """ Predictions for this task """ - total_predictions: typing.Optional[int] = None - predictions_score: typing.Optional[float] = None predictions_results: str - comments: str - comment_count: str - unresolved_comment_count: str + predictions_score: typing.Optional[float] = None reviews_rejected: typing.Optional[int] = None - draft_exists: typing.Optional[bool] = None + total_annotations: typing.Optional[int] = None + total_predictions: typing.Optional[int] = None + unresolved_comment_count: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py b/src/label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py index 03da5bcab..c06e3b47a 100644 --- a/src/label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py +++ b/src/label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py @@ -8,8 +8,8 @@ class LseTaskSerializerForAnnotatorsDraftsItem(UncheckedBaseModel): - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None created_at: typing.Optional[dt.datetime] = None + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None updated_at: typing.Optional[dt.datetime] = None if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py b/src/label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py index 857375446..e6c40584d 100644 --- a/src/label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py +++ b/src/label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py @@ -8,14 +8,14 @@ class LseTaskSerializerForAnnotatorsPredictionsItem(UncheckedBaseModel): - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None - score: typing.Optional[float] = None - model_version: typing.Optional[str] = None + created_at: typing.Optional[dt.datetime] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None model_run: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None - task: typing.Optional[int] = None + model_version: typing.Optional[str] = None project: typing.Optional[int] = None - created_at: typing.Optional[dt.datetime] = None + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None + score: typing.Optional[float] = None + task: typing.Optional[int] = None updated_at: typing.Optional[dt.datetime] = None if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task_serializer_for_reviewers.py b/src/label_studio_sdk/types/lse_task_serializer_for_reviewers.py index 97b105e2e..cbba184a8 100644 --- a/src/label_studio_sdk/types/lse_task_serializer_for_reviewers.py +++ b/src/label_studio_sdk/types/lse_task_serializer_for_reviewers.py @@ -2,10 +2,10 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .lse_task_serializer_for_reviewers_predictions_item import LseTaskSerializerForReviewersPredictionsItem import pydantic -from .lse_task_serializer_for_reviewers_drafts_item import LseTaskSerializerForReviewersDraftsItem import datetime as dt +from .lse_task_serializer_for_reviewers_drafts_item import LseTaskSerializerForReviewersDraftsItem +from .lse_task_serializer_for_reviewers_predictions_item import LseTaskSerializerForReviewersPredictionsItem from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -14,97 +14,97 @@ class LseTaskSerializerForReviewers(UncheckedBaseModel): Task Serializer with project scheme configs validation """ - id: int agreement: str - predictions: typing.List[LseTaskSerializerForReviewersPredictionsItem] = pydantic.Field() - """ - Predictions for this task - """ - annotations: str - drafts: typing.List[LseTaskSerializerForReviewersDraftsItem] = pydantic.Field() - """ - Drafts for this task - """ - + annotations_ids: str + annotations_results: str annotators: typing.List[int] = pydantic.Field() """ Annotators IDs who annotated this task """ - inner_id: typing.Optional[int] = None - cancelled_annotations: typing.Optional[int] = None - total_annotations: typing.Optional[int] = None - total_predictions: typing.Optional[int] = None - completed_at: typing.Optional[dt.datetime] = None - annotations_results: str - predictions_results: str - predictions_score: typing.Optional[float] = None - file_upload: str - storage_filename: str - annotations_ids: str - predictions_model_versions: str - avg_lead_time: typing.Optional[float] = None - draft_exists: typing.Optional[bool] = None - updated_by: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() + annotators_count: int = pydantic.Field() """ - User IDs who updated this task + The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. """ - reviewers: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] - comments: str + avg_lead_time: typing.Optional[float] = None + cancelled_annotations: typing.Optional[int] = None comment_authors: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] - reviewed: typing.Optional[bool] = None - reviews_accepted: typing.Optional[int] = None - reviews_rejected: typing.Optional[int] = None - ground_truth: typing.Optional[bool] = None - annotators_count: int = pydantic.Field() + comment_authors_count: int + comment_count: typing.Optional[int] = pydantic.Field(default=None) """ - The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. + Number of comments in the task including all annotations """ - reviewers_count: int - comment_authors_count: int - data: typing.Optional[typing.Any] = None - meta: typing.Optional[typing.Optional[typing.Any]] = None + comments: str + completed_at: typing.Optional[dt.datetime] = None created_at: dt.datetime = pydantic.Field() """ Time a task was created """ - updated_at: dt.datetime = pydantic.Field() + data: typing.Optional[typing.Any] = None + draft_exists: typing.Optional[bool] = None + drafts: typing.List[LseTaskSerializerForReviewersDraftsItem] = pydantic.Field() """ - Last time a task was updated + Drafts for this task """ + file_upload: str + ground_truth: typing.Optional[bool] = None + id: int + inner_id: typing.Optional[int] = None is_labeled: typing.Optional[bool] = pydantic.Field(default=None) """ True if the number of annotations for this task is greater than or equal to the number of maximum_completions for the project """ + last_comment_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the last comment was updated + """ + + meta: typing.Optional[typing.Optional[typing.Any]] = None overlap: typing.Optional[int] = pydantic.Field(default=None) """ Number of distinct annotators that processed the current task """ - comment_count: typing.Optional[int] = pydantic.Field(default=None) + predictions: typing.List[LseTaskSerializerForReviewersPredictionsItem] = pydantic.Field() """ - Number of comments in the task including all annotations + Predictions for this task """ + predictions_model_versions: str + predictions_results: str + predictions_score: typing.Optional[float] = None + project: typing.Optional[int] = pydantic.Field(default=None) + """ + Project ID for this task + """ + + reviewed: typing.Optional[bool] = None + reviewers: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] + reviewers_count: int + reviews_accepted: typing.Optional[int] = None + reviews_rejected: typing.Optional[int] = None + storage_filename: str + total_annotations: typing.Optional[int] = None + total_predictions: typing.Optional[int] = None unresolved_comment_count: typing.Optional[int] = pydantic.Field(default=None) """ Number of unresolved comments in the task including all annotations """ - last_comment_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + updated_at: dt.datetime = pydantic.Field() """ - When the last comment was updated + Last time a task was updated """ - project: typing.Optional[int] = pydantic.Field(default=None) + updated_by: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() """ - Project ID for this task + User IDs who updated this task """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py b/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py index b6830f7e4..16779d969 100644 --- a/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py +++ b/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py @@ -8,8 +8,8 @@ class LseTaskSerializerForReviewersDraftsItem(UncheckedBaseModel): - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None created_at: typing.Optional[dt.datetime] = None + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None updated_at: typing.Optional[dt.datetime] = None if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py b/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py index 9130009ee..399a50d45 100644 --- a/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py +++ b/src/label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py @@ -8,14 +8,14 @@ class LseTaskSerializerForReviewersPredictionsItem(UncheckedBaseModel): - result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None - score: typing.Optional[float] = None - model_version: typing.Optional[str] = None + created_at: typing.Optional[dt.datetime] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None model_run: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None - task: typing.Optional[int] = None + model_version: typing.Optional[str] = None project: typing.Optional[int] = None - created_at: typing.Optional[dt.datetime] = None + result: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None + score: typing.Optional[float] = None + task: typing.Optional[int] = None updated_at: typing.Optional[dt.datetime] = None if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/lse_user.py b/src/label_studio_sdk/types/lse_user.py index 1b0f98e25..5f146708c 100644 --- a/src/label_studio_sdk/types/lse_user.py +++ b/src/label_studio_sdk/types/lse_user.py @@ -2,10 +2,10 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic -from .organization_membership import OrganizationMembership +import datetime as dt from .lse_fields import LseFields +from .organization_membership import OrganizationMembership from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -17,16 +17,6 @@ class LseUser(UncheckedBaseModel): values with complex, nested serializations """ - id: int - first_name: typing.Optional[str] = None - last_name: typing.Optional[str] = None - username: str - email: typing.Optional[str] = None - last_activity: dt.datetime - custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = None - avatar: str - initials: str - phone: typing.Optional[str] = None active_organization: typing.Optional[int] = None active_organization_meta: str allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None) @@ -34,10 +24,20 @@ class LseUser(UncheckedBaseModel): Allow sending newsletters to user """ + avatar: str + custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = None date_joined: typing.Optional[dt.datetime] = None - org_membership: typing.List[OrganizationMembership] + email: typing.Optional[str] = None + first_name: typing.Optional[str] = None + id: int + initials: str + last_activity: dt.datetime + last_name: typing.Optional[str] = None lse_fields: LseFields + org_membership: typing.List[OrganizationMembership] pause: str + phone: typing.Optional[str] = None + username: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lse_user_api.py b/src/label_studio_sdk/types/lse_user_api.py index eea9fed45..b7ca5dd85 100644 --- a/src/label_studio_sdk/types/lse_user_api.py +++ b/src/label_studio_sdk/types/lse_user_api.py @@ -2,8 +2,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic +import datetime as dt from .organization_membership import OrganizationMembership from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -16,16 +16,6 @@ class LseUserApi(UncheckedBaseModel): values with complex, nested serializations """ - id: int - first_name: typing.Optional[str] = None - last_name: typing.Optional[str] = None - username: str - email: typing.Optional[str] = None - last_activity: dt.datetime - custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = None - avatar: str - initials: str - phone: typing.Optional[str] = None active_organization: typing.Optional[int] = None active_organization_meta: str allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None) @@ -33,8 +23,18 @@ class LseUserApi(UncheckedBaseModel): Allow sending newsletters to user """ + avatar: str + custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = None date_joined: typing.Optional[dt.datetime] = None + email: typing.Optional[str] = None + first_name: typing.Optional[str] = None + id: int + initials: str + last_activity: dt.datetime + last_name: typing.Optional[str] = None org_membership: typing.List[OrganizationMembership] + phone: typing.Optional[str] = None + username: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lse_user_organization_member_list.py b/src/label_studio_sdk/types/lse_user_organization_member_list.py index 7699d06a8..f81384b59 100644 --- a/src/label_studio_sdk/types/lse_user_organization_member_list.py +++ b/src/label_studio_sdk/types/lse_user_organization_member_list.py @@ -2,8 +2,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic +import datetime as dt from .lse_fields import LseFields from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -16,27 +16,27 @@ class LseUserOrganizationMemberList(UncheckedBaseModel): values with complex, nested serializations """ - id: int - first_name: typing.Optional[str] = None - last_name: typing.Optional[str] = None - username: str - email: typing.Optional[str] = None - last_activity: dt.datetime - custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = None - avatar: str - initials: str - phone: typing.Optional[str] = None active_organization: typing.Optional[int] = None allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None) """ Allow sending newsletters to user """ + avatar: str + contributed_to_projects: str + created_projects: str + custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = None date_joined: typing.Optional[dt.datetime] = None + email: typing.Optional[str] = None + first_name: typing.Optional[str] = None + id: int + initials: str + last_activity: dt.datetime + last_name: typing.Optional[str] = None lse_fields: LseFields pause: str - created_projects: str - contributed_to_projects: str + phone: typing.Optional[str] = None + username: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lseapi_token_create.py b/src/label_studio_sdk/types/lseapi_token_create.py index 0eeb74adf..166b8c171 100644 --- a/src/label_studio_sdk/types/lseapi_token_create.py +++ b/src/label_studio_sdk/types/lseapi_token_create.py @@ -7,9 +7,9 @@ class LseapiTokenCreate(UncheckedBaseModel): - token: str created_at: str expires_at: str + token: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lseapi_token_list.py b/src/label_studio_sdk/types/lseapi_token_list.py index 5daca4c68..65f3bcef3 100644 --- a/src/label_studio_sdk/types/lseapi_token_list.py +++ b/src/label_studio_sdk/types/lseapi_token_list.py @@ -7,9 +7,9 @@ class LseapiTokenList(UncheckedBaseModel): - token: str created_at: str expires_at: str + token: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/lsejwt_settings.py b/src/label_studio_sdk/types/lsejwt_settings.py index 8bf3497ac..aec3d52ba 100644 --- a/src/label_studio_sdk/types/lsejwt_settings.py +++ b/src/label_studio_sdk/types/lsejwt_settings.py @@ -7,6 +7,11 @@ class LsejwtSettings(UncheckedBaseModel): + api_token_ttl_days: typing.Optional[int] = pydantic.Field(default=None) + """ + Number of days before JWT API tokens expire + """ + api_tokens_enabled: typing.Optional[bool] = pydantic.Field(default=None) """ Enable JWT API token authentication for this organization @@ -17,11 +22,6 @@ class LsejwtSettings(UncheckedBaseModel): Enable legacy API token authentication for this organization """ - api_token_ttl_days: typing.Optional[int] = pydantic.Field(default=None) - """ - Number of days before JWT API tokens expire - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/ml_backend.py b/src/label_studio_sdk/types/ml_backend.py index 2640d5e32..e3e3b6324 100644 --- a/src/label_studio_sdk/types/ml_backend.py +++ b/src/label_studio_sdk/types/ml_backend.py @@ -2,10 +2,10 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .state_enum import StateEnum -import pydantic from .auth_method_enum import AuthMethodEnum +import pydantic import datetime as dt +from .state_enum import StateEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -14,60 +14,59 @@ class MlBackend(UncheckedBaseModel): Serializer for MLBackend model. """ - id: int - state: typing.Optional[StateEnum] = None - readable_state: str - is_interactive: typing.Optional[bool] = pydantic.Field(default=None) - """ - Used to interactively annotate tasks. If true, model returns one list with results - """ - - url: str = pydantic.Field() + auth_method: typing.Optional[AuthMethodEnum] = None + auto_update: typing.Optional[bool] = pydantic.Field(default=None) """ - URL for the machine learning model server + If false, model version is set by the user, if true - getting latest version from backend. """ - error_message: typing.Optional[str] = pydantic.Field(default=None) + basic_auth_pass_is_set: str + basic_auth_user: typing.Optional[str] = pydantic.Field(default=None) """ - Error message in error state + HTTP Basic Auth user """ - title: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime + description: typing.Optional[str] = pydantic.Field(default=None) """ - Name of the machine learning backend + Description for the machine learning backend """ - auth_method: typing.Optional[AuthMethodEnum] = None - basic_auth_user: typing.Optional[str] = pydantic.Field(default=None) + error_message: typing.Optional[str] = pydantic.Field(default=None) """ - HTTP Basic Auth user + Error message in error state """ - basic_auth_pass_is_set: str - description: typing.Optional[str] = pydantic.Field(default=None) + extra_params: typing.Optional[typing.Optional[typing.Any]] = None + id: int + is_interactive: typing.Optional[bool] = pydantic.Field(default=None) """ - Description for the machine learning backend + Used to interactively annotate tasks. If true, model returns one list with results """ - extra_params: typing.Optional[typing.Optional[typing.Any]] = None model_version: typing.Optional[str] = pydantic.Field(default=None) """ Current model version associated with this machine learning backend """ + project: int + readable_state: str + state: typing.Optional[StateEnum] = None timeout: typing.Optional[float] = pydantic.Field(default=None) """ Response model timeout """ - created_at: dt.datetime - updated_at: dt.datetime - auto_update: typing.Optional[bool] = pydantic.Field(default=None) + title: typing.Optional[str] = pydantic.Field(default=None) """ - If false, model version is set by the user, if true - getting latest version from backend. + Name of the machine learning backend """ - project: int + updated_at: dt.datetime + url: str = pydantic.Field() + """ + URL for the machine learning model server + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/model_interface.py b/src/label_studio_sdk/types/model_interface.py index aaae674ef..5bd1e563b 100644 --- a/src/label_studio_sdk/types/model_interface.py +++ b/src/label_studio_sdk/types/model_interface.py @@ -2,37 +2,37 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +import datetime as dt from .user_simple import UserSimple import pydantic from .skill_name_enum import SkillNameEnum -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ModelInterface(UncheckedBaseModel): - id: int + associated_projects: typing.Optional[typing.List[int]] = None + created_at: dt.datetime created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) """ User who created Dataset """ - skill_name: typing.Optional[SkillNameEnum] = None - title: str = pydantic.Field() - """ - Model name - """ - description: typing.Optional[str] = pydantic.Field(default=None) """ Model description """ - created_at: dt.datetime - updated_at: dt.datetime + id: int input_fields: typing.Optional[typing.Optional[typing.Any]] = None - output_classes: typing.Optional[typing.Optional[typing.Any]] = None organization: typing.Optional[int] = None - associated_projects: typing.Optional[typing.List[int]] = None + output_classes: typing.Optional[typing.Optional[typing.Any]] = None + skill_name: typing.Optional[SkillNameEnum] = None + title: str = pydantic.Field() + """ + Model name + """ + + updated_at: dt.datetime if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/model_interface_request.py b/src/label_studio_sdk/types/model_interface_request.py index 3fe67fe65..2ab82a53c 100644 --- a/src/label_studio_sdk/types/model_interface_request.py +++ b/src/label_studio_sdk/types/model_interface_request.py @@ -9,26 +9,25 @@ class ModelInterfaceRequest(UncheckedBaseModel): + associated_projects: typing.Optional[typing.List[int]] = None created_by: typing.Optional[UserSimpleRequest] = pydantic.Field(default=None) """ User who created Dataset """ - skill_name: typing.Optional[SkillNameEnum] = None - title: str = pydantic.Field() - """ - Model name - """ - description: typing.Optional[str] = pydantic.Field(default=None) """ Model description """ input_fields: typing.Optional[typing.Optional[typing.Any]] = None - output_classes: typing.Optional[typing.Optional[typing.Any]] = None organization: typing.Optional[int] = None - associated_projects: typing.Optional[typing.List[int]] = None + output_classes: typing.Optional[typing.Optional[typing.Any]] = None + skill_name: typing.Optional[SkillNameEnum] = None + title: str = pydantic.Field() + """ + Model name + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/model_interface_serializer_get.py b/src/label_studio_sdk/types/model_interface_serializer_get.py index 98e996005..66b66cb00 100644 --- a/src/label_studio_sdk/types/model_interface_serializer_get.py +++ b/src/label_studio_sdk/types/model_interface_serializer_get.py @@ -2,38 +2,38 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .associated_project import AssociatedProject +import datetime as dt from .user_simple import UserSimple import pydantic from .skill_name_enum import SkillNameEnum -from .associated_project import AssociatedProject -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ModelInterfaceSerializerGet(UncheckedBaseModel): - id: int + associated_projects: typing.Optional[typing.List[AssociatedProject]] = None + created_at: dt.datetime created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) """ User who created Dataset """ - skill_name: typing.Optional[SkillNameEnum] = None - associated_projects: typing.Optional[typing.List[AssociatedProject]] = None - title: str = pydantic.Field() - """ - Model name - """ - description: typing.Optional[str] = pydantic.Field(default=None) """ Model description """ - created_at: dt.datetime - updated_at: dt.datetime + id: int input_fields: typing.Optional[typing.Optional[typing.Any]] = None - output_classes: typing.Optional[typing.Optional[typing.Any]] = None organization: typing.Optional[int] = None + output_classes: typing.Optional[typing.Optional[typing.Any]] = None + skill_name: typing.Optional[SkillNameEnum] = None + title: str = pydantic.Field() + """ + Model name + """ + + updated_at: dt.datetime if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/model_provider_connection.py b/src/label_studio_sdk/types/model_provider_connection.py index 09642dca0..fc43f6646 100644 --- a/src/label_studio_sdk/types/model_provider_connection.py +++ b/src/label_studio_sdk/types/model_provider_connection.py @@ -1,43 +1,43 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -from .user_simple import UserSimple -import pydantic import typing -from .provider_enum import ProviderEnum -from .scope_enum import ScopeEnum +import pydantic import datetime as dt from .model_provider_connection_budget_reset_period import ModelProviderConnectionBudgetResetPeriod +from .user_simple import UserSimple +from .provider_enum import ProviderEnum +from .scope_enum import ScopeEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ModelProviderConnection(UncheckedBaseModel): - id: int - created_by: UserSimple - model_params: str = pydantic.Field() + budget_alert_threshold: typing.Optional[float] = pydantic.Field(default=None) """ - JSON schema for the model parameters available for the provider + Budget alert threshold for the given provider connection """ - provider: typing.Optional[ProviderEnum] = None - deployment_name: typing.Optional[str] = pydantic.Field(default=None) + budget_last_reset_date: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Azure OpenAI deployment name + Date and time the budget was last reset """ - endpoint: typing.Optional[str] = pydantic.Field(default=None) + budget_limit: typing.Optional[float] = pydantic.Field(default=None) """ - Azure OpenAI endpoint + Budget limit for the model provider connection (null if unlimited) """ - google_project_id: typing.Optional[str] = pydantic.Field(default=None) + budget_reset_period: typing.Optional[ModelProviderConnectionBudgetResetPeriod] = pydantic.Field(default=None) """ - Google project ID + Budget reset period for the model provider connection (null if not reset) + + * `Monthly` - Monthly + * `Yearly` - Yearly """ - google_location: typing.Optional[str] = pydantic.Field(default=None) + budget_total_spent: typing.Optional[float] = pydantic.Field(default=None) """ - Google project location + Tracked total budget spent for the given provider connection within the current budget period """ cached_available_models: typing.Optional[str] = pydantic.Field(default=None) @@ -45,43 +45,43 @@ class ModelProviderConnection(UncheckedBaseModel): List of available models from the provider """ - scope: typing.Optional[ScopeEnum] = None created_at: dt.datetime - updated_at: dt.datetime - is_internal: typing.Optional[bool] = pydantic.Field(default=None) + created_by: UserSimple + deployment_name: typing.Optional[str] = pydantic.Field(default=None) """ - Whether the model provider connection is internal, not visible to the user + Azure OpenAI deployment name """ - budget_limit: typing.Optional[float] = pydantic.Field(default=None) + endpoint: typing.Optional[str] = pydantic.Field(default=None) """ - Budget limit for the model provider connection (null if unlimited) + Azure OpenAI endpoint """ - budget_last_reset_date: typing.Optional[dt.datetime] = pydantic.Field(default=None) + google_location: typing.Optional[str] = pydantic.Field(default=None) """ - Date and time the budget was last reset + Google project location """ - budget_reset_period: typing.Optional[ModelProviderConnectionBudgetResetPeriod] = pydantic.Field(default=None) + google_project_id: typing.Optional[str] = pydantic.Field(default=None) """ - Budget reset period for the model provider connection (null if not reset) - - * `Monthly` - Monthly - * `Yearly` - Yearly + Google project ID """ - budget_total_spent: typing.Optional[float] = pydantic.Field(default=None) + id: int + is_internal: typing.Optional[bool] = pydantic.Field(default=None) """ - Tracked total budget spent for the given provider connection within the current budget period + Whether the model provider connection is internal, not visible to the user """ - budget_alert_threshold: typing.Optional[float] = pydantic.Field(default=None) + model_params: str = pydantic.Field() """ - Budget alert threshold for the given provider connection + JSON schema for the model parameters available for the provider """ organization: typing.Optional[int] = None + provider: typing.Optional[ProviderEnum] = None + scope: typing.Optional[ScopeEnum] = None + updated_at: dt.datetime if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/model_provider_connection_request.py b/src/label_studio_sdk/types/model_provider_connection_request.py index 067a82575..a380eb9dc 100644 --- a/src/label_studio_sdk/types/model_provider_connection_request.py +++ b/src/label_studio_sdk/types/model_provider_connection_request.py @@ -2,14 +2,13 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .provider_enum import ProviderEnum import pydantic +from .provider_enum import ProviderEnum from .scope_enum import ScopeEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ModelProviderConnectionRequest(UncheckedBaseModel): - provider: typing.Optional[ProviderEnum] = None api_key: typing.Optional[str] = pydantic.Field(default=None) """ Model provider API key @@ -20,6 +19,16 @@ class ModelProviderConnectionRequest(UncheckedBaseModel): Model provider Auth token """ + budget_alert_threshold: typing.Optional[float] = pydantic.Field(default=None) + """ + Budget alert threshold for the given provider connection + """ + + cached_available_models: typing.Optional[str] = pydantic.Field(default=None) + """ + List of available models from the provider + """ + deployment_name: typing.Optional[str] = pydantic.Field(default=None) """ Azure OpenAI deployment name @@ -35,31 +44,23 @@ class ModelProviderConnectionRequest(UncheckedBaseModel): The content of GOOGLE_APPLICATION_CREDENTIALS json file """ - google_project_id: typing.Optional[str] = pydantic.Field(default=None) - """ - Google project ID - """ - google_location: typing.Optional[str] = pydantic.Field(default=None) """ Google project location """ - cached_available_models: typing.Optional[str] = pydantic.Field(default=None) + google_project_id: typing.Optional[str] = pydantic.Field(default=None) """ - List of available models from the provider + Google project ID """ - scope: typing.Optional[ScopeEnum] = None is_internal: typing.Optional[bool] = pydantic.Field(default=None) """ Whether the model provider connection is internal, not visible to the user """ - budget_alert_threshold: typing.Optional[float] = pydantic.Field(default=None) - """ - Budget alert threshold for the given provider connection - """ + provider: typing.Optional[ProviderEnum] = None + scope: typing.Optional[ScopeEnum] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/model_run.py b/src/label_studio_sdk/types/model_run.py index 242ab28ae..d48db8fab 100644 --- a/src/label_studio_sdk/types/model_run.py +++ b/src/label_studio_sdk/types/model_run.py @@ -2,33 +2,33 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +import datetime as dt +import pydantic from .project_subset_enum import ProjectSubsetEnum from .model_run_status_enum import ModelRunStatusEnum -import pydantic -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ModelRun(UncheckedBaseModel): + completed_at: typing.Optional[dt.datetime] = None + created_at: dt.datetime + created_by: typing.Optional[int] = None id: int - parent_model: int - project_subset: typing.Optional[ProjectSubsetEnum] = None - status: ModelRunStatusEnum job_id: typing.Optional[str] = pydantic.Field(default=None) """ Job ID for inference job for a ModelRun e.g. Adala job ID """ - total_predictions: typing.Optional[int] = None + organization: typing.Optional[int] = None + parent_model: int + predictions_updated_at: typing.Optional[dt.datetime] = None + project: int + project_subset: typing.Optional[ProjectSubsetEnum] = None + status: ModelRunStatusEnum total_correct_predictions: typing.Optional[int] = None + total_predictions: typing.Optional[int] = None total_tasks: typing.Optional[int] = None - created_at: dt.datetime triggered_at: typing.Optional[dt.datetime] = None - predictions_updated_at: typing.Optional[dt.datetime] = None - completed_at: typing.Optional[dt.datetime] = None - organization: typing.Optional[int] = None - project: int - created_by: typing.Optional[int] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/organization_billing.py b/src/label_studio_sdk/types/organization_billing.py index fdd7ad6a2..7978de74a 100644 --- a/src/label_studio_sdk/types/organization_billing.py +++ b/src/label_studio_sdk/types/organization_billing.py @@ -7,8 +7,8 @@ class OrganizationBilling(UncheckedBaseModel): - manual_workspace_management: str manual_role_management: str + manual_workspace_management: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/organization_id.py b/src/label_studio_sdk/types/organization_id.py index 1f5d4a7d7..e9b5cf95c 100644 --- a/src/label_studio_sdk/types/organization_id.py +++ b/src/label_studio_sdk/types/organization_id.py @@ -13,10 +13,10 @@ class OrganizationId(UncheckedBaseModel): which fields should be displayed. """ - id: int - title: str contact_info: typing.Optional[str] = None created_at: dt.datetime + id: int + title: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/organization_invite.py b/src/label_studio_sdk/types/organization_invite.py index c09f085e8..b7273f8fe 100644 --- a/src/label_studio_sdk/types/organization_invite.py +++ b/src/label_studio_sdk/types/organization_invite.py @@ -7,8 +7,8 @@ class OrganizationInvite(UncheckedBaseModel): - token: typing.Optional[str] = None invite_url: typing.Optional[str] = None + token: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/organization_member.py b/src/label_studio_sdk/types/organization_member.py index f0669ac46..036294c75 100644 --- a/src/label_studio_sdk/types/organization_member.py +++ b/src/label_studio_sdk/types/organization_member.py @@ -1,8 +1,8 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -import pydantic import datetime as dt +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing @@ -13,19 +13,18 @@ class OrganizationMember(UncheckedBaseModel): which fields should be displayed. """ - user: int = pydantic.Field() - """ - User ID - """ - + annotations_count: str + contributed_projects_count: str + created_at: dt.datetime organization: int = pydantic.Field() """ Organization ID """ - contributed_projects_count: str - annotations_count: str - created_at: dt.datetime + user: int = pydantic.Field() + """ + User ID + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/organization_membership.py b/src/label_studio_sdk/types/organization_membership.py index 4fd44a12d..c63919b0c 100644 --- a/src/label_studio_sdk/types/organization_membership.py +++ b/src/label_studio_sdk/types/organization_membership.py @@ -7,13 +7,14 @@ class OrganizationMembership(UncheckedBaseModel): - role: str active: str organization_id: int = pydantic.Field() """ Organization ID """ + role: str + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/pause.py b/src/label_studio_sdk/types/pause.py index d49af7eb7..5c9516c6f 100644 --- a/src/label_studio_sdk/types/pause.py +++ b/src/label_studio_sdk/types/pause.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -import typing +import datetime as dt import pydantic +import typing from .user_simple import UserSimple from .reason_enum import ReasonEnum -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -17,18 +17,28 @@ class Pause(UncheckedBaseModel): values with complex, nested serializations """ - id: int - project: typing.Optional[int] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Related project for which the pause is set + Timestamp when this pause record was created """ - user: typing.Optional[int] = pydantic.Field(default=None) + deleted_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - User who is paused + Timestamp when this pause record was soft-deleted + """ + + deleted_by: typing.Optional[int] = pydantic.Field(default=None) + """ + User who soft-deleted this pause record """ + id: int paused_by: UserSimple + project: typing.Optional[int] = pydantic.Field(default=None) + """ + Related project for which the pause is set + """ + reason: ReasonEnum = pydantic.Field() """ Reason for pausing @@ -40,29 +50,19 @@ class Pause(UncheckedBaseModel): * `CUSTOM_SCRIPT` - Custom script """ - verbose_reason: typing.Optional[str] = pydantic.Field(default=None) - """ - Detailed description of why the project is paused, will be readable by paused annotators - """ - - deleted_by: typing.Optional[int] = pydantic.Field(default=None) - """ - User who soft-deleted this pause record - """ - - deleted_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + updated_at: dt.datetime = pydantic.Field() """ - Timestamp when this pause record was soft-deleted + Timestamp when this pause record was last updated """ - created_at: dt.datetime = pydantic.Field() + user: typing.Optional[int] = pydantic.Field(default=None) """ - Timestamp when this pause record was created + User who is paused """ - updated_at: dt.datetime = pydantic.Field() + verbose_reason: typing.Optional[str] = pydantic.Field(default=None) """ - Timestamp when this pause record was last updated + Detailed description of why the project is paused, will be readable by paused annotators """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/prediction.py b/src/label_studio_sdk/types/prediction.py index 1bbc2914a..8e38d1a0d 100644 --- a/src/label_studio_sdk/types/prediction.py +++ b/src/label_studio_sdk/types/prediction.py @@ -8,52 +8,52 @@ class Prediction(UncheckedBaseModel): - id: int - result: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() + cluster: typing.Optional[int] = pydantic.Field(default=None) """ - List of prediction results for the task + Cluster for the current prediction """ - model_version: typing.Optional[str] = pydantic.Field(default=None) + created_ago: str = pydantic.Field() """ - Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + Delta time from creation time """ - created_ago: str = pydantic.Field() + created_at: dt.datetime + id: int + mislabeling: typing.Optional[float] = pydantic.Field(default=None) """ - Delta time from creation time + Related task mislabeling score """ - score: typing.Optional[float] = pydantic.Field(default=None) + model: typing.Optional[int] = pydantic.Field(default=None) """ - Prediction score + An ML Backend instance that created the prediction. """ - cluster: typing.Optional[int] = pydantic.Field(default=None) + model_run: typing.Optional[int] = pydantic.Field(default=None) """ - Cluster for the current prediction + A run of a ModelVersion that created the prediction. """ - neighbors: typing.Optional[typing.Optional[typing.Any]] = None - mislabeling: typing.Optional[float] = pydantic.Field(default=None) + model_version: typing.Optional[str] = pydantic.Field(default=None) """ - Related task mislabeling score + Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface """ - created_at: dt.datetime - updated_at: dt.datetime - model: typing.Optional[int] = pydantic.Field(default=None) + neighbors: typing.Optional[typing.Optional[typing.Any]] = None + project: typing.Optional[int] = None + result: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() """ - An ML Backend instance that created the prediction. + List of prediction results for the task """ - model_run: typing.Optional[int] = pydantic.Field(default=None) + score: typing.Optional[float] = pydantic.Field(default=None) """ - A run of a ModelVersion that created the prediction. + Prediction score """ task: int - project: typing.Optional[int] = None + updated_at: dt.datetime if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/prediction_request.py b/src/label_studio_sdk/types/prediction_request.py index 3ee129ef9..e352f6086 100644 --- a/src/label_studio_sdk/types/prediction_request.py +++ b/src/label_studio_sdk/types/prediction_request.py @@ -7,44 +7,44 @@ class PredictionRequest(UncheckedBaseModel): - result: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() + cluster: typing.Optional[int] = pydantic.Field(default=None) """ - List of prediction results for the task + Cluster for the current prediction """ - model_version: typing.Optional[str] = pydantic.Field(default=None) + mislabeling: typing.Optional[float] = pydantic.Field(default=None) """ - Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface + Related task mislabeling score """ - score: typing.Optional[float] = pydantic.Field(default=None) + model: typing.Optional[int] = pydantic.Field(default=None) """ - Prediction score + An ML Backend instance that created the prediction. """ - cluster: typing.Optional[int] = pydantic.Field(default=None) + model_run: typing.Optional[int] = pydantic.Field(default=None) """ - Cluster for the current prediction + A run of a ModelVersion that created the prediction. """ - neighbors: typing.Optional[typing.Optional[typing.Any]] = None - mislabeling: typing.Optional[float] = pydantic.Field(default=None) + model_version: typing.Optional[str] = pydantic.Field(default=None) """ - Related task mislabeling score + Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface """ - model: typing.Optional[int] = pydantic.Field(default=None) + neighbors: typing.Optional[typing.Optional[typing.Any]] = None + project: typing.Optional[int] = None + result: typing.List[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field() """ - An ML Backend instance that created the prediction. + List of prediction results for the task """ - model_run: typing.Optional[int] = pydantic.Field(default=None) + score: typing.Optional[float] = pydantic.Field(default=None) """ - A run of a ModelVersion that created the prediction. + Prediction score """ task: int - project: typing.Optional[int] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/project.py b/src/label_studio_sdk/types/project.py index e5aa77f27..8560ddd5d 100644 --- a/src/label_studio_sdk/types/project.py +++ b/src/label_studio_sdk/types/project.py @@ -3,8 +3,8 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing import pydantic -from .user_simple import UserSimple import datetime as dt +from .user_simple import UserSimple from .project_sampling import ProjectSampling from .project_skip_queue import ProjectSkipQueue from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -16,10 +16,22 @@ class Project(UncheckedBaseModel): make sure, that you use correct one(Project.objects.with_counts()) """ - id: int - title: typing.Optional[str] = pydantic.Field(default=None) + color: typing.Optional[str] = None + config_has_control_tags: bool = pydantic.Field() """ - Project name. Must be between 3 and 50 characters long. + Flag to detect is project ready for labeling + """ + + config_suitable_for_bulk_annotation: bool = pydantic.Field() + """ + Flag to detect is project ready for bulk annotation + """ + + control_weights: typing.Optional[typing.Optional[typing.Any]] = None + created_at: dt.datetime + created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) + """ + Project owner """ description: typing.Optional[str] = pydantic.Field(default=None) @@ -27,9 +39,14 @@ class Project(UncheckedBaseModel): Project description """ - label_config: typing.Optional[str] = pydantic.Field(default=None) + enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) """ - Label config in XML format. See more about it in documentation + Allow annotators to submit empty annotations + """ + + evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) + """ + Retrieve and display predictions when loading a task """ expert_instruction: typing.Optional[str] = pydantic.Field(default=None) @@ -37,36 +54,40 @@ class Project(UncheckedBaseModel): Labeling instructions in HTML format """ - show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + finished_task_number: int = pydantic.Field() """ - Show instructions to the annotator before they start + Finished tasks """ - show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) + ground_truth_number: int = pydantic.Field() """ - Show a skip button in interface and allow annotators to skip the task + Honeypot annotation number in project """ - enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) + id: int + is_draft: typing.Optional[bool] = pydantic.Field(default=None) """ - Allow annotators to submit empty annotations + Whether or not the project is in the middle of being created """ - show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) + is_published: typing.Optional[bool] = pydantic.Field(default=None) """ - Show annotation history to annotator + Whether or not the project is published to annotators + """ + + label_config: typing.Optional[str] = pydantic.Field(default=None) + """ + Label config in XML format. See more about it in documentation """ - organization: typing.Optional[int] = None - color: typing.Optional[str] = None maximum_annotations: typing.Optional[int] = pydantic.Field(default=None) """ Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) """ - is_published: typing.Optional[bool] = pydantic.Field(default=None) + min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) """ - Whether or not the project is published to annotators + Minimum number of completed tasks after which model training is started """ model_version: typing.Optional[str] = pydantic.Field(default=None) @@ -74,25 +95,30 @@ class Project(UncheckedBaseModel): Machine learning model version """ - is_draft: typing.Optional[bool] = pydantic.Field(default=None) + num_tasks_with_annotations: int = pydantic.Field() """ - Whether or not the project is in the middle of being created + Tasks with annotations count """ - created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) + organization: typing.Optional[int] = None + overlap_cohort_percentage: typing.Optional[int] = None + parsed_label_config: typing.Optional[typing.Any] = None + pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Project owner + Pinned date and time """ - created_at: dt.datetime - min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) + queue_done: int + queue_total: int + reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) """ - Minimum number of completed tasks after which model training is started + Reveal pre-annotations interactively """ - start_training_on_annotation_update: bool = pydantic.Field() + sampling: typing.Optional[ProjectSampling] = None + show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) """ - Start model training after any annotations are submitted or updated + Show annotation history to annotator """ show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) @@ -100,45 +126,29 @@ class Project(UncheckedBaseModel): If set, the annotator can view model predictions """ - num_tasks_with_annotations: int = pydantic.Field() - """ - Tasks with annotations count - """ - - task_number: int = pydantic.Field() - """ - Total task number in project - """ - - useful_annotation_number: int = pydantic.Field() + show_ground_truth_first: typing.Optional[bool] = None + show_instruction: typing.Optional[bool] = pydantic.Field(default=None) """ - Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number + Show instructions to the annotator before they start """ - ground_truth_number: int = pydantic.Field() + show_overlap_first: typing.Optional[bool] = None + show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) """ - Honeypot annotation number in project + Show a skip button in interface and allow annotators to skip the task """ + skip_queue: typing.Optional[ProjectSkipQueue] = None skipped_annotations_number: int = pydantic.Field() """ Skipped by collaborators annotation number in project """ - total_annotations_number: int = pydantic.Field() - """ - Total annotations number in project including skipped_annotations_number and ground_truth_number. - """ - - total_predictions_number: int = pydantic.Field() + start_training_on_annotation_update: bool = pydantic.Field() """ - Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. + Start model training after any annotations are submitted or updated """ - sampling: typing.Optional[ProjectSampling] = None - show_ground_truth_first: typing.Optional[bool] = None - show_overlap_first: typing.Optional[bool] = None - overlap_cohort_percentage: typing.Optional[int] = None task_data_login: typing.Optional[str] = pydantic.Field(default=None) """ Task data credentials: login @@ -149,39 +159,29 @@ class Project(UncheckedBaseModel): Task data credentials: password """ - control_weights: typing.Optional[typing.Optional[typing.Any]] = None - parsed_label_config: typing.Optional[typing.Any] = None - evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) - """ - Retrieve and display predictions when loading a task - """ - - config_has_control_tags: bool = pydantic.Field() + task_number: int = pydantic.Field() """ - Flag to detect is project ready for labeling + Total task number in project """ - skip_queue: typing.Optional[ProjectSkipQueue] = None - reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) + title: typing.Optional[str] = pydantic.Field(default=None) """ - Reveal pre-annotations interactively + Project name. Must be between 3 and 50 characters long. """ - pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + total_annotations_number: int = pydantic.Field() """ - Pinned date and time + Total annotations number in project including skipped_annotations_number and ground_truth_number. """ - finished_task_number: int = pydantic.Field() + total_predictions_number: int = pydantic.Field() """ - Finished tasks + Total predictions number in project including skipped_annotations_number, ground_truth_number, and useful_annotation_number. """ - queue_total: int - queue_done: int - config_suitable_for_bulk_annotation: bool = pydantic.Field() + useful_annotation_number: int = pydantic.Field() """ - Flag to detect is project ready for bulk annotation + Useful annotation number in project not including skipped_annotations_number and ground_truth_number. Total annotations = annotation_number + skipped_annotations_number + ground_truth_number """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/project_import.py b/src/label_studio_sdk/types/project_import.py index c4bee40ba..d283a3d86 100644 --- a/src/label_studio_sdk/types/project_import.py +++ b/src/label_studio_sdk/types/project_import.py @@ -2,46 +2,46 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .status7bf_enum import Status7BfEnum import datetime as dt import pydantic +from .status7bf_enum import Status7BfEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ProjectImport(UncheckedBaseModel): - id: int - project: typing.Optional[int] = None - preannotated_from_fields: typing.Optional[typing.Optional[typing.Any]] = None + annotation_count: typing.Optional[int] = None commit_to_project: typing.Optional[bool] = None - return_task_ids: typing.Optional[bool] = None - status: typing.Optional[Status7BfEnum] = None - url: typing.Optional[str] = None - error: typing.Optional[str] = None + could_be_tasks_list: typing.Optional[bool] = None created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Creation time """ - updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - Updated time - """ - + data_columns: typing.Optional[typing.Optional[typing.Any]] = None + duration: typing.Optional[int] = None + error: typing.Optional[str] = None + file_upload_ids: typing.Optional[typing.Optional[typing.Any]] = None finished_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Complete or fail time """ - task_count: typing.Optional[int] = None - annotation_count: typing.Optional[int] = None - prediction_count: typing.Optional[int] = None - duration: typing.Optional[int] = None - file_upload_ids: typing.Optional[typing.Optional[typing.Any]] = None - could_be_tasks_list: typing.Optional[bool] = None found_formats: typing.Optional[typing.Optional[typing.Any]] = None - data_columns: typing.Optional[typing.Optional[typing.Any]] = None - tasks: typing.Optional[typing.Optional[typing.Any]] = None + id: int + preannotated_from_fields: typing.Optional[typing.Optional[typing.Any]] = None + prediction_count: typing.Optional[int] = None + project: typing.Optional[int] = None + return_task_ids: typing.Optional[bool] = None + status: typing.Optional[Status7BfEnum] = None + task_count: typing.Optional[int] = None task_ids: typing.Optional[typing.Optional[typing.Any]] = None + tasks: typing.Optional[typing.Optional[typing.Any]] = None + updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + Updated time + """ + + url: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/redis_export_storage.py b/src/label_studio_sdk/types/redis_export_storage.py index 492553049..44404a8f4 100644 --- a/src/label_studio_sdk/types/redis_export_storage.py +++ b/src/label_studio_sdk/types/redis_export_storage.py @@ -9,39 +9,32 @@ class RedisExportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - path: typing.Optional[str] = pydantic.Field(default=None) - """ - Storage prefix (optional) - """ - - host: typing.Optional[str] = pydantic.Field(default=None) + can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) """ - Server Host IP (optional) + Deletion from storage enabled """ - port: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Server Port (optional) + Creation time """ - password: typing.Optional[str] = pydantic.Field(default=None) + db: typing.Optional[int] = pydantic.Field(default=None) """ - Server Password (optional) + Server Database """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Cloud storage description """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + host: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Server Host IP (optional) """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -57,41 +50,48 @@ class RedisExportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + password: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + Server Password (optional) """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + path: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + Storage prefix (optional) """ - description: typing.Optional[str] = pydantic.Field(default=None) + port: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + Server Port (optional) """ - created_at: dt.datetime = pydantic.Field() + project: int = pydantic.Field() """ - Creation time + A unique integer value identifying this project. """ - can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Deletion from storage enabled + Cloud storage regex for filtering objects """ - db: typing.Optional[int] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Server Database + Cloud storage title """ - project: int = pydantic.Field() + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Traceback report for the last failed sync + """ + + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + """ + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/redis_import_storage.py b/src/label_studio_sdk/types/redis_import_storage.py index b5535c2fd..5a81e00a9 100644 --- a/src/label_studio_sdk/types/redis_import_storage.py +++ b/src/label_studio_sdk/types/redis_import_storage.py @@ -1,47 +1,35 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -import typing -import pydantic import datetime as dt +import pydantic +import typing from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class RedisImportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - path: typing.Optional[str] = pydantic.Field(default=None) - """ - Storage prefix (optional) - """ - - host: typing.Optional[str] = pydantic.Field(default=None) - """ - Server Host IP (optional) - """ - - port: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Server Port (optional) + Creation time """ - password: typing.Optional[str] = pydantic.Field(default=None) + db: typing.Optional[int] = pydantic.Field(default=None) """ - Server Password (optional) + Server Database """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Cloud storage description """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + host: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Server Host IP (optional) """ + id: int last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ Last sync finished time @@ -57,36 +45,48 @@ class RedisImportStorage(UncheckedBaseModel): Last sync job ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + password: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + Server Password (optional) """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + path: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + Storage prefix (optional) """ - description: typing.Optional[str] = pydantic.Field(default=None) + port: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + Server Port (optional) """ - created_at: dt.datetime = pydantic.Field() + project: int = pydantic.Field() """ - Creation time + A unique integer value identifying this project. """ - db: typing.Optional[int] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - Server Database + Cloud storage regex for filtering objects """ - project: int = pydantic.Field() + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Cloud storage title + """ + + traceback: typing.Optional[str] = pydantic.Field(default=None) + """ + Traceback report for the last failed sync + """ + + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + """ + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/refined_prompt_response.py b/src/label_studio_sdk/types/refined_prompt_response.py index 5dae83f12..6a3ab91ee 100644 --- a/src/label_studio_sdk/types/refined_prompt_response.py +++ b/src/label_studio_sdk/types/refined_prompt_response.py @@ -2,25 +2,25 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import pydantic from .third_party_model_version import ThirdPartyModelVersion +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 class RefinedPromptResponse(UncheckedBaseModel): - title: typing.Optional[str] = pydantic.Field(default=None) + previous_version: typing.Optional[ThirdPartyModelVersion] = pydantic.Field(default=None) """ - Title of the refined prompt + Previous version of the prompt """ - reasoning: typing.Optional[str] = pydantic.Field(default=None) + prompt: str = pydantic.Field() """ - Reasoning behind the refinement + The refined prompt text """ - prompt: str = pydantic.Field() + reasoning: typing.Optional[str] = pydantic.Field(default=None) """ - The refined prompt text + Reasoning behind the refinement """ refinement_job_id: typing.Optional[str] = pydantic.Field(default=None) @@ -33,14 +33,14 @@ class RefinedPromptResponse(UncheckedBaseModel): Status of the refinement job """ - total_cost: typing.Optional[str] = pydantic.Field(default=None) + title: typing.Optional[str] = pydantic.Field(default=None) """ - Total cost of the refinement job (in USD) + Title of the refined prompt """ - previous_version: typing.Optional[ThirdPartyModelVersion] = pydantic.Field(default=None) + total_cost: typing.Optional[str] = pydantic.Field(default=None) """ - Previous version of the prompt + Total cost of the refinement job (in USD) """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/review_settings.py b/src/label_studio_sdk/types/review_settings.py index fcf6a9a57..f1ccd30eb 100644 --- a/src/label_studio_sdk/types/review_settings.py +++ b/src/label_studio_sdk/types/review_settings.py @@ -2,26 +2,22 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .review_settings_review_criteria import ReviewSettingsReviewCriteria import pydantic from .review_settings_requeue_rejected_tasks_mode import ReviewSettingsRequeueRejectedTasksMode +from .review_settings_review_criteria import ReviewSettingsReviewCriteria from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ReviewSettings(UncheckedBaseModel): - id: int - requeue_rejected_tasks_to_annotator: bool - review_criteria: typing.Optional[ReviewSettingsReviewCriteria] = pydantic.Field(default=None) + anonymize_annotations: typing.Optional[bool] = pydantic.Field(default=None) """ - Criteria to mark task as reviewed - - * `all` - Task is reviewed if all annotations are reviewed - * `one` - Task is reviewed if at least one annotation is reviewed + Hide annotator names from annotations while review """ - anonymize_annotations: typing.Optional[bool] = pydantic.Field(default=None) + id: int + instruction: typing.Optional[str] = pydantic.Field(default=None) """ - Hide annotator names from annotations while review + Reviewer instructions in HTML format """ only_finished_tasks: typing.Optional[bool] = pydantic.Field(default=None) @@ -29,47 +25,50 @@ class ReviewSettings(UncheckedBaseModel): Show only finished tasks in the review stream """ - instruction: typing.Optional[str] = pydantic.Field(default=None) + project: typing.Optional[int] = None + requeue_rejected_tasks_mode: typing.Optional[ReviewSettingsRequeueRejectedTasksMode] = pydantic.Field(default=None) """ - Reviewer instructions in HTML format + Requeue mode for rejected tasks + + * `requeue` - Requeue + * `remove` - Remove + * `flexible` - Flexible """ - show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + requeue_rejected_tasks_to_annotator: bool + require_comment_on_reject: typing.Optional[bool] = pydantic.Field(default=None) """ - Show instructions to the reviewers before they start + If set, the reviewer must leave a comment on reject """ - show_data_manager_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) + review_criteria: typing.Optional[ReviewSettingsReviewCriteria] = pydantic.Field(default=None) """ - Show the data manager to reviewers + Criteria to mark task as reviewed + + * `all` - Task is reviewed if all annotations are reviewed + * `one` - Task is reviewed if at least one annotation is reviewed """ - show_agreement_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) + review_only_manual_assignments: typing.Optional[bool] = pydantic.Field(default=None) """ - Show the agreement column to reviewers + When set True, review queue is built only from manually assigned tasks """ - require_comment_on_reject: typing.Optional[bool] = pydantic.Field(default=None) + show_agreement_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) """ - If set, the reviewer must leave a comment on reject + Show the agreement column to reviewers """ - requeue_rejected_tasks_mode: typing.Optional[ReviewSettingsRequeueRejectedTasksMode] = pydantic.Field(default=None) + show_data_manager_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) """ - Requeue mode for rejected tasks - - * `requeue` - Requeue - * `remove` - Remove - * `flexible` - Flexible + Show the data manager to reviewers """ - review_only_manual_assignments: typing.Optional[bool] = pydantic.Field(default=None) + show_instruction: typing.Optional[bool] = pydantic.Field(default=None) """ - When set True, review queue is built only from manually assigned tasks + Show instructions to the reviewers before they start """ - project: typing.Optional[int] = None - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/review_settings_request.py b/src/label_studio_sdk/types/review_settings_request.py index 05b4a9d3f..426d40542 100644 --- a/src/label_studio_sdk/types/review_settings_request.py +++ b/src/label_studio_sdk/types/review_settings_request.py @@ -2,24 +2,21 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -from .review_settings_request_review_criteria import ReviewSettingsRequestReviewCriteria import pydantic from .review_settings_request_requeue_rejected_tasks_mode import ReviewSettingsRequestRequeueRejectedTasksMode +from .review_settings_request_review_criteria import ReviewSettingsRequestReviewCriteria from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ReviewSettingsRequest(UncheckedBaseModel): - review_criteria: typing.Optional[ReviewSettingsRequestReviewCriteria] = pydantic.Field(default=None) + anonymize_annotations: typing.Optional[bool] = pydantic.Field(default=None) """ - Criteria to mark task as reviewed - - * `all` - Task is reviewed if all annotations are reviewed - * `one` - Task is reviewed if at least one annotation is reviewed + Hide annotator names from annotations while review """ - anonymize_annotations: typing.Optional[bool] = pydantic.Field(default=None) + instruction: typing.Optional[str] = pydantic.Field(default=None) """ - Hide annotator names from annotations while review + Reviewer instructions in HTML format """ only_finished_tasks: typing.Optional[bool] = pydantic.Field(default=None) @@ -27,49 +24,51 @@ class ReviewSettingsRequest(UncheckedBaseModel): Show only finished tasks in the review stream """ - instruction: typing.Optional[str] = pydantic.Field(default=None) + project: typing.Optional[int] = None + requeue_rejected_tasks_mode: typing.Optional[ReviewSettingsRequestRequeueRejectedTasksMode] = pydantic.Field( + default=None + ) """ - Reviewer instructions in HTML format + Requeue mode for rejected tasks + + * `requeue` - Requeue + * `remove` - Remove + * `flexible` - Flexible """ - show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + require_comment_on_reject: typing.Optional[bool] = pydantic.Field(default=None) """ - Show instructions to the reviewers before they start + If set, the reviewer must leave a comment on reject """ - show_data_manager_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) + review_criteria: typing.Optional[ReviewSettingsRequestReviewCriteria] = pydantic.Field(default=None) """ - Show the data manager to reviewers + Criteria to mark task as reviewed + + * `all` - Task is reviewed if all annotations are reviewed + * `one` - Task is reviewed if at least one annotation is reviewed """ - show_agreement_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) + review_only_manual_assignments: typing.Optional[bool] = pydantic.Field(default=None) """ - Show the agreement column to reviewers + When set True, review queue is built only from manually assigned tasks """ - require_comment_on_reject: typing.Optional[bool] = pydantic.Field(default=None) + show_agreement_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) """ - If set, the reviewer must leave a comment on reject + Show the agreement column to reviewers """ - requeue_rejected_tasks_mode: typing.Optional[ReviewSettingsRequestRequeueRejectedTasksMode] = pydantic.Field( - default=None - ) + show_data_manager_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) """ - Requeue mode for rejected tasks - - * `requeue` - Requeue - * `remove` - Remove - * `flexible` - Flexible + Show the data manager to reviewers """ - review_only_manual_assignments: typing.Optional[bool] = pydantic.Field(default=None) + show_instruction: typing.Optional[bool] = pydantic.Field(default=None) """ - When set True, review queue is built only from manually assigned tasks + Show instructions to the reviewers before they start """ - project: typing.Optional[int] = None - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/s3export_storage.py b/src/label_studio_sdk/types/s3export_storage.py index 1f8433740..1decd5aad 100644 --- a/src/label_studio_sdk/types/s3export_storage.py +++ b/src/label_studio_sdk/types/s3export_storage.py @@ -2,53 +2,38 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic -from .status_c5a_enum import StatusC5AEnum +import datetime as dt import typing_extensions from ..core.serialization import FieldMetadata +from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class S3ExportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) - """ - Last sync finished time - """ - - last_sync_count: typing.Optional[int] = pydantic.Field(default=None) - """ - Count of tasks synced last time - """ - - last_sync_job: typing.Optional[str] = pydantic.Field(default=None) + aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync job ID + AWS_ACCESS_KEY_ID """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + AWS_SECRET_ACCESS_KEY """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + aws_session_token: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + AWS_SESSION_TOKEN """ - description: typing.Optional[str] = pydantic.Field(default=None) + aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage description + AWS SSE KMS Key ID """ - created_at: dt.datetime = pydantic.Field() + bucket: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + S3 bucket name """ can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None) @@ -56,44 +41,46 @@ class S3ExportStorage(UncheckedBaseModel): Deletion from storage enabled """ - bucket: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - S3 bucket name + Creation time """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - S3 bucket prefix + Cloud storage description """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + id: int + last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Last sync finished time """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + last_sync_count: typing.Optional[int] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + Count of tasks synced last time """ - aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) + last_sync_job: typing.Optional[str] = pydantic.Field(default=None) """ - AWS_ACCESS_KEY_ID + Last sync job ID """ - aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - AWS_SECRET_ACCESS_KEY + S3 bucket prefix """ - aws_session_token: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - AWS_SESSION_TOKEN + A unique integer value identifying this project. """ - aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - AWS SSE KMS Key ID + Cloud storage regex for filtering objects """ region_name: typing.Optional[str] = pydantic.Field(default=None) @@ -108,9 +95,22 @@ class S3ExportStorage(UncheckedBaseModel): S3 Endpoint """ - project: int = pydantic.Field() + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Cloud storage title + """ + + traceback: typing.Optional[str] = pydantic.Field(default=None) + """ + Traceback report for the last failed sync + """ + + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + """ + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/s3import_storage.py b/src/label_studio_sdk/types/s3import_storage.py index ac2e48454..99a6bfb9e 100644 --- a/src/label_studio_sdk/types/s3import_storage.py +++ b/src/label_studio_sdk/types/s3import_storage.py @@ -2,94 +2,91 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import datetime as dt import pydantic -from .status_c5a_enum import StatusC5AEnum +import datetime as dt import typing_extensions from ..core.serialization import FieldMetadata +from .status_c5a_enum import StatusC5AEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class S3ImportStorage(UncheckedBaseModel): - id: int - type: str - synchronizable: typing.Optional[bool] = None - presign: typing.Optional[bool] = None - last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) + aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync finished time + AWS_ACCESS_KEY_ID """ - last_sync_count: typing.Optional[int] = pydantic.Field(default=None) + aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) """ - Count of tasks synced last time + AWS_SECRET_ACCESS_KEY """ - last_sync_job: typing.Optional[str] = pydantic.Field(default=None) + aws_session_token: typing.Optional[str] = pydantic.Field(default=None) """ - Last sync job ID + AWS_SESSION_TOKEN """ - status: typing.Optional[StatusC5AEnum] = None - traceback: typing.Optional[str] = pydantic.Field(default=None) + aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) """ - Traceback report for the last failed sync + AWS SSE KMS Key ID """ - meta: typing.Optional[typing.Optional[typing.Any]] = None - title: typing.Optional[str] = pydantic.Field(default=None) + bucket: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage title + S3 bucket name """ - description: typing.Optional[str] = pydantic.Field(default=None) + created_at: dt.datetime = pydantic.Field() """ - Cloud storage description + Creation time """ - created_at: dt.datetime = pydantic.Field() + description: typing.Optional[str] = pydantic.Field(default=None) """ - Creation time + Cloud storage description """ - bucket: typing.Optional[str] = pydantic.Field(default=None) + id: int + last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - S3 bucket name + Last sync finished time """ - prefix: typing.Optional[str] = pydantic.Field(default=None) + last_sync_count: typing.Optional[int] = pydantic.Field(default=None) """ - S3 bucket prefix + Count of tasks synced last time """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) + last_sync_job: typing.Optional[str] = pydantic.Field(default=None) """ - Cloud storage regex for filtering objects + Last sync job ID """ - use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) + meta: typing.Optional[typing.Optional[typing.Any]] = None + prefix: typing.Optional[str] = pydantic.Field(default=None) """ - Interpret objects as BLOBs and generate URLs + S3 bucket prefix """ - aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None) + presign: typing.Optional[bool] = None + presign_ttl: typing.Optional[int] = pydantic.Field(default=None) """ - AWS_ACCESS_KEY_ID + Presigned URLs TTL (in minutes) """ - aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None) + project: int = pydantic.Field() """ - AWS_SECRET_ACCESS_KEY + A unique integer value identifying this project. """ - aws_session_token: typing.Optional[str] = pydantic.Field(default=None) + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) """ - AWS_SESSION_TOKEN + Perform recursive scan over the bucket content """ - aws_sse_kms_key_id: typing.Optional[str] = pydantic.Field(default=None) + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ - AWS SSE KMS Key ID + Cloud storage regex for filtering objects """ region_name: typing.Optional[str] = pydantic.Field(default=None) @@ -104,19 +101,22 @@ class S3ImportStorage(UncheckedBaseModel): S3 Endpoint """ - presign_ttl: typing.Optional[int] = pydantic.Field(default=None) + status: typing.Optional[StatusC5AEnum] = None + synchronizable: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Presigned URLs TTL (in minutes) + Cloud storage title """ - recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + traceback: typing.Optional[str] = pydantic.Field(default=None) """ - Perform recursive scan over the bucket content + Traceback report for the last failed sync """ - project: int = pydantic.Field() + type: str + use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None) """ - A unique integer value identifying this project. + Interpret objects as BLOBs and generate URLs """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/selected_items_request.py b/src/label_studio_sdk/types/selected_items_request.py index 18956bf25..c88da57fc 100644 --- a/src/label_studio_sdk/types/selected_items_request.py +++ b/src/label_studio_sdk/types/selected_items_request.py @@ -10,8 +10,8 @@ class SelectedItemsRequest(UncheckedBaseModel): all_: typing_extensions.Annotated[bool, FieldMetadata(alias="all")] - included: typing.Optional[typing.List[int]] = None excluded: typing.Optional[typing.List[int]] = None + included: typing.Optional[typing.List[int]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/serialization_options.py b/src/label_studio_sdk/types/serialization_options.py index b8fc26823..b80a685ce 100644 --- a/src/label_studio_sdk/types/serialization_options.py +++ b/src/label_studio_sdk/types/serialization_options.py @@ -1,21 +1,23 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel +import typing_extensions import typing from .serialization_option import SerializationOption -import pydantic -import typing_extensions from ..core.serialization import FieldMetadata +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 class SerializationOptions(UncheckedBaseModel): - drafts: typing.Optional[SerializationOption] = pydantic.Field(default=None) + annotations_completed_by: typing_extensions.Annotated[ + typing.Optional[SerializationOption], FieldMetadata(alias="annotations__completed_by") + ] = pydantic.Field(default=None) """ JSON dict with parameters """ - predictions: typing.Optional[SerializationOption] = pydantic.Field(default=None) + drafts: typing.Optional[SerializationOption] = pydantic.Field(default=None) """ JSON dict with parameters """ @@ -25,16 +27,14 @@ class SerializationOptions(UncheckedBaseModel): Include annotation history """ - annotations_completed_by: typing_extensions.Annotated[ - typing.Optional[SerializationOption], FieldMetadata(alias="annotations__completed_by") - ] = pydantic.Field(default=None) + interpolate_key_frames: typing.Optional[bool] = pydantic.Field(default=None) """ - JSON dict with parameters + Interpolate video key frames """ - interpolate_key_frames: typing.Optional[bool] = pydantic.Field(default=None) + predictions: typing.Optional[SerializationOption] = pydantic.Field(default=None) """ - Interpolate video key frames + JSON dict with parameters """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/serialization_options_request.py b/src/label_studio_sdk/types/serialization_options_request.py index e045998ab..62dfbd809 100644 --- a/src/label_studio_sdk/types/serialization_options_request.py +++ b/src/label_studio_sdk/types/serialization_options_request.py @@ -1,21 +1,23 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel +import typing_extensions import typing from .serialization_option_request import SerializationOptionRequest -import pydantic -import typing_extensions from ..core.serialization import FieldMetadata +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 class SerializationOptionsRequest(UncheckedBaseModel): - drafts: typing.Optional[SerializationOptionRequest] = pydantic.Field(default=None) + annotations_completed_by: typing_extensions.Annotated[ + typing.Optional[SerializationOptionRequest], FieldMetadata(alias="annotations__completed_by") + ] = pydantic.Field(default=None) """ JSON dict with parameters """ - predictions: typing.Optional[SerializationOptionRequest] = pydantic.Field(default=None) + drafts: typing.Optional[SerializationOptionRequest] = pydantic.Field(default=None) """ JSON dict with parameters """ @@ -25,16 +27,14 @@ class SerializationOptionsRequest(UncheckedBaseModel): Include annotation history """ - annotations_completed_by: typing_extensions.Annotated[ - typing.Optional[SerializationOptionRequest], FieldMetadata(alias="annotations__completed_by") - ] = pydantic.Field(default=None) + interpolate_key_frames: typing.Optional[bool] = pydantic.Field(default=None) """ - JSON dict with parameters + Interpolate video key frames """ - interpolate_key_frames: typing.Optional[bool] = pydantic.Field(default=None) + predictions: typing.Optional[SerializationOptionRequest] = pydantic.Field(default=None) """ - Interpolate video key frames + JSON dict with parameters """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/third_party_model_version.py b/src/label_studio_sdk/types/third_party_model_version.py index 01cdf5da3..4909b9b0f 100644 --- a/src/label_studio_sdk/types/third_party_model_version.py +++ b/src/label_studio_sdk/types/third_party_model_version.py @@ -1,32 +1,29 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel +import datetime as dt from .user_simple import UserSimple import pydantic import typing from .provider_enum import ProviderEnum -import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ThirdPartyModelVersion(UncheckedBaseModel): - id: int + created_at: dt.datetime created_by: UserSimple = pydantic.Field() """ User who created Dataset """ - score: str + id: int + model_provider_connection: typing.Optional[int] = None + organization: typing.Optional[int] = None parent_model: typing.Optional[int] = pydantic.Field(default=None) """ Parent model interface ID """ - title: str = pydantic.Field() - """ - Model name - """ - prompt: str = pydantic.Field() """ Prompt to execute @@ -50,10 +47,13 @@ class ThirdPartyModelVersion(UncheckedBaseModel): The model ID to use within the given provider, e.g. gpt-3.5 """ - created_at: dt.datetime + score: str + title: str = pydantic.Field() + """ + Model name + """ + updated_at: dt.datetime - model_provider_connection: typing.Optional[int] = None - organization: typing.Optional[int] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/third_party_model_version_request.py b/src/label_studio_sdk/types/third_party_model_version_request.py index 06ac0e1b8..6f99ef319 100644 --- a/src/label_studio_sdk/types/third_party_model_version_request.py +++ b/src/label_studio_sdk/types/third_party_model_version_request.py @@ -8,16 +8,13 @@ class ThirdPartyModelVersionRequest(UncheckedBaseModel): + model_provider_connection: typing.Optional[int] = None + organization: typing.Optional[int] = None parent_model: typing.Optional[int] = pydantic.Field(default=None) """ Parent model interface ID """ - title: str = pydantic.Field() - """ - Model name - """ - prompt: str = pydantic.Field() """ Prompt to execute @@ -41,8 +38,10 @@ class ThirdPartyModelVersionRequest(UncheckedBaseModel): The model ID to use within the given provider, e.g. gpt-3.5 """ - model_provider_connection: typing.Optional[int] = None - organization: typing.Optional[int] = None + title: str = pydantic.Field() + """ + Model name + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/user_simple.py b/src/label_studio_sdk/types/user_simple.py index 4338da638..c956c2654 100644 --- a/src/label_studio_sdk/types/user_simple.py +++ b/src/label_studio_sdk/types/user_simple.py @@ -14,11 +14,11 @@ class UserSimple(UncheckedBaseModel): values with complex, nested serializations """ - id: int + avatar: str + email: typing.Optional[str] = None first_name: typing.Optional[str] = None + id: int last_name: typing.Optional[str] = None - email: typing.Optional[str] = None - avatar: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/user_simple_request.py b/src/label_studio_sdk/types/user_simple_request.py index 48a0c22c2..4da160e96 100644 --- a/src/label_studio_sdk/types/user_simple_request.py +++ b/src/label_studio_sdk/types/user_simple_request.py @@ -14,9 +14,9 @@ class UserSimpleRequest(UncheckedBaseModel): values with complex, nested serializations """ + email: typing.Optional[str] = None first_name: typing.Optional[str] = None last_name: typing.Optional[str] = None - email: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/version_response.py b/src/label_studio_sdk/types/version_response.py index 09b7a6dcf..e168c756f 100644 --- a/src/label_studio_sdk/types/version_response.py +++ b/src/label_studio_sdk/types/version_response.py @@ -1,33 +1,17 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel +import typing +from .edition_enum import EditionEnum import pydantic import typing_extensions -import typing from ..core.serialization import FieldMetadata -from .edition_enum import EditionEnum from ..core.pydantic_utilities import IS_PYDANTIC_V2 class VersionResponse(UncheckedBaseModel): - release: str = pydantic.Field() - """ - Current release version of Label Studio - """ - - label_studio_os_package: typing_extensions.Annotated[ - typing.Optional[typing.Any], FieldMetadata(alias="label-studio-os-package") - ] = None - label_studio_os_backend: typing_extensions.Annotated[ - typing.Optional[typing.Any], FieldMetadata(alias="label-studio-os-backend") - ] = None - label_studio_frontend: typing_extensions.Annotated[ - typing.Optional[typing.Any], FieldMetadata(alias="label-studio-frontend") - ] = None + backend: typing.Optional[typing.Any] = None dm2: typing.Optional[typing.Any] = None - label_studio_converter: typing_extensions.Annotated[ - typing.Optional[typing.Any], FieldMetadata(alias="label-studio-converter") - ] = None edition: EditionEnum = pydantic.Field() """ Label Studio edition (Community or Enterprise) @@ -36,8 +20,23 @@ class VersionResponse(UncheckedBaseModel): * `Enterprise` - Enterprise """ + label_studio_converter: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="label-studio-converter") + ] = None + label_studio_frontend: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="label-studio-frontend") + ] = None + label_studio_os_backend: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="label-studio-os-backend") + ] = None + label_studio_os_package: typing_extensions.Annotated[ + typing.Optional[typing.Any], FieldMetadata(alias="label-studio-os-package") + ] = None lsf: typing.Optional[typing.Any] = None - backend: typing.Optional[typing.Any] = None + release: str = pydantic.Field() + """ + Current release version of Label Studio + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/label_studio_sdk/types/view.py b/src/label_studio_sdk/types/view.py index 9d9f12c90..7f8703848 100644 --- a/src/label_studio_sdk/types/view.py +++ b/src/label_studio_sdk/types/view.py @@ -8,24 +8,24 @@ class View(UncheckedBaseModel): - id: int - filter_group: typing.Optional[FilterGroup] = None data: typing.Optional[typing.Optional[typing.Any]] = None - ordering: typing.Optional[typing.Optional[typing.Any]] = None + filter_group: typing.Optional[FilterGroup] = None + id: int order: typing.Optional[int] = pydantic.Field(default=None) """ Position of the tab, starting at the left in data manager and increasing as the tabs go left to right """ - selected_items: typing.Optional[typing.Optional[typing.Any]] = None - user: typing.Optional[int] = pydantic.Field(default=None) + ordering: typing.Optional[typing.Optional[typing.Any]] = None + project: int = pydantic.Field() """ - User who made this view + Project ID """ - project: int = pydantic.Field() + selected_items: typing.Optional[typing.Optional[typing.Any]] = None + user: typing.Optional[int] = pydantic.Field(default=None) """ - Project ID + User who made this view """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/webhook.py b/src/label_studio_sdk/types/webhook.py index 94390ab10..658f93152 100644 --- a/src/label_studio_sdk/types/webhook.py +++ b/src/label_studio_sdk/types/webhook.py @@ -2,46 +2,46 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import pydantic from .actions_enum import ActionsEnum import datetime as dt +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 class Webhook(UncheckedBaseModel): - id: int - organization: int - project: typing.Optional[int] = None - url: str = pydantic.Field() + actions: typing.Optional[typing.List[ActionsEnum]] = None + created_at: dt.datetime = pydantic.Field() """ - URL of webhook + Creation time """ - send_payload: typing.Optional[bool] = pydantic.Field(default=None) + headers: typing.Optional[typing.Optional[typing.Any]] = None + id: int + is_active: typing.Optional[bool] = pydantic.Field(default=None) """ - If value is False send only action + If value is False the webhook is disabled """ + organization: int + project: typing.Optional[int] = None send_for_all_actions: typing.Optional[bool] = pydantic.Field(default=None) """ If value is False - used only for actions from WebhookAction """ - headers: typing.Optional[typing.Optional[typing.Any]] = None - is_active: typing.Optional[bool] = pydantic.Field(default=None) + send_payload: typing.Optional[bool] = pydantic.Field(default=None) """ - If value is False the webhook is disabled + If value is False send only action """ - actions: typing.Optional[typing.List[ActionsEnum]] = None - created_at: dt.datetime = pydantic.Field() + updated_at: dt.datetime = pydantic.Field() """ - Creation time + Last update time """ - updated_at: dt.datetime = pydantic.Field() + url: str = pydantic.Field() """ - Last update time + URL of webhook """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/webhook_serializer_for_update.py b/src/label_studio_sdk/types/webhook_serializer_for_update.py index 968d31cef..a63927f1e 100644 --- a/src/label_studio_sdk/types/webhook_serializer_for_update.py +++ b/src/label_studio_sdk/types/webhook_serializer_for_update.py @@ -2,9 +2,9 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing -import pydantic from .actions_enum import ActionsEnum import datetime as dt +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -15,39 +15,39 @@ class WebhookSerializerForUpdate(UncheckedBaseModel): Used to forbid updating project field. """ - id: int - organization: int - project: typing.Optional[int] = None - url: str = pydantic.Field() + actions: typing.Optional[typing.List[ActionsEnum]] = None + created_at: dt.datetime = pydantic.Field() """ - URL of webhook + Creation time """ - send_payload: typing.Optional[bool] = pydantic.Field(default=None) + headers: typing.Optional[typing.Optional[typing.Any]] = None + id: int + is_active: typing.Optional[bool] = pydantic.Field(default=None) """ - If value is False send only action + If value is False the webhook is disabled """ + organization: int + project: typing.Optional[int] = None send_for_all_actions: typing.Optional[bool] = pydantic.Field(default=None) """ If value is False - used only for actions from WebhookAction """ - headers: typing.Optional[typing.Optional[typing.Any]] = None - is_active: typing.Optional[bool] = pydantic.Field(default=None) + send_payload: typing.Optional[bool] = pydantic.Field(default=None) """ - If value is False the webhook is disabled + If value is False send only action """ - actions: typing.Optional[typing.List[ActionsEnum]] = None - created_at: dt.datetime = pydantic.Field() + updated_at: dt.datetime = pydantic.Field() """ - Creation time + Last update time """ - updated_at: dt.datetime = pydantic.Field() + url: str = pydantic.Field() """ - Last update time + URL of webhook """ if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/types/workspace.py b/src/label_studio_sdk/types/workspace.py index 99a79b2fd..7cf219ad5 100644 --- a/src/label_studio_sdk/types/workspace.py +++ b/src/label_studio_sdk/types/workspace.py @@ -1,8 +1,8 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -import pydantic import typing +import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -14,30 +14,29 @@ class Workspace(UncheckedBaseModel): values with complex, nested serializations """ - id: int - title: str = pydantic.Field() + color: typing.Optional[str] = None + created_by: int + description: typing.Optional[str] = pydantic.Field(default=None) """ - Workspace name + Workspace description """ - description: typing.Optional[str] = pydantic.Field(default=None) + id: int + is_archived: typing.Optional[bool] = pydantic.Field(default=None) """ - Workspace description + Workspace is archived """ - color: typing.Optional[str] = None is_personal: typing.Optional[bool] = pydantic.Field(default=None) """ Workspace is a personal user workspace """ - is_archived: typing.Optional[bool] = pydantic.Field(default=None) + title: str = pydantic.Field() """ - Workspace is archived + Workspace name """ - created_by: int - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/users/client.py b/src/label_studio_sdk/users/client.py index 3caed2aff..f1b766f6f 100644 --- a/src/label_studio_sdk/users/client.py +++ b/src/label_studio_sdk/users/client.py @@ -68,18 +68,18 @@ def get_current_user(self, *, request_options: typing.Optional[RequestOptions] = def update_current_user( self, *, - first_name: typing.Optional[str] = OMIT, - last_name: typing.Optional[str] = OMIT, - username: typing.Optional[str] = OMIT, - custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = OMIT, - phone: typing.Optional[str] = OMIT, active_organization: typing.Optional[int] = OMIT, allow_newsletters: typing.Optional[bool] = OMIT, + custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = OMIT, date_joined: typing.Optional[dt.datetime] = OMIT, - password: typing.Optional[str] = OMIT, - onboarding_state: typing.Optional[str] = OMIT, - is_email_verified: typing.Optional[bool] = OMIT, email_notification_settings: typing.Optional[typing.Optional[typing.Any]] = OMIT, + first_name: typing.Optional[str] = OMIT, + is_email_verified: typing.Optional[bool] = OMIT, + last_name: typing.Optional[str] = OMIT, + onboarding_state: typing.Optional[str] = OMIT, + password: typing.Optional[str] = OMIT, + phone: typing.Optional[str] = OMIT, + username: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseUserApi: """ @@ -87,30 +87,30 @@ def update_current_user( Parameters ---------- - first_name : typing.Optional[str] - - last_name : typing.Optional[str] + active_organization : typing.Optional[int] - username : typing.Optional[str] + allow_newsletters : typing.Optional[bool] + Allow sending newsletters to user custom_hotkeys : typing.Optional[typing.Optional[typing.Any]] - phone : typing.Optional[str] + date_joined : typing.Optional[dt.datetime] - active_organization : typing.Optional[int] + email_notification_settings : typing.Optional[typing.Optional[typing.Any]] - allow_newsletters : typing.Optional[bool] - Allow sending newsletters to user + first_name : typing.Optional[str] - date_joined : typing.Optional[dt.datetime] + is_email_verified : typing.Optional[bool] - password : typing.Optional[str] + last_name : typing.Optional[str] onboarding_state : typing.Optional[str] - is_email_verified : typing.Optional[bool] + password : typing.Optional[str] - email_notification_settings : typing.Optional[typing.Optional[typing.Any]] + phone : typing.Optional[str] + + username : typing.Optional[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -133,18 +133,18 @@ def update_current_user( "api/current-user", method="PATCH", json={ - "first_name": first_name, - "last_name": last_name, - "username": username, - "custom_hotkeys": custom_hotkeys, - "phone": phone, "active_organization": active_organization, "allow_newsletters": allow_newsletters, + "custom_hotkeys": custom_hotkeys, "date_joined": date_joined, - "password": password, - "onboarding_state": onboarding_state, - "is_email_verified": is_email_verified, "email_notification_settings": email_notification_settings, + "first_name": first_name, + "is_email_verified": is_email_verified, + "last_name": last_name, + "onboarding_state": onboarding_state, + "password": password, + "phone": phone, + "username": username, }, headers={ "content-type": "application/json", @@ -443,15 +443,15 @@ def list( def create( self, *, - id: typing.Optional[int] = OMIT, - first_name: typing.Optional[str] = OMIT, - last_name: typing.Optional[str] = OMIT, - username: typing.Optional[str] = OMIT, - email: typing.Optional[str] = OMIT, + allow_newsletters: typing.Optional[bool] = OMIT, avatar: typing.Optional[str] = OMIT, + email: typing.Optional[str] = OMIT, + first_name: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, initials: typing.Optional[str] = OMIT, + last_name: typing.Optional[str] = OMIT, phone: typing.Optional[str] = OMIT, - allow_newsletters: typing.Optional[bool] = OMIT, + username: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseUser: """ @@ -459,32 +459,32 @@ def create( Parameters ---------- - id : typing.Optional[int] - User ID - - first_name : typing.Optional[str] - First name of the user - - last_name : typing.Optional[str] - Last name of the user + allow_newsletters : typing.Optional[bool] + Whether the user allows newsletters - username : typing.Optional[str] - Username of the user + avatar : typing.Optional[str] + Avatar URL of the user email : typing.Optional[str] Email of the user - avatar : typing.Optional[str] - Avatar URL of the user + first_name : typing.Optional[str] + First name of the user + + id : typing.Optional[int] + User ID initials : typing.Optional[str] Initials of the user + last_name : typing.Optional[str] + Last name of the user + phone : typing.Optional[str] Phone number of the user - allow_newsletters : typing.Optional[bool] - Whether the user allows newsletters + username : typing.Optional[str] + Username of the user request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -507,15 +507,15 @@ def create( "api/users/", method="POST", json={ - "id": id, - "first_name": first_name, - "last_name": last_name, - "username": username, - "email": email, + "allow_newsletters": allow_newsletters, "avatar": avatar, + "email": email, + "first_name": first_name, + "id": id, "initials": initials, + "last_name": last_name, "phone": phone, - "allow_newsletters": allow_newsletters, + "username": username, }, headers={ "content-type": "application/json", @@ -630,15 +630,15 @@ def update( self, id: int, *, - users_update_request_id: typing.Optional[int] = OMIT, - first_name: typing.Optional[str] = OMIT, - last_name: typing.Optional[str] = OMIT, - username: typing.Optional[str] = OMIT, - email: typing.Optional[str] = OMIT, + allow_newsletters: typing.Optional[bool] = OMIT, avatar: typing.Optional[str] = OMIT, + email: typing.Optional[str] = OMIT, + first_name: typing.Optional[str] = OMIT, + users_update_request_id: typing.Optional[int] = OMIT, initials: typing.Optional[str] = OMIT, + last_name: typing.Optional[str] = OMIT, phone: typing.Optional[str] = OMIT, - allow_newsletters: typing.Optional[bool] = OMIT, + username: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseUser: """ @@ -651,32 +651,32 @@ def update( id : int User ID - users_update_request_id : typing.Optional[int] - User ID - - first_name : typing.Optional[str] - First name of the user - - last_name : typing.Optional[str] - Last name of the user + allow_newsletters : typing.Optional[bool] + Whether the user allows newsletters - username : typing.Optional[str] - Username of the user + avatar : typing.Optional[str] + Avatar URL of the user email : typing.Optional[str] Email of the user - avatar : typing.Optional[str] - Avatar URL of the user + first_name : typing.Optional[str] + First name of the user + + users_update_request_id : typing.Optional[int] + User ID initials : typing.Optional[str] Initials of the user + last_name : typing.Optional[str] + Last name of the user + phone : typing.Optional[str] Phone number of the user - allow_newsletters : typing.Optional[bool] - Whether the user allows newsletters + username : typing.Optional[str] + Username of the user request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -701,15 +701,15 @@ def update( f"api/users/{jsonable_encoder(id)}/", method="PATCH", json={ - "id": users_update_request_id, - "first_name": first_name, - "last_name": last_name, - "username": username, - "email": email, + "allow_newsletters": allow_newsletters, "avatar": avatar, + "email": email, + "first_name": first_name, + "id": users_update_request_id, "initials": initials, + "last_name": last_name, "phone": phone, - "allow_newsletters": allow_newsletters, + "username": username, }, headers={ "content-type": "application/json", @@ -789,18 +789,18 @@ async def main() -> None: async def update_current_user( self, *, - first_name: typing.Optional[str] = OMIT, - last_name: typing.Optional[str] = OMIT, - username: typing.Optional[str] = OMIT, - custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = OMIT, - phone: typing.Optional[str] = OMIT, active_organization: typing.Optional[int] = OMIT, allow_newsletters: typing.Optional[bool] = OMIT, + custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = OMIT, date_joined: typing.Optional[dt.datetime] = OMIT, - password: typing.Optional[str] = OMIT, - onboarding_state: typing.Optional[str] = OMIT, - is_email_verified: typing.Optional[bool] = OMIT, email_notification_settings: typing.Optional[typing.Optional[typing.Any]] = OMIT, + first_name: typing.Optional[str] = OMIT, + is_email_verified: typing.Optional[bool] = OMIT, + last_name: typing.Optional[str] = OMIT, + onboarding_state: typing.Optional[str] = OMIT, + password: typing.Optional[str] = OMIT, + phone: typing.Optional[str] = OMIT, + username: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseUserApi: """ @@ -808,30 +808,30 @@ async def update_current_user( Parameters ---------- - first_name : typing.Optional[str] - - last_name : typing.Optional[str] + active_organization : typing.Optional[int] - username : typing.Optional[str] + allow_newsletters : typing.Optional[bool] + Allow sending newsletters to user custom_hotkeys : typing.Optional[typing.Optional[typing.Any]] - phone : typing.Optional[str] + date_joined : typing.Optional[dt.datetime] - active_organization : typing.Optional[int] + email_notification_settings : typing.Optional[typing.Optional[typing.Any]] - allow_newsletters : typing.Optional[bool] - Allow sending newsletters to user + first_name : typing.Optional[str] - date_joined : typing.Optional[dt.datetime] + is_email_verified : typing.Optional[bool] - password : typing.Optional[str] + last_name : typing.Optional[str] onboarding_state : typing.Optional[str] - is_email_verified : typing.Optional[bool] + password : typing.Optional[str] - email_notification_settings : typing.Optional[typing.Optional[typing.Any]] + phone : typing.Optional[str] + + username : typing.Optional[str] request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -862,18 +862,18 @@ async def main() -> None: "api/current-user", method="PATCH", json={ - "first_name": first_name, - "last_name": last_name, - "username": username, - "custom_hotkeys": custom_hotkeys, - "phone": phone, "active_organization": active_organization, "allow_newsletters": allow_newsletters, + "custom_hotkeys": custom_hotkeys, "date_joined": date_joined, - "password": password, - "onboarding_state": onboarding_state, - "is_email_verified": is_email_verified, "email_notification_settings": email_notification_settings, + "first_name": first_name, + "is_email_verified": is_email_verified, + "last_name": last_name, + "onboarding_state": onboarding_state, + "password": password, + "phone": phone, + "username": username, }, headers={ "content-type": "application/json", @@ -1220,15 +1220,15 @@ async def main() -> None: async def create( self, *, - id: typing.Optional[int] = OMIT, - first_name: typing.Optional[str] = OMIT, - last_name: typing.Optional[str] = OMIT, - username: typing.Optional[str] = OMIT, - email: typing.Optional[str] = OMIT, + allow_newsletters: typing.Optional[bool] = OMIT, avatar: typing.Optional[str] = OMIT, + email: typing.Optional[str] = OMIT, + first_name: typing.Optional[str] = OMIT, + id: typing.Optional[int] = OMIT, initials: typing.Optional[str] = OMIT, + last_name: typing.Optional[str] = OMIT, phone: typing.Optional[str] = OMIT, - allow_newsletters: typing.Optional[bool] = OMIT, + username: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseUser: """ @@ -1236,32 +1236,32 @@ async def create( Parameters ---------- - id : typing.Optional[int] - User ID - - first_name : typing.Optional[str] - First name of the user - - last_name : typing.Optional[str] - Last name of the user + allow_newsletters : typing.Optional[bool] + Whether the user allows newsletters - username : typing.Optional[str] - Username of the user + avatar : typing.Optional[str] + Avatar URL of the user email : typing.Optional[str] Email of the user - avatar : typing.Optional[str] - Avatar URL of the user + first_name : typing.Optional[str] + First name of the user + + id : typing.Optional[int] + User ID initials : typing.Optional[str] Initials of the user + last_name : typing.Optional[str] + Last name of the user + phone : typing.Optional[str] Phone number of the user - allow_newsletters : typing.Optional[bool] - Whether the user allows newsletters + username : typing.Optional[str] + Username of the user request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1292,15 +1292,15 @@ async def main() -> None: "api/users/", method="POST", json={ - "id": id, - "first_name": first_name, - "last_name": last_name, - "username": username, - "email": email, + "allow_newsletters": allow_newsletters, "avatar": avatar, + "email": email, + "first_name": first_name, + "id": id, "initials": initials, + "last_name": last_name, "phone": phone, - "allow_newsletters": allow_newsletters, + "username": username, }, headers={ "content-type": "application/json", @@ -1431,15 +1431,15 @@ async def update( self, id: int, *, - users_update_request_id: typing.Optional[int] = OMIT, - first_name: typing.Optional[str] = OMIT, - last_name: typing.Optional[str] = OMIT, - username: typing.Optional[str] = OMIT, - email: typing.Optional[str] = OMIT, + allow_newsletters: typing.Optional[bool] = OMIT, avatar: typing.Optional[str] = OMIT, + email: typing.Optional[str] = OMIT, + first_name: typing.Optional[str] = OMIT, + users_update_request_id: typing.Optional[int] = OMIT, initials: typing.Optional[str] = OMIT, + last_name: typing.Optional[str] = OMIT, phone: typing.Optional[str] = OMIT, - allow_newsletters: typing.Optional[bool] = OMIT, + username: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LseUser: """ @@ -1452,32 +1452,32 @@ async def update( id : int User ID - users_update_request_id : typing.Optional[int] - User ID - - first_name : typing.Optional[str] - First name of the user - - last_name : typing.Optional[str] - Last name of the user + allow_newsletters : typing.Optional[bool] + Whether the user allows newsletters - username : typing.Optional[str] - Username of the user + avatar : typing.Optional[str] + Avatar URL of the user email : typing.Optional[str] Email of the user - avatar : typing.Optional[str] - Avatar URL of the user + first_name : typing.Optional[str] + First name of the user + + users_update_request_id : typing.Optional[int] + User ID initials : typing.Optional[str] Initials of the user + last_name : typing.Optional[str] + Last name of the user + phone : typing.Optional[str] Phone number of the user - allow_newsletters : typing.Optional[bool] - Whether the user allows newsletters + username : typing.Optional[str] + Username of the user request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1510,15 +1510,15 @@ async def main() -> None: f"api/users/{jsonable_encoder(id)}/", method="PATCH", json={ - "id": users_update_request_id, - "first_name": first_name, - "last_name": last_name, - "username": username, - "email": email, + "allow_newsletters": allow_newsletters, "avatar": avatar, + "email": email, + "first_name": first_name, + "id": users_update_request_id, "initials": initials, + "last_name": last_name, "phone": phone, - "allow_newsletters": allow_newsletters, + "username": username, }, headers={ "content-type": "application/json", diff --git a/src/label_studio_sdk/views/client.py b/src/label_studio_sdk/views/client.py index dc0e95808..962a3f1eb 100644 --- a/src/label_studio_sdk/views/client.py +++ b/src/label_studio_sdk/views/client.py @@ -135,22 +135,25 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> View: + def update_order( + self, *, ids: typing.Sequence[int], project: int, request_options: typing.Optional[RequestOptions] = None + ) -> None: """ - Get the details about a specific view in the data manager + Update the order field of views based on the provided list of view IDs Parameters ---------- - id : str - View ID + ids : typing.Sequence[int] + A list of view IDs in the desired order. + + project : int request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - View - + None Examples -------- @@ -159,37 +162,40 @@ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non client = LabelStudio( api_key="YOUR_API_KEY", ) - client.views.get( - id="id", + client.views.update_order( + ids=[1], + project=1, ) """ _response = self._client_wrapper.httpx_client.request( - f"api/dm/views/{jsonable_encoder(id)}/", - method="GET", + "api/dm/views/order/", + method="POST", + json={ + "ids": ids, + "project": project, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return typing.cast( - View, - construct_type( - type_=View, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Delete a specific view by ID. + Delete all views for a specific project. Parameters ---------- - id : str - View ID + project : int + Project ID request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -205,13 +211,16 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = client = LabelStudio( api_key="YOUR_API_KEY", ) - client.views.delete( - id="id", + client.views.delete_all( + project=1, ) """ _response = self._client_wrapper.httpx_client.request( - f"api/dm/views/{jsonable_encoder(id)}/", + "api/dm/views/reset/", method="DELETE", + params={ + "project": project, + }, request_options=request_options, ) try: @@ -222,28 +231,15 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def update( - self, - id: str, - *, - data: typing.Optional[ViewsUpdateRequestData] = OMIT, - project: typing.Optional[int] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> View: + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> View: """ - Update view data with additional filters and other information for a specific project. + Get the details about a specific view in the data manager Parameters ---------- id : str View ID - data : typing.Optional[ViewsUpdateRequestData] - Custom view data - - project : typing.Optional[int] - Project ID - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -259,24 +255,14 @@ def update( client = LabelStudio( api_key="YOUR_API_KEY", ) - client.views.update( + client.views.get( id="id", ) """ _response = self._client_wrapper.httpx_client.request( f"api/dm/views/{jsonable_encoder(id)}/", - method="PATCH", - json={ - "data": convert_and_respect_annotation_metadata( - object_=data, annotation=ViewsUpdateRequestData, direction="write" - ), - "project": project, - }, - headers={ - "content-type": "application/json", - }, + method="GET", request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -292,18 +278,14 @@ def update( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def update_order( - self, *, project: int, ids: typing.Sequence[int], request_options: typing.Optional[RequestOptions] = None - ) -> None: + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Update the order field of views based on the provided list of view IDs + Delete a specific view by ID. Parameters ---------- - project : int - - ids : typing.Sequence[int] - A list of view IDs in the desired order. + id : str + View ID request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -319,23 +301,14 @@ def update_order( client = LabelStudio( api_key="YOUR_API_KEY", ) - client.views.update_order( - project=1, - ids=[1], + client.views.delete( + id="id", ) """ _response = self._client_wrapper.httpx_client.request( - "api/dm/views/order/", - method="POST", - json={ - "project": project, - "ids": ids, - }, - headers={ - "content-type": "application/json", - }, + f"api/dm/views/{jsonable_encoder(id)}/", + method="DELETE", request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -345,13 +318,26 @@ def update_order( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None: + def update( + self, + id: str, + *, + data: typing.Optional[ViewsUpdateRequestData] = OMIT, + project: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> View: """ - Delete all views for a specific project. + Update view data with additional filters and other information for a specific project. Parameters ---------- - project : int + id : str + View ID + + data : typing.Optional[ViewsUpdateRequestData] + Custom view data + + project : typing.Optional[int] Project ID request_options : typing.Optional[RequestOptions] @@ -359,7 +345,8 @@ def delete_all(self, *, project: int, request_options: typing.Optional[RequestOp Returns ------- - None + View + Examples -------- @@ -368,21 +355,34 @@ def delete_all(self, *, project: int, request_options: typing.Optional[RequestOp client = LabelStudio( api_key="YOUR_API_KEY", ) - client.views.delete_all( - project=1, + client.views.update( + id="id", ) """ _response = self._client_wrapper.httpx_client.request( - "api/dm/views/reset/", - method="DELETE", - params={ + f"api/dm/views/{jsonable_encoder(id)}/", + method="PATCH", + json={ + "data": convert_and_respect_annotation_metadata( + object_=data, annotation=ViewsUpdateRequestData, direction="write" + ), "project": project, }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + View, + construct_type( + type_=View, # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) @@ -523,22 +523,25 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> View: + async def update_order( + self, *, ids: typing.Sequence[int], project: int, request_options: typing.Optional[RequestOptions] = None + ) -> None: """ - Get the details about a specific view in the data manager + Update the order field of views based on the provided list of view IDs Parameters ---------- - id : str - View ID + ids : typing.Sequence[int] + A list of view IDs in the desired order. + + project : int request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - View - + None Examples -------- @@ -552,40 +555,43 @@ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] async def main() -> None: - await client.views.get( - id="id", + await client.views.update_order( + ids=[1], + project=1, ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/dm/views/{jsonable_encoder(id)}/", - method="GET", + "api/dm/views/order/", + method="POST", + json={ + "ids": ids, + "project": project, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return typing.cast( - View, - construct_type( - type_=View, # type: ignore - object_=_response.json(), - ), - ) + return _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + async def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Delete a specific view by ID. + Delete all views for a specific project. Parameters ---------- - id : str - View ID + project : int + Project ID request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -606,16 +612,19 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio async def main() -> None: - await client.views.delete( - id="id", + await client.views.delete_all( + project=1, ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/dm/views/{jsonable_encoder(id)}/", + "api/dm/views/reset/", method="DELETE", + params={ + "project": project, + }, request_options=request_options, ) try: @@ -626,28 +635,15 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def update( - self, - id: str, - *, - data: typing.Optional[ViewsUpdateRequestData] = OMIT, - project: typing.Optional[int] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> View: + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> View: """ - Update view data with additional filters and other information for a specific project. + Get the details about a specific view in the data manager Parameters ---------- id : str View ID - data : typing.Optional[ViewsUpdateRequestData] - Custom view data - - project : typing.Optional[int] - Project ID - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -668,7 +664,7 @@ async def update( async def main() -> None: - await client.views.update( + await client.views.get( id="id", ) @@ -677,18 +673,8 @@ async def main() -> None: """ _response = await self._client_wrapper.httpx_client.request( f"api/dm/views/{jsonable_encoder(id)}/", - method="PATCH", - json={ - "data": convert_and_respect_annotation_metadata( - object_=data, annotation=ViewsUpdateRequestData, direction="write" - ), - "project": project, - }, - headers={ - "content-type": "application/json", - }, + method="GET", request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -704,18 +690,14 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def update_order( - self, *, project: int, ids: typing.Sequence[int], request_options: typing.Optional[RequestOptions] = None - ) -> None: + async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Update the order field of views based on the provided list of view IDs + Delete a specific view by ID. Parameters ---------- - project : int - - ids : typing.Sequence[int] - A list of view IDs in the desired order. + id : str + View ID request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -736,26 +718,17 @@ async def update_order( async def main() -> None: - await client.views.update_order( - project=1, - ids=[1], + await client.views.delete( + id="id", ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/dm/views/order/", - method="POST", - json={ - "project": project, - "ids": ids, - }, - headers={ - "content-type": "application/json", - }, + f"api/dm/views/{jsonable_encoder(id)}/", + method="DELETE", request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -765,13 +738,26 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None: + async def update( + self, + id: str, + *, + data: typing.Optional[ViewsUpdateRequestData] = OMIT, + project: typing.Optional[int] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> View: """ - Delete all views for a specific project. + Update view data with additional filters and other information for a specific project. Parameters ---------- - project : int + id : str + View ID + + data : typing.Optional[ViewsUpdateRequestData] + Custom view data + + project : typing.Optional[int] Project ID request_options : typing.Optional[RequestOptions] @@ -779,7 +765,8 @@ async def delete_all(self, *, project: int, request_options: typing.Optional[Req Returns ------- - None + View + Examples -------- @@ -793,24 +780,37 @@ async def delete_all(self, *, project: int, request_options: typing.Optional[Req async def main() -> None: - await client.views.delete_all( - project=1, + await client.views.update( + id="id", ) asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - "api/dm/views/reset/", - method="DELETE", - params={ + f"api/dm/views/{jsonable_encoder(id)}/", + method="PATCH", + json={ + "data": convert_and_respect_annotation_metadata( + object_=data, annotation=ViewsUpdateRequestData, direction="write" + ), "project": project, }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: - return + return typing.cast( + View, + construct_type( + type_=View, # type: ignore + object_=_response.json(), + ), + ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) diff --git a/src/label_studio_sdk/webhooks/client.py b/src/label_studio_sdk/webhooks/client.py index 890357172..66c018a20 100644 --- a/src/label_studio_sdk/webhooks/client.py +++ b/src/label_studio_sdk/webhooks/client.py @@ -8,9 +8,9 @@ from json.decoder import JSONDecodeError from ..core.api_error import ApiError from ..types.actions_enum import ActionsEnum +from .types.webhooks_info_response import WebhooksInfoResponse from ..core.jsonable_encoder import jsonable_encoder from ..types.webhook_serializer_for_update import WebhookSerializerForUpdate -from .types.webhooks_info_response import WebhooksInfoResponse from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters @@ -75,12 +75,12 @@ def create( self, *, url: str, - project: typing.Optional[int] = OMIT, - send_payload: typing.Optional[bool] = OMIT, - send_for_all_actions: typing.Optional[bool] = OMIT, + actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, headers: typing.Optional[typing.Optional[typing.Any]] = OMIT, is_active: typing.Optional[bool] = OMIT, - actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, + project: typing.Optional[int] = OMIT, + send_for_all_actions: typing.Optional[bool] = OMIT, + send_payload: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Webhook: """ @@ -91,20 +91,20 @@ def create( url : str URL of webhook - project : typing.Optional[int] - - send_payload : typing.Optional[bool] - If value is False send only action - - send_for_all_actions : typing.Optional[bool] - If value is False - used only for actions from WebhookAction + actions : typing.Optional[typing.Sequence[ActionsEnum]] headers : typing.Optional[typing.Optional[typing.Any]] is_active : typing.Optional[bool] If value is False the webhook is disabled - actions : typing.Optional[typing.Sequence[ActionsEnum]] + project : typing.Optional[int] + + send_for_all_actions : typing.Optional[bool] + If value is False - used only for actions from WebhookAction + + send_payload : typing.Optional[bool] + If value is False send only action request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -129,13 +129,13 @@ def create( "api/webhooks/", method="POST", json={ - "project": project, - "url": url, - "send_payload": send_payload, - "send_for_all_actions": send_for_all_actions, + "actions": actions, "headers": headers, "is_active": is_active, - "actions": actions, + "project": project, + "send_for_all_actions": send_for_all_actions, + "send_payload": send_payload, + "url": url, }, headers={ "content-type": "application/json", @@ -157,6 +157,59 @@ def create( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def info( + self, + *, + organization_only: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> WebhooksInfoResponse: + """ + Get descriptions of all available webhook actions to set up webhooks. + + Parameters + ---------- + organization_only : typing.Optional[bool] + organization-only or not + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WebhooksInfoResponse + Object with webhook action descriptions. + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.webhooks.info() + """ + _response = self._client_wrapper.httpx_client.request( + "api/webhooks/info/", + method="GET", + params={ + "organization-only": organization_only, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + WebhooksInfoResponse, + construct_type( + type_=WebhooksInfoResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> Webhook: """ Parameters @@ -242,12 +295,12 @@ def update( self, id: int, *, - url: typing.Optional[str] = OMIT, - send_payload: typing.Optional[bool] = OMIT, - send_for_all_actions: typing.Optional[bool] = OMIT, + actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, headers: typing.Optional[typing.Optional[typing.Any]] = OMIT, is_active: typing.Optional[bool] = OMIT, - actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, + send_for_all_actions: typing.Optional[bool] = OMIT, + send_payload: typing.Optional[bool] = OMIT, + url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> WebhookSerializerForUpdate: """ @@ -255,21 +308,21 @@ def update( ---------- id : int - url : typing.Optional[str] - URL of webhook - - send_payload : typing.Optional[bool] - If value is False send only action - - send_for_all_actions : typing.Optional[bool] - If value is False - used only for actions from WebhookAction + actions : typing.Optional[typing.Sequence[ActionsEnum]] headers : typing.Optional[typing.Optional[typing.Any]] is_active : typing.Optional[bool] If value is False the webhook is disabled - actions : typing.Optional[typing.Sequence[ActionsEnum]] + send_for_all_actions : typing.Optional[bool] + If value is False - used only for actions from WebhookAction + + send_payload : typing.Optional[bool] + If value is False send only action + + url : typing.Optional[str] + URL of webhook request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -294,12 +347,12 @@ def update( f"api/webhooks/{jsonable_encoder(id)}/", method="PATCH", json={ - "url": url, - "send_payload": send_payload, - "send_for_all_actions": send_for_all_actions, + "actions": actions, "headers": headers, "is_active": is_active, - "actions": actions, + "send_for_all_actions": send_for_all_actions, + "send_payload": send_payload, + "url": url, }, headers={ "content-type": "application/json", @@ -321,59 +374,6 @@ def update( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def info( - self, - *, - organization_only: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WebhooksInfoResponse: - """ - Get descriptions of all available webhook actions to set up webhooks. - - Parameters - ---------- - organization_only : typing.Optional[bool] - organization-only or not - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WebhooksInfoResponse - Object with webhook action descriptions. - - Examples - -------- - from label_studio_sdk import LabelStudio - - client = LabelStudio( - api_key="YOUR_API_KEY", - ) - client.webhooks.info() - """ - _response = self._client_wrapper.httpx_client.request( - "api/webhooks/info/", - method="GET", - params={ - "organization-only": organization_only, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - WebhooksInfoResponse, - construct_type( - type_=WebhooksInfoResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - class AsyncWebhooksClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -441,12 +441,12 @@ async def create( self, *, url: str, - project: typing.Optional[int] = OMIT, - send_payload: typing.Optional[bool] = OMIT, - send_for_all_actions: typing.Optional[bool] = OMIT, + actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, headers: typing.Optional[typing.Optional[typing.Any]] = OMIT, is_active: typing.Optional[bool] = OMIT, - actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, + project: typing.Optional[int] = OMIT, + send_for_all_actions: typing.Optional[bool] = OMIT, + send_payload: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Webhook: """ @@ -457,20 +457,20 @@ async def create( url : str URL of webhook - project : typing.Optional[int] - - send_payload : typing.Optional[bool] - If value is False send only action - - send_for_all_actions : typing.Optional[bool] - If value is False - used only for actions from WebhookAction + actions : typing.Optional[typing.Sequence[ActionsEnum]] headers : typing.Optional[typing.Optional[typing.Any]] is_active : typing.Optional[bool] If value is False the webhook is disabled - actions : typing.Optional[typing.Sequence[ActionsEnum]] + project : typing.Optional[int] + + send_for_all_actions : typing.Optional[bool] + If value is False - used only for actions from WebhookAction + + send_payload : typing.Optional[bool] + If value is False send only action request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -503,13 +503,13 @@ async def main() -> None: "api/webhooks/", method="POST", json={ - "project": project, - "url": url, - "send_payload": send_payload, - "send_for_all_actions": send_for_all_actions, + "actions": actions, "headers": headers, "is_active": is_active, - "actions": actions, + "project": project, + "send_for_all_actions": send_for_all_actions, + "send_payload": send_payload, + "url": url, }, headers={ "content-type": "application/json", @@ -531,6 +531,67 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def info( + self, + *, + organization_only: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> WebhooksInfoResponse: + """ + Get descriptions of all available webhook actions to set up webhooks. + + Parameters + ---------- + organization_only : typing.Optional[bool] + organization-only or not + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + WebhooksInfoResponse + Object with webhook action descriptions. + + Examples + -------- + import asyncio + + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.webhooks.info() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "api/webhooks/info/", + method="GET", + params={ + "organization-only": organization_only, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + WebhooksInfoResponse, + construct_type( + type_=WebhooksInfoResponse, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> Webhook: """ Parameters @@ -632,12 +693,12 @@ async def update( self, id: int, *, - url: typing.Optional[str] = OMIT, - send_payload: typing.Optional[bool] = OMIT, - send_for_all_actions: typing.Optional[bool] = OMIT, + actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, headers: typing.Optional[typing.Optional[typing.Any]] = OMIT, is_active: typing.Optional[bool] = OMIT, - actions: typing.Optional[typing.Sequence[ActionsEnum]] = OMIT, + send_for_all_actions: typing.Optional[bool] = OMIT, + send_payload: typing.Optional[bool] = OMIT, + url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> WebhookSerializerForUpdate: """ @@ -645,21 +706,21 @@ async def update( ---------- id : int - url : typing.Optional[str] - URL of webhook - - send_payload : typing.Optional[bool] - If value is False send only action - - send_for_all_actions : typing.Optional[bool] - If value is False - used only for actions from WebhookAction + actions : typing.Optional[typing.Sequence[ActionsEnum]] headers : typing.Optional[typing.Optional[typing.Any]] is_active : typing.Optional[bool] If value is False the webhook is disabled - actions : typing.Optional[typing.Sequence[ActionsEnum]] + send_for_all_actions : typing.Optional[bool] + If value is False - used only for actions from WebhookAction + + send_payload : typing.Optional[bool] + If value is False send only action + + url : typing.Optional[str] + URL of webhook request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -692,12 +753,12 @@ async def main() -> None: f"api/webhooks/{jsonable_encoder(id)}/", method="PATCH", json={ - "url": url, - "send_payload": send_payload, - "send_for_all_actions": send_for_all_actions, + "actions": actions, "headers": headers, "is_active": is_active, - "actions": actions, + "send_for_all_actions": send_for_all_actions, + "send_payload": send_payload, + "url": url, }, headers={ "content-type": "application/json", @@ -718,64 +779,3 @@ async def main() -> None: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def info( - self, - *, - organization_only: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> WebhooksInfoResponse: - """ - Get descriptions of all available webhook actions to set up webhooks. - - Parameters - ---------- - organization_only : typing.Optional[bool] - organization-only or not - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - WebhooksInfoResponse - Object with webhook action descriptions. - - Examples - -------- - import asyncio - - from label_studio_sdk import AsyncLabelStudio - - client = AsyncLabelStudio( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.webhooks.info() - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "api/webhooks/info/", - method="GET", - params={ - "organization-only": organization_only, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - WebhooksInfoResponse, - construct_type( - type_=WebhooksInfoResponse, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response.py index 5bac62c5d..fa246474c 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response.py @@ -3,62 +3,59 @@ from ...core.unchecked_base_model import UncheckedBaseModel import typing_extensions import typing -from .webhooks_info_response_project_created import WebhooksInfoResponseProjectCreated +from .webhooks_info_response_annotations_created import WebhooksInfoResponseAnnotationsCreated from ...core.serialization import FieldMetadata -from .webhooks_info_response_project_updated import WebhooksInfoResponseProjectUpdated -from .webhooks_info_response_project_deleted import WebhooksInfoResponseProjectDeleted -from .webhooks_info_response_tasks_created import WebhooksInfoResponseTasksCreated -from .webhooks_info_response_tasks_deleted import WebhooksInfoResponseTasksDeleted +from .webhooks_info_response_annotations_deleted import WebhooksInfoResponseAnnotationsDeleted from .webhooks_info_response_annotation_created import WebhooksInfoResponseAnnotationCreated -from .webhooks_info_response_annotations_created import WebhooksInfoResponseAnnotationsCreated from .webhooks_info_response_annotation_updated import WebhooksInfoResponseAnnotationUpdated -from .webhooks_info_response_annotations_deleted import WebhooksInfoResponseAnnotationsDeleted from .webhooks_info_response_label_link_created import WebhooksInfoResponseLabelLinkCreated -from .webhooks_info_response_label_link_updated import WebhooksInfoResponseLabelLinkUpdated from .webhooks_info_response_label_link_deleted import WebhooksInfoResponseLabelLinkDeleted +from .webhooks_info_response_label_link_updated import WebhooksInfoResponseLabelLinkUpdated +from .webhooks_info_response_project_created import WebhooksInfoResponseProjectCreated +from .webhooks_info_response_project_deleted import WebhooksInfoResponseProjectDeleted +from .webhooks_info_response_project_updated import WebhooksInfoResponseProjectUpdated +from .webhooks_info_response_reviews_deleted import WebhooksInfoResponseReviewsDeleted from .webhooks_info_response_review_created import WebhooksInfoResponseReviewCreated from .webhooks_info_response_review_updated import WebhooksInfoResponseReviewUpdated -from .webhooks_info_response_reviews_deleted import WebhooksInfoResponseReviewsDeleted +from .webhooks_info_response_tasks_created import WebhooksInfoResponseTasksCreated +from .webhooks_info_response_tasks_deleted import WebhooksInfoResponseTasksDeleted from ...core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic class WebhooksInfoResponse(UncheckedBaseModel): - project_created: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseProjectCreated], FieldMetadata(alias="PROJECT_CREATED") - ] = None - project_updated: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseProjectUpdated], FieldMetadata(alias="PROJECT_UPDATED") - ] = None - project_deleted: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseProjectDeleted], FieldMetadata(alias="PROJECT_DELETED") - ] = None - tasks_created: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseTasksCreated], FieldMetadata(alias="TASKS_CREATED") + annotations_created: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseAnnotationsCreated], FieldMetadata(alias="ANNOTATIONS_CREATED") ] = None - tasks_deleted: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseTasksDeleted], FieldMetadata(alias="TASKS_DELETED") + annotations_deleted: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseAnnotationsDeleted], FieldMetadata(alias="ANNOTATIONS_DELETED") ] = None annotation_created: typing_extensions.Annotated[ typing.Optional[WebhooksInfoResponseAnnotationCreated], FieldMetadata(alias="ANNOTATION_CREATED") ] = None - annotations_created: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseAnnotationsCreated], FieldMetadata(alias="ANNOTATIONS_CREATED") - ] = None annotation_updated: typing_extensions.Annotated[ typing.Optional[WebhooksInfoResponseAnnotationUpdated], FieldMetadata(alias="ANNOTATION_UPDATED") ] = None - annotations_deleted: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseAnnotationsDeleted], FieldMetadata(alias="ANNOTATIONS_DELETED") - ] = None label_link_created: typing_extensions.Annotated[ typing.Optional[WebhooksInfoResponseLabelLinkCreated], FieldMetadata(alias="LABEL_LINK_CREATED") ] = None + label_link_deleted: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseLabelLinkDeleted], FieldMetadata(alias="LABEL_LINK_DELETED") + ] = None label_link_updated: typing_extensions.Annotated[ typing.Optional[WebhooksInfoResponseLabelLinkUpdated], FieldMetadata(alias="LABEL_LINK_UPDATED") ] = None - label_link_deleted: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseLabelLinkDeleted], FieldMetadata(alias="LABEL_LINK_DELETED") + project_created: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseProjectCreated], FieldMetadata(alias="PROJECT_CREATED") + ] = None + project_deleted: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseProjectDeleted], FieldMetadata(alias="PROJECT_DELETED") + ] = None + project_updated: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseProjectUpdated], FieldMetadata(alias="PROJECT_UPDATED") + ] = None + reviews_deleted: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseReviewsDeleted], FieldMetadata(alias="REVIEWS_DELETED") ] = None review_created: typing_extensions.Annotated[ typing.Optional[WebhooksInfoResponseReviewCreated], FieldMetadata(alias="REVIEW_CREATED") @@ -66,8 +63,11 @@ class WebhooksInfoResponse(UncheckedBaseModel): review_updated: typing_extensions.Annotated[ typing.Optional[WebhooksInfoResponseReviewUpdated], FieldMetadata(alias="REVIEW_UPDATED") ] = None - reviews_deleted: typing_extensions.Annotated[ - typing.Optional[WebhooksInfoResponseReviewsDeleted], FieldMetadata(alias="REVIEWS_DELETED") + tasks_created: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseTasksCreated], FieldMetadata(alias="TASKS_CREATED") + ] = None + tasks_deleted: typing_extensions.Annotated[ + typing.Optional[WebhooksInfoResponseTasksDeleted], FieldMetadata(alias="TASKS_DELETED") ] = None if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py index cb8f5c1aa..6a5289ca1 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseAnnotationCreated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py index 59a330e08..bba43fab8 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseAnnotationUpdated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py index 6209e8bda..197a97a05 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseAnnotationsCreated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py index 56d4b4d48..955fc3264 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseAnnotationsDeleted(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py index d1f0144b2..b048861e8 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseLabelLinkCreated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py index bdc9d6ccf..cd0cef208 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseLabelLinkDeleted(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py index 4bb2fbd0b..020c41ffd 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseLabelLinkUpdated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py index 225d8efb7..8e3eaf460 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseProjectCreated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py index fb9c507a1..735d0c65b 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseProjectDeleted(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py index b91425df7..c673fa5b7 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseProjectUpdated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py index c1b6abc4e..96f999472 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseReviewCreated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py index 8d157869e..3a19a556b 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseReviewUpdated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py index 7ad946f5a..0550a9909 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseReviewsDeleted(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py index 696e725e5..554b474bb 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseTasksCreated(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py b/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py index db18eb66a..e5cb949eb 100644 --- a/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py +++ b/src/label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py @@ -9,9 +9,9 @@ class WebhooksInfoResponseTasksDeleted(UncheckedBaseModel): - name: str description: str key: str + name: str organization_only: typing_extensions.Annotated[bool, FieldMetadata(alias="organization-only")] if IS_PYDANTIC_V2: diff --git a/src/label_studio_sdk/workspaces/client.py b/src/label_studio_sdk/workspaces/client.py index f3accb0ca..e7a0a5f71 100644 --- a/src/label_studio_sdk/workspaces/client.py +++ b/src/label_studio_sdk/workspaces/client.py @@ -83,10 +83,10 @@ def create( self, *, title: str, - description: typing.Optional[str] = OMIT, color: typing.Optional[str] = OMIT, - is_personal: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, is_archived: typing.Optional[bool] = OMIT, + is_personal: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Workspace: """ @@ -97,17 +97,17 @@ def create( title : str Workspace name + color : typing.Optional[str] + description : typing.Optional[str] Workspace description - color : typing.Optional[str] + is_archived : typing.Optional[bool] + Workspace is archived is_personal : typing.Optional[bool] Workspace is a personal user workspace - is_archived : typing.Optional[bool] - Workspace is archived - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -131,11 +131,11 @@ def create( "api/workspaces/", method="POST", json={ - "title": title, - "description": description, "color": color, - "is_personal": is_personal, + "description": description, "is_archived": is_archived, + "is_personal": is_personal, + "title": title, }, headers={ "content-type": "application/json", @@ -246,11 +246,11 @@ def update( self, id: int, *, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, color: typing.Optional[str] = OMIT, - is_personal: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, is_archived: typing.Optional[bool] = OMIT, + is_personal: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Workspace: """ @@ -260,19 +260,19 @@ def update( ---------- id : int - title : typing.Optional[str] - Workspace name + color : typing.Optional[str] description : typing.Optional[str] Workspace description - color : typing.Optional[str] + is_archived : typing.Optional[bool] + Workspace is archived is_personal : typing.Optional[bool] Workspace is a personal user workspace - is_archived : typing.Optional[bool] - Workspace is archived + title : typing.Optional[str] + Workspace name request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -297,11 +297,11 @@ def update( f"api/workspaces/{jsonable_encoder(id)}/", method="PATCH", json={ - "title": title, - "description": description, "color": color, - "is_personal": is_personal, + "description": description, "is_archived": is_archived, + "is_personal": is_personal, + "title": title, }, headers={ "content-type": "application/json", @@ -399,10 +399,10 @@ async def create( self, *, title: str, - description: typing.Optional[str] = OMIT, color: typing.Optional[str] = OMIT, - is_personal: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, is_archived: typing.Optional[bool] = OMIT, + is_personal: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Workspace: """ @@ -413,17 +413,17 @@ async def create( title : str Workspace name + color : typing.Optional[str] + description : typing.Optional[str] Workspace description - color : typing.Optional[str] + is_archived : typing.Optional[bool] + Workspace is archived is_personal : typing.Optional[bool] Workspace is a personal user workspace - is_archived : typing.Optional[bool] - Workspace is archived - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -455,11 +455,11 @@ async def main() -> None: "api/workspaces/", method="POST", json={ - "title": title, - "description": description, "color": color, - "is_personal": is_personal, + "description": description, "is_archived": is_archived, + "is_personal": is_personal, + "title": title, }, headers={ "content-type": "application/json", @@ -586,11 +586,11 @@ async def update( self, id: int, *, - title: typing.Optional[str] = OMIT, - description: typing.Optional[str] = OMIT, color: typing.Optional[str] = OMIT, - is_personal: typing.Optional[bool] = OMIT, + description: typing.Optional[str] = OMIT, is_archived: typing.Optional[bool] = OMIT, + is_personal: typing.Optional[bool] = OMIT, + title: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Workspace: """ @@ -600,19 +600,19 @@ async def update( ---------- id : int - title : typing.Optional[str] - Workspace name + color : typing.Optional[str] description : typing.Optional[str] Workspace description - color : typing.Optional[str] + is_archived : typing.Optional[bool] + Workspace is archived is_personal : typing.Optional[bool] Workspace is a personal user workspace - is_archived : typing.Optional[bool] - Workspace is archived + title : typing.Optional[str] + Workspace name request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -645,11 +645,11 @@ async def main() -> None: f"api/workspaces/{jsonable_encoder(id)}/", method="PATCH", json={ - "title": title, - "description": description, "color": color, - "is_personal": is_personal, + "description": description, "is_archived": is_archived, + "is_personal": is_personal, + "title": title, }, headers={ "content-type": "application/json", diff --git a/tests/export_storage/test_azure.py b/tests/export_storage/test_azure.py index 07b539742..4ab874e64 100644 --- a/tests/export_storage/test_azure.py +++ b/tests/export_storage/test_azure.py @@ -9,52 +9,52 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "type": "type", - "synchronizable": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "can_delete_objects": True, + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "type": None, - "synchronizable": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "can_delete_objects": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -67,48 +67,48 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "can_delete_objects": True, + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "can_delete_objects": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.azure.create() validate_response(response, expected_response, expected_types) @@ -117,50 +117,63 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.export_storage.azure.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.export_storage.azure.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "can_delete_objects": True, + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "can_delete_objects": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.azure.get(id=1) validate_response(response, expected_response, expected_types) @@ -184,48 +197,48 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "can_delete_objects": True, + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "can_delete_objects": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.azure.update(id=1) validate_response(response, expected_response, expected_types) @@ -236,64 +249,51 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "can_delete_objects": True, + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "can_delete_objects": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.azure.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.export_storage.azure.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.export_storage.azure.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.export_storage.azure.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/export_storage/test_gcs.py b/tests/export_storage/test_gcs.py index a4e3dbb70..aca0c7f56 100644 --- a/tests/export_storage/test_gcs.py +++ b/tests/export_storage/test_gcs.py @@ -9,52 +9,52 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "type": "type", - "synchronizable": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "type": None, - "synchronizable": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -67,48 +67,48 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.gcs.create() validate_response(response, expected_response, expected_types) @@ -117,50 +117,63 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.export_storage.gcs.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.export_storage.gcs.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.gcs.get(id=1) validate_response(response, expected_response, expected_types) @@ -184,48 +197,48 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.gcs.update(id=1) validate_response(response, expected_response, expected_types) @@ -236,64 +249,51 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "prefix": "prefix", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "prefix": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.gcs.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.export_storage.gcs.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.export_storage.gcs.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.export_storage.gcs.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/export_storage/test_local.py b/tests/export_storage/test_local.py index 291e8528f..206e4f682 100644 --- a/tests/export_storage/test_local.py +++ b/tests/export_storage/test_local.py @@ -9,46 +9,46 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -61,42 +61,42 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.local.create() validate_response(response, expected_response, expected_types) @@ -105,44 +105,57 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.export_storage.local.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.export_storage.local.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.local.get(id=1) validate_response(response, expected_response, expected_types) @@ -166,42 +179,42 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.local.update(id=1) validate_response(response, expected_response, expected_types) @@ -212,58 +225,45 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.local.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.export_storage.local.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.export_storage.local.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.export_storage.local.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/export_storage/test_redis.py b/tests/export_storage/test_redis.py index dade43c0f..1486f83a7 100644 --- a/tests/export_storage/test_redis.py +++ b/tests/export_storage/test_redis.py @@ -9,54 +9,54 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "can_delete_objects": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -69,50 +69,50 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "can_delete_objects": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.redis.create() validate_response(response, expected_response, expected_types) @@ -121,52 +121,65 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.export_storage.redis.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.export_storage.redis.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "can_delete_objects": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.redis.get(id=1) validate_response(response, expected_response, expected_types) @@ -190,50 +203,50 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "can_delete_objects": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.redis.update(id=1) validate_response(response, expected_response, expected_types) @@ -244,66 +257,53 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "can_delete_objects": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.redis.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.export_storage.redis.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.export_storage.redis.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.export_storage.redis.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/export_storage/test_s3.py b/tests/export_storage/test_s3.py index 00ffcca5f..1f1f29ce0 100644 --- a/tests/export_storage/test_s3.py +++ b/tests/export_storage/test_s3.py @@ -9,60 +9,60 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -75,56 +75,56 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.s3.create() validate_response(response, expected_response, expected_types) @@ -133,58 +133,71 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.export_storage.s3.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.export_storage.s3.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.s3.get(id=1) validate_response(response, expected_response, expected_types) @@ -208,56 +221,56 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.s3.update(id=1) validate_response(response, expected_response, expected_types) @@ -268,72 +281,59 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.s3.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.export_storage.s3.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.export_storage.s3.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.export_storage.s3.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/export_storage/test_s3s.py b/tests/export_storage/test_s3s.py index 5ac791d5d..dfae7d9fe 100644 --- a/tests/export_storage/test_s3s.py +++ b/tests/export_storage/test_s3s.py @@ -9,66 +9,66 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -81,128 +81,141 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } - response = client.export_storage.s3s.create(role_arn="role_arn", project=1) + response = client.export_storage.s3s.create(project=1, role_arn="role_arn") validate_response(response, expected_response, expected_types) - async_response = await async_client.export_storage.s3s.create(role_arn="role_arn", project=1) + async_response = await async_client.export_storage.s3s.create(project=1, role_arn="role_arn") validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.export_storage.s3s.validate(project=1, role_arn="role_arn") # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.export_storage.s3s.validate(project=1, role_arn="role_arn") # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.s3s.get(id=1) validate_response(response, expected_response, expected_types) @@ -226,62 +239,62 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.s3s.update(id=1) validate_response(response, expected_response, expected_types) @@ -292,78 +305,65 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "can_delete_objects": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "can_delete_objects": True, - "bucket": "bucket", "prefix": "prefix", + "project": 1, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "can_delete_objects": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "can_delete_objects": None, - "bucket": None, "prefix": None, + "project": "integer", "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.export_storage.s3s.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.export_storage.s3s.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.export_storage.s3s.validate(role_arn="role_arn", project=1) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.export_storage.s3s.validate(role_arn="role_arn", project=1) # type: ignore[func-returns-value] - is None - ) diff --git a/tests/import_storage/test_azure.py b/tests/import_storage/test_azure.py index adc5a5515..c531ff055 100644 --- a/tests/import_storage/test_azure.py +++ b/tests/import_storage/test_azure.py @@ -9,54 +9,54 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -69,50 +69,50 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.azure.create() validate_response(response, expected_response, expected_types) @@ -121,52 +121,65 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.import_storage.azure.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.import_storage.azure.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.azure.get(id=1) validate_response(response, expected_response, expected_types) @@ -190,50 +203,50 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.azure.update(id=1) validate_response(response, expected_response, expected_types) @@ -244,66 +257,53 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, - "container": "container", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, - "account_name": "account_name", "account_key": "account_key", + "account_name": "account_name", + "container": "container", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, - "container": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, - "account_name": None, "account_key": None, + "account_name": None, + "container": None, + "created_at": "datetime", + "description": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.azure.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.import_storage.azure.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.import_storage.azure.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.import_storage.azure.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/import_storage/test_gcs.py b/tests/import_storage/test_gcs.py index 782a94062..0ddbda076 100644 --- a/tests/import_storage/test_gcs.py +++ b/tests/import_storage/test_gcs.py @@ -9,54 +9,54 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -69,50 +69,50 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.gcs.create() validate_response(response, expected_response, expected_types) @@ -121,52 +121,65 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.import_storage.gcs.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.import_storage.gcs.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.gcs.get(id=1) validate_response(response, expected_response, expected_types) @@ -190,50 +203,50 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.gcs.update(id=1) validate_response(response, expected_response, expected_types) @@ -244,66 +257,53 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "bucket": "bucket", - "prefix": "prefix", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "google_application_credentials": "google_application_credentials", "google_project_id": "google_project_id", + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "prefix": "prefix", + "presign": True, "presign_ttl": 1, "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "bucket": None, - "prefix": None, - "regex_filter": None, - "use_blob_urls": None, + "created_at": "datetime", + "description": None, "google_application_credentials": None, "google_project_id": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "prefix": None, + "presign": None, "presign_ttl": "integer", "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.gcs.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.import_storage.gcs.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.import_storage.gcs.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.import_storage.gcs.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/import_storage/test_local.py b/tests/import_storage/test_local.py index ad60f52c2..0829644b7 100644 --- a/tests/import_storage/test_local.py +++ b/tests/import_storage/test_local.py @@ -9,44 +9,44 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -59,40 +59,40 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.local.create() validate_response(response, expected_response, expected_types) @@ -101,42 +101,55 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.import_storage.local.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.import_storage.local.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.local.get(id=1) validate_response(response, expected_response, expected_types) @@ -160,40 +173,40 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.local.update(id=1) validate_response(response, expected_response, expected_types) @@ -204,56 +217,43 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", - "regex_filter": "regex_filter", - "use_blob_urls": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", + "path": "path", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "path": None, - "regex_filter": None, - "use_blob_urls": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", + "path": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.local.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.import_storage.local.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.import_storage.local.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.import_storage.local.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/import_storage/test_redis.py b/tests/import_storage/test_redis.py index fdf15e17a..62714bb8a 100644 --- a/tests/import_storage/test_redis.py +++ b/tests/import_storage/test_redis.py @@ -9,52 +9,52 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -67,48 +67,48 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.redis.create() validate_response(response, expected_response, expected_types) @@ -117,50 +117,63 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.import_storage.redis.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.import_storage.redis.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.redis.get(id=1) validate_response(response, expected_response, expected_types) @@ -184,48 +197,48 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.redis.update(id=1) validate_response(response, expected_response, expected_types) @@ -236,64 +249,51 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "type": "type", - "synchronizable": True, - "path": "path", + "created_at": "2024-01-15T09:30:00Z", + "db": 1, + "description": "description", "host": "host", - "port": "port", - "password": "password", - "regex_filter": "regex_filter", - "use_blob_urls": True, + "id": 1, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "db": 1, + "password": "password", + "path": "path", + "port": "port", "project": 1, + "regex_filter": "regex_filter", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { - "id": "integer", - "type": None, - "synchronizable": None, - "path": None, + "created_at": "datetime", + "db": "integer", + "description": None, "host": None, - "port": None, - "password": None, - "regex_filter": None, - "use_blob_urls": None, + "id": "integer", "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "db": "integer", + "password": None, + "path": None, + "port": None, "project": "integer", + "regex_filter": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.redis.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.import_storage.redis.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.import_storage.redis.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.import_storage.redis.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/import_storage/test_s3.py b/tests/import_storage/test_s3.py index fe568b0ca..505e0a2b6 100644 --- a/tests/import_storage/test_s3.py +++ b/tests/import_storage/test_s3.py @@ -9,64 +9,64 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -79,60 +79,60 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.s3.create() validate_response(response, expected_response, expected_types) @@ -141,62 +141,75 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.import_storage.s3.validate() # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.import_storage.s3.validate() # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.s3.get(id=1) validate_response(response, expected_response, expected_types) @@ -220,60 +233,60 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.s3.update(id=1) validate_response(response, expected_response, expected_types) @@ -284,76 +297,63 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", "s3_endpoint": "s3_endpoint", - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, "s3_endpoint": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.s3.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.import_storage.s3.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.import_storage.s3.validate() # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.import_storage.s3.validate() # type: ignore[func-returns-value] - is None - ) diff --git a/tests/import_storage/test_s3s.py b/tests/import_storage/test_s3s.py index 3042b9f84..adde2563d 100644 --- a/tests/import_storage/test_s3s.py +++ b/tests/import_storage/test_s3s.py @@ -9,70 +9,70 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } }, ) @@ -85,136 +85,149 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } - response = client.import_storage.s3s.create(role_arn="role_arn", project=1) + response = client.import_storage.s3s.create(project=1, role_arn="role_arn") validate_response(response, expected_response, expected_types) - async_response = await async_client.import_storage.s3s.create(role_arn="role_arn", project=1) + async_response = await async_client.import_storage.s3s.create(project=1, role_arn="role_arn") validate_response(async_response, expected_response, expected_types) +async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.import_storage.s3s.validate(project=1, role_arn="role_arn") # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.import_storage.s3s.validate(project=1, role_arn="role_arn") # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.s3s.get(id=1) validate_response(response, expected_response, expected_types) @@ -238,66 +251,66 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.s3s.update(id=1) validate_response(response, expected_response, expected_types) @@ -308,82 +321,69 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "aws_access_key_id": "aws_access_key_id", + "aws_secret_access_key": "aws_secret_access_key", + "aws_session_token": "aws_session_token", + "aws_sse_kms_key_id": "aws_sse_kms_key_id", + "bucket": "bucket", + "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "external_id": "external_id", "id": 1, - "type": "type", - "synchronizable": True, - "presign": True, "last_sync": "2024-01-15T09:30:00Z", "last_sync_count": 1, "last_sync_job": "last_sync_job", - "status": "initialized", - "traceback": "traceback", + "legacy_auth": True, "meta": {"key": "value"}, - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "bucket": "bucket", "prefix": "prefix", + "presign": True, + "presign_ttl": 1, + "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", - "use_blob_urls": True, - "aws_access_key_id": "aws_access_key_id", - "aws_secret_access_key": "aws_secret_access_key", - "aws_session_token": "aws_session_token", - "aws_sse_kms_key_id": "aws_sse_kms_key_id", "region_name": "region_name", - "s3_endpoint": "s3_endpoint", - "external_id": "external_id", "role_arn": "role_arn", - "legacy_auth": True, - "presign_ttl": 1, - "recursive_scan": True, - "project": 1, + "s3_endpoint": "s3_endpoint", + "status": "initialized", + "synchronizable": True, + "title": "title", + "traceback": "traceback", + "type": "type", + "use_blob_urls": True, } expected_types: typing.Any = { + "aws_access_key_id": None, + "aws_secret_access_key": None, + "aws_session_token": None, + "aws_sse_kms_key_id": None, + "bucket": None, + "created_at": "datetime", + "description": None, + "external_id": None, "id": "integer", - "type": None, - "synchronizable": None, - "presign": None, "last_sync": "datetime", "last_sync_count": "integer", "last_sync_job": None, - "status": None, - "traceback": None, + "legacy_auth": None, "meta": None, - "title": None, - "description": None, - "created_at": "datetime", - "bucket": None, "prefix": None, + "presign": None, + "presign_ttl": "integer", + "project": "integer", + "recursive_scan": None, "regex_filter": None, - "use_blob_urls": None, - "aws_access_key_id": None, - "aws_secret_access_key": None, - "aws_session_token": None, - "aws_sse_kms_key_id": None, "region_name": None, - "s3_endpoint": None, - "external_id": None, "role_arn": None, - "legacy_auth": None, - "presign_ttl": "integer", - "recursive_scan": None, - "project": "integer", + "s3_endpoint": None, + "status": None, + "synchronizable": None, + "title": None, + "traceback": None, + "type": None, + "use_blob_urls": None, } response = client.import_storage.s3s.sync(id=1) validate_response(response, expected_response, expected_types) async_response = await async_client.import_storage.s3s.sync(id=1) validate_response(async_response, expected_response, expected_types) - - -async def test_validate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.import_storage.s3s.validate(role_arn="role_arn", project=1) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.import_storage.s3s.validate(role_arn="role_arn", project=1) # type: ignore[func-returns-value] - is None - ) diff --git a/tests/organizations/test_members.py b/tests/organizations/test_members.py index 604e81da4..014b01966 100644 --- a/tests/organizations/test_members.py +++ b/tests/organizations/test_members.py @@ -15,22 +15,22 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non { "id": 1, "organization": 1, + "role": "role", "user": { - "id": 1, - "username": "username", - "last_activity": "2024-01-15T09:30:00Z", "avatar": "avatar", + "contributed_to_projects": "contributed_to_projects", + "created_projects": "created_projects", + "id": 1, "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", "lse_fields": { + "email_notification_settings": "email_notification_settings", "invite_expired": "invite_expired", "invite_expired_at": "invite_expired_at", - "email_notification_settings": "email_notification_settings", }, "pause": "pause", - "created_projects": "created_projects", - "contributed_to_projects": "contributed_to_projects", + "username": "username", }, - "role": "role", } ], } @@ -44,22 +44,22 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non 0: { "id": "integer", "organization": "integer", + "role": None, "user": { - "id": "integer", - "username": None, - "last_activity": "datetime", "avatar": None, + "contributed_to_projects": None, + "created_projects": None, + "id": "integer", "initials": None, + "last_activity": "datetime", "lse_fields": { + "email_notification_settings": None, "invite_expired": None, "invite_expired_at": None, - "email_notification_settings": None, }, "pause": None, - "created_projects": None, - "contributed_to_projects": None, + "username": None, }, - "role": None, } }, ), @@ -75,78 +75,78 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No expected_response: typing.Any = { "id": 1, "organization": 1, + "role": "role", "user": { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "allow_newsletters": True, + "avatar": "avatar", + "contributed_to_projects": "contributed_to_projects", + "created_projects": "created_projects", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", "lse_fields": { + "email_notification_settings": "email_notification_settings", + "invite_activated": True, "invite_expired": "invite_expired", "invite_expired_at": "invite_expired_at", "invited_at": "2024-01-15T09:30:00Z", - "invite_activated": True, + "invited_by": 1, + "onboarding_state": "not_started", + "social_auth_finished": True, "trial_company": "trial_company", - "trial_role": "annotator", - "trial_models_in_production": "trial_models_in_production", "trial_experience_labeling": "trial_experience_labeling", "trial_license_enterprise": True, - "social_auth_finished": True, - "invited_by": 1, - "onboarding_state": "not_started", - "email_notification_settings": "email_notification_settings", + "trial_models_in_production": "trial_models_in_production", + "trial_role": "annotator", }, "pause": "pause", - "created_projects": "created_projects", - "contributed_to_projects": "contributed_to_projects", + "phone": "phone", + "username": "username", }, - "role": "role", } expected_types: typing.Any = { "id": "integer", "organization": "integer", + "role": None, "user": { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "allow_newsletters": None, + "avatar": None, + "contributed_to_projects": None, + "created_projects": None, + "custom_hotkeys": None, "date_joined": "datetime", + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, "lse_fields": { + "email_notification_settings": None, + "invite_activated": None, "invite_expired": None, "invite_expired_at": None, "invited_at": "datetime", - "invite_activated": None, + "invited_by": "integer", + "onboarding_state": None, + "social_auth_finished": None, "trial_company": None, - "trial_role": None, - "trial_models_in_production": None, "trial_experience_labeling": None, "trial_license_enterprise": None, - "social_auth_finished": None, - "invited_by": "integer", - "onboarding_state": None, - "email_notification_settings": None, + "trial_models_in_production": None, + "trial_role": None, }, "pause": None, - "created_projects": None, - "contributed_to_projects": None, + "phone": None, + "username": None, }, - "role": None, } response = client.organizations.members.update(id=1) validate_response(response, expected_response, expected_types) @@ -157,18 +157,18 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "user": 1, - "organization": 1, - "contributed_projects_count": "contributed_projects_count", "annotations_count": "annotations_count", + "contributed_projects_count": "contributed_projects_count", "created_at": "2024-01-15T09:30:00Z", + "organization": 1, + "user": 1, } expected_types: typing.Any = { - "user": "integer", - "organization": "integer", - "contributed_projects_count": None, "annotations_count": None, + "contributed_projects_count": None, "created_at": "datetime", + "organization": "integer", + "user": "integer", } response = client.organizations.members.get(id=1, user_pk=1) validate_response(response, expected_response, expected_types) diff --git a/tests/projects/test_exports.py b/tests/projects/test_exports.py index 59016e87f..61f5ddfa8 100644 --- a/tests/projects/test_exports.py +++ b/tests/projects/test_exports.py @@ -19,36 +19,36 @@ async def test_list_formats(client: LabelStudio, async_client: AsyncLabelStudio) async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "title": "title", - "id": 1, + "converted_formats": [{"export_type": "export_type", "id": 1}], + "counters": {"key": "value"}, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "created_at": "2024-01-15T09:30:00Z", "finished_at": "2024-01-15T09:30:00Z", - "status": "created", + "id": 1, "md5": "md5", - "counters": {"key": "value"}, - "converted_formats": [{"id": 1, "export_type": "export_type"}], + "status": "created", + "title": "title", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "title": None, - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, + "converted_formats": ("list", {0: {"export_type": None, "id": "integer"}}), + "counters": None, "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "finished_at": "datetime", - "status": None, + "id": "integer", "md5": None, - "counters": None, - "converted_formats": ("list", {0: {"id": "integer", "export_type": None}}), + "status": None, + "title": None, } }, ) @@ -61,64 +61,64 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "title": "title", - "id": 1, + "annotation_filter_options": {"ground_truth": True, "reviewed": "only", "skipped": True, "usual": True}, + "converted_formats": [{"export_type": "export_type", "id": 1, "status": "created", "traceback": "traceback"}], + "counters": {"key": "value"}, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "created_at": "2024-01-15T09:30:00Z", "finished_at": "2024-01-15T09:30:00Z", - "status": "created", + "id": 1, "md5": "md5", - "counters": {"key": "value"}, - "converted_formats": [{"id": 1, "status": "created", "export_type": "export_type", "traceback": "traceback"}], - "task_filter_options": { - "view": 1, - "skipped": "only", - "finished": "only", - "annotated": "only", - "only_with_annotations": True, - "reviewed": "only", - }, - "annotation_filter_options": {"usual": True, "ground_truth": True, "skipped": True, "reviewed": "only"}, "serialization_options": { + "annotations__completed_by": {"only_id": True}, "drafts": {"only_id": True}, - "predictions": {"only_id": True}, "include_annotation_history": True, - "annotations__completed_by": {"only_id": True}, "interpolate_key_frames": True, + "predictions": {"only_id": True}, + }, + "status": "created", + "task_filter_options": { + "annotated": "only", + "finished": "only", + "only_with_annotations": True, + "reviewed": "only", + "skipped": "only", + "view": 1, }, + "title": "title", } expected_types: typing.Any = { - "title": None, - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, + "annotation_filter_options": {"ground_truth": None, "reviewed": None, "skipped": None, "usual": None}, + "converted_formats": ("list", {0: {"export_type": None, "id": "integer", "status": None, "traceback": None}}), + "counters": None, "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "finished_at": "datetime", - "status": None, + "id": "integer", "md5": None, - "counters": None, - "converted_formats": ("list", {0: {"id": "integer", "status": None, "export_type": None, "traceback": None}}), - "task_filter_options": { - "view": "integer", - "skipped": None, - "finished": None, - "annotated": None, - "only_with_annotations": None, - "reviewed": None, - }, - "annotation_filter_options": {"usual": None, "ground_truth": None, "skipped": None, "reviewed": None}, "serialization_options": { + "annotations__completed_by": {"only_id": None}, "drafts": {"only_id": None}, - "predictions": {"only_id": None}, "include_annotation_history": None, - "annotations__completed_by": {"only_id": None}, "interpolate_key_frames": None, + "predictions": {"only_id": None}, + }, + "status": None, + "task_filter_options": { + "annotated": None, + "finished": None, + "only_with_annotations": None, + "reviewed": None, + "skipped": None, + "view": "integer", }, + "title": None, } response = client.projects.exports.create(id=1) validate_response(response, expected_response, expected_types) @@ -129,32 +129,32 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "title": "title", - "id": 1, + "converted_formats": [{"export_type": "export_type", "id": 1, "status": "created", "traceback": "traceback"}], + "counters": {"key": "value"}, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "created_at": "2024-01-15T09:30:00Z", "finished_at": "2024-01-15T09:30:00Z", - "status": "created", + "id": 1, "md5": "md5", - "counters": {"key": "value"}, - "converted_formats": [{"id": 1, "status": "created", "export_type": "export_type", "traceback": "traceback"}], + "status": "created", + "title": "title", } expected_types: typing.Any = { - "title": None, - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, + "converted_formats": ("list", {0: {"export_type": None, "id": "integer", "status": None, "traceback": None}}), + "counters": None, "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "finished_at": "datetime", - "status": None, + "id": "integer", "md5": None, - "counters": None, - "converted_formats": ("list", {0: {"id": "integer", "status": None, "export_type": None, "traceback": None}}), + "status": None, + "title": None, } response = client.projects.exports.get(export_pk=1, id=1) validate_response(response, expected_response, expected_types) @@ -177,8 +177,8 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_convert(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"export_type": "export_type", "converted_format": 1} - expected_types: typing.Any = {"export_type": None, "converted_format": "integer"} + expected_response: typing.Any = {"converted_format": 1, "export_type": "export_type"} + expected_types: typing.Any = {"converted_format": "integer", "export_type": None} response = client.projects.exports.convert(export_pk=1, id=1, export_type="export_type") validate_response(response, expected_response, expected_types) diff --git a/tests/projects/test_pauses.py b/tests/projects/test_pauses.py index 3bdd8b22a..dcfa8aa89 100644 --- a/tests/projects/test_pauses.py +++ b/tests/projects/test_pauses.py @@ -9,38 +9,38 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "created_at": "2024-01-15T09:30:00Z", + "deleted_at": "2024-01-15T09:30:00Z", + "deleted_by": 1, "id": 1, - "project": 1, - "user": 1, "paused_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, + "project": 1, "reason": "MANUAL", - "verbose_reason": "verbose_reason", - "deleted_by": 1, - "deleted_at": "2024-01-15T09:30:00Z", - "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", + "user": 1, + "verbose_reason": "verbose_reason", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "created_at": "datetime", + "deleted_at": "datetime", + "deleted_by": "integer", "id": "integer", + "paused_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "project": "integer", - "user": "integer", - "paused_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, "reason": None, - "verbose_reason": None, - "deleted_by": "integer", - "deleted_at": "datetime", - "created_at": "datetime", "updated_at": "datetime", + "user": "integer", + "verbose_reason": None, } }, ) @@ -53,34 +53,34 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "created_at": "2024-01-15T09:30:00Z", + "deleted_at": "2024-01-15T09:30:00Z", + "deleted_by": 1, "id": 1, - "project": 1, - "user": 1, "paused_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, + "project": 1, "reason": "MANUAL", - "verbose_reason": "verbose_reason", - "deleted_by": 1, - "deleted_at": "2024-01-15T09:30:00Z", - "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", + "user": 1, + "verbose_reason": "verbose_reason", } expected_types: typing.Any = { + "created_at": "datetime", + "deleted_at": "datetime", + "deleted_by": "integer", "id": "integer", + "paused_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "project": "integer", - "user": "integer", - "paused_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, "reason": None, - "verbose_reason": None, - "deleted_by": "integer", - "deleted_at": "datetime", - "created_at": "datetime", "updated_at": "datetime", + "user": "integer", + "verbose_reason": None, } response = client.projects.pauses.create(project_pk=1, user_pk=1, reason="MANUAL") validate_response(response, expected_response, expected_types) @@ -91,34 +91,34 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "created_at": "2024-01-15T09:30:00Z", + "deleted_at": "2024-01-15T09:30:00Z", + "deleted_by": 1, "id": 1, - "project": 1, - "user": 1, "paused_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, + "project": 1, "reason": "MANUAL", - "verbose_reason": "verbose_reason", - "deleted_by": 1, - "deleted_at": "2024-01-15T09:30:00Z", - "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", + "user": 1, + "verbose_reason": "verbose_reason", } expected_types: typing.Any = { + "created_at": "datetime", + "deleted_at": "datetime", + "deleted_by": "integer", "id": "integer", + "paused_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "project": "integer", - "user": "integer", - "paused_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, "reason": None, - "verbose_reason": None, - "deleted_by": "integer", - "deleted_at": "datetime", - "created_at": "datetime", "updated_at": "datetime", + "user": "integer", + "verbose_reason": None, } response = client.projects.pauses.get(id="id", project_pk=1, user_pk=1) validate_response(response, expected_response, expected_types) @@ -142,34 +142,34 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "created_at": "2024-01-15T09:30:00Z", + "deleted_at": "2024-01-15T09:30:00Z", + "deleted_by": 1, "id": 1, - "project": 1, - "user": 1, "paused_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, + "project": 1, "reason": "MANUAL", - "verbose_reason": "verbose_reason", - "deleted_by": 1, - "deleted_at": "2024-01-15T09:30:00Z", - "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", + "user": 1, + "verbose_reason": "verbose_reason", } expected_types: typing.Any = { + "created_at": "datetime", + "deleted_at": "datetime", + "deleted_by": "integer", "id": "integer", + "paused_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "project": "integer", - "user": "integer", - "paused_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, "reason": None, - "verbose_reason": None, - "deleted_by": "integer", - "deleted_at": "datetime", - "created_at": "datetime", "updated_at": "datetime", + "user": "integer", + "verbose_reason": None, } response = client.projects.pauses.update(id="id", project_pk=1, user_pk=1) validate_response(response, expected_response, expected_types) diff --git a/tests/projects/test_stats.py b/tests/projects/test_stats.py index 0e5221ff4..b989f048e 100644 --- a/tests/projects/test_stats.py +++ b/tests/projects/test_stats.py @@ -9,18 +9,18 @@ async def test_iaa(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "IAA": [[1, 0.5], [0.5, 1]], - "users": [{"id": 1, "email": "user1@example.com"}, {"id": 2, "email": "user2@example.com"}], - "std": 1.1, "common_tasks": [[0, 1], [1, 0]], + "std": 1.1, + "users": [{"email": "user1@example.com", "id": 1}, {"email": "user2@example.com", "id": 2}], } expected_types: typing.Any = { "IAA": ("list", {0: ("list", {0: None, 1: None}), 1: ("list", {0: None, 1: None})}), + "common_tasks": ("list", {0: ("list", {0: None, 1: None}), 1: ("list", {0: None, 1: None})}), + "std": None, "users": ( "list", {0: ("dict", {0: (None, None), 1: (None, None)}), 1: ("dict", {0: (None, None), 1: (None, None)})}, ), - "std": None, - "common_tasks": ("list", {0: ("list", {0: None, 1: None}), 1: ("list", {0: None, 1: None})}), } response = client.projects.stats.iaa(id=1) validate_response(response, expected_response, expected_types) diff --git a/tests/prompts/test_runs.py b/tests/prompts/test_runs.py index b51a48212..a42f776cd 100644 --- a/tests/prompts/test_runs.py +++ b/tests/prompts/test_runs.py @@ -9,42 +9,42 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { + "completed_at": "2024-01-15T09:30:00Z", + "created_at": "2024-01-15T09:30:00Z", + "created_by": 1, "id": 1, + "job_id": "job_id", + "organization": 1, "parent_model": 1, + "predictions_updated_at": "2024-01-15T09:30:00Z", + "project": 1, "project_subset": "All", "status": "Pending", - "job_id": "job_id", - "total_predictions": 1, "total_correct_predictions": 1, + "total_predictions": 1, "total_tasks": 1, - "created_at": "2024-01-15T09:30:00Z", "triggered_at": "2024-01-15T09:30:00Z", - "predictions_updated_at": "2024-01-15T09:30:00Z", - "completed_at": "2024-01-15T09:30:00Z", - "organization": 1, - "project": 1, - "created_by": 1, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "completed_at": "datetime", + "created_at": "datetime", + "created_by": "integer", "id": "integer", + "job_id": None, + "organization": "integer", "parent_model": "integer", + "predictions_updated_at": "datetime", + "project": "integer", "project_subset": None, "status": None, - "job_id": None, - "total_predictions": "integer", "total_correct_predictions": "integer", + "total_predictions": "integer", "total_tasks": "integer", - "created_at": "datetime", "triggered_at": "datetime", - "predictions_updated_at": "datetime", - "completed_at": "datetime", - "organization": "integer", - "project": "integer", - "created_by": "integer", } }, ) @@ -57,38 +57,38 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "completed_at": "2024-01-15T09:30:00Z", + "created_at": "2024-01-15T09:30:00Z", + "created_by": 1, "id": 1, + "job_id": "job_id", + "organization": 1, "parent_model": 1, + "predictions_updated_at": "2024-01-15T09:30:00Z", + "project": 1, "project_subset": "All", "status": "Pending", - "job_id": "job_id", - "total_predictions": 1, "total_correct_predictions": 1, + "total_predictions": 1, "total_tasks": 1, - "created_at": "2024-01-15T09:30:00Z", "triggered_at": "2024-01-15T09:30:00Z", - "predictions_updated_at": "2024-01-15T09:30:00Z", - "completed_at": "2024-01-15T09:30:00Z", - "organization": 1, - "project": 1, - "created_by": 1, } expected_types: typing.Any = { + "completed_at": "datetime", + "created_at": "datetime", + "created_by": "integer", "id": "integer", + "job_id": None, + "organization": "integer", "parent_model": "integer", + "predictions_updated_at": "datetime", + "project": "integer", "project_subset": None, "status": None, - "job_id": None, - "total_predictions": "integer", "total_correct_predictions": "integer", + "total_predictions": "integer", "total_tasks": "integer", - "created_at": "datetime", "triggered_at": "datetime", - "predictions_updated_at": "datetime", - "completed_at": "datetime", - "organization": "integer", - "project": "integer", - "created_by": "integer", } response = client.prompts.runs.create(prompt_id=1, version_id=1, project=1) validate_response(response, expected_response, expected_types) diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py index 759276eed..06a4c79a1 100644 --- a/tests/prompts/test_versions.py +++ b/tests/prompts/test_versions.py @@ -22,42 +22,42 @@ async def test_get_default_version_name(client: LabelStudio, async_client: Async async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "score": "score", + "id": 1, + "model_provider_connection": 1, + "organization": 1, "parent_model": 1, - "title": "title", "prompt": "prompt", "provider": "OpenAI", "provider_model_id": "provider_model_id", - "created_at": "2024-01-15T09:30:00Z", + "score": "score", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "model_provider_connection": 1, - "organization": 1, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "score": None, + "model_provider_connection": "integer", + "organization": "integer", "parent_model": "integer", - "title": None, "prompt": None, "provider": None, "provider_model_id": None, - "created_at": "datetime", + "score": None, + "title": None, "updated_at": "datetime", - "model_provider_connection": "integer", - "organization": "integer", } }, ) @@ -70,84 +70,84 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "score": "score", + "id": 1, + "model_provider_connection": 1, + "organization": 1, "parent_model": 1, - "title": "title", "prompt": "prompt", "provider": "OpenAI", "provider_model_id": "provider_model_id", - "created_at": "2024-01-15T09:30:00Z", + "score": "score", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "model_provider_connection": 1, - "organization": 1, } expected_types: typing.Any = { + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "score": None, + "model_provider_connection": "integer", + "organization": "integer", "parent_model": "integer", - "title": None, "prompt": None, "provider": None, "provider_model_id": None, - "created_at": "datetime", + "score": None, + "title": None, "updated_at": "datetime", - "model_provider_connection": "integer", - "organization": "integer", } response = client.prompts.versions.create( - prompt_id=1, title="title", prompt="prompt", provider_model_id="provider_model_id" + prompt_id=1, prompt="prompt", provider_model_id="provider_model_id", title="title" ) validate_response(response, expected_response, expected_types) async_response = await async_client.prompts.versions.create( - prompt_id=1, title="title", prompt="prompt", provider_model_id="provider_model_id" + prompt_id=1, prompt="prompt", provider_model_id="provider_model_id", title="title" ) validate_response(async_response, expected_response, expected_types) async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "score": "score", + "id": 1, + "model_provider_connection": 1, + "organization": 1, "parent_model": 1, - "title": "title", "prompt": "prompt", "provider": "OpenAI", "provider_model_id": "provider_model_id", - "created_at": "2024-01-15T09:30:00Z", + "score": "score", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "model_provider_connection": 1, - "organization": 1, } expected_types: typing.Any = { + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "score": None, + "model_provider_connection": "integer", + "organization": "integer", "parent_model": "integer", - "title": None, "prompt": None, "provider": None, "provider_model_id": None, - "created_at": "datetime", + "score": None, + "title": None, "updated_at": "datetime", - "model_provider_connection": "integer", - "organization": "integer", } response = client.prompts.versions.get(prompt_id=1, version_id=1) validate_response(response, expected_response, expected_types) @@ -171,38 +171,38 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "score": "score", + "id": 1, + "model_provider_connection": 1, + "organization": 1, "parent_model": 1, - "title": "title", "prompt": "prompt", "provider": "OpenAI", "provider_model_id": "provider_model_id", - "created_at": "2024-01-15T09:30:00Z", + "score": "score", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "model_provider_connection": 1, - "organization": 1, } expected_types: typing.Any = { + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "score": None, + "model_provider_connection": "integer", + "organization": "integer", "parent_model": "integer", - "title": None, "prompt": None, "provider": None, "provider_model_id": None, - "created_at": "datetime", + "score": None, + "title": None, "updated_at": "datetime", - "model_provider_connection": "integer", - "organization": "integer", } response = client.prompts.versions.update(prompt_id=1, version_id=1) validate_response(response, expected_response, expected_types) @@ -213,20 +213,20 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "prompt_cost_usd": "prompt_cost_usd", "completion_cost_usd": "completion_cost_usd", - "total_cost_usd": "total_cost_usd", - "is_error": True, - "error_type": "error_type", "error_message": "error_message", + "error_type": "error_type", + "is_error": True, + "prompt_cost_usd": "prompt_cost_usd", + "total_cost_usd": "total_cost_usd", } expected_types: typing.Any = { - "prompt_cost_usd": None, "completion_cost_usd": None, - "total_cost_usd": None, - "is_error": None, - "error_type": None, "error_message": None, + "error_type": None, + "is_error": None, + "prompt_cost_usd": None, + "total_cost_usd": None, } response = client.prompts.versions.cost_estimate(prompt_id=1, version_id=1) validate_response(response, expected_response, expected_types) @@ -237,54 +237,54 @@ async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio async def test_get_refined_prompt(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "title": "title", - "reasoning": "reasoning", - "prompt": "prompt", - "refinement_job_id": "refinement_job_id", - "refinement_status": "refinement_status", - "total_cost": "total_cost", "previous_version": { - "id": 1, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "score": "score", + "id": 1, + "model_provider_connection": 1, + "organization": 1, "parent_model": 1, - "title": "title", "prompt": "prompt", "provider": "OpenAI", "provider_model_id": "provider_model_id", - "created_at": "2024-01-15T09:30:00Z", + "score": "score", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "model_provider_connection": 1, - "organization": 1, }, + "prompt": "prompt", + "reasoning": "reasoning", + "refinement_job_id": "refinement_job_id", + "refinement_status": "refinement_status", + "title": "title", + "total_cost": "total_cost", } expected_types: typing.Any = { - "title": None, - "reasoning": None, - "prompt": None, - "refinement_job_id": None, - "refinement_status": None, - "total_cost": None, "previous_version": { + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "score": None, + "model_provider_connection": "integer", + "organization": "integer", "parent_model": "integer", - "title": None, "prompt": None, "provider": None, "provider_model_id": None, - "created_at": "datetime", + "score": None, + "title": None, "updated_at": "datetime", - "model_provider_connection": "integer", - "organization": "integer", }, + "prompt": None, + "reasoning": None, + "refinement_job_id": None, + "refinement_status": None, + "title": None, + "total_cost": None, } response = client.prompts.versions.get_refined_prompt(prompt_id=1, version_id=1) validate_response(response, expected_response, expected_types) @@ -295,69 +295,69 @@ async def test_get_refined_prompt(client: LabelStudio, async_client: AsyncLabelS async def test_refine_prompt(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "title": "title", - "reasoning": "reasoning", - "prompt": "prompt", - "refinement_job_id": "refinement_job_id", - "refinement_status": "refinement_status", - "total_cost": "total_cost", "previous_version": { - "id": 1, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "score": "score", + "id": 1, + "model_provider_connection": 1, + "organization": 1, "parent_model": 1, - "title": "title", "prompt": "prompt", "provider": "OpenAI", "provider_model_id": "provider_model_id", - "created_at": "2024-01-15T09:30:00Z", + "score": "score", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "model_provider_connection": 1, - "organization": 1, }, + "prompt": "prompt", + "reasoning": "reasoning", + "refinement_job_id": "refinement_job_id", + "refinement_status": "refinement_status", + "title": "title", + "total_cost": "total_cost", } expected_types: typing.Any = { - "title": None, - "reasoning": None, - "prompt": None, - "refinement_job_id": None, - "refinement_status": None, - "total_cost": None, "previous_version": { + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "score": None, + "model_provider_connection": "integer", + "organization": "integer", "parent_model": "integer", - "title": None, "prompt": None, "provider": None, "provider_model_id": None, - "created_at": "datetime", + "score": None, + "title": None, "updated_at": "datetime", - "model_provider_connection": "integer", - "organization": "integer", }, + "prompt": None, + "reasoning": None, + "refinement_job_id": None, + "refinement_status": None, + "title": None, + "total_cost": None, } response = client.prompts.versions.refine_prompt( prompt_id=1, version_id=1, - teacher_model_provider_connection_id=1, - teacher_model_name="teacher_model_name", project_id=1, + teacher_model_name="teacher_model_name", + teacher_model_provider_connection_id=1, ) validate_response(response, expected_response, expected_types) async_response = await async_client.prompts.versions.refine_prompt( prompt_id=1, version_id=1, - teacher_model_provider_connection_id=1, - teacher_model_name="teacher_model_name", project_id=1, + teacher_model_name="teacher_model_name", + teacher_model_provider_connection_id=1, ) validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_actions.py b/tests/test_actions.py index 8d170ce26..f3f3b205d 100644 --- a/tests/test_actions.py +++ b/tests/test_actions.py @@ -12,34 +12,34 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": "predictions_to_annotations", - "title": "Create Annotations From Predictions", - "order": 91, - "permission": "tasks.change", - "experimental": False, "dialog": { - "title": "Create Annotations From Predictions", + "form": [{"key": "value"}], "text": "Create annotations from predictions using selected predictions set for each selected task. Your account will be assigned as an owner to those annotations.", + "title": "Create Annotations From Predictions", "type": "confirm", - "form": [{"key": "value"}], }, + "experimental": False, + "id": "predictions_to_annotations", + "order": 91, + "permission": "tasks.change", + "title": "Create Annotations From Predictions", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": None, - "title": None, - "order": "integer", - "permission": None, - "experimental": None, "dialog": { - "title": None, + "form": ("list", {0: ("dict", {0: (None, None)})}), "text": None, + "title": None, "type": None, - "form": ("list", {0: ("dict", {0: (None, None)})}), }, + "experimental": None, + "id": None, + "order": "integer", + "permission": None, + "title": None, } }, ) @@ -64,8 +64,8 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No ) ], ), - selected_items=ActionsCreateRequestSelectedItemsExcluded(all_=True, excluded=[124, 125, 126]), ordering=["tasks:total_annotations"], + selected_items=ActionsCreateRequestSelectedItemsExcluded(all_=True, excluded=[124, 125, 126]), ) # type: ignore[func-returns-value] is None ) @@ -82,8 +82,8 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No ) ], ), - selected_items=ActionsCreateRequestSelectedItemsExcluded(all_=True, excluded=[124, 125, 126]), ordering=["tasks:total_annotations"], + selected_items=ActionsCreateRequestSelectedItemsExcluded(all_=True, excluded=[124, 125, 126]), ) # type: ignore[func-returns-value] is None ) diff --git a/tests/test_annotations.py b/tests/test_annotations.py index 51093a628..045edcd98 100644 --- a/tests/test_annotations.py +++ b/tests/test_annotations.py @@ -6,48 +6,72 @@ from .utilities import validate_response +async def test_create_bulk(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + expected_response: typing.Any = [{"id": 1}] + expected_types: typing.Tuple[typing.Any, typing.Any] = ("list", {0: {"id": "integer"}}) + response = client.annotations.create_bulk() + validate_response(response, expected_response, expected_types) + + async_response = await async_client.annotations.create_bulk() + validate_response(async_response, expected_response, expected_types) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "bulk_created": True, + "completed_by": 1, + "created_ago": "created_ago", + "created_at": "2024-01-15T09:30:00Z", + "created_username": "created_username", + "draft_created_at": "2024-01-15T09:30:00Z", + "ground_truth": False, "id": 1, + "import_id": 1000000, + "last_action": "prediction", + "last_created_by": 1, + "lead_time": 10, + "parent_annotation": 1, + "parent_prediction": 1, + "project": 1, "result": [ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], - "created_username": "created_username", - "created_ago": "created_ago", - "completed_by": 1, - "was_cancelled": False, - "ground_truth": False, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "draft_created_at": "2024-01-15T09:30:00Z", - "lead_time": 10, - "import_id": 1000000, - "last_action": "prediction", - "bulk_created": True, "task": 1, - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", "updated_by": 1, - "parent_prediction": 1, - "parent_annotation": 1, - "last_created_by": 1, + "was_cancelled": False, } expected_types: typing.Any = { + "bulk_created": None, + "completed_by": "integer", + "created_ago": None, + "created_at": "datetime", + "created_username": None, + "draft_created_at": "datetime", + "ground_truth": None, "id": "integer", + "import_id": None, + "last_action": None, + "last_created_by": "integer", + "lead_time": None, + "parent_annotation": "integer", + "parent_prediction": "integer", + "project": "integer", "result": ( "list", { @@ -65,24 +89,10 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: ) }, ), - "created_username": None, - "created_ago": None, - "completed_by": "integer", - "was_cancelled": None, - "ground_truth": None, - "created_at": "datetime", - "updated_at": "datetime", - "draft_created_at": "datetime", - "lead_time": None, - "import_id": None, - "last_action": None, - "bulk_created": None, "task": "integer", - "project": "integer", + "updated_at": "datetime", "updated_by": "integer", - "parent_prediction": "integer", - "parent_annotation": "integer", - "last_created_by": "integer", + "was_cancelled": None, } response = client.annotations.get(id=1) validate_response(response, expected_response, expected_types) @@ -106,46 +116,60 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "bulk_created": True, + "completed_by": 1, + "created_ago": "created_ago", + "created_at": "2024-01-15T09:30:00Z", + "created_username": "created_username", + "draft_created_at": "2024-01-15T09:30:00Z", + "ground_truth": False, "id": 1, + "import_id": 1000000, + "last_action": "prediction", + "last_created_by": 1, + "lead_time": 10, + "parent_annotation": 1, + "parent_prediction": 1, + "project": 1, "result": [ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], - "created_username": "created_username", - "created_ago": "created_ago", - "completed_by": 1, - "was_cancelled": False, - "ground_truth": False, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "draft_created_at": "2024-01-15T09:30:00Z", - "lead_time": 10, - "import_id": 1000000, - "last_action": "prediction", - "bulk_created": True, "task": 1, - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", "updated_by": 1, - "parent_prediction": 1, - "parent_annotation": 1, - "last_created_by": 1, + "was_cancelled": False, } expected_types: typing.Any = { + "bulk_created": None, + "completed_by": "integer", + "created_ago": None, + "created_at": "datetime", + "created_username": None, + "draft_created_at": "datetime", + "ground_truth": None, "id": "integer", + "import_id": None, + "last_action": None, + "last_created_by": "integer", + "lead_time": None, + "parent_annotation": "integer", + "parent_prediction": "integer", + "project": "integer", "result": ( "list", { @@ -163,135 +187,111 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No ) }, ), - "created_username": None, - "created_ago": None, - "completed_by": "integer", - "was_cancelled": None, - "ground_truth": None, - "created_at": "datetime", - "updated_at": "datetime", - "draft_created_at": "datetime", - "lead_time": None, - "import_id": None, - "last_action": None, - "bulk_created": None, "task": "integer", - "project": "integer", + "updated_at": "datetime", "updated_by": "integer", - "parent_prediction": "integer", - "parent_annotation": "integer", - "last_created_by": "integer", + "was_cancelled": None, } response = client.annotations.update( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) validate_response(response, expected_response, expected_types) async_response = await async_client.annotations.update( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) validate_response(async_response, expected_response, expected_types) -async def test_create_bulk(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = [{"id": 1}] - expected_types: typing.Tuple[typing.Any, typing.Any] = ("list", {0: {"id": "integer"}}) - response = client.annotations.create_bulk() - validate_response(response, expected_response, expected_types) - - async_response = await async_client.annotations.create_bulk() - validate_response(async_response, expected_response, expected_types) - - async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "result": [{"key": "value"}], - "created_username": "created_username", - "created_ago": "created_ago", + "bulk_created": True, "completed_by": 1, - "was_cancelled": True, - "ground_truth": True, + "created_ago": "created_ago", "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "created_username": "created_username", "draft_created_at": "2024-01-15T09:30:00Z", - "lead_time": 1.1, + "ground_truth": True, + "id": 1, "import_id": 1000000, "last_action": "prediction", - "bulk_created": True, - "task": 1, + "last_created_by": 1, + "lead_time": 1.1, + "parent_annotation": 1, + "parent_prediction": 1, "project": 1, + "result": [{"key": "value"}], + "task": 1, + "updated_at": "2024-01-15T09:30:00Z", "updated_by": 1, - "parent_prediction": 1, - "parent_annotation": 1, - "last_created_by": 1, + "was_cancelled": True, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "result": ("list", {0: ("dict", {0: (None, None)})}), - "created_username": None, - "created_ago": None, + "bulk_created": None, "completed_by": "integer", - "was_cancelled": None, - "ground_truth": None, + "created_ago": None, "created_at": "datetime", - "updated_at": "datetime", + "created_username": None, "draft_created_at": "datetime", - "lead_time": None, + "ground_truth": None, + "id": "integer", "import_id": None, "last_action": None, - "bulk_created": None, - "task": "integer", + "last_created_by": "integer", + "lead_time": None, + "parent_annotation": "integer", + "parent_prediction": "integer", "project": "integer", + "result": ("list", {0: ("dict", {0: (None, None)})}), + "task": "integer", + "updated_at": "datetime", "updated_by": "integer", - "parent_prediction": "integer", - "parent_annotation": "integer", - "last_created_by": "integer", + "was_cancelled": None, } }, ) @@ -304,46 +304,60 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "bulk_created": True, + "completed_by": 1, + "created_ago": "created_ago", + "created_at": "2024-01-15T09:30:00Z", + "created_username": "created_username", + "draft_created_at": "2024-01-15T09:30:00Z", + "ground_truth": False, "id": 1, + "import_id": 1000000, + "last_action": "prediction", + "last_created_by": 1, + "lead_time": 10, + "parent_annotation": 1, + "parent_prediction": 1, + "project": 1, "result": [ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], - "created_username": "created_username", - "created_ago": "created_ago", - "completed_by": 1, - "was_cancelled": False, - "ground_truth": False, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "draft_created_at": "2024-01-15T09:30:00Z", - "lead_time": 10, - "import_id": 1000000, - "last_action": "prediction", - "bulk_created": True, "task": 1, - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", "updated_by": 1, - "parent_prediction": 1, - "parent_annotation": 1, - "last_created_by": 1, + "was_cancelled": False, } expected_types: typing.Any = { + "bulk_created": None, + "completed_by": "integer", + "created_ago": None, + "created_at": "datetime", + "created_username": None, + "draft_created_at": "datetime", + "ground_truth": None, "id": "integer", + "import_id": None, + "last_action": None, + "last_created_by": "integer", + "lead_time": None, + "parent_annotation": "integer", + "parent_prediction": "integer", + "project": "integer", "result": ( "list", { @@ -361,71 +375,57 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No ) }, ), - "created_username": None, - "created_ago": None, - "completed_by": "integer", - "was_cancelled": None, - "ground_truth": None, - "created_at": "datetime", - "updated_at": "datetime", - "draft_created_at": "datetime", - "lead_time": None, - "import_id": None, - "last_action": None, - "bulk_created": None, "task": "integer", - "project": "integer", + "updated_at": "datetime", "updated_by": "integer", - "parent_prediction": "integer", - "parent_annotation": "integer", - "last_created_by": "integer", + "was_cancelled": None, } response = client.annotations.create( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) validate_response(response, expected_response, expected_types) async_response = await async_client.annotations.create( id=1, + ground_truth=True, result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], was_cancelled=False, - ground_truth=True, ) validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_billing.py b/tests/test_billing.py index dbec9138c..eb52f077d 100644 --- a/tests/test_billing.py +++ b/tests/test_billing.py @@ -9,102 +9,102 @@ async def test_info(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "billing_checks": { - "users": {"count": 110, "limit": 1000, "reached": False, "total": 221}, - "projects": {"count": 2044, "limit": 1000000, "reached": False, "total": 1}, - "results": {"count": 42949, "limit": 1000000000, "reached": False, "total": 1}, - "trial_days": 0, - "organization_is_active": True, - "license_issued": "2000-01-01", - "license_warning": "2030-01-01", - "is_license_warning": False, - "license_expires": "2030-01-02", + "export_storages": {"count": 0, "limit": 0, "reached": False, "total": 1}, + "import_storages": {"count": 0, "limit": 0, "reached": False, "total": 1}, "is_license_expired": False, + "is_license_warning": False, + "is_prompts_expire": False, + "is_prompts_warning": False, + "license_expires": "2025-01-01", + "license_issued": "2023-01-01", + "license_warning": "2024-12-01", + "organization_is_active": True, + "projects": {"count": 3, "limit": 50, "reached": False, "total": 1}, + "prompts_api_keys_enabled": True, "prompts_enabled": True, + "prompts_expire": "2024-12-31", "prompts_status": "Enabled", "prompts_warning": "prompts_warning", - "is_prompts_warning": False, - "prompts_expire": "prompts_expire", - "is_prompts_expire": False, - "prompts_api_keys_enabled": True, - "import_storages": {"count": 0, "limit": 0, "reached": False, "total": 1}, - "export_storages": {"count": 0, "limit": 0, "reached": False, "total": 1}, + "results": {"count": 100, "limit": 1000, "reached": False, "total": 1}, + "trial_days": 14, + "users": {"count": 5, "limit": 10, "reached": False, "total": 6}, }, "billing_flags": { - "activated_at": "2024-01-15T09:30:00Z", - "cloud_instance": True, + "activated_at": "2023-01-01T00:00:00Z", "allow_activity_log": True, - "allow_invite_project_experts": True, - "allow_sso": True, - "white_label_id": "white_label_id", - "allow_data_credentials": False, - "allow_organization_webhooks": False, - "disable_members_page": False, - "secure_mode": False, - "manual_workspace_management": True, - "manual_role_management": True, - "hide_storage_settings_for_manager": False, - "disable_project_imports": False, - "automax_token_exists": True, - "automax_enabled": True, - "storage_persistence": True, "allow_ai": True, - "early_adopter": True, "allow_ask_ai": True, + "allow_data_credentials": True, "allow_invite_people": True, + "allow_invite_project_experts": True, + "allow_organization_webhooks": True, + "allow_sso": False, "allow_storage_proxy": True, - "embed_enabled": True, - "embed_domains": [{"domain": "http://localhost:3000"}, {"domain": "https://purple-zoos-flash.loca.lt"}], + "automax_enabled": True, + "automax_token_exists": False, + "cloud_instance": True, + "disable_members_page": False, + "disable_project_imports": False, + "early_adopter": False, + "embed_domains": [{"domain": "http://localhost:3000"}, {"domain": "https://example.com"}], + "embed_enabled": False, "embed_settings": {"public_verify_alg": ["RS256"], "public_verify_key": "...."}, + "hide_storage_settings_for_manager": False, + "manual_role_management": False, + "manual_workspace_management": False, + "secure_mode": False, + "storage_persistence": True, + "white_label_id": "white_label_id", }, } expected_types: typing.Any = { "billing_checks": { - "users": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, - "projects": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, - "results": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, - "trial_days": "integer", - "organization_is_active": None, - "license_issued": None, - "license_warning": None, + "export_storages": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, + "import_storages": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, + "is_license_expired": None, "is_license_warning": None, + "is_prompts_expire": None, + "is_prompts_warning": None, "license_expires": None, - "is_license_expired": None, + "license_issued": None, + "license_warning": None, + "organization_is_active": None, + "projects": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, + "prompts_api_keys_enabled": None, "prompts_enabled": None, + "prompts_expire": None, "prompts_status": None, "prompts_warning": None, - "is_prompts_warning": None, - "prompts_expire": None, - "is_prompts_expire": None, - "prompts_api_keys_enabled": None, - "import_storages": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, - "export_storages": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, + "results": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, + "trial_days": "integer", + "users": {"count": "integer", "limit": "integer", "reached": None, "total": "integer"}, }, "billing_flags": { "activated_at": "datetime", - "cloud_instance": None, "allow_activity_log": None, - "allow_invite_project_experts": None, - "allow_sso": None, - "white_label_id": None, + "allow_ai": None, + "allow_ask_ai": None, "allow_data_credentials": None, + "allow_invite_people": None, + "allow_invite_project_experts": None, "allow_organization_webhooks": None, + "allow_sso": None, + "allow_storage_proxy": None, + "automax_enabled": None, + "automax_token_exists": None, + "cloud_instance": None, "disable_members_page": None, - "secure_mode": None, - "manual_workspace_management": None, - "manual_role_management": None, - "hide_storage_settings_for_manager": None, "disable_project_imports": None, - "automax_token_exists": None, - "automax_enabled": None, - "storage_persistence": None, - "allow_ai": None, "early_adopter": None, - "allow_ask_ai": None, - "allow_invite_people": None, - "allow_storage_proxy": None, - "embed_enabled": None, "embed_domains": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), + "embed_enabled": None, "embed_settings": ("dict", {0: (None, None), 1: (None, None)}), + "hide_storage_settings_for_manager": None, + "manual_role_management": None, + "manual_workspace_management": None, + "secure_mode": None, + "storage_persistence": None, + "white_label_id": None, }, } response = client.billing.info() diff --git a/tests/test_comments.py b/tests/test_comments.py index 51dbce82d..9fa613bfc 100644 --- a/tests/test_comments.py +++ b/tests/test_comments.py @@ -9,38 +9,38 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "region_ref": {"key": "value"}, + "annotation": 1, "classifications": {"key": "value"}, - "text": "text", "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "created_by": 1, + "draft": 1, + "id": 1, "is_resolved": True, - "resolved_at": "2024-01-15T09:30:00Z", "project": 1, + "region_ref": {"key": "value"}, + "resolved_at": "2024-01-15T09:30:00Z", "task": 1, - "draft": 1, - "annotation": 1, - "created_by": 1, + "text": "text", + "updated_at": "2024-01-15T09:30:00Z", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "region_ref": None, + "annotation": "integer", "classifications": None, - "text": None, "created_at": "datetime", - "updated_at": "datetime", + "created_by": "integer", + "draft": "integer", + "id": "integer", "is_resolved": None, - "resolved_at": "datetime", "project": "integer", + "region_ref": None, + "resolved_at": "datetime", "task": "integer", - "draft": "integer", - "annotation": "integer", - "created_by": "integer", + "text": None, + "updated_at": "datetime", } }, ) @@ -53,34 +53,34 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "region_ref": {"key": "value"}, + "annotation": 1, "classifications": {"key": "value"}, - "text": "text", "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "created_by": 1, + "draft": 1, + "id": 1, "is_resolved": True, - "resolved_at": "2024-01-15T09:30:00Z", "project": 1, + "region_ref": {"key": "value"}, + "resolved_at": "2024-01-15T09:30:00Z", "task": 1, - "draft": 1, - "annotation": 1, - "created_by": 1, + "text": "text", + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { - "id": "integer", - "region_ref": None, + "annotation": "integer", "classifications": None, - "text": None, "created_at": "datetime", - "updated_at": "datetime", + "created_by": "integer", + "draft": "integer", + "id": "integer", "is_resolved": None, - "resolved_at": "datetime", "project": "integer", + "region_ref": None, + "resolved_at": "datetime", "task": "integer", - "draft": "integer", - "annotation": "integer", - "created_by": "integer", + "text": None, + "updated_at": "datetime", } response = client.comments.create() validate_response(response, expected_response, expected_types) @@ -91,34 +91,34 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "region_ref": {"key": "value"}, + "annotation": 1, "classifications": {"key": "value"}, - "text": "text", "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "created_by": 1, + "draft": 1, + "id": 1, "is_resolved": True, - "resolved_at": "2024-01-15T09:30:00Z", "project": 1, + "region_ref": {"key": "value"}, + "resolved_at": "2024-01-15T09:30:00Z", "task": 1, - "draft": 1, - "annotation": 1, - "created_by": 1, + "text": "text", + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { - "id": "integer", - "region_ref": None, + "annotation": "integer", "classifications": None, - "text": None, "created_at": "datetime", - "updated_at": "datetime", + "created_by": "integer", + "draft": "integer", + "id": "integer", "is_resolved": None, - "resolved_at": "datetime", "project": "integer", + "region_ref": None, + "resolved_at": "datetime", "task": "integer", - "draft": "integer", - "annotation": "integer", - "created_by": "integer", + "text": None, + "updated_at": "datetime", } response = client.comments.get(id="id") validate_response(response, expected_response, expected_types) @@ -142,34 +142,34 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "region_ref": {"key": "value"}, + "annotation": 1, "classifications": {"key": "value"}, - "text": "text", "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "created_by": 1, + "draft": 1, + "id": 1, "is_resolved": True, - "resolved_at": "2024-01-15T09:30:00Z", "project": 1, + "region_ref": {"key": "value"}, + "resolved_at": "2024-01-15T09:30:00Z", "task": 1, - "draft": 1, - "annotation": 1, - "created_by": 1, + "text": "text", + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { - "id": "integer", - "region_ref": None, + "annotation": "integer", "classifications": None, - "text": None, "created_at": "datetime", - "updated_at": "datetime", + "created_by": "integer", + "draft": "integer", + "id": "integer", "is_resolved": None, - "resolved_at": "datetime", "project": "integer", + "region_ref": None, + "resolved_at": "datetime", "task": "integer", - "draft": "integer", - "annotation": "integer", - "created_by": "integer", + "text": None, + "updated_at": "datetime", } response = client.comments.update(id="id") validate_response(response, expected_response, expected_types) diff --git a/tests/test_files.py b/tests/test_files.py index 00ec11f1c..57da55347 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -7,8 +7,8 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"id": 1, "file": "file"} - expected_types: typing.Any = {"id": "integer", "file": None} + expected_response: typing.Any = {"file": "file", "id": 1} + expected_types: typing.Any = {"file": None, "id": "integer"} response = client.files.get(id=1) validate_response(response, expected_response, expected_types) @@ -30,8 +30,8 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = [{"id": 1, "file": "file"}] - expected_types: typing.Tuple[typing.Any, typing.Any] = ("list", {0: {"id": "integer", "file": None}}) + expected_response: typing.Any = [{"file": "file", "id": 1}] + expected_types: typing.Tuple[typing.Any, typing.Any] = ("list", {0: {"file": None, "id": "integer"}}) response = client.files.list(id=1) validate_response(response, expected_response, expected_types) diff --git a/tests/test_jwt_settings.py b/tests/test_jwt_settings.py index 058d75a6c..e829701ba 100644 --- a/tests/test_jwt_settings.py +++ b/tests/test_jwt_settings.py @@ -8,14 +8,14 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "api_token_ttl_days": 1, "api_tokens_enabled": True, "legacy_api_tokens_enabled": True, - "api_token_ttl_days": 1, } expected_types: typing.Any = { + "api_token_ttl_days": "integer", "api_tokens_enabled": None, "legacy_api_tokens_enabled": None, - "api_token_ttl_days": "integer", } response = client.jwt_settings.get() validate_response(response, expected_response, expected_types) @@ -26,14 +26,14 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "api_token_ttl_days": 1, "api_tokens_enabled": True, "legacy_api_tokens_enabled": True, - "api_token_ttl_days": 1, } expected_types: typing.Any = { + "api_token_ttl_days": "integer", "api_tokens_enabled": None, "legacy_api_tokens_enabled": None, - "api_token_ttl_days": "integer", } response = client.jwt_settings.update() validate_response(response, expected_response, expected_types) diff --git a/tests/test_ml.py b/tests/test_ml.py index 12cf21030..23362f9bf 100644 --- a/tests/test_ml.py +++ b/tests/test_ml.py @@ -9,48 +9,48 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "state": "CO", - "readable_state": "readable_state", - "is_interactive": True, - "url": "url", - "error_message": "error_message", - "title": "title", "auth_method": "NONE", - "basic_auth_user": "basic_auth_user", + "auto_update": True, "basic_auth_pass_is_set": "basic_auth_pass_is_set", + "basic_auth_user": "basic_auth_user", + "created_at": "2024-01-15T09:30:00Z", "description": "description", + "error_message": "error_message", "extra_params": {"key": "value"}, + "id": 1, + "is_interactive": True, "model_version": "model_version", + "project": 1, + "readable_state": "readable_state", + "state": "CO", "timeout": 1.1, - "created_at": "2024-01-15T09:30:00Z", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "auto_update": True, - "project": 1, + "url": "url", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "state": None, - "readable_state": None, - "is_interactive": None, - "url": None, - "error_message": None, - "title": None, "auth_method": None, - "basic_auth_user": None, + "auto_update": None, "basic_auth_pass_is_set": None, + "basic_auth_user": None, + "created_at": "datetime", "description": None, + "error_message": None, "extra_params": None, + "id": "integer", + "is_interactive": None, "model_version": None, + "project": "integer", + "readable_state": None, + "state": None, "timeout": None, - "created_at": "datetime", + "title": None, "updated_at": "datetime", - "auto_update": None, - "project": "integer", + "url": None, } }, ) @@ -63,44 +63,44 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "state": "CO", - "readable_state": "readable_state", - "is_interactive": True, - "url": "url", - "error_message": "error_message", - "title": "title", "auth_method": "NONE", - "basic_auth_user": "basic_auth_user", + "auto_update": True, "basic_auth_pass_is_set": "basic_auth_pass_is_set", + "basic_auth_user": "basic_auth_user", + "created_at": "2024-01-15T09:30:00Z", "description": "description", + "error_message": "error_message", "extra_params": {"key": "value"}, + "id": 1, + "is_interactive": True, "model_version": "model_version", + "project": 1, + "readable_state": "readable_state", + "state": "CO", "timeout": 1.1, - "created_at": "2024-01-15T09:30:00Z", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "auto_update": True, - "project": 1, + "url": "url", } expected_types: typing.Any = { - "id": "integer", - "state": None, - "readable_state": None, - "is_interactive": None, - "url": None, - "error_message": None, - "title": None, "auth_method": None, - "basic_auth_user": None, + "auto_update": None, "basic_auth_pass_is_set": None, + "basic_auth_user": None, + "created_at": "datetime", "description": None, + "error_message": None, "extra_params": None, + "id": "integer", + "is_interactive": None, "model_version": None, + "project": "integer", + "readable_state": None, + "state": None, "timeout": None, - "created_at": "datetime", + "title": None, "updated_at": "datetime", - "auto_update": None, - "project": "integer", + "url": None, } response = client.ml.create() validate_response(response, expected_response, expected_types) @@ -111,44 +111,44 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "state": "CO", - "readable_state": "readable_state", - "is_interactive": True, - "url": "url", - "error_message": "error_message", - "title": "title", "auth_method": "NONE", - "basic_auth_user": "basic_auth_user", + "auto_update": True, "basic_auth_pass_is_set": "basic_auth_pass_is_set", + "basic_auth_user": "basic_auth_user", + "created_at": "2024-01-15T09:30:00Z", "description": "description", + "error_message": "error_message", "extra_params": {"key": "value"}, + "id": 1, + "is_interactive": True, "model_version": "model_version", + "project": 1, + "readable_state": "readable_state", + "state": "CO", "timeout": 1.1, - "created_at": "2024-01-15T09:30:00Z", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "auto_update": True, - "project": 1, + "url": "url", } expected_types: typing.Any = { - "id": "integer", - "state": None, - "readable_state": None, - "is_interactive": None, - "url": None, - "error_message": None, - "title": None, "auth_method": None, - "basic_auth_user": None, + "auto_update": None, "basic_auth_pass_is_set": None, + "basic_auth_user": None, + "created_at": "datetime", "description": None, + "error_message": None, "extra_params": None, + "id": "integer", + "is_interactive": None, "model_version": None, + "project": "integer", + "readable_state": None, + "state": None, "timeout": None, - "created_at": "datetime", + "title": None, "updated_at": "datetime", - "auto_update": None, - "project": "integer", + "url": None, } response = client.ml.get(id=1) validate_response(response, expected_response, expected_types) @@ -172,44 +172,44 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "state": "CO", - "readable_state": "readable_state", - "is_interactive": True, - "url": "url", - "error_message": "error_message", - "title": "title", "auth_method": "NONE", - "basic_auth_user": "basic_auth_user", + "auto_update": True, "basic_auth_pass_is_set": "basic_auth_pass_is_set", + "basic_auth_user": "basic_auth_user", + "created_at": "2024-01-15T09:30:00Z", "description": "description", + "error_message": "error_message", "extra_params": {"key": "value"}, + "id": 1, + "is_interactive": True, "model_version": "model_version", + "project": 1, + "readable_state": "readable_state", + "state": "CO", "timeout": 1.1, - "created_at": "2024-01-15T09:30:00Z", + "title": "title", "updated_at": "2024-01-15T09:30:00Z", - "auto_update": True, - "project": 1, + "url": "url", } expected_types: typing.Any = { - "id": "integer", - "state": None, - "readable_state": None, - "is_interactive": None, - "url": None, - "error_message": None, - "title": None, "auth_method": None, - "basic_auth_user": None, + "auto_update": None, "basic_auth_pass_is_set": None, + "basic_auth_user": None, + "created_at": "datetime", "description": None, + "error_message": None, "extra_params": None, + "id": "integer", + "is_interactive": None, "model_version": None, + "project": "integer", + "readable_state": None, + "state": None, "timeout": None, - "created_at": "datetime", + "title": None, "updated_at": "datetime", - "auto_update": None, - "project": "integer", + "url": None, } response = client.ml.update(id=1) validate_response(response, expected_response, expected_types) @@ -245,8 +245,8 @@ async def test_train(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_list_model_versions(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"versions": ["versions"], "message": "message"} - expected_types: typing.Any = {"versions": ("list", {0: None}), "message": None} + expected_response: typing.Any = {"message": "message", "versions": ["versions"]} + expected_types: typing.Any = {"message": None, "versions": ("list", {0: None})} response = client.ml.list_model_versions(id=1) validate_response(response, expected_response, expected_types) diff --git a/tests/test_model_providers.py b/tests/test_model_providers.py index e19c65096..a1031632b 100644 --- a/tests/test_model_providers.py +++ b/tests/test_model_providers.py @@ -9,56 +9,56 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, + "budget_alert_threshold": 1.1, + "budget_last_reset_date": "2024-01-15T09:30:00Z", + "budget_limit": 1.1, + "budget_reset_period": "Monthly", + "budget_total_spent": 1.1, + "cached_available_models": "cached_available_models", + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "model_params": "model_params", - "provider": "OpenAI", "deployment_name": "deployment_name", "endpoint": "endpoint", - "google_project_id": "google_project_id", "google_location": "google_location", - "cached_available_models": "cached_available_models", - "scope": "Organization", - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "google_project_id": "google_project_id", + "id": 1, "is_internal": True, - "budget_limit": 1.1, - "budget_last_reset_date": "2024-01-15T09:30:00Z", - "budget_reset_period": "Monthly", - "budget_total_spent": 1.1, - "budget_alert_threshold": 1.1, + "model_params": "model_params", "organization": 1, + "provider": "OpenAI", + "scope": "Organization", + "updated_at": "2024-01-15T09:30:00Z", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "model_params": None, - "provider": None, + "budget_alert_threshold": None, + "budget_last_reset_date": "datetime", + "budget_limit": None, + "budget_reset_period": None, + "budget_total_spent": None, + "cached_available_models": None, + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "deployment_name": None, "endpoint": None, - "google_project_id": None, "google_location": None, - "cached_available_models": None, - "scope": None, - "created_at": "datetime", - "updated_at": "datetime", + "google_project_id": None, + "id": "integer", "is_internal": None, - "budget_limit": None, - "budget_last_reset_date": "datetime", - "budget_reset_period": None, - "budget_total_spent": None, - "budget_alert_threshold": None, + "model_params": None, "organization": "integer", + "provider": None, + "scope": None, + "updated_at": "datetime", } }, ) @@ -71,52 +71,52 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "budget_alert_threshold": 1.1, + "budget_last_reset_date": "2024-01-15T09:30:00Z", + "budget_limit": 1.1, + "budget_reset_period": "Monthly", + "budget_total_spent": 1.1, + "cached_available_models": "cached_available_models", + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "model_params": "model_params", - "provider": "OpenAI", "deployment_name": "deployment_name", "endpoint": "endpoint", - "google_project_id": "google_project_id", "google_location": "google_location", - "cached_available_models": "cached_available_models", - "scope": "Organization", - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "google_project_id": "google_project_id", + "id": 1, "is_internal": True, - "budget_limit": 1.1, - "budget_last_reset_date": "2024-01-15T09:30:00Z", - "budget_reset_period": "Monthly", - "budget_total_spent": 1.1, - "budget_alert_threshold": 1.1, + "model_params": "model_params", "organization": 1, + "provider": "OpenAI", + "scope": "Organization", + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "model_params": None, - "provider": None, + "budget_alert_threshold": None, + "budget_last_reset_date": "datetime", + "budget_limit": None, + "budget_reset_period": None, + "budget_total_spent": None, + "cached_available_models": None, + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "deployment_name": None, "endpoint": None, - "google_project_id": None, "google_location": None, - "cached_available_models": None, - "scope": None, - "created_at": "datetime", - "updated_at": "datetime", + "google_project_id": None, + "id": "integer", "is_internal": None, - "budget_limit": None, - "budget_last_reset_date": "datetime", - "budget_reset_period": None, - "budget_total_spent": None, - "budget_alert_threshold": None, + "model_params": None, "organization": "integer", + "provider": None, + "scope": None, + "updated_at": "datetime", } response = client.model_providers.create() validate_response(response, expected_response, expected_types) @@ -125,54 +125,64 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_list_model_provider_choices(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + expected_response: typing.Any = {"provider_choices": ["provider_choices"]} + expected_types: typing.Any = {"provider_choices": ("list", {0: None})} + response = client.model_providers.list_model_provider_choices() + validate_response(response, expected_response, expected_types) + + async_response = await async_client.model_providers.list_model_provider_choices() + validate_response(async_response, expected_response, expected_types) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "budget_alert_threshold": 1.1, + "budget_last_reset_date": "2024-01-15T09:30:00Z", + "budget_limit": 1.1, + "budget_reset_period": "Monthly", + "budget_total_spent": 1.1, + "cached_available_models": "cached_available_models", + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "model_params": "model_params", - "provider": "OpenAI", "deployment_name": "deployment_name", "endpoint": "endpoint", - "google_project_id": "google_project_id", "google_location": "google_location", - "cached_available_models": "cached_available_models", - "scope": "Organization", - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "google_project_id": "google_project_id", + "id": 1, "is_internal": True, - "budget_limit": 1.1, - "budget_last_reset_date": "2024-01-15T09:30:00Z", - "budget_reset_period": "Monthly", - "budget_total_spent": 1.1, - "budget_alert_threshold": 1.1, + "model_params": "model_params", "organization": 1, + "provider": "OpenAI", + "scope": "Organization", + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "model_params": None, - "provider": None, + "budget_alert_threshold": None, + "budget_last_reset_date": "datetime", + "budget_limit": None, + "budget_reset_period": None, + "budget_total_spent": None, + "cached_available_models": None, + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "deployment_name": None, "endpoint": None, - "google_project_id": None, "google_location": None, - "cached_available_models": None, - "scope": None, - "created_at": "datetime", - "updated_at": "datetime", + "google_project_id": None, + "id": "integer", "is_internal": None, - "budget_limit": None, - "budget_last_reset_date": "datetime", - "budget_reset_period": None, - "budget_total_spent": None, - "budget_alert_threshold": None, + "model_params": None, "organization": "integer", + "provider": None, + "scope": None, + "updated_at": "datetime", } response = client.model_providers.get(id="id") validate_response(response, expected_response, expected_types) @@ -196,65 +206,55 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "budget_alert_threshold": 1.1, + "budget_last_reset_date": "2024-01-15T09:30:00Z", + "budget_limit": 1.1, + "budget_reset_period": "Monthly", + "budget_total_spent": 1.1, + "cached_available_models": "cached_available_models", + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "model_params": "model_params", - "provider": "OpenAI", "deployment_name": "deployment_name", "endpoint": "endpoint", - "google_project_id": "google_project_id", "google_location": "google_location", - "cached_available_models": "cached_available_models", - "scope": "Organization", - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "google_project_id": "google_project_id", + "id": 1, "is_internal": True, - "budget_limit": 1.1, - "budget_last_reset_date": "2024-01-15T09:30:00Z", - "budget_reset_period": "Monthly", - "budget_total_spent": 1.1, - "budget_alert_threshold": 1.1, + "model_params": "model_params", "organization": 1, + "provider": "OpenAI", + "scope": "Organization", + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "model_params": None, - "provider": None, + "budget_alert_threshold": None, + "budget_last_reset_date": "datetime", + "budget_limit": None, + "budget_reset_period": None, + "budget_total_spent": None, + "cached_available_models": None, + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "deployment_name": None, "endpoint": None, - "google_project_id": None, "google_location": None, - "cached_available_models": None, - "scope": None, - "created_at": "datetime", - "updated_at": "datetime", + "google_project_id": None, + "id": "integer", "is_internal": None, - "budget_limit": None, - "budget_last_reset_date": "datetime", - "budget_reset_period": None, - "budget_total_spent": None, - "budget_alert_threshold": None, + "model_params": None, "organization": "integer", + "provider": None, + "scope": None, + "updated_at": "datetime", } response = client.model_providers.update(id="id") validate_response(response, expected_response, expected_types) async_response = await async_client.model_providers.update(id="id") validate_response(async_response, expected_response, expected_types) - - -async def test_list_model_provider_choices(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"provider_choices": ["provider_choices"]} - expected_types: typing.Any = {"provider_choices": ("list", {0: None})} - response = client.model_providers.list_model_provider_choices() - validate_response(response, expected_response, expected_types) - - async_response = await async_client.model_providers.list_model_provider_choices() - validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_organizations.py b/tests/test_organizations.py index 97f0d5e6e..d0b3ea84c 100644 --- a/tests/test_organizations.py +++ b/tests/test_organizations.py @@ -7,8 +7,8 @@ async def test_reset_token(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"token": "token", "invite_url": "invite_url"} - expected_types: typing.Any = {"token": None, "invite_url": None} + expected_response: typing.Any = {"invite_url": "invite_url", "token": "token"} + expected_types: typing.Any = {"invite_url": None, "token": None} response = client.organizations.reset_token() validate_response(response, expected_response, expected_types) @@ -18,11 +18,11 @@ async def test_reset_token(client: LabelStudio, async_client: AsyncLabelStudio) async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ - {"id": 1, "title": "title", "contact_info": "contact_info", "created_at": "2024-01-15T09:30:00Z"} + {"contact_info": "contact_info", "created_at": "2024-01-15T09:30:00Z", "id": 1, "title": "title"} ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", - {0: {"id": "integer", "title": None, "contact_info": None, "created_at": "datetime"}}, + {0: {"contact_info": None, "created_at": "datetime", "id": "integer", "title": None}}, ) response = client.organizations.list() validate_response(response, expected_response, expected_types) @@ -33,35 +33,35 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "external_id": "external_id", - "title": "title", - "token": "token", - "default_role": "OW", - "created_at": "2024-01-15T09:30:00Z", "billing": { - "manual_workspace_management": "manual_workspace_management", "manual_role_management": "manual_role_management", + "manual_workspace_management": "manual_workspace_management", }, - "embed_domains": {"key": "value"}, - "embed_settings": {"key": "value"}, - "custom_scripts_enabled": "custom_scripts_enabled", + "created_at": "2024-01-15T09:30:00Z", "custom_scripts_editable_by": "AD", + "custom_scripts_enabled": "custom_scripts_enabled", + "default_role": "OW", "email_notification_settings": "email_notification_settings", + "embed_domains": {"key": "value"}, + "embed_settings": {"key": "value"}, + "external_id": "external_id", + "id": 1, + "title": "title", + "token": "token", } expected_types: typing.Any = { - "id": "integer", - "external_id": None, - "title": None, - "token": None, - "default_role": None, + "billing": {"manual_role_management": None, "manual_workspace_management": None}, "created_at": "datetime", - "billing": {"manual_workspace_management": None, "manual_role_management": None}, - "embed_domains": None, - "embed_settings": None, - "custom_scripts_enabled": None, "custom_scripts_editable_by": None, + "custom_scripts_enabled": None, + "default_role": None, "email_notification_settings": None, + "embed_domains": None, + "embed_settings": None, + "external_id": None, + "id": "integer", + "title": None, + "token": None, } response = client.organizations.get(id=1) validate_response(response, expected_response, expected_types) diff --git a/tests/test_predictions.py b/tests/test_predictions.py index f3c88b723..7054978cd 100644 --- a/tests/test_predictions.py +++ b/tests/test_predictions.py @@ -9,40 +9,40 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "result": [{"key": "value"}], - "model_version": "model_version", - "created_ago": "created_ago", - "score": 1.1, "cluster": 1, - "neighbors": {"key": "value"}, - "mislabeling": 1.1, + "created_ago": "created_ago", "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "id": 1, + "mislabeling": 1.1, "model": 1, "model_run": 1, - "task": 1, + "model_version": "model_version", + "neighbors": {"key": "value"}, "project": 1, + "result": [{"key": "value"}], + "score": 1.1, + "task": 1, + "updated_at": "2024-01-15T09:30:00Z", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "result": ("list", {0: ("dict", {0: (None, None)})}), - "model_version": None, - "created_ago": None, - "score": None, "cluster": "integer", - "neighbors": None, - "mislabeling": None, + "created_ago": None, "created_at": "datetime", - "updated_at": "datetime", + "id": "integer", + "mislabeling": None, "model": "integer", "model_run": "integer", - "task": "integer", + "model_version": None, + "neighbors": None, "project": "integer", + "result": ("list", {0: ("dict", {0: (None, None)})}), + "score": None, + "task": "integer", + "updated_at": "datetime", } }, ) @@ -55,40 +55,49 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "cluster": 1, + "created_ago": "created_ago", + "created_at": "2024-01-15T09:30:00Z", "id": 1, + "mislabeling": 1.1, + "model": 1, + "model_run": 1, + "model_version": "yolo-v8", + "neighbors": {"key": "value"}, + "project": 1, "result": [ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], - "model_version": "yolo-v8", - "created_ago": "created_ago", "score": 0.95, - "cluster": 1, - "neighbors": {"key": "value"}, - "mislabeling": 1.1, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "model": 1, - "model_run": 1, "task": 1, - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { + "cluster": "integer", + "created_ago": None, + "created_at": "datetime", "id": "integer", + "mislabeling": None, + "model": "integer", + "model_run": "integer", + "model_version": None, + "neighbors": None, + "project": "integer", "result": ( "list", { @@ -106,104 +115,104 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No ) }, ), - "model_version": None, - "created_ago": None, "score": None, - "cluster": "integer", - "neighbors": None, - "mislabeling": None, - "created_at": "datetime", - "updated_at": "datetime", - "model": "integer", - "model_run": "integer", "task": "integer", - "project": "integer", + "updated_at": "datetime", } response = client.predictions.create( + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) validate_response(response, expected_response, expected_types) async_response = await async_client.predictions.create( + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) validate_response(async_response, expected_response, expected_types) async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "cluster": 1, + "created_ago": "created_ago", + "created_at": "2024-01-15T09:30:00Z", "id": 1, + "mislabeling": 1.1, + "model": 1, + "model_run": 1, + "model_version": "yolo-v8", + "neighbors": {"key": "value"}, + "project": 1, "result": [ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], - "model_version": "yolo-v8", - "created_ago": "created_ago", "score": 0.95, - "cluster": 1, - "neighbors": {"key": "value"}, - "mislabeling": 1.1, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "model": 1, - "model_run": 1, "task": 1, - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { + "cluster": "integer", + "created_ago": None, + "created_at": "datetime", "id": "integer", + "mislabeling": None, + "model": "integer", + "model_run": "integer", + "model_version": None, + "neighbors": None, + "project": "integer", "result": ( "list", { @@ -221,18 +230,9 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: ) }, ), - "model_version": None, - "created_ago": None, "score": None, - "cluster": "integer", - "neighbors": None, - "mislabeling": None, - "created_at": "datetime", - "updated_at": "datetime", - "model": "integer", - "model_run": "integer", "task": "integer", - "project": "integer", + "updated_at": "datetime", } response = client.predictions.get(id=1) validate_response(response, expected_response, expected_types) @@ -256,40 +256,49 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { + "cluster": 1, + "created_ago": "created_ago", + "created_at": "2024-01-15T09:30:00Z", "id": 1, + "mislabeling": 1.1, + "model": 1, + "model_run": 1, + "model_version": "yolo-v8", + "neighbors": {"key": "value"}, + "project": 1, "result": [ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], - "model_version": "yolo-v8", - "created_ago": "created_ago", "score": 0.95, - "cluster": 1, - "neighbors": {"key": "value"}, - "mislabeling": 1.1, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "model": 1, - "model_run": 1, "task": 1, - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", } expected_types: typing.Any = { + "cluster": "integer", + "created_ago": None, + "created_at": "datetime", "id": "integer", + "mislabeling": None, + "model": "integer", + "model_run": "integer", + "model_version": None, + "neighbors": None, + "project": "integer", "result": ( "list", { @@ -307,65 +316,56 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No ) }, ), - "model_version": None, - "created_ago": None, "score": None, - "cluster": "integer", - "neighbors": None, - "mislabeling": None, - "created_at": "datetime", - "updated_at": "datetime", - "model": "integer", - "model_run": "integer", "task": "integer", - "project": "integer", + "updated_at": "datetime", } response = client.predictions.update( id=1, + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) validate_response(response, expected_response, expected_types) async_response = await async_client.predictions.update( id=1, + model_version="yolo-v8", result=[ { - "original_width": 1920, - "original_height": 1080, - "image_rotation": 0, "from_name": "bboxes", + "image_rotation": 0, + "original_height": 1080, + "original_width": 1920, "to_name": "image", "type": "rectanglelabels", "value": { - "x": 20, - "y": 30, - "width": 50, "height": 60, "rotation": 0, "values": {"rectanglelabels": ["Person"]}, + "width": 50, + "x": 20, + "y": 30, }, } ], score=0.95, - model_version="yolo-v8", ) validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_projects.py b/tests/test_projects.py index a7d4968a7..28cb28d76 100644 --- a/tests/test_projects.py +++ b/tests/test_projects.py @@ -8,103 +8,103 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "title": "title", - "description": "description", - "label_config": "label_config", - "expert_instruction": "expert_instruction", - "show_instruction": True, - "show_skip_button": True, - "enable_empty_annotation": True, - "show_annotation_history": True, - "organization": 1, "color": "color", - "maximum_annotations": 1, - "is_published": True, - "model_version": "model_version", - "is_draft": True, + "config_has_control_tags": True, + "config_suitable_for_bulk_annotation": True, + "control_weights": {"key": "value"}, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "created_at": "2024-01-15T09:30:00Z", + "description": "description", + "enable_empty_annotation": True, + "evaluate_predictions_automatically": True, + "expert_instruction": "expert_instruction", + "finished_task_number": 1, + "ground_truth_number": 1, + "id": 1, + "is_draft": True, + "is_published": True, + "label_config": "label_config", + "maximum_annotations": 1, "min_annotations_to_start_training": 1, - "start_training_on_annotation_update": True, - "show_collab_predictions": True, + "model_version": "model_version", "num_tasks_with_annotations": 1, - "task_number": 1, - "useful_annotation_number": 1, - "ground_truth_number": 1, - "skipped_annotations_number": 1, - "total_annotations_number": 1, - "total_predictions_number": 1, + "organization": 1, + "overlap_cohort_percentage": 1, + "parsed_label_config": {"key": "value"}, + "pinned_at": "2024-01-15T09:30:00Z", + "queue_done": 1, + "queue_total": 1, + "reveal_preannotations_interactively": True, "sampling": "Sequential sampling", + "show_annotation_history": True, + "show_collab_predictions": True, "show_ground_truth_first": True, + "show_instruction": True, "show_overlap_first": True, - "overlap_cohort_percentage": 1, + "show_skip_button": True, + "skip_queue": "REQUEUE_FOR_ME", + "skipped_annotations_number": 1, + "start_training_on_annotation_update": True, "task_data_login": "task_data_login", "task_data_password": "task_data_password", - "control_weights": {"key": "value"}, - "parsed_label_config": {"key": "value"}, - "evaluate_predictions_automatically": True, - "config_has_control_tags": True, - "skip_queue": "REQUEUE_FOR_ME", - "reveal_preannotations_interactively": True, - "pinned_at": "2024-01-15T09:30:00Z", - "finished_task_number": 1, - "queue_total": 1, - "queue_done": 1, - "config_suitable_for_bulk_annotation": True, + "task_number": 1, + "title": "title", + "total_annotations_number": 1, + "total_predictions_number": 1, + "useful_annotation_number": 1, "workspace": 1, } expected_types: typing.Any = { - "id": "integer", - "title": None, + "color": None, + "config_has_control_tags": None, + "config_suitable_for_bulk_annotation": None, + "control_weights": None, + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "description": None, - "label_config": None, - "expert_instruction": None, - "show_instruction": None, - "show_skip_button": None, "enable_empty_annotation": None, - "show_annotation_history": None, - "organization": "integer", - "color": None, - "maximum_annotations": "integer", - "is_published": None, - "model_version": None, + "evaluate_predictions_automatically": None, + "expert_instruction": None, + "finished_task_number": "integer", + "ground_truth_number": "integer", + "id": "integer", "is_draft": None, - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "created_at": "datetime", + "is_published": None, + "label_config": None, + "maximum_annotations": "integer", "min_annotations_to_start_training": "integer", - "start_training_on_annotation_update": None, - "show_collab_predictions": None, + "model_version": None, "num_tasks_with_annotations": "integer", - "task_number": "integer", - "useful_annotation_number": "integer", - "ground_truth_number": "integer", - "skipped_annotations_number": "integer", - "total_annotations_number": "integer", - "total_predictions_number": "integer", + "organization": "integer", + "overlap_cohort_percentage": "integer", + "parsed_label_config": None, + "pinned_at": "datetime", + "queue_done": "integer", + "queue_total": "integer", + "reveal_preannotations_interactively": None, "sampling": None, + "show_annotation_history": None, + "show_collab_predictions": None, "show_ground_truth_first": None, + "show_instruction": None, "show_overlap_first": None, - "overlap_cohort_percentage": "integer", + "show_skip_button": None, + "skip_queue": None, + "skipped_annotations_number": "integer", + "start_training_on_annotation_update": None, "task_data_login": None, "task_data_password": None, - "control_weights": None, - "parsed_label_config": None, - "evaluate_predictions_automatically": None, - "config_has_control_tags": None, - "skip_queue": None, - "reveal_preannotations_interactively": None, - "pinned_at": "datetime", - "finished_task_number": "integer", - "queue_total": "integer", - "queue_done": "integer", - "config_suitable_for_bulk_annotation": None, + "task_number": "integer", + "title": None, + "total_annotations_number": "integer", + "total_predictions_number": "integer", + "useful_annotation_number": "integer", "workspace": "integer", } response = client.projects.create() @@ -116,102 +116,102 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "title": "My project", - "description": "My first project", - "label_config": "[...]", - "expert_instruction": "Label all cats", - "show_instruction": True, - "show_skip_button": True, - "enable_empty_annotation": True, - "show_annotation_history": True, - "organization": 1, "color": "#FF0000", - "maximum_annotations": 1, - "is_published": True, - "model_version": "1.0.0", - "is_draft": False, + "config_has_control_tags": True, + "config_suitable_for_bulk_annotation": True, + "control_weights": {}, + "created_at": "2023-08-24T14:15:22Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "manager@humansignal.com", "first_name": "Jo", + "id": 1, "last_name": "Doe", - "email": "manager@humansignal.com", - "avatar": "avatar", }, - "created_at": "2023-08-24T14:15:22Z", + "description": "My first project", + "enable_empty_annotation": True, + "evaluate_predictions_automatically": False, + "expert_instruction": "Label all cats", + "finished_task_number": 10, + "ground_truth_number": 5, + "id": 1, + "is_draft": False, + "is_published": True, + "label_config": "[...]", + "maximum_annotations": 1, "min_annotations_to_start_training": 0, - "start_training_on_annotation_update": True, - "show_collab_predictions": True, + "model_version": "1.0.0", "num_tasks_with_annotations": 10, - "task_number": 100, - "useful_annotation_number": 10, - "ground_truth_number": 5, - "skipped_annotations_number": 0, - "total_annotations_number": 10, - "total_predictions_number": 0, + "organization": 1, + "overlap_cohort_percentage": 100, + "parsed_label_config": '{"tag": {...}}', + "pinned_at": "2023-08-24T14:15:22Z", + "queue_done": 100, + "queue_total": 10, + "reveal_preannotations_interactively": True, "sampling": "Sequential sampling", + "show_annotation_history": True, + "show_collab_predictions": True, "show_ground_truth_first": True, + "show_instruction": True, "show_overlap_first": True, - "overlap_cohort_percentage": 100, + "show_skip_button": True, + "skip_queue": "REQUEUE_FOR_ME", + "skipped_annotations_number": 0, + "start_training_on_annotation_update": True, "task_data_login": "user", "task_data_password": "secret", - "control_weights": {}, - "parsed_label_config": '{"tag": {...}}', - "evaluate_predictions_automatically": False, - "config_has_control_tags": True, - "skip_queue": "REQUEUE_FOR_ME", - "reveal_preannotations_interactively": True, - "pinned_at": "2023-08-24T14:15:22Z", - "finished_task_number": 10, - "queue_total": 10, - "queue_done": 100, - "config_suitable_for_bulk_annotation": True, + "task_number": 100, + "title": "My project", + "total_annotations_number": 10, + "total_predictions_number": 0, + "useful_annotation_number": 10, } expected_types: typing.Any = { - "id": "integer", - "title": None, + "color": None, + "config_has_control_tags": None, + "config_suitable_for_bulk_annotation": None, + "control_weights": None, + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, "description": None, - "label_config": None, - "expert_instruction": None, - "show_instruction": None, - "show_skip_button": None, "enable_empty_annotation": None, - "show_annotation_history": None, - "organization": "integer", - "color": None, - "maximum_annotations": "integer", - "is_published": None, - "model_version": None, + "evaluate_predictions_automatically": None, + "expert_instruction": None, + "finished_task_number": "integer", + "ground_truth_number": "integer", + "id": "integer", "is_draft": None, - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "created_at": "datetime", + "is_published": None, + "label_config": None, + "maximum_annotations": "integer", "min_annotations_to_start_training": "integer", - "start_training_on_annotation_update": None, - "show_collab_predictions": None, + "model_version": None, "num_tasks_with_annotations": "integer", - "task_number": "integer", - "useful_annotation_number": "integer", - "ground_truth_number": "integer", - "skipped_annotations_number": "integer", - "total_annotations_number": "integer", - "total_predictions_number": "integer", - "sampling": None, - "show_ground_truth_first": None, - "show_overlap_first": None, + "organization": "integer", "overlap_cohort_percentage": "integer", - "task_data_login": None, - "task_data_password": None, - "control_weights": None, "parsed_label_config": None, - "evaluate_predictions_automatically": None, - "config_has_control_tags": None, - "skip_queue": None, - "reveal_preannotations_interactively": None, "pinned_at": "datetime", - "finished_task_number": "integer", - "queue_total": "integer", "queue_done": "integer", - "config_suitable_for_bulk_annotation": None, + "queue_total": "integer", + "reveal_preannotations_interactively": None, + "sampling": None, + "show_annotation_history": None, + "show_collab_predictions": None, + "show_ground_truth_first": None, + "show_instruction": None, + "show_overlap_first": None, + "show_skip_button": None, + "skip_queue": None, + "skipped_annotations_number": "integer", + "start_training_on_annotation_update": None, + "task_data_login": None, + "task_data_password": None, + "task_number": "integer", + "title": None, + "total_annotations_number": "integer", + "total_predictions_number": "integer", + "useful_annotation_number": "integer", } response = client.projects.get(id=1) validate_response(response, expected_response, expected_types) @@ -235,157 +235,157 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "title": "title", - "description": "description", - "label_config": "label_config", - "expert_instruction": "expert_instruction", - "show_instruction": True, - "show_skip_button": True, - "enable_empty_annotation": True, - "show_annotation_history": True, - "organization": 1, + "annotation_limit_count": 1, + "annotation_limit_percent": "annotation_limit_percent", + "annotator_evaluation_minimum_score": "annotator_evaluation_minimum_score", + "annotator_evaluation_minimum_tasks": 1, + "assignment_settings": {"id": 1, "label_stream_task_distribution": "auto_distribution", "project": 1}, "color": "color", - "maximum_annotations": 1, - "is_published": True, - "model_version": "model_version", - "is_draft": True, + "comment_classification_config": "comment_classification_config", + "config_has_control_tags": True, + "config_suitable_for_bulk_annotation": True, + "control_weights": {"key": "value"}, + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "created_at": "2024-01-15T09:30:00Z", + "custom_script": "custom_script", + "custom_task_lock_ttl": 1, + "description": "description", + "enable_empty_annotation": True, + "evaluate_predictions_automatically": True, + "expert_instruction": "expert_instruction", + "finished_task_number": 1, + "ground_truth_number": 1, + "id": 1, + "is_draft": True, + "is_published": True, + "label_config": "label_config", + "maximum_annotations": 1, "min_annotations_to_start_training": 1, - "start_training_on_annotation_update": True, - "show_collab_predictions": True, + "model_version": "model_version", "num_tasks_with_annotations": 1, - "task_number": 1, - "useful_annotation_number": 1, - "ground_truth_number": 1, - "skipped_annotations_number": 1, - "total_annotations_number": 1, - "total_predictions_number": 1, - "sampling": "Sequential sampling", - "show_ground_truth_first": True, - "show_overlap_first": True, + "organization": 1, "overlap_cohort_percentage": 1, - "task_data_login": "task_data_login", - "task_data_password": "task_data_password", - "control_weights": {"key": "value"}, "parsed_label_config": {"key": "value"}, - "evaluate_predictions_automatically": True, - "config_has_control_tags": True, - "skip_queue": "REQUEUE_FOR_ME", - "reveal_preannotations_interactively": True, + "pause_on_failed_annotator_evaluation": True, "pinned_at": "2024-01-15T09:30:00Z", - "finished_task_number": 1, - "queue_total": 1, + "prompts": "prompts", "queue_done": 1, - "config_suitable_for_bulk_annotation": True, - "workspace": 1, + "queue_total": 1, + "require_comment_on_skip": True, + "reveal_preannotations_interactively": True, "review_settings": { - "id": 1, - "requeue_rejected_tasks_to_annotator": True, - "review_criteria": "all", "anonymize_annotations": True, - "only_finished_tasks": True, + "id": 1, "instruction": "instruction", - "show_instruction": True, - "show_data_manager_to_reviewers": True, - "show_agreement_to_reviewers": True, - "require_comment_on_reject": True, + "only_finished_tasks": True, + "project": 1, "requeue_rejected_tasks_mode": "requeue", + "requeue_rejected_tasks_to_annotator": True, + "require_comment_on_reject": True, + "review_criteria": "all", "review_only_manual_assignments": True, - "project": 1, + "show_agreement_to_reviewers": True, + "show_data_manager_to_reviewers": True, + "show_instruction": True, }, - "assignment_settings": {"id": 1, "label_stream_task_distribution": "auto_distribution", "project": 1}, - "custom_script": "custom_script", - "comment_classification_config": "comment_classification_config", - "require_comment_on_skip": True, - "custom_task_lock_ttl": 1, - "prompts": "prompts", - "annotation_limit_count": 1, - "annotation_limit_percent": "annotation_limit_percent", - "pause_on_failed_annotator_evaluation": True, - "annotator_evaluation_minimum_score": "annotator_evaluation_minimum_score", - "annotator_evaluation_minimum_tasks": 1, + "sampling": "Sequential sampling", + "show_annotation_history": True, + "show_collab_predictions": True, + "show_ground_truth_first": True, + "show_instruction": True, + "show_overlap_first": True, + "show_skip_button": True, + "skip_queue": "REQUEUE_FOR_ME", + "skipped_annotations_number": 1, + "start_training_on_annotation_update": True, + "task_data_login": "task_data_login", + "task_data_password": "task_data_password", + "task_number": 1, + "title": "title", + "total_annotations_number": 1, + "total_predictions_number": 1, + "useful_annotation_number": 1, + "workspace": 1, "workspace_title": "workspace_title", } expected_types: typing.Any = { - "id": "integer", - "title": None, + "annotation_limit_count": "integer", + "annotation_limit_percent": None, + "annotator_evaluation_minimum_score": None, + "annotator_evaluation_minimum_tasks": "integer", + "assignment_settings": {"id": "integer", "label_stream_task_distribution": None, "project": "integer"}, + "color": None, + "comment_classification_config": None, + "config_has_control_tags": None, + "config_suitable_for_bulk_annotation": None, + "control_weights": None, + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, + "custom_script": None, + "custom_task_lock_ttl": "integer", "description": None, - "label_config": None, - "expert_instruction": None, - "show_instruction": None, - "show_skip_button": None, "enable_empty_annotation": None, - "show_annotation_history": None, - "organization": "integer", - "color": None, - "maximum_annotations": "integer", - "is_published": None, - "model_version": None, + "evaluate_predictions_automatically": None, + "expert_instruction": None, + "finished_task_number": "integer", + "ground_truth_number": "integer", + "id": "integer", "is_draft": None, - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "created_at": "datetime", + "is_published": None, + "label_config": None, + "maximum_annotations": "integer", "min_annotations_to_start_training": "integer", - "start_training_on_annotation_update": None, - "show_collab_predictions": None, + "model_version": None, "num_tasks_with_annotations": "integer", - "task_number": "integer", - "useful_annotation_number": "integer", - "ground_truth_number": "integer", - "skipped_annotations_number": "integer", - "total_annotations_number": "integer", - "total_predictions_number": "integer", - "sampling": None, - "show_ground_truth_first": None, - "show_overlap_first": None, + "organization": "integer", "overlap_cohort_percentage": "integer", - "task_data_login": None, - "task_data_password": None, - "control_weights": None, "parsed_label_config": None, - "evaluate_predictions_automatically": None, - "config_has_control_tags": None, - "skip_queue": None, - "reveal_preannotations_interactively": None, + "pause_on_failed_annotator_evaluation": None, "pinned_at": "datetime", - "finished_task_number": "integer", - "queue_total": "integer", + "prompts": None, "queue_done": "integer", - "config_suitable_for_bulk_annotation": None, - "workspace": "integer", + "queue_total": "integer", + "require_comment_on_skip": None, + "reveal_preannotations_interactively": None, "review_settings": { - "id": "integer", - "requeue_rejected_tasks_to_annotator": None, - "review_criteria": None, "anonymize_annotations": None, - "only_finished_tasks": None, + "id": "integer", "instruction": None, - "show_instruction": None, - "show_data_manager_to_reviewers": None, - "show_agreement_to_reviewers": None, - "require_comment_on_reject": None, + "only_finished_tasks": None, + "project": "integer", "requeue_rejected_tasks_mode": None, + "requeue_rejected_tasks_to_annotator": None, + "require_comment_on_reject": None, + "review_criteria": None, "review_only_manual_assignments": None, - "project": "integer", + "show_agreement_to_reviewers": None, + "show_data_manager_to_reviewers": None, + "show_instruction": None, }, - "assignment_settings": {"id": "integer", "label_stream_task_distribution": None, "project": "integer"}, - "custom_script": None, - "comment_classification_config": None, - "require_comment_on_skip": None, - "custom_task_lock_ttl": "integer", - "prompts": None, - "annotation_limit_count": "integer", - "annotation_limit_percent": None, - "pause_on_failed_annotator_evaluation": None, - "annotator_evaluation_minimum_score": None, - "annotator_evaluation_minimum_tasks": "integer", + "sampling": None, + "show_annotation_history": None, + "show_collab_predictions": None, + "show_ground_truth_first": None, + "show_instruction": None, + "show_overlap_first": None, + "show_skip_button": None, + "skip_queue": None, + "skipped_annotations_number": "integer", + "start_training_on_annotation_update": None, + "task_data_login": None, + "task_data_password": None, + "task_number": "integer", + "title": None, + "total_annotations_number": "integer", + "total_predictions_number": "integer", + "useful_annotation_number": "integer", + "workspace": "integer", "workspace_title": None, } response = client.projects.update(id=1) @@ -398,33 +398,33 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_duplicate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = {"id": 1} expected_types: typing.Any = {"id": "integer"} - response = client.projects.duplicate(id=1, mode="settings", workspace=1, title="title") + response = client.projects.duplicate(id=1, mode="settings", title="title", workspace=1) validate_response(response, expected_response, expected_types) - async_response = await async_client.projects.duplicate(id=1, mode="settings", workspace=1, title="title") + async_response = await async_client.projects.duplicate(id=1, mode="settings", title="title", workspace=1) validate_response(async_response, expected_response, expected_types) async def test_import_tasks(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "task_count": 1, "annotation_count": 1, - "predictions_count": 1, + "could_be_tasks_list": True, + "data_columns": ["data_columns"], "duration": 1.1, "file_upload_ids": [1], - "could_be_tasks_list": True, "found_formats": ["found_formats"], - "data_columns": ["data_columns"], + "predictions_count": 1, + "task_count": 1, } expected_types: typing.Any = { - "task_count": "integer", "annotation_count": "integer", - "predictions_count": "integer", + "could_be_tasks_list": None, + "data_columns": ("list", {0: None}), "duration": None, "file_upload_ids": ("list", {0: "integer"}), - "could_be_tasks_list": None, "found_formats": ("list", {0: None}), - "data_columns": ("list", {0: None}), + "predictions_count": "integer", + "task_count": "integer", } response = client.projects.import_tasks(id=1, request=[]) validate_response(response, expected_response, expected_types) diff --git a/tests/test_prompts.py b/tests/test_prompts.py index c4bafae9e..088083b63 100644 --- a/tests/test_prompts.py +++ b/tests/test_prompts.py @@ -7,8 +7,8 @@ async def test_batch_failed_predictions(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"job_id": "job_id", "failed_predictions": [{"key": "value"}]} - expected_types: typing.Any = {"job_id": None, "failed_predictions": ("list", {0: None})} + expected_response: typing.Any = {"failed_predictions": [{"key": "value"}], "job_id": "job_id"} + expected_types: typing.Any = {"failed_predictions": ("list", {0: None}), "job_id": None} response = client.prompts.batch_failed_predictions(failed_predictions=[], modelrun_id=1) validate_response(response, expected_response, expected_types) @@ -19,50 +19,50 @@ async def test_batch_failed_predictions(client: LabelStudio, async_client: Async async def test_batch_predictions(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = {"job_id": "job_id", "results": [{"key": "value"}]} expected_types: typing.Any = {"job_id": None, "results": ("list", {0: None})} - response = client.prompts.batch_predictions(results=[], modelrun_id=1) + response = client.prompts.batch_predictions(modelrun_id=1, results=[]) validate_response(response, expected_response, expected_types) - async_response = await async_client.prompts.batch_predictions(results=[], modelrun_id=1) + async_response = await async_client.prompts.batch_predictions(modelrun_id=1, results=[]) validate_response(async_response, expected_response, expected_types) async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, + "associated_projects": [{"id": 1}], + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "skill_name": "TextClassification", - "associated_projects": [{"id": 1}], - "title": "title", "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "id": 1, "input_fields": {"key": "value"}, - "output_classes": {"key": "value"}, "organization": 1, + "output_classes": {"key": "value"}, + "skill_name": "TextClassification", + "title": "title", + "updated_at": "2024-01-15T09:30:00Z", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "skill_name": None, "associated_projects": ("list", {0: {"id": "integer"}}), - "title": None, - "description": None, "created_at": "datetime", - "updated_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, + "description": None, + "id": "integer", "input_fields": None, - "output_classes": None, "organization": "integer", + "output_classes": None, + "skill_name": None, + "title": None, + "updated_at": "datetime", } }, ) @@ -75,134 +75,41 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "associated_projects": [1], + "created_at": "2024-01-15T09:30:00Z", "created_by": { - "id": 1, + "avatar": "avatar", + "email": "email", "first_name": "first_name", + "id": 1, "last_name": "last_name", - "email": "email", - "avatar": "avatar", }, - "skill_name": "TextClassification", - "title": "title", "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", + "id": 1, "input_fields": {"key": "value"}, - "output_classes": {"key": "value"}, "organization": 1, - "associated_projects": [1], - } - expected_types: typing.Any = { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "skill_name": None, - "title": None, - "description": None, - "created_at": "datetime", - "updated_at": "datetime", - "input_fields": None, - "output_classes": None, - "organization": "integer", - "associated_projects": ("list", {0: "integer"}), - } - response = client.prompts.create(title="title") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.prompts.create(title="title") - validate_response(async_response, expected_response, expected_types) - - -async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = { - "id": 1, - "created_by": { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "email": "email", - "avatar": "avatar", - }, + "output_classes": {"key": "value"}, "skill_name": "TextClassification", - "associated_projects": [{"id": 1, "title": "title"}], "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", - "input_fields": {"key": "value"}, - "output_classes": {"key": "value"}, - "organization": 1, } expected_types: typing.Any = { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, - "skill_name": None, - "associated_projects": ("list", {0: {"id": "integer", "title": None}}), - "title": None, - "description": None, + "associated_projects": ("list", {0: "integer"}), "created_at": "datetime", - "updated_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, + "description": None, + "id": "integer", "input_fields": None, - "output_classes": None, "organization": "integer", - } - response = client.prompts.get(id="id") - validate_response(response, expected_response, expected_types) - - async_response = await async_client.prompts.get(id="id") - validate_response(async_response, expected_response, expected_types) - - -async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.prompts.delete(id="id") # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.prompts.delete(id="id") # type: ignore[func-returns-value] - is None - ) - - -async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = { - "id": 1, - "created_by": { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "email": "email", - "avatar": "avatar", - }, - "skill_name": "TextClassification", - "title": "title", - "description": "description", - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "input_fields": {"key": "value"}, - "output_classes": {"key": "value"}, - "organization": 1, - "associated_projects": [1], - } - expected_types: typing.Any = { - "id": "integer", - "created_by": {"id": "integer", "first_name": None, "last_name": None, "email": None, "avatar": None}, + "output_classes": None, "skill_name": None, "title": None, - "description": None, - "created_at": "datetime", "updated_at": "datetime", - "input_fields": None, - "output_classes": None, - "organization": "integer", - "associated_projects": ("list", {0: "integer"}), } - response = client.prompts.update(id="id") + response = client.prompts.create(title="title") validate_response(response, expected_response, expected_types) - async_response = await async_client.prompts.update(id="id") + async_response = await async_client.prompts.create(title="title") validate_response(async_response, expected_response, expected_types) @@ -213,79 +120,79 @@ async def test_compatible_projects(client: LabelStudio, async_client: AsyncLabel "previous": "http://api.example.org/accounts/?page=2", "results": [ { - "control_weights": {"key": "value"}, - "start_training_on_annotation_update": True, - "id": 1, - "ground_truth_number": 1, - "config_has_control_tags": True, + "allow_stream": "allow_stream", + "annotation_limit_count": 1, "annotation_limit_percent": "annotation_limit_percent", - "duplication_done": True, - "finished_task_number": 1, - "members": "members", - "total_annotations_number": "total_annotations_number", - "members_count": 1, - "enable_empty_annotation": True, + "annotator_evaluation_minimum_score": "annotator_evaluation_minimum_score", + "annotator_evaluation_minimum_tasks": 1, + "assignment_settings": {"id": 1}, + "blueprints": [ + {"created_at": "2024-01-15T09:30:00Z", "id": 1, "share_id": "share_id", "short_url": "short_url"} + ], + "color": "color", + "comment_classification_config": "comment_classification_config", + "config_has_control_tags": True, "config_suitable_for_bulk_annotation": True, - "task_number": 1, - "workspace_title": "workspace_title", - "total_predictions_number": 1, - "is_published": True, - "is_draft": True, - "description": "description", - "rejected": "rejected", + "control_weights": {"key": "value"}, + "created_at": "2024-01-15T09:30:00Z", + "created_by": {"avatar": "avatar", "id": 1}, "custom_script": "custom_script", - "workspace": "workspace", - "show_ground_truth_first": True, + "custom_task_lock_ttl": 1, + "data_types": {"key": "value"}, + "description": "description", + "description_short": "description_short", + "duplication_done": True, + "duplication_status": "duplication_status", + "enable_empty_annotation": True, + "evaluate_predictions_automatically": True, "expert_instruction": "expert_instruction", - "allow_stream": "allow_stream", - "reviewer_queue_total": "reviewer_queue_total", - "created_at": "2024-01-15T09:30:00Z", - "annotator_evaluation_minimum_tasks": 1, - "review_total_tasks": "review_total_tasks", - "min_annotations_to_start_training": 1, + "finished_task_number": 1, + "ground_truth_number": 1, + "has_blueprints": "has_blueprints", + "id": 1, + "is_draft": True, + "is_published": True, "label_config": "label_config", - "created_by": {"id": 1, "avatar": "avatar"}, "maximum_annotations": 1, - "evaluate_predictions_automatically": True, - "annotator_evaluation_minimum_score": "annotator_evaluation_minimum_score", + "members": "members", + "members_count": 1, + "min_annotations_to_start_training": 1, "model_version": "model_version", - "useful_annotation_number": "useful_annotation_number", - "has_blueprints": "has_blueprints", + "num_tasks_with_annotations": "num_tasks_with_annotations", + "organization": 1, + "overlap_cohort_percentage": 1, + "parsed_label_config": {"key": "value"}, "pause_on_failed_annotator_evaluation": True, - "show_instruction": True, - "queue_left": "queue_left", - "custom_task_lock_ttl": 1, "pinned_at": "2024-01-15T09:30:00Z", + "prompts": "prompts", + "queue_done": "queue_done", + "queue_left": "queue_left", + "queue_total": "queue_total", "ready": "ready", - "description_short": "description_short", - "show_overlap_first": True, + "rejected": "rejected", + "require_comment_on_skip": True, "reveal_preannotations_interactively": True, - "comment_classification_config": "comment_classification_config", - "show_skip_button": True, - "data_types": {"key": "value"}, - "organization": 1, - "show_collab_predictions": True, + "review_settings": {"id": 1, "requeue_rejected_tasks_to_annotator": True}, + "review_total_tasks": "review_total_tasks", "reviewed_number": "reviewed_number", - "prompts": "prompts", - "overlap_cohort_percentage": 1, - "duplication_status": "duplication_status", - "skipped_annotations_number": "skipped_annotations_number", - "blueprints": [ - {"id": 1, "share_id": "share_id", "short_url": "short_url", "created_at": "2024-01-15T09:30:00Z"} - ], + "reviewer_queue_total": "reviewer_queue_total", "sampling": "Sequential sampling", - "color": "color", - "title": "title", - "skip_queue": "REQUEUE_FOR_ME", - "review_settings": {"id": 1, "requeue_rejected_tasks_to_annotator": True}, - "num_tasks_with_annotations": "num_tasks_with_annotations", - "assignment_settings": {"id": 1}, - "require_comment_on_skip": True, - "annotation_limit_count": 1, - "queue_done": "queue_done", "show_annotation_history": True, - "queue_total": "queue_total", - "parsed_label_config": {"key": "value"}, + "show_collab_predictions": True, + "show_ground_truth_first": True, + "show_instruction": True, + "show_overlap_first": True, + "show_skip_button": True, + "skip_queue": "REQUEUE_FOR_ME", + "skipped_annotations_number": "skipped_annotations_number", + "start_training_on_annotation_update": True, + "task_number": 1, + "title": "title", + "total_annotations_number": "total_annotations_number", + "total_predictions_number": 1, + "useful_annotation_number": "useful_annotation_number", + "workspace": "workspace", + "workspace_title": "workspace_title", } ], } @@ -297,80 +204,80 @@ async def test_compatible_projects(client: LabelStudio, async_client: AsyncLabel "list", { 0: { - "control_weights": None, - "start_training_on_annotation_update": None, - "id": "integer", - "ground_truth_number": "integer", - "config_has_control_tags": None, + "allow_stream": None, + "annotation_limit_count": "integer", "annotation_limit_percent": None, - "duplication_done": None, - "finished_task_number": "integer", - "members": None, - "total_annotations_number": None, - "members_count": "integer", - "enable_empty_annotation": None, + "annotator_evaluation_minimum_score": None, + "annotator_evaluation_minimum_tasks": "integer", + "assignment_settings": {"id": "integer"}, + "blueprints": ( + "list", + {0: {"created_at": "datetime", "id": "integer", "share_id": None, "short_url": None}}, + ), + "color": None, + "comment_classification_config": None, + "config_has_control_tags": None, "config_suitable_for_bulk_annotation": None, - "task_number": "integer", - "workspace_title": None, - "total_predictions_number": "integer", - "is_published": None, - "is_draft": None, - "description": None, - "rejected": None, + "control_weights": None, + "created_at": "datetime", + "created_by": {"avatar": None, "id": "integer"}, "custom_script": None, - "workspace": None, - "show_ground_truth_first": None, + "custom_task_lock_ttl": "integer", + "data_types": None, + "description": None, + "description_short": None, + "duplication_done": None, + "duplication_status": None, + "enable_empty_annotation": None, + "evaluate_predictions_automatically": None, "expert_instruction": None, - "allow_stream": None, - "reviewer_queue_total": None, - "created_at": "datetime", - "annotator_evaluation_minimum_tasks": "integer", - "review_total_tasks": None, - "min_annotations_to_start_training": "integer", + "finished_task_number": "integer", + "ground_truth_number": "integer", + "has_blueprints": None, + "id": "integer", + "is_draft": None, + "is_published": None, "label_config": None, - "created_by": {"id": "integer", "avatar": None}, "maximum_annotations": "integer", - "evaluate_predictions_automatically": None, - "annotator_evaluation_minimum_score": None, + "members": None, + "members_count": "integer", + "min_annotations_to_start_training": "integer", "model_version": None, - "useful_annotation_number": None, - "has_blueprints": None, + "num_tasks_with_annotations": None, + "organization": "integer", + "overlap_cohort_percentage": "integer", + "parsed_label_config": None, "pause_on_failed_annotator_evaluation": None, - "show_instruction": None, - "queue_left": None, - "custom_task_lock_ttl": "integer", "pinned_at": "datetime", + "prompts": None, + "queue_done": None, + "queue_left": None, + "queue_total": None, "ready": None, - "description_short": None, - "show_overlap_first": None, + "rejected": None, + "require_comment_on_skip": None, "reveal_preannotations_interactively": None, - "comment_classification_config": None, - "show_skip_button": None, - "data_types": None, - "organization": "integer", - "show_collab_predictions": None, + "review_settings": {"id": "integer", "requeue_rejected_tasks_to_annotator": None}, + "review_total_tasks": None, "reviewed_number": None, - "prompts": None, - "overlap_cohort_percentage": "integer", - "duplication_status": None, - "skipped_annotations_number": None, - "blueprints": ( - "list", - {0: {"id": "integer", "share_id": None, "short_url": None, "created_at": "datetime"}}, - ), + "reviewer_queue_total": None, "sampling": None, - "color": None, - "title": None, - "skip_queue": None, - "review_settings": {"id": "integer", "requeue_rejected_tasks_to_annotator": None}, - "num_tasks_with_annotations": None, - "assignment_settings": {"id": "integer"}, - "require_comment_on_skip": None, - "annotation_limit_count": "integer", - "queue_done": None, "show_annotation_history": None, - "queue_total": None, - "parsed_label_config": None, + "show_collab_predictions": None, + "show_ground_truth_first": None, + "show_instruction": None, + "show_overlap_first": None, + "show_skip_button": None, + "skip_queue": None, + "skipped_annotations_number": None, + "start_training_on_annotation_update": None, + "task_number": "integer", + "title": None, + "total_annotations_number": None, + "total_predictions_number": "integer", + "useful_annotation_number": None, + "workspace": None, + "workspace_title": None, } }, ), @@ -380,3 +287,96 @@ async def test_compatible_projects(client: LabelStudio, async_client: AsyncLabel async_response = await async_client.prompts.compatible_projects() validate_response(async_response, expected_response, expected_types) + + +async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + expected_response: typing.Any = { + "associated_projects": [{"id": 1, "title": "title"}], + "created_at": "2024-01-15T09:30:00Z", + "created_by": { + "avatar": "avatar", + "email": "email", + "first_name": "first_name", + "id": 1, + "last_name": "last_name", + }, + "description": "description", + "id": 1, + "input_fields": {"key": "value"}, + "organization": 1, + "output_classes": {"key": "value"}, + "skill_name": "TextClassification", + "title": "title", + "updated_at": "2024-01-15T09:30:00Z", + } + expected_types: typing.Any = { + "associated_projects": ("list", {0: {"id": "integer", "title": None}}), + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, + "description": None, + "id": "integer", + "input_fields": None, + "organization": "integer", + "output_classes": None, + "skill_name": None, + "title": None, + "updated_at": "datetime", + } + response = client.prompts.get(id="id") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.prompts.get(id="id") + validate_response(async_response, expected_response, expected_types) + + +async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.prompts.delete(id="id") # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.prompts.delete(id="id") # type: ignore[func-returns-value] + is None + ) + + +async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + expected_response: typing.Any = { + "associated_projects": [1], + "created_at": "2024-01-15T09:30:00Z", + "created_by": { + "avatar": "avatar", + "email": "email", + "first_name": "first_name", + "id": 1, + "last_name": "last_name", + }, + "description": "description", + "id": 1, + "input_fields": {"key": "value"}, + "organization": 1, + "output_classes": {"key": "value"}, + "skill_name": "TextClassification", + "title": "title", + "updated_at": "2024-01-15T09:30:00Z", + } + expected_types: typing.Any = { + "associated_projects": ("list", {0: "integer"}), + "created_at": "datetime", + "created_by": {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}, + "description": None, + "id": "integer", + "input_fields": None, + "organization": "integer", + "output_classes": None, + "skill_name": None, + "title": None, + "updated_at": "datetime", + } + response = client.prompts.update(id="id") + validate_response(response, expected_response, expected_types) + + async_response = await async_client.prompts.update(id="id") + validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_tasks.py b/tests/test_tasks.py index fe37e89b2..af29d5a2c 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -8,50 +8,50 @@ async def test_create_many_status(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "project": 1, - "preannotated_from_fields": {"key": "value"}, + "annotation_count": 1, "commit_to_project": True, - "return_task_ids": True, - "status": "created", - "url": "url", - "error": "error", + "could_be_tasks_list": True, "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "finished_at": "2024-01-15T09:30:00Z", - "task_count": 1, - "annotation_count": 1, - "prediction_count": 1, + "data_columns": {"key": "value"}, "duration": 1, + "error": "error", "file_upload_ids": {"key": "value"}, - "could_be_tasks_list": True, + "finished_at": "2024-01-15T09:30:00Z", "found_formats": {"key": "value"}, - "data_columns": {"key": "value"}, - "tasks": {"key": "value"}, + "id": 1, + "preannotated_from_fields": {"key": "value"}, + "prediction_count": 1, + "project": 1, + "return_task_ids": True, + "status": "created", + "task_count": 1, "task_ids": {"key": "value"}, + "tasks": {"key": "value"}, + "updated_at": "2024-01-15T09:30:00Z", + "url": "url", } expected_types: typing.Any = { - "id": "integer", - "project": "integer", - "preannotated_from_fields": None, + "annotation_count": "integer", "commit_to_project": None, - "return_task_ids": None, - "status": None, - "url": None, - "error": None, + "could_be_tasks_list": None, "created_at": "datetime", - "updated_at": "datetime", - "finished_at": "datetime", - "task_count": "integer", - "annotation_count": "integer", - "prediction_count": "integer", + "data_columns": None, "duration": "integer", + "error": None, "file_upload_ids": None, - "could_be_tasks_list": None, + "finished_at": "datetime", "found_formats": None, - "data_columns": None, - "tasks": None, + "id": "integer", + "preannotated_from_fields": None, + "prediction_count": "integer", + "project": "integer", + "return_task_ids": None, + "status": None, + "task_count": "integer", "task_ids": None, + "tasks": None, + "updated_at": "datetime", + "url": None, } response = client.tasks.create_many_status(id=1, import_pk=1) validate_response(response, expected_response, expected_types) @@ -75,164 +75,164 @@ async def test_delete_all_tasks(client: LabelStudio, async_client: AsyncLabelStu async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, "agreement": "agreement", - "predictions": [ + "annotations": "annotations", + "annotations_ids": "annotations_ids", + "annotations_results": "annotations_results", + "annotators": [1, 1], + "annotators_count": 1, + "avg_lead_time": 1.1, + "cancelled_annotations": 1, + "comment_authors": [{"comment_authors": {"key": "value"}}, {"comment_authors": {"key": "value"}}], + "comment_authors_count": 1, + "comment_count": 2147483647, + "comments": "comments", + "completed_at": "2024-01-15T09:30:00Z", + "created_at": "2024-01-15T09:30:00Z", + "data": {"key": "value"}, + "draft_exists": True, + "drafts": [ { - "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], - "score": 1.1, - "model_version": "model_version", - "model": {"model": {"key": "value"}}, - "model_run": {"model_run": {"key": "value"}}, - "task": 1, - "project": 1, "created_at": "2024-01-15T09:30:00Z", + "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], "updated_at": "2024-01-15T09:30:00Z", }, { - "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], - "score": 1.1, - "model_version": "model_version", - "model": {"model": {"key": "value"}}, - "model_run": {"model_run": {"key": "value"}}, - "task": 1, - "project": 1, "created_at": "2024-01-15T09:30:00Z", + "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], "updated_at": "2024-01-15T09:30:00Z", }, ], - "annotations": "annotations", - "drafts": [ + "file_upload": "file_upload", + "ground_truth": True, + "id": 1, + "inner_id": 1, + "is_labeled": True, + "last_comment_updated_at": "2024-01-15T09:30:00Z", + "meta": {"key": "value"}, + "overlap": 2147483647, + "predictions": [ { - "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], "created_at": "2024-01-15T09:30:00Z", + "model": {"model": {"key": "value"}}, + "model_run": {"model_run": {"key": "value"}}, + "model_version": "model_version", + "project": 1, + "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], + "score": 1.1, + "task": 1, "updated_at": "2024-01-15T09:30:00Z", }, { - "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], "created_at": "2024-01-15T09:30:00Z", + "model": {"model": {"key": "value"}}, + "model_run": {"model_run": {"key": "value"}}, + "model_version": "model_version", + "project": 1, + "result": [{"result": {"key": "value"}}, {"result": {"key": "value"}}], + "score": 1.1, + "task": 1, "updated_at": "2024-01-15T09:30:00Z", }, ], - "annotators": [1, 1], - "inner_id": 1, - "cancelled_annotations": 1, - "total_annotations": 1, - "total_predictions": 1, - "completed_at": "2024-01-15T09:30:00Z", - "annotations_results": "annotations_results", + "predictions_model_versions": "predictions_model_versions", "predictions_results": "predictions_results", "predictions_score": 1.1, - "file_upload": "file_upload", - "storage_filename": "storage_filename", - "annotations_ids": "annotations_ids", - "predictions_model_versions": "predictions_model_versions", - "avg_lead_time": 1.1, - "draft_exists": True, - "updated_by": [{"updated_by": {"key": "value"}}, {"updated_by": {"key": "value"}}], - "reviewers": [{"reviewers": {"key": "value"}}, {"reviewers": {"key": "value"}}], - "comments": "comments", - "comment_authors": [{"comment_authors": {"key": "value"}}, {"comment_authors": {"key": "value"}}], + "project": 1, "reviewed": True, + "reviewers": [{"reviewers": {"key": "value"}}, {"reviewers": {"key": "value"}}], + "reviewers_count": 1, "reviews_accepted": 1, "reviews_rejected": 1, - "ground_truth": True, - "annotators_count": 1, - "reviewers_count": 1, - "comment_authors_count": 1, - "data": {"key": "value"}, - "meta": {"key": "value"}, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "is_labeled": True, - "overlap": 2147483647, - "comment_count": 2147483647, + "storage_filename": "storage_filename", + "total_annotations": 1, + "total_predictions": 1, "unresolved_comment_count": 2147483647, - "last_comment_updated_at": "2024-01-15T09:30:00Z", - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", + "updated_by": [{"updated_by": {"key": "value"}}, {"updated_by": {"key": "value"}}], } expected_types: typing.Any = { - "id": "integer", "agreement": None, - "predictions": ( + "annotations": None, + "annotations_ids": None, + "annotations_results": None, + "annotators": ("list", {0: "integer", 1: "integer"}), + "annotators_count": "integer", + "avg_lead_time": None, + "cancelled_annotations": "integer", + "comment_authors": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), + "comment_authors_count": "integer", + "comment_count": "integer", + "comments": None, + "completed_at": "datetime", + "created_at": "datetime", + "data": None, + "draft_exists": None, + "drafts": ( "list", { 0: { - "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), - "score": None, - "model_version": None, - "model": ("dict", {0: (None, None)}), - "model_run": ("dict", {0: (None, None)}), - "task": "integer", - "project": "integer", "created_at": "datetime", + "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), "updated_at": "datetime", }, 1: { - "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), - "score": None, - "model_version": None, - "model": ("dict", {0: (None, None)}), - "model_run": ("dict", {0: (None, None)}), - "task": "integer", - "project": "integer", "created_at": "datetime", + "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), "updated_at": "datetime", }, }, ), - "annotations": None, - "drafts": ( + "file_upload": None, + "ground_truth": None, + "id": "integer", + "inner_id": "integer", + "is_labeled": None, + "last_comment_updated_at": "datetime", + "meta": None, + "overlap": "integer", + "predictions": ( "list", { 0: { - "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), "created_at": "datetime", + "model": ("dict", {0: (None, None)}), + "model_run": ("dict", {0: (None, None)}), + "model_version": None, + "project": "integer", + "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), + "score": None, + "task": "integer", "updated_at": "datetime", }, 1: { - "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), "created_at": "datetime", + "model": ("dict", {0: (None, None)}), + "model_run": ("dict", {0: (None, None)}), + "model_version": None, + "project": "integer", + "result": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), + "score": None, + "task": "integer", "updated_at": "datetime", }, }, ), - "annotators": ("list", {0: "integer", 1: "integer"}), - "inner_id": "integer", - "cancelled_annotations": "integer", - "total_annotations": "integer", - "total_predictions": "integer", - "completed_at": "datetime", - "annotations_results": None, + "predictions_model_versions": None, "predictions_results": None, "predictions_score": None, - "file_upload": None, - "storage_filename": None, - "annotations_ids": None, - "predictions_model_versions": None, - "avg_lead_time": None, - "draft_exists": None, - "updated_by": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), - "reviewers": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), - "comments": None, - "comment_authors": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), + "project": "integer", "reviewed": None, + "reviewers": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), + "reviewers_count": "integer", "reviews_accepted": "integer", "reviews_rejected": "integer", - "ground_truth": None, - "annotators_count": "integer", - "reviewers_count": "integer", - "comment_authors_count": "integer", - "data": None, - "meta": None, - "created_at": "datetime", - "updated_at": "datetime", - "is_labeled": None, - "overlap": "integer", - "comment_count": "integer", + "storage_filename": None, + "total_annotations": "integer", + "total_predictions": "integer", "unresolved_comment_count": "integer", - "last_comment_updated_at": "datetime", - "project": "integer", + "updated_at": "datetime", + "updated_by": ("list", {0: ("dict", {0: (None, None)}), 1: ("dict", {0: (None, None)})}), } response = client.tasks.create(data={"key": "value"}) validate_response(response, expected_response, expected_types) @@ -243,128 +243,128 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, "agreement": "agreement", + "annotations": "annotations", + "annotations_ids": "annotations_ids", + "annotations_results": "annotations_results", + "annotators": [1], + "annotators_count": 1, + "avg_lead_time": 1.1, + "cancelled_annotations": 1, + "comment_authors": [{"key": "value"}], + "comment_authors_count": 1, + "comment_count": 1, + "comments": "comments", + "completed_at": "2024-01-15T09:30:00Z", + "created_at": "2024-01-15T09:30:00Z", + "data": {"key": "value"}, + "draft_exists": True, + "drafts": [ + {"created_at": "2024-01-15T09:30:00Z", "result": [{"key": "value"}], "updated_at": "2024-01-15T09:30:00Z"} + ], + "file_upload": "file_upload", + "ground_truth": True, + "id": 1, + "inner_id": 1, + "is_labeled": True, + "last_comment_updated_at": "2024-01-15T09:30:00Z", + "meta": {"key": "value"}, + "overlap": 1, "predictions": [ { - "result": [{"key": "value"}], - "score": 1.1, - "model_version": "model_version", + "created_at": "2024-01-15T09:30:00Z", "model": {"key": "value"}, "model_run": {"key": "value"}, - "task": 1, + "model_version": "model_version", "project": 1, - "created_at": "2024-01-15T09:30:00Z", + "result": [{"key": "value"}], + "score": 1.1, + "task": 1, "updated_at": "2024-01-15T09:30:00Z", } ], - "annotations": "annotations", - "drafts": [ - {"result": [{"key": "value"}], "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z"} - ], - "annotators": [1], - "inner_id": 1, - "cancelled_annotations": 1, - "total_annotations": 1, - "total_predictions": 1, - "completed_at": "2024-01-15T09:30:00Z", - "annotations_results": "annotations_results", + "predictions_model_versions": "predictions_model_versions", "predictions_results": "predictions_results", "predictions_score": 1.1, - "file_upload": "file_upload", - "storage_filename": "storage_filename", - "annotations_ids": "annotations_ids", - "predictions_model_versions": "predictions_model_versions", - "avg_lead_time": 1.1, - "draft_exists": True, - "updated_by": [{"key": "value"}], - "reviewers": [{"key": "value"}], - "comments": "comments", - "comment_authors": [{"key": "value"}], + "project": 1, "reviewed": True, + "reviewers": [{"key": "value"}], + "reviewers_count": 1, "reviews_accepted": 1, "reviews_rejected": 1, - "ground_truth": True, - "annotators_count": 1, - "reviewers_count": 1, - "comment_authors_count": 1, - "data": {"key": "value"}, - "meta": {"key": "value"}, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "is_labeled": True, - "overlap": 1, - "comment_count": 1, + "storage_filename": "storage_filename", + "total_annotations": 1, + "total_predictions": 1, "unresolved_comment_count": 1, - "last_comment_updated_at": "2024-01-15T09:30:00Z", - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", + "updated_by": [{"key": "value"}], } expected_types: typing.Any = { - "id": "integer", "agreement": None, - "predictions": ( + "annotations": None, + "annotations_ids": None, + "annotations_results": None, + "annotators": ("list", {0: "integer"}), + "annotators_count": "integer", + "avg_lead_time": None, + "cancelled_annotations": "integer", + "comment_authors": ("list", {0: ("dict", {0: (None, None)})}), + "comment_authors_count": "integer", + "comment_count": "integer", + "comments": None, + "completed_at": "datetime", + "created_at": "datetime", + "data": None, + "draft_exists": None, + "drafts": ( "list", { 0: { - "result": ("list", {0: ("dict", {0: (None, None)})}), - "score": None, - "model_version": None, - "model": ("dict", {0: (None, None)}), - "model_run": ("dict", {0: (None, None)}), - "task": "integer", - "project": "integer", "created_at": "datetime", + "result": ("list", {0: ("dict", {0: (None, None)})}), "updated_at": "datetime", } }, ), - "annotations": None, - "drafts": ( + "file_upload": None, + "ground_truth": None, + "id": "integer", + "inner_id": "integer", + "is_labeled": None, + "last_comment_updated_at": "datetime", + "meta": None, + "overlap": "integer", + "predictions": ( "list", { 0: { - "result": ("list", {0: ("dict", {0: (None, None)})}), "created_at": "datetime", + "model": ("dict", {0: (None, None)}), + "model_run": ("dict", {0: (None, None)}), + "model_version": None, + "project": "integer", + "result": ("list", {0: ("dict", {0: (None, None)})}), + "score": None, + "task": "integer", "updated_at": "datetime", } }, ), - "annotators": ("list", {0: "integer"}), - "inner_id": "integer", - "cancelled_annotations": "integer", - "total_annotations": "integer", - "total_predictions": "integer", - "completed_at": "datetime", - "annotations_results": None, + "predictions_model_versions": None, "predictions_results": None, "predictions_score": None, - "file_upload": None, - "storage_filename": None, - "annotations_ids": None, - "predictions_model_versions": None, - "avg_lead_time": None, - "draft_exists": None, - "updated_by": ("list", {0: ("dict", {0: (None, None)})}), - "reviewers": ("list", {0: ("dict", {0: (None, None)})}), - "comments": None, - "comment_authors": ("list", {0: ("dict", {0: (None, None)})}), + "project": "integer", "reviewed": None, + "reviewers": ("list", {0: ("dict", {0: (None, None)})}), + "reviewers_count": "integer", "reviews_accepted": "integer", "reviews_rejected": "integer", - "ground_truth": None, - "annotators_count": "integer", - "reviewers_count": "integer", - "comment_authors_count": "integer", - "data": None, - "meta": None, - "created_at": "datetime", - "updated_at": "datetime", - "is_labeled": None, - "overlap": "integer", - "comment_count": "integer", + "storage_filename": None, + "total_annotations": "integer", + "total_predictions": "integer", "unresolved_comment_count": "integer", - "last_comment_updated_at": "datetime", - "project": "integer", + "updated_at": "datetime", + "updated_by": ("list", {0: ("dict", {0: (None, None)})}), } response = client.tasks.get(id="id") validate_response(response, expected_response, expected_types) @@ -388,128 +388,128 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, "agreement": "agreement", + "annotations": "annotations", + "annotations_ids": "annotations_ids", + "annotations_results": "annotations_results", + "annotators": [1], + "annotators_count": 1, + "avg_lead_time": 1.1, + "cancelled_annotations": 1, + "comment_authors": [{"key": "value"}], + "comment_authors_count": 1, + "comment_count": 1, + "comments": "comments", + "completed_at": "2024-01-15T09:30:00Z", + "created_at": "2024-01-15T09:30:00Z", + "data": {"key": "value"}, + "draft_exists": True, + "drafts": [ + {"created_at": "2024-01-15T09:30:00Z", "result": [{"key": "value"}], "updated_at": "2024-01-15T09:30:00Z"} + ], + "file_upload": "file_upload", + "ground_truth": True, + "id": 1, + "inner_id": 1, + "is_labeled": True, + "last_comment_updated_at": "2024-01-15T09:30:00Z", + "meta": {"key": "value"}, + "overlap": 1, "predictions": [ { - "result": [{"key": "value"}], - "score": 1.1, - "model_version": "model_version", + "created_at": "2024-01-15T09:30:00Z", "model": {"key": "value"}, "model_run": {"key": "value"}, - "task": 1, + "model_version": "model_version", "project": 1, - "created_at": "2024-01-15T09:30:00Z", + "result": [{"key": "value"}], + "score": 1.1, + "task": 1, "updated_at": "2024-01-15T09:30:00Z", } ], - "annotations": "annotations", - "drafts": [ - {"result": [{"key": "value"}], "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z"} - ], - "annotators": [1], - "inner_id": 1, - "cancelled_annotations": 1, - "total_annotations": 1, - "total_predictions": 1, - "completed_at": "2024-01-15T09:30:00Z", - "annotations_results": "annotations_results", + "predictions_model_versions": "predictions_model_versions", "predictions_results": "predictions_results", "predictions_score": 1.1, - "file_upload": "file_upload", - "storage_filename": "storage_filename", - "annotations_ids": "annotations_ids", - "predictions_model_versions": "predictions_model_versions", - "avg_lead_time": 1.1, - "draft_exists": True, - "updated_by": [{"key": "value"}], - "reviewers": [{"key": "value"}], - "comments": "comments", - "comment_authors": [{"key": "value"}], + "project": 1, "reviewed": True, + "reviewers": [{"key": "value"}], + "reviewers_count": 1, "reviews_accepted": 1, "reviews_rejected": 1, - "ground_truth": True, - "annotators_count": 1, - "reviewers_count": 1, - "comment_authors_count": 1, - "data": {"key": "value"}, - "meta": {"key": "value"}, - "created_at": "2024-01-15T09:30:00Z", - "updated_at": "2024-01-15T09:30:00Z", - "is_labeled": True, - "overlap": 1, - "comment_count": 1, + "storage_filename": "storage_filename", + "total_annotations": 1, + "total_predictions": 1, "unresolved_comment_count": 1, - "last_comment_updated_at": "2024-01-15T09:30:00Z", - "project": 1, + "updated_at": "2024-01-15T09:30:00Z", + "updated_by": [{"key": "value"}], } expected_types: typing.Any = { - "id": "integer", "agreement": None, - "predictions": ( + "annotations": None, + "annotations_ids": None, + "annotations_results": None, + "annotators": ("list", {0: "integer"}), + "annotators_count": "integer", + "avg_lead_time": None, + "cancelled_annotations": "integer", + "comment_authors": ("list", {0: ("dict", {0: (None, None)})}), + "comment_authors_count": "integer", + "comment_count": "integer", + "comments": None, + "completed_at": "datetime", + "created_at": "datetime", + "data": None, + "draft_exists": None, + "drafts": ( "list", { 0: { - "result": ("list", {0: ("dict", {0: (None, None)})}), - "score": None, - "model_version": None, - "model": ("dict", {0: (None, None)}), - "model_run": ("dict", {0: (None, None)}), - "task": "integer", - "project": "integer", "created_at": "datetime", + "result": ("list", {0: ("dict", {0: (None, None)})}), "updated_at": "datetime", } }, ), - "annotations": None, - "drafts": ( + "file_upload": None, + "ground_truth": None, + "id": "integer", + "inner_id": "integer", + "is_labeled": None, + "last_comment_updated_at": "datetime", + "meta": None, + "overlap": "integer", + "predictions": ( "list", { 0: { - "result": ("list", {0: ("dict", {0: (None, None)})}), "created_at": "datetime", + "model": ("dict", {0: (None, None)}), + "model_run": ("dict", {0: (None, None)}), + "model_version": None, + "project": "integer", + "result": ("list", {0: ("dict", {0: (None, None)})}), + "score": None, + "task": "integer", "updated_at": "datetime", } }, ), - "annotators": ("list", {0: "integer"}), - "inner_id": "integer", - "cancelled_annotations": "integer", - "total_annotations": "integer", - "total_predictions": "integer", - "completed_at": "datetime", - "annotations_results": None, + "predictions_model_versions": None, "predictions_results": None, "predictions_score": None, - "file_upload": None, - "storage_filename": None, - "annotations_ids": None, - "predictions_model_versions": None, - "avg_lead_time": None, - "draft_exists": None, - "updated_by": ("list", {0: ("dict", {0: (None, None)})}), - "reviewers": ("list", {0: ("dict", {0: (None, None)})}), - "comments": None, - "comment_authors": ("list", {0: ("dict", {0: (None, None)})}), + "project": "integer", "reviewed": None, + "reviewers": ("list", {0: ("dict", {0: (None, None)})}), + "reviewers_count": "integer", "reviews_accepted": "integer", "reviews_rejected": "integer", - "ground_truth": None, - "annotators_count": "integer", - "reviewers_count": "integer", - "comment_authors_count": "integer", - "data": None, - "meta": None, - "created_at": "datetime", - "updated_at": "datetime", - "is_labeled": None, - "overlap": "integer", - "comment_count": "integer", + "storage_filename": None, + "total_annotations": "integer", + "total_predictions": "integer", "unresolved_comment_count": "integer", - "last_comment_updated_at": "datetime", - "project": "integer", + "updated_at": "datetime", + "updated_by": ("list", {0: ("dict", {0: (None, None)})}), } response = client.tasks.update(id="id") validate_response(response, expected_response, expected_types) diff --git a/tests/test_tokens.py b/tests/test_tokens.py index 9973f800e..5357517d5 100644 --- a/tests/test_tokens.py +++ b/tests/test_tokens.py @@ -7,10 +7,10 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = [{"token": "token", "created_at": "created_at", "expires_at": "expires_at"}] + expected_response: typing.Any = [{"created_at": "created_at", "expires_at": "expires_at", "token": "token"}] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", - {0: {"token": None, "created_at": None, "expires_at": None}}, + {0: {"created_at": None, "expires_at": None, "token": None}}, ) response = client.tokens.list() validate_response(response, expected_response, expected_types) @@ -20,8 +20,8 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"token": "token", "created_at": "created_at", "expires_at": "expires_at"} - expected_types: typing.Any = {"token": None, "created_at": None, "expires_at": None} + expected_response: typing.Any = {"created_at": "created_at", "expires_at": "expires_at", "token": "token"} + expected_types: typing.Any = {"created_at": None, "expires_at": None, "token": None} response = client.tokens.create() validate_response(response, expected_response, expected_types) diff --git a/tests/test_users.py b/tests/test_users.py index 1c62e33cd..e9ca066d8 100644 --- a/tests/test_users.py +++ b/tests/test_users.py @@ -8,38 +8,38 @@ async def test_get_current_user(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "phone": "phone", + "username": "username", } expected_types: typing.Any = { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "phone": None, + "username": None, } response = client.users.get_current_user() validate_response(response, expected_response, expected_types) @@ -50,38 +50,38 @@ async def test_get_current_user(client: LabelStudio, async_client: AsyncLabelStu async def test_update_current_user(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "phone": "phone", + "username": "username", } expected_types: typing.Any = { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "phone": None, + "username": None, } response = client.users.update_current_user() validate_response(response, expected_response, expected_types) @@ -132,70 +132,70 @@ async def test_get_token(client: LabelStudio, async_client: AsyncLabelStudio) -> async def test_whoami(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", "lse_fields": { + "email_notification_settings": "email_notification_settings", + "invite_activated": True, "invite_expired": "invite_expired", "invite_expired_at": "invite_expired_at", "invited_at": "2024-01-15T09:30:00Z", - "invite_activated": True, + "invited_by": 1, + "onboarding_state": "not_started", + "social_auth_finished": True, "trial_company": "trial_company", - "trial_role": "annotator", - "trial_models_in_production": "trial_models_in_production", "trial_experience_labeling": "trial_experience_labeling", "trial_license_enterprise": True, - "social_auth_finished": True, - "invited_by": 1, - "onboarding_state": "not_started", - "email_notification_settings": "email_notification_settings", + "trial_models_in_production": "trial_models_in_production", + "trial_role": "annotator", }, + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], "pause": "pause", + "phone": "phone", + "username": "username", } expected_types: typing.Any = { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, "lse_fields": { + "email_notification_settings": None, + "invite_activated": None, "invite_expired": None, "invite_expired_at": None, "invited_at": "datetime", - "invite_activated": None, + "invited_by": "integer", + "onboarding_state": None, + "social_auth_finished": None, "trial_company": None, - "trial_role": None, - "trial_models_in_production": None, "trial_experience_labeling": None, "trial_license_enterprise": None, - "social_auth_finished": None, - "invited_by": "integer", - "onboarding_state": None, - "email_notification_settings": None, + "trial_models_in_production": None, + "trial_role": None, }, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), "pause": None, + "phone": None, + "username": None, } response = client.users.whoami() validate_response(response, expected_response, expected_types) @@ -207,42 +207,42 @@ async def test_whoami(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "phone": "phone", + "username": "username", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "phone": None, + "username": None, } }, ) @@ -255,70 +255,70 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", "lse_fields": { + "email_notification_settings": "email_notification_settings", + "invite_activated": True, "invite_expired": "invite_expired", "invite_expired_at": "invite_expired_at", "invited_at": "2024-01-15T09:30:00Z", - "invite_activated": True, + "invited_by": 1, + "onboarding_state": "not_started", + "social_auth_finished": True, "trial_company": "trial_company", - "trial_role": "annotator", - "trial_models_in_production": "trial_models_in_production", "trial_experience_labeling": "trial_experience_labeling", "trial_license_enterprise": True, - "social_auth_finished": True, - "invited_by": 1, - "onboarding_state": "not_started", - "email_notification_settings": "email_notification_settings", + "trial_models_in_production": "trial_models_in_production", + "trial_role": "annotator", }, + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], "pause": "pause", + "phone": "phone", + "username": "username", } expected_types: typing.Any = { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, "lse_fields": { + "email_notification_settings": None, + "invite_activated": None, "invite_expired": None, "invite_expired_at": None, "invited_at": "datetime", - "invite_activated": None, + "invited_by": "integer", + "onboarding_state": None, + "social_auth_finished": None, "trial_company": None, - "trial_role": None, - "trial_models_in_production": None, "trial_experience_labeling": None, "trial_license_enterprise": None, - "social_auth_finished": None, - "invited_by": "integer", - "onboarding_state": None, - "email_notification_settings": None, + "trial_models_in_production": None, + "trial_role": None, }, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), "pause": None, + "phone": None, + "username": None, } response = client.users.create() validate_response(response, expected_response, expected_types) @@ -329,70 +329,70 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", "lse_fields": { + "email_notification_settings": "email_notification_settings", + "invite_activated": True, "invite_expired": "invite_expired", "invite_expired_at": "invite_expired_at", "invited_at": "2024-01-15T09:30:00Z", - "invite_activated": True, + "invited_by": 1, + "onboarding_state": "not_started", + "social_auth_finished": True, "trial_company": "trial_company", - "trial_role": "annotator", - "trial_models_in_production": "trial_models_in_production", "trial_experience_labeling": "trial_experience_labeling", "trial_license_enterprise": True, - "social_auth_finished": True, - "invited_by": 1, - "onboarding_state": "not_started", - "email_notification_settings": "email_notification_settings", + "trial_models_in_production": "trial_models_in_production", + "trial_role": "annotator", }, + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], "pause": "pause", + "phone": "phone", + "username": "username", } expected_types: typing.Any = { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, "lse_fields": { + "email_notification_settings": None, + "invite_activated": None, "invite_expired": None, "invite_expired_at": None, "invited_at": "datetime", - "invite_activated": None, + "invited_by": "integer", + "onboarding_state": None, + "social_auth_finished": None, "trial_company": None, - "trial_role": None, - "trial_models_in_production": None, "trial_experience_labeling": None, "trial_license_enterprise": None, - "social_auth_finished": None, - "invited_by": "integer", - "onboarding_state": None, - "email_notification_settings": None, + "trial_models_in_production": None, + "trial_role": None, }, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), "pause": None, + "phone": None, + "username": None, } response = client.users.get(id=1) validate_response(response, expected_response, expected_types) @@ -416,70 +416,70 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", "lse_fields": { + "email_notification_settings": "email_notification_settings", + "invite_activated": True, "invite_expired": "invite_expired", "invite_expired_at": "invite_expired_at", "invited_at": "2024-01-15T09:30:00Z", - "invite_activated": True, + "invited_by": 1, + "onboarding_state": "not_started", + "social_auth_finished": True, "trial_company": "trial_company", - "trial_role": "annotator", - "trial_models_in_production": "trial_models_in_production", "trial_experience_labeling": "trial_experience_labeling", "trial_license_enterprise": True, - "social_auth_finished": True, - "invited_by": 1, - "onboarding_state": "not_started", - "email_notification_settings": "email_notification_settings", + "trial_models_in_production": "trial_models_in_production", + "trial_role": "annotator", }, + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], "pause": "pause", + "phone": "phone", + "username": "username", } expected_types: typing.Any = { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, "lse_fields": { + "email_notification_settings": None, + "invite_activated": None, "invite_expired": None, "invite_expired_at": None, "invited_at": "datetime", - "invite_activated": None, + "invited_by": "integer", + "onboarding_state": None, + "social_auth_finished": None, "trial_company": None, - "trial_role": None, - "trial_models_in_production": None, "trial_experience_labeling": None, "trial_license_enterprise": None, - "social_auth_finished": None, - "invited_by": "integer", - "onboarding_state": None, - "email_notification_settings": None, + "trial_models_in_production": None, + "trial_role": None, }, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), "pause": None, + "phone": None, + "username": None, } response = client.users.update(id=1) validate_response(response, expected_response, expected_types) diff --git a/tests/test_versions.py b/tests/test_versions.py index 6c48fa3a8..5aceec87f 100644 --- a/tests/test_versions.py +++ b/tests/test_versions.py @@ -8,26 +8,26 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "release": "release", - "label-studio-os-package": {"key": "value"}, - "label-studio-os-backend": {"key": "value"}, - "label-studio-frontend": {"key": "value"}, + "backend": {"key": "value"}, "dm2": {"key": "value"}, - "label-studio-converter": {"key": "value"}, "edition": "Community", + "label-studio-converter": {"key": "value"}, + "label-studio-frontend": {"key": "value"}, + "label-studio-os-backend": {"key": "value"}, + "label-studio-os-package": {"key": "value"}, "lsf": {"key": "value"}, - "backend": {"key": "value"}, + "release": "release", } expected_types: typing.Any = { - "release": None, - "label-studio-os-package": None, - "label-studio-os-backend": None, - "label-studio-frontend": None, + "backend": None, "dm2": None, - "label-studio-converter": None, "edition": None, + "label-studio-converter": None, + "label-studio-frontend": None, + "label-studio-os-backend": None, + "label-studio-os-package": None, "lsf": None, - "backend": None, + "release": None, } response = client.versions.get() validate_response(response, expected_response, expected_types) diff --git a/tests/test_views.py b/tests/test_views.py index 5d63baaeb..fd9f876da 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -9,36 +9,36 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, + "data": {"key": "value"}, "filter_group": { - "id": 1, - "filters": [{"id": 1, "column": "column", "type": "type", "operator": "operator"}], "conjunction": "conjunction", + "filters": [{"column": "column", "id": 1, "operator": "operator", "type": "type"}], + "id": 1, }, - "data": {"key": "value"}, - "ordering": {"key": "value"}, + "id": 1, "order": 1, + "ordering": {"key": "value"}, + "project": 1, "selected_items": {"key": "value"}, "user": 1, - "project": 1, } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", + "data": None, "filter_group": { - "id": "integer", - "filters": ("list", {0: {"id": "integer", "column": None, "type": None, "operator": None}}), "conjunction": None, + "filters": ("list", {0: {"column": None, "id": "integer", "operator": None, "type": None}}), + "id": "integer", }, - "data": None, - "ordering": None, + "id": "integer", "order": "integer", + "ordering": None, + "project": "integer", "selected_items": None, "user": "integer", - "project": "integer", } }, ) @@ -51,32 +51,32 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "data": {"key": "value"}, "filter_group": { - "id": 1, - "filters": [{"id": 1, "column": "column", "type": "type", "operator": "operator"}], "conjunction": "conjunction", + "filters": [{"column": "column", "id": 1, "operator": "operator", "type": "type"}], + "id": 1, }, - "data": {"key": "value"}, - "ordering": {"key": "value"}, + "id": 1, "order": 1, + "ordering": {"key": "value"}, + "project": 1, "selected_items": {"key": "value"}, "user": 1, - "project": 1, } expected_types: typing.Any = { - "id": "integer", + "data": None, "filter_group": { - "id": "integer", - "filters": ("list", {0: {"id": "integer", "column": None, "type": None, "operator": None}}), "conjunction": None, + "filters": ("list", {0: {"column": None, "id": "integer", "operator": None, "type": None}}), + "id": "integer", }, - "data": None, - "ordering": None, + "id": "integer", "order": "integer", + "ordering": None, + "project": "integer", "selected_items": None, "user": "integer", - "project": "integer", } response = client.views.create() validate_response(response, expected_response, expected_types) @@ -85,34 +85,60 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_update_order(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.views.update_order(ids=[1], project=1) # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.views.update_order(ids=[1], project=1) # type: ignore[func-returns-value] + is None + ) + + +async def test_delete_all(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + # Type ignore to avoid mypy complaining about the function not being meant to return a value + assert ( + client.views.delete_all(project=1) # type: ignore[func-returns-value] + is None + ) + + assert ( + await async_client.views.delete_all(project=1) # type: ignore[func-returns-value] + is None + ) + + async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "data": {"key": "value"}, "filter_group": { - "id": 1, - "filters": [{"id": 1, "column": "column", "type": "type", "operator": "operator"}], "conjunction": "conjunction", + "filters": [{"column": "column", "id": 1, "operator": "operator", "type": "type"}], + "id": 1, }, - "data": {"key": "value"}, - "ordering": {"key": "value"}, + "id": 1, "order": 1, + "ordering": {"key": "value"}, + "project": 1, "selected_items": {"key": "value"}, "user": 1, - "project": 1, } expected_types: typing.Any = { - "id": "integer", + "data": None, "filter_group": { - "id": "integer", - "filters": ("list", {0: {"id": "integer", "column": None, "type": None, "operator": None}}), "conjunction": None, + "filters": ("list", {0: {"column": None, "id": "integer", "operator": None, "type": None}}), + "id": "integer", }, - "data": None, - "ordering": None, + "id": "integer", "order": "integer", + "ordering": None, + "project": "integer", "selected_items": None, "user": "integer", - "project": "integer", } response = client.views.get(id="id") validate_response(response, expected_response, expected_types) @@ -136,61 +162,35 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, + "data": {"key": "value"}, "filter_group": { - "id": 1, - "filters": [{"id": 1, "column": "column", "type": "type", "operator": "operator"}], "conjunction": "conjunction", + "filters": [{"column": "column", "id": 1, "operator": "operator", "type": "type"}], + "id": 1, }, - "data": {"key": "value"}, - "ordering": {"key": "value"}, + "id": 1, "order": 1, + "ordering": {"key": "value"}, + "project": 1, "selected_items": {"key": "value"}, "user": 1, - "project": 1, } expected_types: typing.Any = { - "id": "integer", + "data": None, "filter_group": { - "id": "integer", - "filters": ("list", {0: {"id": "integer", "column": None, "type": None, "operator": None}}), "conjunction": None, + "filters": ("list", {0: {"column": None, "id": "integer", "operator": None, "type": None}}), + "id": "integer", }, - "data": None, - "ordering": None, + "id": "integer", "order": "integer", + "ordering": None, + "project": "integer", "selected_items": None, "user": "integer", - "project": "integer", } response = client.views.update(id="id") validate_response(response, expected_response, expected_types) async_response = await async_client.views.update(id="id") validate_response(async_response, expected_response, expected_types) - - -async def test_update_order(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.views.update_order(project=1, ids=[1]) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.views.update_order(project=1, ids=[1]) # type: ignore[func-returns-value] - is None - ) - - -async def test_delete_all(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - # Type ignore to avoid mypy complaining about the function not being meant to return a value - assert ( - client.views.delete_all(project=1) # type: ignore[func-returns-value] - is None - ) - - assert ( - await async_client.views.delete_all(project=1) # type: ignore[func-returns-value] - is None - ) diff --git a/tests/test_workspaces.py b/tests/test_workspaces.py index 961b0fbca..d44f41f89 100644 --- a/tests/test_workspaces.py +++ b/tests/test_workspaces.py @@ -9,26 +9,26 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { - "id": 1, - "title": "title", - "description": "description", "color": "color", - "is_personal": True, - "is_archived": True, "created_by": 1, + "description": "description", + "id": 1, + "is_archived": True, + "is_personal": True, + "title": "title", } ] expected_types: typing.Tuple[typing.Any, typing.Any] = ( "list", { 0: { - "id": "integer", - "title": None, - "description": None, "color": None, - "is_personal": None, - "is_archived": None, "created_by": "integer", + "description": None, + "id": "integer", + "is_archived": None, + "is_personal": None, + "title": None, } }, ) @@ -41,22 +41,22 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "title": "title", - "description": "description", "color": "color", - "is_personal": True, - "is_archived": True, "created_by": 1, + "description": "description", + "id": 1, + "is_archived": True, + "is_personal": True, + "title": "title", } expected_types: typing.Any = { - "id": "integer", - "title": None, - "description": None, "color": None, - "is_personal": None, - "is_archived": None, "created_by": "integer", + "description": None, + "id": "integer", + "is_archived": None, + "is_personal": None, + "title": None, } response = client.workspaces.create(title="title") validate_response(response, expected_response, expected_types) @@ -67,22 +67,22 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "title": "title", - "description": "description", "color": "color", - "is_personal": True, - "is_archived": True, "created_by": 1, + "description": "description", + "id": 1, + "is_archived": True, + "is_personal": True, + "title": "title", } expected_types: typing.Any = { - "id": "integer", - "title": None, - "description": None, "color": None, - "is_personal": None, - "is_archived": None, "created_by": "integer", + "description": None, + "id": "integer", + "is_archived": None, + "is_personal": None, + "title": None, } response = client.workspaces.get(id=1) validate_response(response, expected_response, expected_types) @@ -106,22 +106,22 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { - "id": 1, - "title": "title", - "description": "description", "color": "color", - "is_personal": True, - "is_archived": True, "created_by": 1, + "description": "description", + "id": 1, + "is_archived": True, + "is_personal": True, + "title": "title", } expected_types: typing.Any = { - "id": "integer", - "title": None, - "description": None, "color": None, - "is_personal": None, - "is_archived": None, "created_by": "integer", + "description": None, + "id": "integer", + "is_archived": None, + "is_personal": None, + "title": None, } response = client.workspaces.update(id=1) validate_response(response, expected_response, expected_types) diff --git a/tests/workspaces/test_members.py b/tests/workspaces/test_members.py index 2e1245347..e20d22bfc 100644 --- a/tests/workspaces/test_members.py +++ b/tests/workspaces/test_members.py @@ -10,27 +10,27 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non expected_response: typing.Any = [ { "user": { - "id": 1, - "first_name": "first_name", - "last_name": "last_name", - "username": "username", - "email": "email", - "last_activity": "2024-01-15T09:30:00Z", - "custom_hotkeys": {"key": "value"}, - "avatar": "avatar", - "initials": "initials", - "phone": "phone", "active_organization": 1, "active_organization_meta": "active_organization_meta", "allow_newsletters": True, + "avatar": "avatar", + "custom_hotkeys": {"key": "value"}, "date_joined": "2024-01-15T09:30:00Z", - "org_membership": [{"role": "role", "active": "active", "organization_id": 1}], + "email": "email", + "first_name": "first_name", + "id": 1, + "initials": "initials", + "last_activity": "2024-01-15T09:30:00Z", + "last_name": "last_name", "lse_fields": { + "email_notification_settings": "email_notification_settings", "invite_expired": "invite_expired", "invite_expired_at": "invite_expired_at", - "email_notification_settings": "email_notification_settings", }, + "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], "pause": "pause", + "phone": "phone", + "username": "username", }, "workspace": 1, } @@ -40,27 +40,27 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non { 0: { "user": { - "id": "integer", - "first_name": None, - "last_name": None, - "username": None, - "email": None, - "last_activity": "datetime", - "custom_hotkeys": None, - "avatar": None, - "initials": None, - "phone": None, "active_organization": "integer", "active_organization_meta": None, "allow_newsletters": None, + "avatar": None, + "custom_hotkeys": None, "date_joined": "datetime", - "org_membership": ("list", {0: {"role": None, "active": None, "organization_id": "integer"}}), + "email": None, + "first_name": None, + "id": "integer", + "initials": None, + "last_activity": "datetime", + "last_name": None, "lse_fields": { + "email_notification_settings": None, "invite_expired": None, "invite_expired_at": None, - "email_notification_settings": None, }, + "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), "pause": None, + "phone": None, + "username": None, }, "workspace": "integer", } From a5b9ba964ef5ae4e24e08e0590bb30e89518787c Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 19:17:07 +0000 Subject: [PATCH 2/4] SDK regeneration --- .mock/definition/llm.yml | 30 ++++++++++++++++++++++++++++++ .mock/openapi/openapi.yaml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .mock/definition/llm.yml diff --git a/.mock/definition/llm.yml b/.mock/definition/llm.yml new file mode 100644 index 000000000..f638e662d --- /dev/null +++ b/.mock/definition/llm.yml @@ -0,0 +1,30 @@ +service: + auth: false + base-path: '' + endpoints: + api_llm_openai_chat_completions_create: + path: /api/llm/openai/chat/completions + method: POST + auth: true + docs: >- + Proxy requests to OpenAI /chat/completions and return the full response + payload. + source: + openapi: openapi/openapi.yaml + display-name: Proxy to OpenAI Chat Completions + request: + body: map + content-type: application/json + response: + docs: '' + type: map + examples: + - request: + key: value + response: + body: + key: value + audiences: + - internal + source: + openapi: openapi/openapi.yaml diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index 0a7a70bf8..cdf7ad552 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -4251,6 +4251,39 @@ paths: - internal x-fern-sdk-group-name: labels x-fern-sdk-method-name: update + /api/llm/openai/chat/completions: + post: + description: Proxy requests to OpenAI /chat/completions and return the full response payload. + operationId: api_llm_openai_chat_completions_create + requestBody: + content: + application/json: + schema: + additionalProperties: {} + type: object + application/x-www-form-urlencoded: + schema: + additionalProperties: {} + type: object + multipart/form-data: + schema: + additionalProperties: {} + type: object + responses: + '200': + content: + application/json: + schema: + additionalProperties: {} + type: object + description: '' + security: + - Token: [] + summary: Proxy to OpenAI Chat Completions + tags: + - LLM + x-fern-audiences: + - internal /api/ml/: get: description: "\n List all configured ML backends for a specific project by ID.\n Use the following cURL command:\n ```bash\n curl http://localhost:8000/api/ml?project={project_id} -H 'Authorization: Token abc123'\n " From 8cd4269e3f84d02cfa5c85a0070bf10048f62a93 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 19:20:14 +0000 Subject: [PATCH 3/4] SDK regeneration --- .mock/definition/__package__.yml | 1 + .mock/definition/files.yml | 3 +++ .mock/openapi/openapi.yaml | 5 +++++ src/label_studio_sdk/types/file_upload.py | 3 ++- tests/test_files.py | 11 +++++++---- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 6ca7007b1..d0b57846f 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -1897,6 +1897,7 @@ types: properties: file: string id: integer + size: optional source: openapi: openapi/openapi.yaml Filter: diff --git a/.mock/definition/files.yml b/.mock/definition/files.yml index e45d20931..617fe5227 100644 --- a/.mock/definition/files.yml +++ b/.mock/definition/files.yml @@ -24,6 +24,7 @@ service: body: file: file id: 1 + size: 1 audiences: - public delete: @@ -68,6 +69,7 @@ service: body: file: file id: 1 + size: 1 audiences: - public list: @@ -106,6 +108,7 @@ service: body: - file: file id: 1 + size: 1 audiences: - public delete_many: diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index cdf7ad552..85accf905 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -17622,9 +17622,14 @@ components: id: readOnly: true type: integer + size: + nullable: true + readOnly: true + type: integer required: - file - id + - size type: object Filter: properties: diff --git a/src/label_studio_sdk/types/file_upload.py b/src/label_studio_sdk/types/file_upload.py index b461b7b78..9a752a74a 100644 --- a/src/label_studio_sdk/types/file_upload.py +++ b/src/label_studio_sdk/types/file_upload.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from ..core.unchecked_base_model import UncheckedBaseModel -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic class FileUpload(UncheckedBaseModel): file: str id: int + size: typing.Optional[int] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/tests/test_files.py b/tests/test_files.py index 57da55347..02db3cb73 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -7,8 +7,8 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = {"file": "file", "id": 1} - expected_types: typing.Any = {"file": None, "id": "integer"} + expected_response: typing.Any = {"file": "file", "id": 1, "size": 1} + expected_types: typing.Any = {"file": None, "id": "integer", "size": "integer"} response = client.files.get(id=1) validate_response(response, expected_response, expected_types) @@ -30,8 +30,11 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> None: - expected_response: typing.Any = [{"file": "file", "id": 1}] - expected_types: typing.Tuple[typing.Any, typing.Any] = ("list", {0: {"file": None, "id": "integer"}}) + expected_response: typing.Any = [{"file": "file", "id": 1, "size": 1}] + expected_types: typing.Tuple[typing.Any, typing.Any] = ( + "list", + {0: {"file": None, "id": "integer", "size": "integer"}}, + ) response = client.files.list(id=1) validate_response(response, expected_response, expected_types) From 060b1562dfc802eb591fc11e52c00e001ea5c169 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 20:17:13 +0000 Subject: [PATCH 4/4] SDK regeneration