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:
200 OK – Returns list of datasets.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Datasets/create
¶ Creates a dataset.
- Status Codes:
200 OK – Dataset was created.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Datasets/delete
¶ Deletes dataset.
- Status Codes:
200 OK – Dataset was deleted.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- 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:
200 OK – Returns list of dataset images.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Datasets/publish
¶ Publishes dataset.
- Status Codes:
200 OK – Dataset was published.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Datasets/update
¶ Updates a dataset.
- Status Codes:
200 OK – Dataset was updated.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- 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:
200 OK – Image was uploaded.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Images/addImageFromUrl
¶ Uploads image from url.
- Status Codes:
200 OK – Image was uploaded.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Images/delete
¶ Deletes image.
- Status Codes:
200 OK – Image was deleted.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
GET
/api/Images/download
¶ Downloads image.
- Query Parameters:
imageId (string) – (Required)
- Status Codes:
200 OK – Image was downloaded.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
GET
/api/Images/downloadThumb
¶ Downloads thumbnail.
- Query Parameters:
imageId (string) – (Required)
- Status Codes:
200 OK – Thumb was downloaded.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
GET
/api/Projects
¶ Gets all projects.
- Query Parameters:
workspaceId (string) – (Required)
- Status Codes:
200 OK – List of all projects is returned.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Projects/AssignDataset
¶ Assigns dataset to project.
- Status Codes:
200 OK – Dataset has been assigned.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Projects/UnlinkDataset
¶ Unassigns dataset from project.
- Status Codes:
200 OK – Dataset has been unassigned.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
GET
/api/Projects/export
¶ Exports project.
- Query Parameters:
projectId (string) – (Required)
dataFilter (string) – (Required)
- Status Codes:
200 OK – Export file was downloaded.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
GET
/api/Workspaces
¶ Gets all workspaces.
- Status Codes:
200 OK – List of all workspaces is returned.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Workspaces/create
¶ Creates a workspace.
- Status Codes:
200 OK – Workspace was created.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
-
POST
/api/Workspaces/delete
¶ Deletes workspace.
- Status Codes:
200 OK – Workspace was deleted.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- 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:
200 OK – Key checksum has been registered.
400 Bad Request – Bad request (Error code in response).
500 Internal Server Error – Internal server error.
- Request Headers:
api-version –
6.1.2. Models¶
definitions |
||||
|
Dataset information model. |
|||
type |
object |
|||
properties |
||||
|
Id of the dataset. |
|||
type |
string |
|||
format |
uuid |
|||
|
Name of the dataset. |
|||
type |
string |
|||
|
Description of the dataset. |
|||
type |
string |
|||
|
Count of images in dataset. |
|||
type |
integer |
|||
format |
int32 |
|||
|
Count of projects the dataset is assigned to. |
|||
type |
integer |
|||
format |
int32 |
|||
|
Status determining current dataset state. |
|||
type |
string |
|||
additionalProperties |
False |
|||
|
Public api response model. |
|||
type |
object |
|||
properties |
||||
|
Data object of type T containing response data. |
|||
type |
array |
|||
items |
#/components/schemas/DatasetInfoDto |
|||
|
Error message. |
|||
type |
string |
|||
|
List of error codes. |
|||
type |
array |
|||
items |
type |
string |
||
|
Property defining whether response is successful. |
|||
type |
boolean |
|||
additionalProperties |
False |
|||
|
Dataset creation model. |
|||
type |
object |
|||
properties |
||||
|
Name of the dataset. |
|||
type |
string |
|||
|
Description of the dataset. |
|||
type |
string |
|||
|
Id of the workspace. |
|||
type |
string |
|||
format |
uuid |
|||
additionalProperties |
False |
|||
|
Public api response model. |
|||
type |
object |
|||
properties |
||||
|
Data object of type T containing response data. |
|||
type |
string |
|||
format |
uuid |
|||
|
Error message. |
|||
type |
string |
|||
|
List of error codes. |
|||
type |
array |
|||
items |
type |
string |
||
|
Property defining whether response is successful. |
|||
type |
boolean |
|||
additionalProperties |
False |
|||
|
Update dataset model. |
|||
type |
object |
|||
properties |
||||
|
Id of the dataset to update. |
|||
type |
string |
|||
format |
uuid |
|||
|
New name for the dataset. |
|||
type |
string |
|||
|
New description for the dataset. |
|||
type |
string |
|||
additionalProperties |
False |
|||
|
Public api response model. |
|||
type |
object |
|||
properties |
||||
|
Data object of type T containing response data. |
|||
|
Error message. |
|||
type |
string |
|||
|
List of error codes. |
|||
type |
array |
|||
items |
type |
string |
||
|
Property defining whether response is successful. |
|||
type |
boolean |
|||
additionalProperties |
False |
|||
|
Delete dataset model. |
|||
type |
object |
|||
properties |
||||
|
Id of the dataset to delete. |
|||
type |
string |
|||
format |
uuid |
|||
additionalProperties |
False |
|||
|
Publish dataset model. |
|||
type |
object |
|||
properties |
||||
|
Id of the dataset to publish. |
|||
type |
string |
|||
format |
uuid |
|||
additionalProperties |
False |
|||
|
type |
object |
||
properties |
||||
|
type |
string |
||
format |
uuid |
|||
|
type |
string |
||
|
type |
integer |
||
format |
int32 |
|||
|
type |
integer |
||
format |
int32 |
|||
|
type |
string |
||
format |
date-time |
|||
|
type |
boolean |
||
additionalProperties |
False |
|||
|
type |
object |
||
properties |
||||
|
type |
integer |
||
format |
int32 |
|||
|
type |
integer |
||
format |
int32 |
|||
|
type |
integer |
||
format |
int32 |
|||
|
type |
array |
||
items |
#/components/schemas/DatasetImageDto |
|||
additionalProperties |
False |
|||
|
Public api response model. |
|||
type |
object |
|||
properties |
||||
|
#/components/schemas/PagedQueryResultDtoOfDatasetImageDto |
|||
|
Error message. |
|||
type |
string |
|||
|
List of error codes. |
|||
type |
array |
|||
items |
type |
string |
||
|
Property defining whether response is successful. |
|||
type |
boolean |
|||
additionalProperties |
False |
|||
|
Delete image model. |
|||
type |
object |
|||
properties |
||||
|
Id of the image to delete. |
|||
type |
string |
|||
format |
uuid |
|||
additionalProperties |
False |
|||
|
Project information model. |
|||
type |
object |
|||
properties |
||||
|
Id of the project. |
|||
type |
string |
|||
format |
uuid |
|||
|
Name. |
|||
type |
string |
|||
|
Status determining whether project has been published. |
|||
type |
string |
|||
|
Description. |
|||
type |
string |
|||
|
Count of images in datasets assigned to the project. |
|||
type |
integer |
|||
format |
int32 |
|||
|
Count of users assigned to the project. |
|||
type |
integer |
|||
format |
int32 |
|||
additionalProperties |
False |
|||
|
Public api response model. |
|||
type |
object |
|||
properties |
||||
|
Data object of type T containing response data. |
|||
type |
array |
|||
items |
#/components/schemas/ProjectInfoDto |
|||
|
Error message. |
|||
type |
string |
|||
|
List of error codes. |
|||
type |
array |
|||
items |
type |
string |
||
|
Property defining whether response is successful. |
|||
type |
boolean |
|||
additionalProperties |
False |
|||
|
Assign dataset to project model. |
|||
type |
object |
|||
properties |
||||
|
Id of the project to which the dataset will be assigned. |
|||
type |
string |
|||
format |
uuid |
|||
|
Id of the dataset that will be assigned. |
|||
type |
string |
|||
format |
uuid |
|||
additionalProperties |
False |
|||
|
Unassign dataset from project model. |
|||
type |
object |
|||
properties |
||||
|
Id of the project that dataset will be unassigned from. |
|||
type |
string |
|||
format |
uuid |
|||
|
Id of dataset to unassign. |
|||
type |
string |
|||
format |
uuid |
|||
additionalProperties |
False |
|||
|
type |
string |
||
enum |
All, Accepted, Annotated, ConfigOnly |
|||
|
Workspace information model. |
|||
type |
object |
|||
properties |
||||
|
Id of the workspace. |
|||
type |
string |
|||
format |
uuid |
|||
|
Name of the workspace. |
|||
type |
string |
|||
|
Indicates whether the workspace is encrypted. |
|||
type |
boolean |
|||
additionalProperties |
False |
|||
|
Public api response model. |
|||
type |
object |
|||
properties |
||||
|
Data object of type T containing response data. |
|||
type |
array |
|||
items |
#/components/schemas/WorkspaceInfoDto |
|||
|
Error message. |
|||
type |
string |
|||
|
List of error codes. |
|||
type |
array |
|||
items |
type |
string |
||
|
Property defining whether response is successful. |
|||
type |
boolean |
|||
additionalProperties |
False |
|||
|
Dataset creation model. |
|||
type |
object |
|||
properties |
||||
|
Name of the dataset. |
|||
type |
string |
|||
additionalProperties |
False |
|||
|
Workspace encryption model. |
|||
type |
object |
|||
properties |
||||
|
Id of the workspace to protect. |
|||
type |
string |
|||
format |
uuid |
|||
|
Encryption key checksum. |
|||
type |
string |
|||
maxLength |
44 |
|||
minLength |
44 |
|||
additionalProperties |
False |
|||
|
Delete dataset model. |
|||
type |
object |
|||
properties |
||||
|
Id of the dataset to delete. |
|||
type |
string |
|||
format |
uuid |
|||
additionalProperties |
False |