6. Available Resources

All resources are available here: https://api.zillin.io/swagger

6.1. Api [v. 1.0]

6.1.1. Endpoints

GET /api/Datasets

Gets all the datasets.

Query Parameters:
  • workspaceId (string) – (Required)

Status Codes:
Request Headers:
  • api-version

POST /api/Datasets/create

Creates a dataset.

Status Codes:
Request Headers:
  • api-version

POST /api/Datasets/delete

Deletes dataset.

Status Codes:
Request Headers:
  • api-version

GET /api/Datasets/images

Gets dataset images.

Query Parameters:
  • DatasetId (string) – Id of the dataset. (Required)

  • PageSize (integer) – Number of images per page. Accepted values: 1 - 1000. (Required)

  • PageNumber (integer) – Number of the page. (Required)

Status Codes:
Request Headers:
  • api-version

POST /api/Datasets/publish

Publishes dataset.

Status Codes:
Request Headers:
  • api-version

POST /api/Datasets/update

Updates a dataset.

Status Codes:
Request Headers:
  • api-version

POST /api/Images/addImage

Uploads image.

For unencrypted workspaces, provide just {Image}, {FileName} and {DatasetId}. The thumbnail will be generated automatically. <br /> For encrypted workspaces, additionally provide {Thumbnail} (270x200 pixels), and original {Width} and {Height} of the {Image}. <br /> Both {Image} and {Thumbnail} have to be already encrypted with the workspace key. <br /> You should use AES-256 in CBC mode and prefix the encrypted file with the IV used. <br /> You can prepare the compatible file with OpenSSL as follows: <br /><code> IV=$(openssl rand -hex 16) <br /> cat <(echo -n $IV | xxd -r -ps) <(openssl enc -aes-256-cbc -K $(cat workspace.key) -iv $IV -in image.jpg) > image.enc.jpg </code>

Status Codes:
Request Headers:
  • api-version

POST /api/Images/addImageFromUrl

Uploads image from url.

Status Codes:
Request Headers:
  • api-version

POST /api/Images/delete

Deletes image.

Status Codes:
Request Headers:
  • api-version

GET /api/Images/download

Downloads image.

Query Parameters:
  • imageId (string) – (Required)

Status Codes:
Request Headers:
  • api-version

GET /api/Images/downloadThumb

Downloads thumbnail.

Query Parameters:
  • imageId (string) – (Required)

Status Codes:
Request Headers:
  • api-version

GET /api/Projects

Gets all projects.

Query Parameters:
  • workspaceId (string) – (Required)

Status Codes:
Request Headers:
  • api-version

POST /api/Projects/AssignDataset

Assigns dataset to project.

Status Codes:
Request Headers:
  • api-version

POST /api/Projects/UnlinkDataset

Unassigns dataset from project.

Status Codes:
Request Headers:
  • api-version

GET /api/Projects/export

Exports project.

Query Parameters:
  • projectId (string) – (Required)

  • dataFilter (string) – (Required)

Status Codes:
Request Headers:
  • api-version

GET /api/Workspaces

Gets all workspaces.

Status Codes:
Request Headers:
  • api-version

POST /api/Workspaces/create

Creates a workspace.

Status Codes:
Request Headers:
  • api-version

POST /api/Workspaces/delete

Deletes workspace.

Status Codes:
Request Headers:
  • api-version

POST /api/Workspaces/enableEncryption

Marks the workspace as encrypted and attaches the key checksum to it.

Encrypted workspaces use AES-256. Zillin uses a key checksum to verify the proper key is provided when opening the workspace. <br /><br /><code> $ openssl enc -aes-256-cbc -P -k “correct horse battery staple” -pbkdf2 | sed -n 2p | sed ‘s/key=//’ > my.key <br /></code><br /> From the key you can generate the checksum as follows: <br /><br /><code> IV=00000000000000000000000000000000 <br /> WORKSPACE_ID=”bd81654c-6ac8-4ece-8234-0e0c4265d761” # lowercase hex representation! <br /> cat <(echo -n $IV | xxd -r -ps) <(echo -n $WORKSPACE_ID | openssl enc -aes-256-cbc -K $(cat my.key) -iv $IV) | openssl sha256 -binary | openssl base64 </code>

Status Codes:
Request Headers:
  • api-version

6.1.2. Models

definitions

  • DatasetInfoDto

Dataset information model.

type

object

properties

  • id

Id of the dataset.

type

string

format

uuid

  • name

Name of the dataset.

type

string

  • description

Description of the dataset.

type

string

  • imagesCount

Count of images in dataset.

type

integer

format

int32

  • projectsCount

Count of projects the dataset is assigned to.

type

integer

format

int32

  • status

Status determining current dataset state.

type

string

additionalProperties

False

  • PublicApiResponseOfDatasetInfoDtos

Public api response model.

type

object

properties

  • data

Data object of type T containing response data.

type

array

items

#/components/schemas/DatasetInfoDto

  • errorMessage

Error message.

type

string

  • errorCodes

List of error codes.

type

array

items

type

string

  • isSuccess

Property defining whether response is successful.

type

boolean

additionalProperties

False

  • CreateDatasetDto

Dataset creation model.

type

object

properties

  • name

Name of the dataset.

type

string

  • description

Description of the dataset.

type

string

  • workspaceId

Id of the workspace.

type

string

format

uuid

additionalProperties

False

  • PublicApiResponseOfNullableGuid

Public api response model.

type

object

properties

  • data

Data object of type T containing response data.

type

string

format

uuid

  • errorMessage

Error message.

type

string

  • errorCodes

List of error codes.

type

array

items

type

string

  • isSuccess

Property defining whether response is successful.

type

boolean

additionalProperties

False

  • UpdateDatasetDto

Update dataset model.

type

object

properties

  • datasetId

Id of the dataset to update.

type

string

format

uuid

  • name

New name for the dataset.

type

string

  • description

New description for the dataset.

type

string

additionalProperties

False

  • PublicApiResponseOfObject

Public api response model.

type

object

properties

  • data

Data object of type T containing response data.

  • errorMessage

Error message.

type

string

  • errorCodes

List of error codes.

type

array

items

type

string

  • isSuccess

Property defining whether response is successful.

type

boolean

additionalProperties

False

  • DeleteDatasetDto

Delete dataset model.

type

object

properties

  • datasetId

Id of the dataset to delete.

type

string

format

uuid

additionalProperties

False

  • PublishDatasetDto

Publish dataset model.

type

object

properties

  • datasetId

Id of the dataset to publish.

type

string

format

uuid

additionalProperties

False

  • DatasetImageDto

type

object

properties

  • id

type

string

format

uuid

  • name

type

string

  • width

type

integer

format

int32

  • height

type

integer

format

int32

  • createdDate

type

string

format

date-time

  • hasAnnotations

type

boolean

additionalProperties

False

  • PagedQueryResultDtoOfDatasetImageDto

type

object

properties

  • pagesCount

type

integer

format

int32

  • pageNumber

type

integer

format

int32

  • totalCount

type

integer

format

int32

  • data

type

array

items

#/components/schemas/DatasetImageDto

additionalProperties

False

  • PublicApiResponseOfPagedQueryResultDtoOfDatasetImageDto

Public api response model.

type

object

properties

  • data

#/components/schemas/PagedQueryResultDtoOfDatasetImageDto

  • errorMessage

Error message.

type

string

  • errorCodes

List of error codes.

type

array

items

type

string

  • isSuccess

Property defining whether response is successful.

type

boolean

additionalProperties

False

  • DeleteImageDto

Delete image model.

type

object

properties

  • imageId

Id of the image to delete.

type

string

format

uuid

additionalProperties

False

  • ProjectInfoDto

Project information model.

type

object

properties

  • id

Id of the project.

type

string

format

uuid

  • name

Name.

type

string

  • status

Status determining whether project has been published.

type

string

  • description

Description.

type

string

  • imageCount

Count of images in datasets assigned to the project.

type

integer

format

int32

  • usersCount

Count of users assigned to the project.

type

integer

format

int32

additionalProperties

False

  • PublicApiResponseOfProjectInfoDtos

Public api response model.

type

object

properties

  • data

Data object of type T containing response data.

type

array

items

#/components/schemas/ProjectInfoDto

  • errorMessage

Error message.

type

string

  • errorCodes

List of error codes.

type

array

items

type

string

  • isSuccess

Property defining whether response is successful.

type

boolean

additionalProperties

False

  • AssignDatasetToProjectDto

Assign dataset to project model.

type

object

properties

  • projectId

Id of the project to which the dataset will be assigned.

type

string

format

uuid

  • datasetId

Id of the dataset that will be assigned.

type

string

format

uuid

additionalProperties

False

  • UnassignDatasetFromProjectDto

Unassign dataset from project model.

type

object

properties

  • projectId

Id of the project that dataset will be unassigned from.

type

string

format

uuid

  • datasetId

Id of dataset to unassign.

type

string

format

uuid

additionalProperties

False

  • ExportFilterType

type

string

enum

All, Accepted, Annotated, ConfigOnly

  • WorkspaceInfoDto

Workspace information model.

type

object

properties

  • id

Id of the workspace.

type

string

format

uuid

  • name

Name of the workspace.

type

string

  • encrypted

Indicates whether the workspace is encrypted.

type

boolean

additionalProperties

False

  • PublicApiResponseOfWorkspaceInfoDtos

Public api response model.

type

object

properties

  • data

Data object of type T containing response data.

type

array

items

#/components/schemas/WorkspaceInfoDto

  • errorMessage

Error message.

type

string

  • errorCodes

List of error codes.

type

array

items

type

string

  • isSuccess

Property defining whether response is successful.

type

boolean

additionalProperties

False

  • CreateWorkspaceDto

Dataset creation model.

type

object

properties

  • name

Name of the dataset.

type

string

additionalProperties

False

  • EnableEncryptionDto

Workspace encryption model.

type

object

properties

  • workspaceId

Id of the workspace to protect.

type

string

format

uuid

  • checksum

Encryption key checksum.

type

string

maxLength

44

minLength

44

additionalProperties

False

  • DeleteWorkspaceDto

Delete dataset model.

type

object

properties

  • workspaceId

Id of the dataset to delete.

type

string

format

uuid

additionalProperties

False