Tator Python Client Documentation
REST API wrapper functions (tator.api)
The following parameters are shared by all functions described below:
async_req (bool) – execute request asynchronously
_preload_content – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is 300.
clone_media_list
tator.api.clone_media_list(self, project, clone_media_spec, **kwargs)
Clone media list. This method copies media to a different project without copying the underlying files. It accepts the same query parameters as a Media GET request. All media matching the query will be copied to the project, media type, and section in the given request body. Section is passed as a section name; if the given section does not exist, it will be created. This endpoint will only clone up to 500 media per request. Use the start, stop, or after parameters to paginate a request.
- Parameters
- project (int) – A unique integer identifying the source project. (required)
- clone_media_spec (CloneMediaSpec) – (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
complete_upload
tator.api.complete_upload(self, project, upload_completion_spec, **kwargs)
Complete multipart upload.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- upload_completion_spec (UploadCompletionSpec) – (required)
create_affiliation
tator.api.create_affiliation(self, organization, affiliation_spec, **kwargs)
Create affiliation. Affiliations specify a permission level of a user to an organization. There are currently two cumulative permission levels. Member can only view an organization and not change any data. Admin can modify an organization, add members to an organization, and create new projects under the organization’s account.
- Parameters
- organization (int) – A unique integer identifying an organization. (required)
- affiliation_spec (AffiliationSpec) – (required)
create_attribute_type
tator.api.create_attribute_type(self, id, attribute_type_spec, **kwargs)
Adds an attribute to Type. A attribute type is the metadata definition object for a user-defined attribute. It includes name, type, and any other associated fields, depending on the type.
- Parameters
- id (int) – A unique integer identifying a unique entity type. (required)
- attribute_type_spec (AttributeTypeSpec) – (required)
create_audio_file
tator.api.create_audio_file(self, id, audio_definition, **kwargs)
Create audio file. Audio files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying audio. One or more audio files can be used to reference the audio role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the audio file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- audio_definition (AudioDefinition) – (required)
- role (str) – Role of media file being referenced.
- index (int) – Insertion index. Must be less than size of current list of audio files for the specified role. If omitted, the audio file will be appended to the end of the list.
create_auxiliary_file
tator.api.create_auxiliary_file(self, id, auxiliary_file_definition, **kwargs)
Create file. Auxiliary files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying generic file. One or more files can be used to reference the attachment role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- auxiliary_file_definition (AuxiliaryFileDefinition) – (required)
- role (str) – Role of media file being referenced.
- index (int) – Insertion index. Must be less than size of current list of files for the specified role. If omitted, the file will be appended to the end of the list.
create_bookmark
tator.api.create_bookmark(self, project, bookmark_spec, **kwargs)
Create bookmark. Bookmarks are saved links that can be used to mark videos/frames of interest. They are scoped to a project and user, so if a user requests Bookmarks for a project they will only receive the Bookmarks created by them.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- bookmark_spec (BookmarkSpec) – (required)
- name (str) – Name of the bookmark to filter on.
create_bucket
tator.api.create_bucket(self, organization, bucket_spec, **kwargs)
Create bucket. Buckets allow users to specify a project-specific S3 bucket to store media. Buckets are defined at the Organization level. Creating and setting a bucket on a project requires administrative access within the organization. Once a bucket is defined for a project, all media subsequently uploaded to that project will be stored in the bucket. Projects may have media in multiple buckets. For example, if a project is initially created without setting a separate bucket and media is uploaded, then the bucket field is updated and more media is uploaded, that project would then contain some media in the default bucket and some in the newly defined bucket.
- Parameters
- organization (int) – A unique integer identifying an organization. (required)
- bucket_spec (BucketSpec) – (required)
create_favorite
tator.api.create_favorite(self, project, favorite_spec, **kwargs)
Create favorite. Favorites are saved annotation values to help speed up annotation. They are scoped to a project and user, so if a user requests Favorites for a project they will only receive the Favorites created by them.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- favorite_spec (FavoriteSpec) – (required)
create_file
tator.api.create_file(self, project, file_spec, **kwargs)
Create generic, non-media associated File object. Non-media assocaited files can be stored within the project along with user-defined attributes. Unlike temporary files, these are permanent. These do not include applet files and algorithm workflow files.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- file_spec (FileSpec) – (required)
create_file_type
tator.api.create_file_type(self, project, file_type_spec, **kwargs)
Create file type. A file type is the metadata definition object for non-media FIle objects. It includes the name, description, and any associated user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- file_type_spec (FileTypeSpec) – (required)
create_image_file
tator.api.create_image_file(self, id, role, image_definition, **kwargs)
Create image file. Image files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying image. One or more image files can be used to reference thumbnails, thumbnail GIFs, or images in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the image file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- image_definition (ImageDefinition) – (required)
- index (int) – Insertion index. Must be less than size of current list of images for the specified role. If omitted, the image file will be appended to the end of the list.
create_invitation
tator.api.create_invitation(self, organization, invitation_spec, **kwargs)
Create invitation. Invitations allow users with administrative privileges for an organization to invite a user to join their organization using their email address. Upon creation, if automatic emails are configured an email will be sent to the specified email address. If the user has not yet registered, the email will contain a link to register using a registration token. If the user has registered, the email will send a link to accept the invitation. The link is also returned in the response of the create method.
- Parameters
- organization (int) – A unique integer identifying an organization. (required)
- invitation_spec (InvitationSpec) – (required)
create_job_cluster
tator.api.create_job_cluster(self, id, job_cluster_spec, **kwargs)
Create a job cluster. This endpoint replicates the job cluster creation through the admin portal.
- Parameters
- id (int) – A unique integer identifying an organization. (required)
- job_cluster_spec (JobClusterSpec) – (required)
create_job_list
tator.api.create_job_list(self, project, job_spec, **kwargs)
Launch a registered algorithm. This will create one or more Argo workflows that execute the named algorithm registration. To get a list of available algorithms, use the Algorithms endpoint. A media list will be submitted for processing using either a query string or a list of media IDs. If neither are included, the algorithm will be launched on all media in the project. Media is divided into batches based on the files_per_job field of the Algorithm object. One batch is submitted to each Argo workflow. Submitted algorithm jobs may be cancelled via the Job or JobGroup endpoints.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- job_spec (JobSpec) – (required)
create_leaf_list
tator.api.create_leaf_list(self, project, body, **kwargs)
Create leaf list. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes. This method does a bulk create on a list of tator.models.LeafSpec
objects; it also accepts a single instance. A maximum of 500 leaves may be created in one request.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- body (object) – (required)
create_leaf_type
tator.api.create_leaf_type(self, project, leaf_type_spec, **kwargs)
Create leaf type. A leaf type is the metadata definition object for a leaf. It includes name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- leaf_type_spec (LeafTypeSpec) – (required)
create_localization_list
tator.api.create_localization_list(self, project, body, **kwargs)
Create localiazation list. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes. This method does a bulk create on a list of tator.models.LocalizationSpec
objects; it also accepts a single instance. A maximum of 500 localizations may be created in one request.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- body (object) – (required)
create_localization_type
tator.api.create_localization_type(self, project, localization_type_spec, **kwargs)
Create localization type. A localization type is the metadata definition object for a localization. It includes shape, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- localization_type_spec (LocalizationTypeSpec) – (required)
create_media_list
tator.api.create_media_list(self, project, body, **kwargs)
Create media list. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes. This method creates a Media object in the database for each tator.models.MediaSpec
in body. body must be a list or single instance of tator.models.mediaspec
. For images, the media must already be uploaded and an upload URL must be provided, as well as the group and job IDs associated with the upload. For videos, it is recommended to use the Transcode endpoint, which will create the media object itself. This method is only needed for local transcodes. In that case, it will create an empty Media object; thumbnails, streaming, and archival videos must be subsequently uploaded and saved via the Media PATCH method.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- body (object) – (required)
create_media_type
tator.api.create_media_type(self, project, media_type_spec, **kwargs)
Create media type. A media type is the metadata definition object for media. It includes file format, name, description, and may have any number of user defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_type_spec (MediaTypeSpec) – (required)
create_membership
tator.api.create_membership(self, project, membership_spec, **kwargs)
Create membership. Memberships specify a permission level of a user to a project. There are currently five cumulative permission levels: - View Only can only view a project and not change any data. - Can Edit can create, modify, and delete annotations. - Can Transfer can upload and download media. - Can Execute can launch algorithm workflows. - Full Control can change project settings, including inviting new members, project name, and project metadata schema.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- membership_spec (MembershipSpec) – (required)
create_obtain_auth_token
tator.api.create_obtain_auth_token(self, credentials, **kwargs)
Get API token. This method accepts login credentials and returns an API token that can be used with the Tator REST API, tator-py, or tator-r.
- Parameters
- credentials (Credentials) – (required)
create_organization
tator.api.create_organization(self, organization_spec, **kwargs)
Create organization. Organizations are used to represent groups of users. Multiple projects may be owned by an organization, and users may be members of multiple organizations.
- Parameters
- organization_spec (OrganizationSpec) – (required)
create_password_reset
tator.api.create_password_reset(self, password_reset_spec, **kwargs)
Create password reset. This endpoint will send an email to a registered user with the email address provided. The email will contain a link that will allow the user to reset their password. If the email address is registered for multiple users or no users an exception will be raised and an email will not be sent. If the email fails to be sent, either due to a bad response or system configuration that does not allow sending emails, an exception will be raised.
- Parameters
- password_reset_spec (PasswordResetSpec) – (required)
create_project
tator.api.create_project(self, project_spec, **kwargs)
Create project. Projects are the object under which all data in Tator is grouped, including user access, metadata definitions, media, and annotations. Data does not cross boundaries between projects.
- Parameters
- project_spec (ProjectSpec) – (required)
- organization (int) – Unique integer identifying an organization.
- elemental_id (str) – Elemental ID to search for
create_section
tator.api.create_section(self, project, section_spec, **kwargs)
Create section. Sections represent groups of media using saved queries. Note: In order for a section to be interpreted properly, the tator_user_sections attribute of the SectionSpec cannot be None. The front end assigns a uuid1 string for this attribute, but it is not required to follow this pattern.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- section_spec (SectionSpec) – (required)
create_state_list
tator.api.create_state_list(self, project, body, **kwargs)
Create state list. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes. This method does a bulk create on a list of tator.models.StateSpec
objects; it also accepts a single instance. A maximum of 500 states may be created in one request.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- body (object) – (required)
create_state_type
tator.api.create_state_type(self, project, state_type_spec, **kwargs)
Create state type. A state type is the metadata definition object for a state. It includes association type, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- state_type_spec (StateTypeSpec) – (required)
create_temporary_file
tator.api.create_temporary_file(self, project, temporary_file_spec, **kwargs)
Create temporary file. Temporary files are files stored server side for a defined duration. The file must first be uploaded via tus, and can subsequently be saved using this endpoint.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- temporary_file_spec (TemporaryFileSpec) – (required)
create_user
tator.api.create_user(self, user_spec, **kwargs)
Create user. This method accepts a registration token that is provided by creating a Invitation object. It is optional if anonymous registration is enabled, but otherwise required. If anonymous registration is enabled and email confirmation is also enabled, the method will create an inactive user with a confirmation token. The user can be activated by visiting a link that is automatically sent to the user. If anonymous registration without confirmation is enabled, any user can be created with this method.
- Parameters
- user_spec (UserSpec) – (required)
create_version
tator.api.create_version(self, project, version_spec, **kwargs)
Create version. Versions allow for multiple “layers” of annotations on the same media. Versions are created at the project level, but are only displayed for a given media if that media contains annotations in that version. The version of an annotation can be set by providing it in a POST operation. Currently only localizations and states can have versions.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- version_spec (VersionSpec) – (required)
create_video_file
tator.api.create_video_file(self, id, role, video_definition, **kwargs)
Create video file. Video files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying video. One or more video files can be used to reference streaming or archival roles in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the video file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- video_definition (VideoDefinition) – (required)
- index (int) – Insertion index. Must be less than size of current list of videos for the specified role. If omitted, the video file will be appended to the end of the list.
delete_affiliation
tator.api.delete_affiliation(self, id, **kwargs)
Delete affiliation. Affiliations specify a permission level of a user to an organization. There are currently two cumulative permission levels. Member can only view an organization and not change any data. Admin can modify an organization, add members to an organization, and create new projects under the organization’s account.
- Parameters
- id (int) – A unique integer identifying a affiliation. (required)
delete_algorithm
tator.api.delete_algorithm(self, id, **kwargs)
Delete registered algorithm workflow
- Parameters
- id (int) – A unique integer identifying a registered algorithm workflow. (required)
delete_announcement
tator.api.delete_announcement(self, id, **kwargs)
Delete announcement. Announcements are system-wide messages sent to users. Users may delete individual announcements to acknowledge and stop displaying them.
- Parameters
- id (int) – A unique integer identifying a announcement. (required)
delete_applet
tator.api.delete_applet(self, id, **kwargs)
Delete registered applet file
- Parameters
- id (int) – A unique integer identifying a registered applet file. (required)
delete_attribute_type
tator.api.delete_attribute_type(self, id, attribute_type_delete, **kwargs)
Deletes an existing attribute on Type. A attribute type is the metadata definition object for a user-defined attribute. It includes name, type, and any other associated fields, depending on the type.
- Parameters
- id (int) – A unique integer identifying a unique entity type. (required)
- attribute_type_delete (AttributeTypeDelete) – (required)
delete_audio_file
tator.api.delete_audio_file(self, id, index, **kwargs)
Delete audio file. Audio files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying audio. One or more audio files can be used to reference the audio role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the audio file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- index (int) – Index of object. Must be less than size of current list of audio files for the specified role. (required)
- role (str) – Role of media file being referenced.
delete_auxiliary_file
tator.api.delete_auxiliary_file(self, id, index, **kwargs)
Delete auxiliary file. Auxiliary files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying generic file. One or more files can be used to reference the attachment role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- index (int) – Index of object. Must be less than size of current list of files for the specified role. (required)
- role (str) – Role of media file being referenced.
delete_bookmark
tator.api.delete_bookmark(self, id, **kwargs)
Delete bookmark. Bookmarks are saved links that can be used to mark videos/frames of interest. They are scoped to a project and user, so if a user requests Bookmarks for a project they will only receive the Bookmarks created by them.
- Parameters
- id (int) – A unique integer identifying a bookmark. (required)
delete_bucket
tator.api.delete_bucket(self, id, **kwargs)
Delete bucket. Buckets allow users to specify a project-specific S3 bucket to store media. Buckets are defined at the Organization level. Creating and setting a bucket on a project requires administrative access within the organization. Once a bucket is defined for a project, all media subsequently uploaded to that project will be stored in the bucket. Projects may have media in multiple buckets. For example, if a project is initially created without setting a separate bucket and media is uploaded, then the bucket field is updated and more media is uploaded, that project would then contain some media in the default bucket and some in the newly defined bucket.
- Parameters
- id (int) – A unique integer identifying a bucket. (required)
delete_favorite
tator.api.delete_favorite(self, id, **kwargs)
Delete favorite. Favorites are saved annotation values to help speed up annotation. They are scoped to a project and user, so if a user requests Favorites for a project they will only receive the Favorites created by them.
- Parameters
- id (int) – A unique integer identifying a favorite. (required)
delete_file
tator.api.delete_file(self, id, **kwargs)
Delete registered non-media File object
- Parameters
- id (int) – A unique integer identifying a registered File object. (required)
delete_file_type
tator.api.delete_file_type(self, id, **kwargs)
Delete file type. A file type is the metadata definition object for non-media FIle objects. It includes the name, description, and any associated user defined attributes. Note that this will also delete any files associated with the file type.
- Parameters
- id (int) – A unique integer identifying an file type. (required)
delete_image_file
tator.api.delete_image_file(self, id, role, index, **kwargs)
Delete image file. Image files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying image. One or more image files can be used to reference thumbnails, thumbnail GIFs, or images in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the image file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- index (int) – Index of object. Must be less than size of current list of images for the specified role. (required)
delete_invitation
tator.api.delete_invitation(self, id, **kwargs)
Delete invitation. Invitations allow users with administrative privileges for an organization to invite a user to join their organization using their email address. Upon creation, if automatic emails are configured an email will be sent to the specified email address. If the user has not yet registered, the email will contain a link to register using a registration token. If the user has registered, the email will send a link to accept the invitation. The link is also returned in the response of the create method.
- Parameters
- id (int) – A unique integer identifying a invitation. (required)
delete_job
tator.api.delete_job(self, uid, **kwargs)
Delete background job. Algorithms create argo workflows that are annotated with two uuid1 strings, one identifying the run and the other identifying the group. Jobs that are submitted together have the same group id, but each workflow has a unique run id. This method allows the user to cancel a job using the uid returned by Job create method.
- Parameters
- uid (str) – A uuid1 string identifying to single Job. (required)
delete_job_cluster
tator.api.delete_job_cluster(self, id, **kwargs)
Delete registered job cluster
- Parameters
- id (int) – A unique integer identifying a registered job cluster. (required)
delete_job_list
tator.api.delete_job_list(self, project, **kwargs)
Delete background job list. Algorithms create argo workflows that are annotated with two uuid1 strings, one identifying the run and the other identifying the group. Jobs that are submitted together have the same group id, but each workflow has a unique run id. This method allows the user to batch delete a list of jobs.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- gid (str) – A UUID string identifying a group of jobs.
delete_leaf
tator.api.delete_leaf(self, id, **kwargs)
Delete leaf. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes.
- Parameters
- id (int) – A unique integer identifying a leaf. (required)
delete_leaf_list
tator.api.delete_leaf_list(self, project, **kwargs)
Delete leaf list. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes. This method performs a bulk delete on all leaves matching a query. It is recommended to use a GET request first to check what is being deleted.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- type (int) – Unique integer identifying a leaf type.
- name (str) – Name of the leaf element.
- depth (int) – Get a specific tree depth. Root node depth is 0.
- leaf_id (list[int**]) – Comma-separated list of leaf IDs.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- leaf_id_query (LeafIdQuery) –
delete_leaf_type
tator.api.delete_leaf_type(self, id, **kwargs)
Delete leaf type. A leaf type is the metadata definition object for a leaf. It includes name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying an leaf type. (required)
delete_localization
tator.api.delete_localization(self, id, **kwargs)
Delete localization. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a localization. (required)
- localization_delete (LocalizationDelete) –
delete_localization_list
tator.api.delete_localization_list(self, project, **kwargs)
Delete localiazation list. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes. This method performs a bulk delete on all localizations matching a query. It is recommended to use a GET request first to check what is being deleted.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- frame (int) – Frame number of this localization if it is in a video.
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
- localization_bulk_delete (LocalizationBulkDelete) –
delete_localization_type
tator.api.delete_localization_type(self, id, **kwargs)
Delete localization type. A localization type is the metadata definition object for a localization. It includes shape, name, description, and may have any number of user-defined attribute types associated with it. Note that this will also delete any localizations associated with the localization type.
- Parameters
- id (int) – A unique integer identifying a localization type. (required)
delete_media
tator.api.delete_media(self, id, **kwargs)
Delete media. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a media. (required)
delete_media_list
tator.api.delete_media_list(self, project, **kwargs)
Delete media list. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes. This method performs a bulk delete on all media matching a query. It is recommended to use a GET request first to check what is being deleted.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
- media_id_query (MediaIdQuery) –
delete_media_type
tator.api.delete_media_type(self, id, **kwargs)
Delete media type. A media type is the metadata definition object for media. It includes file format, name, description, and may have any number of user defined attribute types associated with it. Note that this will also delete any media associated with the media type.
- Parameters
- id (int) – A unique integer identifying an media type. (required)
delete_membership
tator.api.delete_membership(self, id, **kwargs)
Delete membership. Memberships specify a permission level of a user to a project. There are currently five cumulative permission levels: - View Only can only view a project and not change any data. - Can Edit can create, modify, and delete annotations. - Can Transfer can upload and download media. - Can Execute can launch algorithm workflows. - Full Control can change project settings, including inviting new members, project name, and project metadata schema.
- Parameters
- id (int) – A unique integer identifying a membership. (required)
delete_organization
tator.api.delete_organization(self, id, **kwargs)
Delete organization. Organizations are used to represent groups of users. Multiple projects may be owned by an organization, and users may be members of multiple organizations. Only organization owners may delete an organization.
- Parameters
- id (int) – A unique integer identifying an organization. (required)
delete_project
tator.api.delete_project(self, id, **kwargs)
Delete project. Projects are the object under which all data in Tator is grouped, including user access, metadata definitions, media, and annotations. Data does not cross boundaries between projects. Only project owners may delete a project. Note that deleting a project will also delete all media and annotations within a project.
- Parameters
- id (int) – A unique integer identifying a project. (required)
delete_section
tator.api.delete_section(self, id, **kwargs)
Delete section. Sections represent groups of media using saved queries.
- Parameters
- id (int) – A unique integer identifying a section. (required)
delete_state
tator.api.delete_state(self, id, **kwargs)
Delete state. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a state. (required)
- state_delete (StateDelete) –
delete_state_list
tator.api.delete_state_list(self, project, **kwargs)
Delete state list. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes. This method performs a bulk delete on all states matching a query. It is recommended to use a GET request first to check what is being deleted.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
- state_bulk_delete (StateBulkDelete) –
delete_state_type
tator.api.delete_state_type(self, id, **kwargs)
Delete state type. A state type is the metadata definition object for a state. It includes association type, name, description, and may have any number of user-defined attribute types associated with it. Note that this will also delete any states associated with the state type.
- Parameters
- id (int) – A unique integer identifying a state type. (required)
delete_temporary_file
tator.api.delete_temporary_file(self, id, **kwargs)
Delete temporary file. Temporary files are files stored server side for a defined duration.
- Parameters
- id (int) – A unique integer identifying a temporary file. (required)
delete_temporary_file_list
tator.api.delete_temporary_file_list(self, project, **kwargs)
Delete temporary file list. Temporary files are files stored server side for a defined duration.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- expired (int) – If greater than 0 will return only expired files
delete_transcode
tator.api.delete_transcode(self, uid, **kwargs)
Delete transcode job. This method allows the user to cancel a transcode using the uid returned by Transcode create method.
- Parameters
- uid (str) – A uuid1 string identifying to single Job. (required)
delete_transcode_list
tator.api.delete_transcode_list(self, project, **kwargs)
Delete transcode list. This method performs a bulk delete on all transcodes matching a query. It is recommended to use a GET request first to check what is being deleted.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
- media_id_query (MediaIdQuery) –
delete_version
tator.api.delete_version(self, id, **kwargs)
Delete version. Versions allow for multiple “layers” of annotations on the same media. Versions are created at the project level, but are only displayed for a given media if that media contains annotations in that version. The version of an annotation can be set by providing it in a POST operation. Currently only localizations and states can have versions. Note that this will also delete any localizations or states associated with the deleted version.
- Parameters
- id (int) – A unique integer identifying a version. (required)
delete_video_file
tator.api.delete_video_file(self, id, role, index, **kwargs)
Delete video file. Video files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying video. One or more video files can be used to reference streaming or archival roles in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the video file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- index (int) – Index of object. Must be less than size of current list of videos for the specified role. (required)
get_affiliation
tator.api.get_affiliation(self, id, **kwargs)
Get affiliation. Affiliations specify a permission level of a user to an organization. There are currently two cumulative permission levels. Member can only view an organization and not change any data. Admin can modify an organization, add members to an organization, and create new projects under the organization’s account.
- Parameters
- id (int) – A unique integer identifying a affiliation. (required)
get_affiliation_list
tator.api.get_affiliation_list(self, organization, **kwargs)
Get affiliation list. Affiliations specify a permission level of a user to an organization. There are currently two cumulative permission levels. Member can only view an organization and not change any data. Admin can modify an organization, add members to an organization, and create new projects under the organization’s account.
- Parameters
- organization (int) – A unique integer identifying an organization. (required)
get_algorithm
tator.api.get_algorithm(self, id, **kwargs)
Get registered algorithm workflow
- Parameters
- id (int) – A unique integer identifying a registered algorithm workflow. (required)
get_algorithm_list
tator.api.get_algorithm_list(self, project, **kwargs)
Get registered algorithms.
- Parameters
- project (int) – A unique integer identifying a project. (required)
get_announcement_list
tator.api.get_announcement_list(self, **kwargs)
Get announcement list. Announcements are system-wide messages sent to users. Users may delete individual announcements to acknowledge and stop displaying them.
- Parameters
get_applet
tator.api.get_applet(self, id, **kwargs)
Get registered applet file
- Parameters
- id (int) – A unique integer identifying a registered applet file. (required)
get_applet_list
tator.api.get_applet_list(self, project, **kwargs)
Get applet list. Applets are customized interfaces (i.e. html files) displayed within the Tator projects.
- Parameters
- project (int) – A unique integer identifying a project. (required)
get_audio_file
tator.api.get_audio_file(self, id, index, **kwargs)
Get audio file. Audio files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying audio. One or more audio files can be used to reference the audio role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the audio file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- index (int) – Index of object. Must be less than size of current list of audio files for the specified role. (required)
- role (str) – Role of media file being referenced.
get_audio_file_list
tator.api.get_audio_file_list(self, id, **kwargs)
Get audio file list. Audio files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying audio. One or more audio files can be used to reference the audio role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the audio file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced.
get_auxiliary_file
tator.api.get_auxiliary_file(self, id, index, **kwargs)
Get auxiliary file. Auxiliary files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying generic file. One or more files can be used to reference the attachment role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- index (int) – Index of object. Must be less than size of current list of files for the specified role. (required)
- role (str) – Role of media file being referenced.
get_auxiliary_file_list
tator.api.get_auxiliary_file_list(self, id, **kwargs)
Get file list. Auxiliary files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying generic file. One or more files can be used to reference the attachment role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced.
get_bookmark
tator.api.get_bookmark(self, id, **kwargs)
Get bookmark. Bookmarks are saved links that can be used to mark videos/frames of interest. They are scoped to a project and user, so if a user requests Bookmarks for a project they will only receive the Bookmarks created by them.
- Parameters
- id (int) – A unique integer identifying a bookmark. (required)
get_bookmark_list
tator.api.get_bookmark_list(self, project, **kwargs)
Get bookmark list. Bookmarks are saved links that can be used to mark videos/frames of interest. They are scoped to a project and user, so if a user requests Bookmarks for a project they will only receive the Bookmarks created by them.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- name (str) – Name of the bookmark to filter on.
get_bucket
tator.api.get_bucket(self, id, **kwargs)
Get bucket. Buckets allow users to specify a project-specific S3 bucket to store media. Buckets are defined at the Organization level. Creating and setting a bucket on a project requires administrative access within the organization. Once a bucket is defined for a project, all media subsequently uploaded to that project will be stored in the bucket. Projects may have media in multiple buckets. For example, if a project is initially created without setting a separate bucket and media is uploaded, then the bucket field is updated and more media is uploaded, that project would then contain some media in the default bucket and some in the newly defined bucket.
- Parameters
- id (int) – A unique integer identifying a bucket. (required)
get_bucket_list
tator.api.get_bucket_list(self, organization, **kwargs)
Get bucket list. Buckets allow users to specify a project-specific S3 bucket to store media. Buckets are defined at the Organization level. Creating and setting a bucket on a project requires administrative access within the organization. Once a bucket is defined for a project, all media subsequently uploaded to that project will be stored in the bucket. Projects may have media in multiple buckets. For example, if a project is initially created without setting a separate bucket and media is uploaded, then the bucket field is updated and more media is uploaded, that project would then contain some media in the default bucket and some in the newly defined bucket.
- Parameters
- organization (int) – A unique integer identifying an organization. (required)
get_change_log_list
tator.api.get_change_log_list(self, project, **kwargs)
Get a list of change logs. A ChangeLog is the object containing information about a change applied to an object. It includes the time, user, and description of the change.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- user_id (int) – Filters ChangeLogs for the given user.
- entity_id (int) – Filters ChangeLogs for the given entity.
- entity_type (str) – Filters ChangeLogs for the given entity type.
get_clip
tator.api.get_clip(self, id, frame_ranges, **kwargs)
Get video clip. Facility to get a clip from the server. Returns a temporary file object that expires in 24 hours.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- frame_ranges (list[str**]) – Comma-seperated list of frame ranges to capture. (required)
- quality (int) – Source resolution to use (default to highest quality)
- reencode (int) – Re-encode to a h264 codec (assumes veryfast) profile (>0 = true, 0 == false)
get_cloned_media
tator.api.get_cloned_media(self, id, **kwargs)
Get cloned media. This method finds and returns the list of media ids that are clones of the given id.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
get_download_info
tator.api.get_download_info(self, project, download_info_spec, **kwargs)
Retrieve URL for one or more file downloads from a given project.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- download_info_spec (DownloadInfoSpec) – (required)
- expiration (int) – Number of seconds until URL expires and becomes invalid.
get_favorite
tator.api.get_favorite(self, id, **kwargs)
Get favorite. Favorites are saved annotation values to help speed up annotation. They are scoped to a project and user, so if a user requests Favorites for a project they will only receive the Favorites created by them.
- Parameters
- id (int) – A unique integer identifying a favorite. (required)
get_favorite_list
tator.api.get_favorite_list(self, project, **kwargs)
Get favorite list. Favorites are saved annotation values to help speed up annotation. They are scoped to a project and user, so if a user requests Favorites for a project they will only receive the Favorites created by them.
- Parameters
- project (int) – A unique integer identifying a project. (required)
get_file
tator.api.get_file(self, id, **kwargs)
Get registered non-media File object
- Parameters
- id (int) – A unique integer identifying a registered File object. (required)
get_file_list
tator.api.get_file_list(self, project, **kwargs)
Get non-media associated File object list. Non-media assocaited files can be stored within the project along with user-defined attributes. Unlike temporary files, these are permanent. These do not include applet files and algorithm workflow files.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- type (int) – Unique integer identifying a FileType.
- name (str) – Name of the file.
- after (int) – If given, all results returned will be after the File object with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
get_file_type
tator.api.get_file_type(self, id, **kwargs)
Get file type. A file type is the metadata definition object for non-media FIle objects. It includes the name, description, and any associated user defined attributes.
- Parameters
- id (int) – A unique integer identifying an file type. (required)
get_file_type_list
tator.api.get_file_type_list(self, project, **kwargs)
Get file type list. A file type is the metadata definition object for non-media FIle objects. It includes the name, description, and any associated user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- elemental_id (str) – Elemental ID to search for
get_frame
tator.api.get_frame(self, id, **kwargs)
Get frame(s) from a video. Facility to get a frame(jpg/png) of a given video frame, returns a square tile of frames based on the input parameter.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- frames (list[int**]) – Comma-seperated list of frames to capture.
- tile (str) – wxh, if not supplied is made as squarish as possible.
- roi (str) – w:h:x:y, optionally crop each frame to a given roi in relative coordinates.
- force_scale (str) – Size of each frame image to return in format wxh. This forces scaling the image. Applied after ROI crop if any.Default is the size of the frame for highest streaming resolution. Example: 1024x768
- animate (int) – If not tiling, animate each frame at a given fps in a gif.
- quality (int) – Source resolution to use (default to highest quality)
get_image_file
tator.api.get_image_file(self, id, role, index, **kwargs)
Get image file. Image files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying image. One or more image files can be used to reference thumbnails, thumbnail GIFs, or images in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the image file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- index (int) – Index of object. Must be less than size of current list of images for the specified role. (required)
get_image_file_list
tator.api.get_image_file_list(self, id, role, **kwargs)
Get image file list. Image files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying image. One or more image files can be used to reference thumbnails, thumbnail GIFs, or images in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the image file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
get_invitation
tator.api.get_invitation(self, id, **kwargs)
Get invitation. Invitations allow users with administrative privileges for an organization to invite a user to join their organization using their email address. Upon creation, if automatic emails are configured an email will be sent to the specified email address. If the user has not yet registered, the email will contain a link to register using a registration token. If the user has registered, the email will send a link to accept the invitation. The link is also returned in the response of the create method.
- Parameters
- id (int) – A unique integer identifying a invitation. (required)
get_invitation_list
tator.api.get_invitation_list(self, organization, **kwargs)
Get invitation list. Invitations allow users with administrative privileges for an organization to invite a user to join their organization using their email address. Upon creation, if automatic emails are configured an email will be sent to the specified email address. If the user has not yet registered, the email will contain a link to register using a registration token. If the user has registered, the email will send a link to accept the invitation. The link is also returned in the response of the create method.
- Parameters
- organization (int) – A unique integer identifying an organization. (required)
get_job
tator.api.get_job(self, uid, **kwargs)
Get background job. Algorithms create argo workflows that are annotated with two uuid1 strings, one identifying the run and the other identifying the group. Jobs that are submitted together have the same group id, but each workflow has a unique run id. This method allows the user to get a job’s status using the uid returned by Job create method.
- Parameters
- uid (str) – A uuid1 string identifying to single Job. (required)
get_job_cluster
tator.api.get_job_cluster(self, id, **kwargs)
Get registered job cluster
- Parameters
- id (int) – A unique integer identifying a registered job cluster. (required)
get_job_cluster_list
tator.api.get_job_cluster_list(self, id, **kwargs)
Get job clusters.
- Parameters
- id (int) – A unique integer identifying an organization. (required)
get_job_list
tator.api.get_job_list(self, project, **kwargs)
Get background job list. Algorithms create argo workflows that are annotated with two uuid1 strings, one identifying the run and the other identifying the group. Jobs that are submitted together have the same group id, but each workflow has a unique run id. This method allows the user to status for a list of jobs in a project.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- gid (str) – A UUID string identifying a group of jobs.
get_leaf
tator.api.get_leaf(self, id, **kwargs)
Get leaf. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes.
- Parameters
- id (int) – A unique integer identifying a leaf. (required)
get_leaf_count
tator.api.get_leaf_count(self, project, **kwargs)
Get leaf list count. This endpoint accepts the same query parameters as a GET or PUT request to the Leaves endpoint, but only returns the number of leaves.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- type (int) – Unique integer identifying a leaf type.
- name (str) – Name of the leaf element.
- depth (int) – Get a specific tree depth. Root node depth is 0.
- leaf_id (list[int**]) – Comma-separated list of leaf IDs.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
get_leaf_count_by_id
tator.api.get_leaf_count_by_id(self, project, leaf_id_query, **kwargs)
Get leaf list count by ID. This endpoint accepts the same query parameters as a GET or PUT request to the Leaves endpoint, but only returns the number of leaves.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- leaf_id_query (LeafIdQuery) – (required)
- type (int) – Unique integer identifying a leaf type.
- name (str) – Name of the leaf element.
- depth (int) – Get a specific tree depth. Root node depth is 0.
- leaf_id (list[int**]) – Comma-separated list of leaf IDs.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
get_leaf_list
tator.api.get_leaf_list(self, project, **kwargs)
Get leaf list. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- type (int) – Unique integer identifying a leaf type.
- name (str) – Name of the leaf element.
- depth (int) – Get a specific tree depth. Root node depth is 0.
- leaf_id (list[int**]) – Comma-separated list of leaf IDs.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
get_leaf_list_by_id
tator.api.get_leaf_list_by_id(self, project, leaf_id_query, **kwargs)
Get leaf list by ID. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- leaf_id_query (LeafIdQuery) – (required)
- type (int) – Unique integer identifying a leaf type.
- name (str) – Name of the leaf element.
- depth (int) – Get a specific tree depth. Root node depth is 0.
- leaf_id (list[int**]) – Comma-separated list of leaf IDs.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
get_leaf_type
tator.api.get_leaf_type(self, id, **kwargs)
Get leaf type. A leaf type is the metadata definition object for a leaf. It includes name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying an leaf type. (required)
get_leaf_type_list
tator.api.get_leaf_type_list(self, project, **kwargs)
Get leaf type list. A leaf type is the metadata definition object for a leaf. It includes name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- elemental_id (str) – Elemental ID to search for
get_localization
tator.api.get_localization(self, id, **kwargs)
Get localization. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a localization. (required)
get_localization_count
tator.api.get_localization_count(self, project, **kwargs)
Get localization list count. This endpoint accepts the same query parameters as a GET or PUT request to the Localizations endpoint, but only returns the number of localizations.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- frame (int) – Frame number of this localization if it is in a video.
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_localization_count_by_id
tator.api.get_localization_count_by_id(self, project, localization_id_query, **kwargs)
Get localization list count by ID. This endpoint accepts the same query parameters as a GET or PUT request to the Localizations endpoint, but only returns the number of localizations.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- localization_id_query (LocalizationIdQuery) – (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- frame (int) – Frame number of this localization if it is in a video.
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_localization_graphic
tator.api.get_localization_graphic(self, id, **kwargs)
Get localization graphic from a media object.
- Parameters
- id (int) – A unique integer identifying a localization. (required)
- force_scale (str) – Size of final image to return. This forces scaling the image. Default is the localization size and margins define the image size. Example: 100x100
- use_default_margins (bool) – Use default margins for localization types. Default margins (x,y pixels) - dot: (10,10) line: (10,10) box: (0,0)
- margin_x (int) – Pixel margin to apply to the height of the localization when generating the image. Valid only if use_default_margins is false.
- margin_y (int) – Pixel margin to apply to the width of the localization when generating the image. Valid only if use_default_margins is false.
get_localization_list
tator.api.get_localization_list(self, project, **kwargs)
Get localization list. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- frame (int) – Frame number of this localization if it is in a video.
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_localization_list_by_id
tator.api.get_localization_list_by_id(self, project, localization_id_query, **kwargs)
Get localization list by ID. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- localization_id_query (LocalizationIdQuery) – (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- frame (int) – Frame number of this localization if it is in a video.
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_localization_type
tator.api.get_localization_type(self, id, **kwargs)
Get localization type. A localization type is the metadata definition object for a localization. It includes shape, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying a localization type. (required)
get_localization_type_list
tator.api.get_localization_type_list(self, project, **kwargs)
Get localization type list. A localization type is the metadata definition object for a localization. It includes shape, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of unique integers identifying a media.
- type (int) – Deprecated. Use LocalizationType endpoint to retrieve individual localization type by ID.
- elemental_id (str) – Elemental ID to search for
get_media
tator.api.get_media(self, id, **kwargs)
Get media. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a media. (required)
- presigned (int) – If given, all path fields in media_files will be replaced with presigned URLs that can be downloaded without authentication. The value is the expiration time of the URLs in seconds.
- no_cache (bool) – If True, and presigned is specified, a new presigned url will be generated.
get_media_count
tator.api.get_media_count(self, project, **kwargs)
Get media list count. This endpoint accepts the same query parameters as a GET or PUT request to the Medias endpoint, but only returns the number of media.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_media_count_by_id
tator.api.get_media_count_by_id(self, project, media_id_query, **kwargs)
Get media list count by ID. This endpoint accepts the same query parameters as a GET or PUT request to the Medias endpoint, but only returns the number of media.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id_query (MediaIdQuery) – (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_media_list
tator.api.get_media_list(self, project, **kwargs)
Get media list. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
- presigned (int) – If given, all path fields in media_files will be replaced with presigned URLs that can be downloaded without authentication. The value is the expiration time of the URLs in seconds.
- no_cache (bool) – If True, and presigned is specified, a new presigned url will be generated.
get_media_list_by_id
tator.api.get_media_list_by_id(self, project, media_id_query, **kwargs)
Get media list by ID. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id_query (MediaIdQuery) – (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
- presigned (int) – If given, all path fields in media_files will be replaced with presigned URLs that can be downloaded without authentication. The value is the expiration time of the URLs in seconds.
- no_cache (bool) – If True, and presigned is specified, a new presigned url will be generated.
get_media_next
tator.api.get_media_next(self, id, **kwargs)
Retrieve ID of next media in a media list. This endpoint accepts the same query parameters as a GET request to the Medias endpoint, but only returns the next media ID from the media passed as a path parameter. This allows iteration through a media list without serializing the entire list, which may be large.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_media_prev
tator.api.get_media_prev(self, id, **kwargs)
Retrieve ID of previous media in a media list. This endpoint accepts the same query parameters as a GET request to the Medias endpoint, but only returns the previous media ID from the media passed as a path parameter. This allows iteration through a media list without serializing the entire list, which may be large.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_media_stats
tator.api.get_media_stats(self, project, **kwargs)
Retrieve count, download size, total size, and duration of a media list. This endpoint accepts the same query parameters as a GET request to the Medias endpoint, but only returns statistics about the media.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_media_type
tator.api.get_media_type(self, id, **kwargs)
Get media type. A media type is the metadata definition object for media. It includes file format, name, description, and may have any number of user defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying an media type. (required)
get_media_type_list
tator.api.get_media_type_list(self, project, **kwargs)
Get media type list. A media type is the metadata definition object for media. It includes file format, name, description, and may have any number of user defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- elemental_id (str) – Elemental ID to search for
get_membership
tator.api.get_membership(self, id, **kwargs)
Get membership. Memberships specify a permission level of a user to a project. There are currently five cumulative permission levels: - View Only can only view a project and not change any data. - Can Edit can create, modify, and delete annotations. - Can Transfer can upload and download media. - Can Execute can launch algorithm workflows. - Full Control can change project settings, including inviting new members, project name, and project metadata schema.
- Parameters
- id (int) – A unique integer identifying a membership. (required)
get_membership_list
tator.api.get_membership_list(self, project, **kwargs)
Get membership list. Memberships specify a permission level of a user to a project. There are currently five cumulative permission levels: - View Only can only view a project and not change any data. - Can Edit can create, modify, and delete annotations. - Can Transfer can upload and download media. - Can Execute can launch algorithm workflows. - Full Control can change project settings, including inviting new members, project name, and project metadata schema.
- Parameters
- project (int) – A unique integer identifying a project. (required)
get_organization
tator.api.get_organization(self, id, **kwargs)
Get organization. Organizations are used to represent groups of users. Multiple projects may be owned by an organization, and users may be members of multiple organizations.
- Parameters
- id (int) – A unique integer identifying an organization. (required)
get_organization_list
tator.api.get_organization_list(self, **kwargs)
Get organization list. Organizations are used to represent groups of users. Multiple projects may be owned by an organization, and users may be members of multiple organizations. Returns all organizations that a user is affiliated with.
- Parameters
get_organization_upload_info
tator.api.get_organization_upload_info(self, organization, **kwargs)
Retrieve URL for file upload to a given organization.
- Parameters
- organization (int) – A unique integer identifying an organization. (required)
- expiration (int) – Number of seconds until URL expires and becomes invalid.
- num_parts (int) – Number of upload parts. Maximum part size is 5GB.
get_permalink
tator.api.get_permalink(self, id, **kwargs)
Get permalink A Permalink allows persistant access to an underlying media resource via a persistent URL.
- Parameters
- id (int) – A unique integer identifying a media. (required)
- element (str) – Object to redirect to via 301.
- quality (int) – Find the object with the closest quality (ignored for audio)
get_project
tator.api.get_project(self, id, **kwargs)
Get project. Projects are the object under which all data in Tator is grouped, including user access, metadata definitions, media, and annotations. Data does not cross boundaries between projects.
- Parameters
- id (int) – A unique integer identifying a project. (required)
get_project_list
tator.api.get_project_list(self, **kwargs)
Get project list. Projects are the object under which all data in Tator is grouped, including user access, metadata definitions, media, and annotations. Data does not cross boundaries between projects. Returns all projects that a user has access to.
- Parameters
- organization (int) – Unique integer identifying an organization.
- elemental_id (str) – Elemental ID to search for
get_section
tator.api.get_section(self, id, **kwargs)
Get section. Sections represent groups of media using saved queries.
- Parameters
- id (int) – A unique integer identifying a section. (required)
get_section_list
tator.api.get_section_list(self, project, **kwargs)
Get section list. Sections represent groups of media using saved queries.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- name (str) – Name of the section.
- elemental_id (str) – Elemental ID to search for
- match (str) – Find any sections matching using an lquery. - foo Match the exact label path foo - .foo. Match any label path containing the label foo - .foo Match any label path whose last label is foo Modifiers: - @ Match case-insensitively, for example a@ matches A - * Match any label with this prefix, for example foo matches foobar - % Match initial underscore-separated words American@.Foot@* would match both america.Football and America.footwear For more information: https://www.postgresql.org/docs/current/ltree.html
- ancestors (str) – Find ancestors using using an lquery. - foo Match the exact label path foo - .foo. Match any label path containing the label foo - .foo Match any label path whose last label is foo Modifiers: - @ Match case-insensitively, for example a@ matches A - * Match any label with this prefix, for example foo matches foobar - % Match initial underscore-separated words American@.Foot@* would match both america.Football and America.footwear For more information: https://www.postgresql.org/docs/current/ltree.html
- descendants (str) – Find descendants using using an lquery. - foo Match the exact label path foo - .foo. Match any label path containing the label foo - .foo Match any label path whose last label is foo Modifiers: - @ Match case-insensitively, for example a@ matches A - * Match any label with this prefix, for example foo matches foobar - % Match initial underscore-separated words American@.Foot@* would match both america.Football and America.footwear For more information: https://www.postgresql.org/docs/current/ltree.html
get_state
tator.api.get_state(self, id, **kwargs)
Get state. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a state. (required)
get_state_count
tator.api.get_state_count(self, project, **kwargs)
Get state list count. This endpoint accepts the same query parameters as a GET or PUT request to the States endpoint, but only returns the number of states.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_state_count_by_id
tator.api.get_state_count_by_id(self, project, state_id_query, **kwargs)
Get state list count by ID. This endpoint accepts the same query parameters as a GET or PUT request to the States endpoint, but only returns the number of states.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- state_id_query (StateIdQuery) – (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_state_graphic
tator.api.get_state_graphic(self, id, **kwargs)
Get frame(s) of a given localization-associated state. Use the mode argument to control whether it is an animated gif or a tiled jpg. A maximum of 100 detections may be retrieved at once. Use the length and offset parameters to control which section of a state is retrieved.
- Parameters
- id (int) – A unique integer identifying a state. (required)
- mode (str) – Whether to animate or tile.
- fps (float) – Frame rate if mode is animate.
- force_scale (str) – wxh to force each tile prior to stich
- length (int) – Number of detections to extract.
- offset (int) – Index offset of detections to extract.
get_state_list
tator.api.get_state_list(self, project, **kwargs)
Get state list. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_state_list_by_id
tator.api.get_state_list_by_id(self, project, state_id_query, **kwargs)
Get state list by ID. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- state_id_query (StateIdQuery) – (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_state_type
tator.api.get_state_type(self, id, **kwargs)
Get state type. A state type is the metadata definition object for a state. It includes association type, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying a state type. (required)
get_state_type_list
tator.api.get_state_type_list(self, project, **kwargs)
Get state type list. A state type is the metadata definition object for a state. It includes association type, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of unique integers identifying a media.
- type (int) – Deprecated. Use LocalizationType endpoint to retrieve individual localization type by ID.
- elemental_id (str) – Elemental ID to search for
get_temporary_file
tator.api.get_temporary_file(self, id, **kwargs)
Get temporary file. Temporary files are files stored server side for a defined duration.
- Parameters
- id (int) – A unique integer identifying a temporary file. (required)
get_temporary_file_list
tator.api.get_temporary_file_list(self, project, **kwargs)
Get temporary file list. Temporary files are files stored server side for a defined duration.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- expired (int) – If greater than 0 will return only expired files
get_transcode
tator.api.get_transcode(self, uid, **kwargs)
Get transcode job. This method allows the user to get a transcode’s status using the uid returned by Transcode create method.
- Parameters
- uid (str) – A uuid1 string identifying to single Job. (required)
get_transcode_list
tator.api.get_transcode_list(self, project, **kwargs)
Get transcode list. Get a list of active transcodes. This method accepts parameters that filter on Media in which case only transcodes on the filtered media list will be returned.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_transcode_list_by_id
tator.api.get_transcode_list_by_id(self, project, media_id_query, **kwargs)
Get transcode list by ID. Get a list of active transcodes. This method accepts parameters that filter on Media in which case only transcodes on the filtered media list will be returned. This method allows a request body containing additional query parameters.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id_query (MediaIdQuery) – (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
get_upload_info
tator.api.get_upload_info(self, project, **kwargs)
Retrieve URL for file upload to a given project.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- expiration (int) – Number of seconds until URL expires and becomes invalid.
- num_parts (int) – Number of upload parts. Maximum part size is 5GB.
- media_id (int) – Media ID if this is an upload for existing media.
- file_id (int) – File ID if this is an upload for existing file.
- filename (str) – Filename to use if media_id is given. If a file with the same name already exists under the given media ID prefix, the new upload will replace it. Ignored if media_id is not given.
get_user
tator.api.get_user(self, id, **kwargs)
Get user.
- Parameters
- id (int) – A unique integer identifying a user. (required)
- presigned (int) – If given, all object key fields in profile will be replaced with presigned URLs that can be downloaded without authentication. The value is the expiration time of the URLs in seconds.
get_user_list
tator.api.get_user_list(self, **kwargs)
Get list of users.
- Parameters
- username (str) – Username associated with user. Either this or email must be supplied.
- email (str) – Email address associated with user. Either this or email must be supplied.
- elemental_id (str) – Elemental_id of user
- presigned (int) – If given, all object key fields in profile will be replaced with presigned URLs that can be downloaded without authentication. The value is the expiration time of the URLs in seconds.
get_version
tator.api.get_version(self, id, **kwargs)
Get version. Versions allow for multiple “layers” of annotations on the same media. Versions are created at the project level, but are only displayed for a given media if that media contains annotations in that version. The version of an annotation can be set by providing it in a POST operation. Currently only localizations and states can have versions.
- Parameters
- id (int) – A unique integer identifying a version. (required)
get_version_list
tator.api.get_version_list(self, project, **kwargs)
Get version list. Versions allow for multiple “layers” of annotations on the same media. Versions are created at the project level, but are only displayed for a given media if that media contains annotations in that version. The version of an annotation can be set by providing it in a POST operation. Currently only localizations and states can have versions.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_id (int) – Unique integer identifying a media.
get_video_file
tator.api.get_video_file(self, id, role, index, **kwargs)
Get video file. Video files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying video. One or more video files can be used to reference streaming or archival roles in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the video file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- index (int) – Index of object. Must be less than size of current list of videos for the specified role. (required)
get_video_file_list
tator.api.get_video_file_list(self, id, role, **kwargs)
Get video file list. Video files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying video. One or more video files can be used to reference streaming or archival roles in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the video file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
leaf_suggestion
tator.api.leaf_suggestion(self, project, ancestor, query, **kwargs)
Get list of autocomplete suggestions. This endpoint is compatible with devbridge suggestion format . It performs a glob search on leaf objects in the project.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- ancestor (str) – Get descendents of a leaf element (inclusive), by path (i.e. ITIS.Animalia). (required)
- query (str) – String to search for matching names. (required)
- min_level (int) – Integer specifying level of results that may be returned. For example, 2 refers to grandchildren of the level specified by the ancestor parameter.
merge_states
tator.api.merge_states(self, id, state_merge_update, **kwargs)
Merges the source state into the target state. The target state will inherit the the source’s localizations and will be deleted.
- Parameters
- id (int) – A unique integer identifying the target state to accept the merge. (required)
- state_merge_update (StateMergeUpdate) – (required)
notify
tator.api.notify(self, notify_spec, **kwargs)
Send a notification to administrators. Uses the Slack API to send a notification to system administrators. This endpoint can only be used by system administrators and must be configured in a Tator deployment’s settings.
- Parameters
- notify_spec (NotifySpec) – (required)
register_algorithm
tator.api.register_algorithm(self, project, algorithm_spec, **kwargs)
Register an algorithm argo workflow. This endpoint replicates the algorithm registration through the admin portal. The provided manifest file must have been uploaded and saved by the SaveAlgorithmManifest endpoint. This endpoint will respond with an error if one of the following conditions occur: - Provided workflow name is not unique (across projects) - Not all the required fields are present - There are syntax errors with the given manifest file
- Parameters
- project (int) – A unique integer identifying a project. (required)
- algorithm_spec (AlgorithmSpec) – (required)
register_applet
tator.api.register_applet(self, project, applet_spec, **kwargs)
Create applet. Applets are customized interfaces (i.e. html files) displayed within the Tator projects.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- applet_spec (AppletSpec) – (required)
replace_attribute_type
tator.api.replace_attribute_type(self, id, attribute_type_update, **kwargs)
Replaces the definition of an existing attribute on Type. WARNING This completely replaces the existing definition and will delete any existing fields that are not present in the attribute_type_update definition. A attribute type is the metadata definition object for a user-defined attribute. It includes name, type, and any other associated fields, depending on the type.
- Parameters
- id (int) – A unique integer identifying a unique entity type. (required)
- attribute_type_update (AttributeTypeUpdate) – (required)
save_algorithm_manifest
tator.api.save_algorithm_manifest(self, project, algorithm_manifest_spec, **kwargs)
Saves an uploaded algorithm manifest to the desired project. It is expected this manifest corresponds with an algorithm workflow to be registered by another endpoint. Manifest is uploaded via tus, a separate mechanism from the REST API. Once a manifest upload is complete (a .yaml file), the file must be saved to the database using this endpoint.
- Parameters
- project (int) – A unique integer identifying a project (required)
- algorithm_manifest_spec (AlgorithmManifestSpec) – (required)
save_generic_file
tator.api.save_generic_file(self, project, generic_file_spec, **kwargs)
Saves an uploaded non-media file to the desired project’s permanent storage. It is expected that this file will be used in conjunction with an applet.
- Parameters
- project (int) – A unique integer identifying a project (required)
- generic_file_spec (GenericFileSpec) – (required)
send_email
tator.api.send_email(self, project, email_spec, **kwargs)
Send an email message using the Tator AWS SES configured credentials.’ Messages can only be sent to members of the same project.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- email_spec (EmailSpec) – (required)
transcode
tator.api.transcode(self, project, transcode_spec, **kwargs)
Start a transcode. Videos in Tator must be transcoded to a multi-resolution streaming format before they can be viewed or annotated. This endpoint launches a transcode on raw uploaded video by creating an Argo workflow. The workflow will download the uploaded raw video, transcode it to the proper format, upload the transcoded video, and save the video using the VideoFile, AudioFile, and ImageFile endpoints. The transcode can be launched on an existing media object, or a media object will be created.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- transcode_spec (TranscodeSpec) – (required)
trim_state_end
tator.api.trim_state_end(self, id, state_trim_update, **kwargs)
Trims the state’s start or end point by deleting the localizations before the new start point or after the new end point.
- Parameters
- id (int) – A unique integer identifying the state to trim (required)
- state_trim_update (StateTrimUpdate) – (required)
update_affiliation
tator.api.update_affiliation(self, id, affiliation_update, **kwargs)
Update affiliation. Affiliations specify a permission level of a user to an organization. There are currently two cumulative permission levels. Member can only view an organization and not change any data. Admin can modify an organization, add members to an organization, and create new projects under the organization’s account.
- Parameters
- id (int) – A unique integer identifying a affiliation. (required)
- affiliation_update (AffiliationUpdate) – (required)
update_algorithm
tator.api.update_algorithm(self, id, algorithm_spec, **kwargs)
Updated registered algorithm workflow
- Parameters
- id (int) – A unique integer identifying a registered algorithm workflow. (required)
- algorithm_spec (AlgorithmSpec) – (required)
update_applet
tator.api.update_applet(self, id, applet_spec, **kwargs)
Updated registered applet file
- Parameters
- id (int) – A unique integer identifying a registered applet file. (required)
- applet_spec (AppletSpec) – (required)
update_attribute_type
tator.api.update_attribute_type(self, id, attribute_type_update, **kwargs)
Renames and/or changes the type of an existing attribute on Type. A attribute type is the metadata definition object for a user-defined attribute. It includes name, type, and any other associated fields, depending on the type.
- Parameters
- id (int) – A unique integer identifying a unique entity type. (required)
- attribute_type_update (AttributeTypeUpdate) – (required)
update_audio_file
tator.api.update_audio_file(self, id, index, audio_definition, **kwargs)
Update audio file. Audio files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying audio. One or more audio files can be used to reference the audio role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the audio file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- index (int) – Index of object. Must be less than size of current list of audio files for the specified role. (required)
- audio_definition (AudioDefinition) – (required)
- role (str) – Role of media file being referenced.
update_auxiliary_file
tator.api.update_auxiliary_file(self, id, index, auxiliary_file_definition, **kwargs)
Update auxiliary file. Auxiliary files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying generic file. One or more files can be used to reference the attachment role in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- index (int) – Index of object. Must be less than size of current list of files for the specified role. (required)
- auxiliary_file_definition (AuxiliaryFileDefinition) – (required)
- role (str) – Role of media file being referenced.
update_bookmark
tator.api.update_bookmark(self, id, bookmark_update, **kwargs)
Update bookmark. Bookmarks are saved links that can be used to mark videos/frames of interest. They are scoped to a project and user, so if a user requests Bookmarks for a project they will only receive the Bookmarks created by them.
- Parameters
- id (int) – A unique integer identifying a bookmark. (required)
- bookmark_update (BookmarkUpdate) – (required)
update_bucket
tator.api.update_bucket(self, id, bucket_update, **kwargs)
Update bucket. Buckets allow users to specify a project-specific S3 bucket to store media. Buckets are defined at the Organization level. Creating and setting a bucket on a project requires administrative access within the organization. Once a bucket is defined for a project, all media subsequently uploaded to that project will be stored in the bucket. Projects may have media in multiple buckets. For example, if a project is initially created without setting a separate bucket and media is uploaded, then the bucket field is updated and more media is uploaded, that project would then contain some media in the default bucket and some in the newly defined bucket.
- Parameters
- id (int) – A unique integer identifying a bucket. (required)
- bucket_update (BucketUpdate) – (required)
update_favorite
tator.api.update_favorite(self, id, favorite_update, **kwargs)
Update favorite. Favorites are saved annotation values to help speed up annotation. They are scoped to a project and user, so if a user requests Favorites for a project they will only receive the Favorites created by them.
- Parameters
- id (int) – A unique integer identifying a favorite. (required)
- favorite_update (FavoriteUpdate) – (required)
update_file
tator.api.update_file(self, id, file_update, **kwargs)
Updated registered non-media File object
- Parameters
- id (int) – A unique integer identifying a registered File object. (required)
- file_update (FileUpdate) – (required)
update_file_type
tator.api.update_file_type(self, id, file_type_update, **kwargs)
Update file type. A file type is the metadata definition object for non-media FIle objects. It includes the name, description, and any associated user defined attributes.
- Parameters
- id (int) – A unique integer identifying an file type. (required)
- file_type_update (FileTypeUpdate) – (required)
update_image_file
tator.api.update_image_file(self, id, role, index, image_definition, **kwargs)
Update image file. Image files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying image. One or more image files can be used to reference thumbnails, thumbnail GIFs, or images in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the image file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- index (int) – Index of object. Must be less than size of current list of images for the specified role. (required)
- image_definition (ImageDefinition) – (required)
update_invitation
tator.api.update_invitation(self, id, invitation_update, **kwargs)
Update invitation. Invitations allow users with administrative privileges for an organization to invite a user to join their organization using their email address. Upon creation, if automatic emails are configured an email will be sent to the specified email address. If the user has not yet registered, the email will contain a link to register using a registration token. If the user has registered, the email will send a link to accept the invitation. The link is also returned in the response of the create method.
- Parameters
- id (int) – A unique integer identifying a invitation. (required)
- invitation_update (InvitationUpdate) – (required)
update_job_cluster
tator.api.update_job_cluster(self, id, job_cluster_spec, **kwargs)
Updated registered job cluster
- Parameters
- id (int) – A unique integer identifying a registered job cluster. (required)
- job_cluster_spec (JobClusterSpec) – (required)
update_leaf
tator.api.update_leaf(self, id, leaf_update, **kwargs)
Update leaf. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes.
- Parameters
- id (int) – A unique integer identifying a leaf. (required)
- leaf_update (LeafUpdate) – (required)
update_leaf_list
tator.api.update_leaf_list(self, project, leaf_bulk_update, **kwargs)
Update leaf list. Leaves are used to define label hierarchies that can be used for autocompletion of string attribute types. Leaves are a type of entity in Tator, meaning they can be described by user-defined attributes. This method does a bulk update on all leaves matching a query. Only user-defined attributes may be bulk updated.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- leaf_bulk_update (LeafBulkUpdate) – (required)
- type (int) – Unique integer identifying a leaf type.
- name (str) – Name of the leaf element.
- depth (int) – Get a specific tree depth. Root node depth is 0.
- leaf_id (list[int**]) – Comma-separated list of leaf IDs.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
update_leaf_type
tator.api.update_leaf_type(self, id, leaf_type_update, **kwargs)
Update leaf type. A leaf type is the metadata definition object for a leaf. It includes name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying an leaf type. (required)
- leaf_type_update (LeafTypeUpdate) – (required)
update_localization
tator.api.update_localization(self, id, localization_update, **kwargs)
Update localization. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a localization. (required)
- localization_update (LocalizationUpdate) – (required)
update_localization_list
tator.api.update_localization_list(self, project, localization_bulk_update, **kwargs)
Update localiazation list. Localizations are shape annotations drawn on a video or image. Available shapes (dtype) are box, line, or dot. Each shape is parameterized by a different subset of data members: - box uses x, y, width, height. - line uses x, y, u, v. - dot uses x and y. - poly uses points. Geometry members may be left null when creating a localization, in which case the shapes may be drawn later using the redraw capability in the web UI. Localizations are a type of entity in Tator, meaning they can be described by user defined attributes. This method does a bulk update on all localizations matching a query. Only user-defined attributes may be bulk updated.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- localization_bulk_update (LocalizationBulkUpdate) – (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- frame (int) – Frame number of this localization if it is in a video.
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
update_localization_type
tator.api.update_localization_type(self, id, localization_type_update, **kwargs)
Update localization type. A localization type is the metadata definition object for a localization. It includes shape, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying a localization type. (required)
- localization_type_update (LocalizationTypeUpdate) – (required)
update_media
tator.api.update_media(self, id, media_update, **kwargs)
Update media. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a media. (required)
- media_update (MediaUpdate) – (required)
update_media_list
tator.api.update_media_list(self, project, media_bulk_update, **kwargs)
Update media list. A media may be an image or a video. Media are a type of entity in Tator, meaning they can be described by user defined attributes. This method does a bulk update on all media matching a query. Only user-defined attributes may be bulk updated.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- media_bulk_update (MediaBulkUpdate) – (required)
- media_id (list[int**]) – List of integers identifying media.
- type (int) – Unique integer identifying media type.
- name (str) – Name of the media to filter on.
- section (int) – Unique integer identifying a media section.
- dtype (str) – Data type of the files, either image or video.
- md5 (str) – MD5 sum of the media file.
- gid (str) – Upload group ID of the media file.
- uid (str) – Upload unique ID of the media file.
- after (int) – If given, all results returned will be after the media with this ID. The start and stop parameters are relative to this modified range.
- after_name (str) – If given, all results returned will be after the media with this name. The start and stop parameters are relative to this modified range.
- archive_lifecycle (str) – Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to ‘live’
- elemental_id (str) – Elemental ID to search for
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
update_media_type
tator.api.update_media_type(self, id, media_type_update, **kwargs)
Update media type. A media type is the metadata definition object for media. It includes file format, name, description, and may have any number of user defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying an media type. (required)
- media_type_update (MediaTypeUpdate) – (required)
update_membership
tator.api.update_membership(self, id, membership_update, **kwargs)
Update membership. Memberships specify a permission level of a user to a project. There are currently five cumulative permission levels: - View Only can only view a project and not change any data. - Can Edit can create, modify, and delete annotations. - Can Transfer can upload and download media. - Can Execute can launch algorithm workflows. - Full Control can change project settings, including inviting new members, project name, and project metadata schema.
- Parameters
- id (int) – A unique integer identifying a membership. (required)
- membership_update (MembershipUpdate) – (required)
update_organization
tator.api.update_organization(self, id, organization_update, **kwargs)
Update organization. Organizations are used to represent groups of users. Multiple projects may be owned by an organization, and users may be members of multiple organizations.
- Parameters
- id (int) – A unique integer identifying an organization. (required)
- organization_update (OrganizationUpdate) – (required)
update_project
tator.api.update_project(self, id, project_update, **kwargs)
Update project. Projects are the object under which all data in Tator is grouped, including user access, metadata definitions, media, and annotations. Data does not cross boundaries between projects.
- Parameters
- id (int) – A unique integer identifying a project. (required)
- project_update (ProjectUpdate) – (required)
update_section
tator.api.update_section(self, id, section_update, **kwargs)
Update section. Sections represent groups of media using saved queries.
- Parameters
- id (int) – A unique integer identifying a section. (required)
- section_update (SectionUpdate) – (required)
update_state
tator.api.update_state(self, id, state_update, **kwargs)
Update state. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes.
- Parameters
- id (int) – A unique integer identifying a state. (required)
- state_update (StateUpdate) – (required)
update_state_list
tator.api.update_state_list(self, project, state_bulk_update, **kwargs)
Update state list. A state is a description of a collection of other objects. The objects a state describes could be media (image or video), video frames, or localizations. A state referring to a collection of localizations is often referred to as a track. States are a type of entity in Tator, meaning they can be described by user defined attributes. This method does a bulk update on all states matching a query. Only user-defined attributes may be bulk updated.
- Parameters
- project (int) – A unique integer identifying a project. (required)
- state_bulk_update (StateBulkUpdate) – (required)
- media_id (list[int**]) – Comma-separated list of media IDs.
- related_id (list[int**]) – Comma-separated list of related IDs. If querying States, one can supply a list of related localization ids to filter on.If querying Localizations, one can supply a list of related state ids to filter on.
- section (int) – Unique integer identifying a media section.
- type (int) – Unique integer identifying a annotation type.
- version (list[int**]) – List of integers representing versions to fetch
- after (int) – If given, all results returned will be after the localization with this ID. The start and stop parameters are relative to this modified range.
- elemental_id (str) – Elemental ID to search for
- merge (int) – Reduce result set based on a server side merge. If multiple versions are selected and a variant of the object exists in both versions, the merge logic will return 1 or 0 objects. Example: Version B derives off Version A. An object, with the same elemental id “foo” exists on both. If Version B over A is selected and merge is turned on: + The “foo” present on Version B is returned + If the “foo” on version B is deleted, no “foo” is returned.
- show_deleted (int) – Include in the return set objects that have variant_deleted set to True.
- attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].
- attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].
- attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].
- attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].
- attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.
- start (int) – Pagination start index. Index of the first item in a larger list to return.
- stop (int) – Pagination stop index. Non-inclusive index of the last item in a larger list to return.
- encoded_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec
- sort_by (list[str**]) – Field names to sort results by. Built-in names should be prefixed with ‘$’, attributes must not be. Because the schema supports sorting by a list of attributes (effectively grouping), we have to utilize a special character to inform direction. Uses the common convention of ‘-’; thus [“$name”, “-$id”] would sort by name ascending and break tie-breakers(grouping) by descending by id. An example REST query will sort all localizations in project 1, by label descending and sort any ties by ascending x. rest/Localizations/1?sort_by=-Label&sort_by=$x A table of built-ins available for a given type: | Name | Description | Localizations | States | Medias | Leaves | Files | —————————————-
|-------------------|
——–|---------------|
——–|--------|
|-------|
| section | Media section | X | X | X | | | | created_datetime | The time of creation for this datum | X | X | X | X | X | | created_by | The user id who created this datum | X | X | X | X | X | | modified_datetime | The last modification time | X | X | X | X | X | | modified_by | The last modification user | X | X | X | X | X | | name | The name of the element | | | X | X | X | | fps | The frames per second | | | X | | | | deleted | Whether the media is marked deleted | | | X | X | X | | variant_deleted | Whether the metadata is marked deleted | X | X | | | | | archive_state | The current archive state of the media | | | X | | | | x, y, u, or v | Geometric coordinates | | | | | | | width or height | Geometric sizes | | | | | | | incident | Available when doing a related search | | | X | | |
- related_attribute (list[str**]) – Attribute equality filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lt (list[str**]) – Attribute less than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_lte (list[str**]) – Attribute less than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gt (list[str**]) – Attribute greater than filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_gte (list[str**]) – Attribute greater than or equal filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_contains (list[str**]) – Attribute contains filter. Format is attribute1::value1,[attribute2::value2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_distance (list[str**]) – Range filter for geoposition attributes. Format is attribute1::distance_km2::lat2::lon2,[attribute2::distancekm2::lat2::lon2].This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- related_attribute_null (list[str**]) – Attribute null filter. Returns elements for which a given attribute is not defined.This filter is applied to related data of the primary object.On the Media endpoint, this searches on related metadata(States/Localizations).On metadata endpoints, this searches on related media.
- encoded_related_search (str) – Base64 encoded string representing an Object_Search defined in /components/AttributeOperationSpec applied against related objects
update_state_type
tator.api.update_state_type(self, id, state_type_update, **kwargs)
Update state type. A state type is the metadata definition object for a state. It includes association type, name, description, and may have any number of user-defined attribute types associated with it.
- Parameters
- id (int) – A unique integer identifying a state type. (required)
- state_type_update (StateTypeUpdate) – (required)
update_user
tator.api.update_user(self, id, user_update, **kwargs)
Update user.
- Parameters
- id (int) – A unique integer identifying a user. (required)
- user_update (UserUpdate) – (required)
- presigned (int) – If given, all object key fields in profile will be replaced with presigned URLs that can be downloaded without authentication. The value is the expiration time of the URLs in seconds.
update_version
tator.api.update_version(self, id, version_update, **kwargs)
Update version. Versions allow for multiple “layers” of annotations on the same media. Versions are created at the project level, but are only displayed for a given media if that media contains annotations in that version. The version of an annotation can be set by providing it in a POST operation. Currently only localizations and states can have versions.
- Parameters
- id (int) – A unique integer identifying a version. (required)
- version_update (VersionUpdate) – (required)
update_video_file
tator.api.update_video_file(self, id, role, index, video_definition, **kwargs)
Update video file. Video files are stored under the media_files field of Media objects. They are used to relate media metadata to an underlying video. One or more video files can be used to reference streaming or archival roles in a Media object. The file itself must first be uploaded to a URL retrieved from the UploadInfo endpoint, and the returned object key should be specified in the video file’s path field.
- Parameters
- id (int) – A unique integer identifying a media object. (required)
- role (str) – Role of media file being referenced. (required)
- index (int) – Index of object. Must be less than size of current list of videos for the specified role. (required)
- video_definition (VideoDefinition) – (required)
user_exists
tator.api.user_exists(self, **kwargs)
Returns whether a user exists.
- Parameters
- username (str) – Username associated with user. Either this or email must be supplied.
- email (str) – Email address associated with user. Either this or email must be supplied.
- elemental_id (str) – Elemental_id of user
whoami
tator.api.whoami(self, **kwargs)
Get current user. Retrieves user making the request.
- Parameters
- presigned (int) – If given, all object key fields in profile will be replaced with presigned URLs that can be downloaded without authentication. The value is the expiration time of the URLs in seconds.