REST API
- GET /api/collection/(id)/csvfile
Download the CSV file for a collection.
- Parameters:
id – The ID of the collection to download the CSV file for.
- Status Codes:
200 OK – The CSV file was downloaded successfully.
400 Bad Request – The collection to download the CSV file for was not found.
- POST /api/collection/(id)/delete
Delete a collection.
- Request Headers:
API-Key – The API key.
- Parameters:
id – The ID of the collection to delete.
- Status Codes:
200 OK – The collection was deleted successfully.
400 Bad Request – The collection to delete was not found.
- POST /api/collection/(id)/finetune
Finetune the model for a collection.
This is a required process for the model to be usable in similarity search. Note, that the finetuning process takes a while to complete. Therefore, this route will return immediately after starting the finetuning process. You can then query the progress of the finetuning process with
GET /api/collection/{id}/info.- Request Headers:
API-Key – The API key.
- Parameters:
id – The ID of the collection to finetune the model for.
- Status Codes:
200 OK – The model finetuning was started successfully.
- GET /api/collection/(id)/info
Get information about a collection.
- Parameters:
id – The ID of the collection to get information about.
- Response JSON Object:
number_of_images (bool) – The number of images in the collection.
requires_finetuning (bool) – Whether the collection requires finetuning.
name (string) – The name of the collection.
last_modified (string) – The date the collection was last modified.
last_finetuned (string) – The date the collection was last finetuned.
finetuning_progess (float) – The progress of the finetuning operation.
heidicon_tag (string) – The HeidICON tag associated with the collection.
id (int) – The ID of the collection.
- Status Codes:
200 OK – The information about the collection was returned successfully.
400 Bad Request – The collection to get information about was not found.
- POST /api/collection/(id)/search
Perform a similarity search in a collection.
- Parameters:
id – The ID of the collection to search in.
- Request JSON Object:
image (string) – The image to search for as a base64 encoded string.
- Response JSON Object:
results (list) – The list of results of the similarity search.
- Status Codes:
200 OK – The similarity search was successful.
400 Bad Request – The collection to search in was not found.
- POST /api/collection/(id)/updatecontent
Upload new content for a collection.
Note that this currently does not allow incremental updates, but replaces the content of the collection. If you want to add images, download the CSV file with
GET /api/collection/{id}/csvfile, add the new images and upload the resulting CSV file.- Request Headers:
API-Key – The API key.
- Parameters:
id – The ID of the collection to update.
- Request JSON Object:
content (string) – The new content of the collection as a base64 encoded string.
- Status Codes:
200 OK – The collection was updated successfully.
400 Bad Request – The collection to update was not found.
- POST /api/collection/(id)/updatename
Change the name of a collection.
- Request Headers:
API-Key – The API key.
- Parameters:
id – The ID of the collection to update.
- Request JSON Object:
name (string) – The new name of the collection.
- Status Codes:
200 OK – The collection was updated successfully.
400 Bad Request – The collection to update was not found.
- POST /api/collection/create
Create a new collection.
- Request Headers:
API-Key – The API key.
- Request JSON Object:
name (string) – The name of the collection to be created.
heidicon_tag (string) – The HeidICON tag to be associated with the collection, if this collection is managed through HeidICON.
- Status Codes:
200 OK – The collection was created successfully.
- GET /api/collection/list
List all existing collections.
- Response JSON Object:
ids (list) – The list of collection IDs.
names (list) – A list of objects for each collection, with properies value, id and name.
- Status Codes:
200 OK – The list of collections was returned successfully.
- POST /api/verify
Verify an API key.
- Request Headers:
API-Key – The API key to verify.
- Status Codes:
200 OK – The API key is valid.
403 Forbidden – The API key is invalid.