api_v1

deepdataspace.server.resources.api_v1

All APIs of version 1.

annotations

deepdataspace.server.resources.api_v1.annotations

The RESTful API of Annotations.

class AnnotationsView(**kwargs)[source]

Bases: BaseAPIView

  • POST /api/v1/annotations

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request)[source]

Save annotations to a image. - POST /api/v1/annotations

comparisons

deepdataspace.server.resources.api_v1.comparisons

The RESTful APIs of comparison of label set.

class ComparisonsView(**kwargs)[source]

Bases: BaseAPIView

  • GET /api/v1/comparisons

get_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
get(request)[source]

Get the comparison result of a label and ground truth of a dataset.

datasets

deepdataspace.server.resources.api_v1.datasets

The dataset RESTful APIs.

class DatasetsView(**kwargs)[source]

Bases: BaseAPIView

  • GET /api/v1/datasets

get_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
get(request)[source]

Get all datasets. - GET /api/v1/datasets

class DatasetView(**kwargs)[source]

Bases: BaseAPIView

  • GET /api/v1/datasets/<dataset_id>

get(request, dataset_id: str)[source]

Get detail of a dataset. - GET /api/v1/datasets/<dataset_id>

image_flags

deepdataspace.server.resources.api_v1.image_flags

RESTful api to update flags of images in a dataset.

class ImageFlagsView(**kwargs)[source]

Bases: BaseAPIView

  • POST /api/v1/image_flags

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request)[source]

Update flags of images in a dataset. - POST /api/v1/image_flags

images

deepdataspace.server.resources.api_v1.images

RESTful API for images.

concat_url(prefix, path)[source]
get_meta_module(dataset)[source]
get_caption_func(dataset)[source]
class ImagesView(**kwargs)[source]

Bases: BaseAPIView

  • GET /api/v1/images

get_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
get(request)[source]

Query all images of a dataset. - GET /api/v1/images

label_clone

deepdataspace.server.resources.api_v1.label_clone

RESTful API for cloning a label set for a dataset.

class LabelCloneView(**kwargs)[source]

Bases: BaseAPIView

  • POST /api/v1/label_clone

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
static gen_unique_clone_name(dataset_id, src_label_name, dst_label_name)[source]
static clone_images_collection(dataset_id, target_dataset_id, src_label_id, dst_label_id, dst_label_name)[source]
static swap_images_collection(dataset_id, target_dataset_id)[source]
static insert_label_meta(dataset_id, src_label_id, dst_label_id, dst_label_name)[source]
post(request)[source]

Clone a label set for a dataset - POST /api/v1/label_clone

label_tasks

deepdataspace.server.resources.api_v1.label_tasks

RESTful APIs of label tasks.

class ProjectsView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/label_projects

  • POST /api/v1/label_projects

get_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post_data = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
get(request)[source]

Query all visible label projects for current user.

  • GET /api/v1/label_projects

post(request)[source]

Create a label project.

  • POST /api/v1/label_projects

class ProjectView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/label_projects/<project_id>

  • POST /api/v1/label_projects/<project_id>

post_data = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
get(request, project_id)[source]

Query project detail for given project id

  • GET /api/v1/label_projects/<project_id>

post(request, project_id)[source]

Update project info for given project id

  • POST /api/v1/label_projects/<project_id>

class ProjectConfigView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_project_configs/<project_id>

post_data = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request, project_id)[source]

Initialize a label project, creating all label tasks for it.

  • POST /api/v1/label_project_configs/<project_id>

class ProjectQAView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_project_qa/<project_id>

post_args = [<deepdataspace.utils.http.Argument object>]
post(request, project_id)[source]

QA a label project by project owner.

  • POST /api/v1/label_project_qa/<project_id>

class ProjectExportView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_project_export/<project_id>

post_args = [<deepdataspace.utils.http.Argument object>]
post(request, project_id)[source]

Export a label project back to datasets.

  • POST /api/v1/label_project_export/<project_id>

class TasksView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/label_tasks

get_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
get(request)[source]

Query tasks of a label project.

  • GET /api/v1/label_tasks

class TaskConfigView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/label_task_configs/<task_id>

get(request, task_id)[source]

Query task config of a label task.

  • GET /api/v1/label_task_configs/<task_id>

class TaskLeadersView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_task_leaders

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request)[source]

Assign labeler leader or reviewer leader for multiple label tasks.

  • POST /api/v1/label_task_leaders

class TaskWorkerView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_task_workers/<task_id>

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request, task_id)[source]

Set labeler or reviewer for a label task.

  • POST /api/v1/label_task_workers/<task_id>

class TaskReassignView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_task_reassign/<task_id>

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request, task_id)[source]

Reassign a labeler or a reviewer for a label task.

  • POST /api/v1/label_task_reassign/<task_id>

class TaskReStartView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_task_restart/<task_id>

post(request, task_id)[source]

Restart a rejected task by a leader.

  • POST /api/v1/label_task_restart/<task_id>

class TaskQAView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_task_qa/<task_id>

post_args = [<deepdataspace.utils.http.Argument object>]
post(request, task_id)[source]

For a manager to QA a task.

  • POST /api/v1/label_task_qa/<task_id>

class TaskRolesView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/label_task_roles/<task_id>

get(request, task_id)[source]

Get all visible task roles for current user of target task.

  • GET /api/v1/label_task_roles/<task_id>

class TaskImagesView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/label_task_images/<task_id>

status_choices = {'accepted', 'labeling', 'rejected', 'reviewing'}
get_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
static concat_url(prefix, path)[source]
get(request, task_id)[source]

Get images of a task from the perspective of a specified role.

  • GET /api/v1/label_task_images/<task_id>

class TaskImageLabelView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_task_image_labels/<task_image_id>

post_args = [<deepdataspace.utils.http.Argument object>]
post(request, task_image_id)[source]

Label an image of a task by current user.

  • POST /api/v1/label_task_image_labels/<task_image_id>

class TaskImageReviewView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • POST /api/v1/label_task_image_reviews/<task_image_id>

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request, task_image_id)[source]

Review a label of target image by current user.

  • POST /api/v1/label_task_image_reviews/<task_image_id>

lints

deepdataspace.server.resources.api_v1.lints

RESTful APIs on lints.

class UserNameLintsView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/user_name_lints

get_data = [<deepdataspace.utils.http.Argument object>]
get(request)[source]

Get user lints by username. - GET /api/v1/user_name_lints

class DatasetNameLintsView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/dataset_name_lints

LabelProjectPurpose = 'label_project'
ALLPurpose_ = ['label_project']
get_data = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
get(request)[source]

Get dataset lints by dataset name. - GET /api/v1/dataset_name_lints

login

deepdataspace.server.resources.api_v1.login

The login and logout RESTful APIs.

class LoginView(**kwargs)[source]

Bases: BaseAPIView

  • POST /api/v1/login

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request)[source]

Login user. - POST /api/v1/login

class LogoutView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • DELETE /api/v1/logout

post(request)[source]

Logout user. - DELETE /api/v1/logout

class UserInfoView(**kwargs)[source]

Bases: AuthenticatedAPIView

  • GET /api/v1/user_info

get(request)[source]

Get user info. - GET /api/v1/user_info

object_confirm

deepdataspace.server.resources.api_v1.object_confirm

RESTful API for object confirm.

class ObjectConfirmView(**kwargs)[source]

Bases: BaseAPIView

  • POST /api/v1/object_confirm

post_args = [<deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>, <deepdataspace.utils.http.Argument object>]
post(request)[source]

Confirm a label set of an image.

  • POST /api/v1/object_confirm

ping

deepdataspace.server.resources.api_v1.ping

RESTful API to check service health of api v1 version.

class PingView(**kwargs)[source]

Bases: BaseAPIView

  • GET /api/v1/ping

get(request)[source]

Check service health for api v1.

  • GET /api/v1/ping