Smyle Engine API
Base URI
{Application-ID}
.engine.smyle.io/0Your application ID.
Your API key.
The application ID or API key is invalid.
The uploaded JSON does not correspond to the object model.
The object ID does not exist.
For POST and PUT requests, the request body must be JSON, with the Content-Type header set to application/json.
Authentication is done via HTTP headers. The X-Smyle-Application-Id header identifies which application you are accessing, and the X-Smyle-API-Key header authenticates the endpoint.
We describe in this section the ressources related to adding and retrieving objects to indexes.
{indexName}
/_clear{indexName}
{indexName}
{indexName}
/{typeName}
/_clear{indexName}
/{typeName}
This command lists all your existing indexes.
Request headers
Responses
Body
{indexName}
/_clearThis method deletes the index content. Settings and index specific API keys are kept untouched.
Path variables
The name of the index.
Request headers
{indexName}
This method deletes an existing index and associated types.
Path variables
The name of the index.
Request headers
{indexName}
This command lists the existing types for the given index.
Path variables
The name of the index.
Request headers
Responses
Body
{indexName}
/{typeName}
/_clearThis method deletes the type content. Type’s settings are kept untouched.
Path variables
The name of the index.
The name of the type.
Request headers
{indexName}
/{typeName}
This method deletes an existing index.
Path variables
The name of the index.
The name of the type.
Request headers
{indexName}
/{typeName}
{indexName}
/{typeName}
/{objectID}
{indexName}
/{typeName}
/{objectID}
{indexName}
/{typeName}
/{objectID}
/partial{indexName}
/{typeName}
/{objectID}
{indexName}
/{typeName}
This method adds one object in the index with automatic assignation of id.
Path variables
The name of the index.
The name of the type.
Request headers
Request body
Responses
Body
{indexName}
/{typeName}
/{objectID}
This method adds or replaces an object (if the object does not exist, it will be created). Be careful: the object ID is shared across all indexes and types. If it already exists in another index or type it will be deleted first. The object will also be completely overriden: existing attributes that are not replaced are deleted.
Path variables
The name of the index.
The name of the type.
The object ID.
Request headers
Request body
Responses
Body
{indexName}
/{typeName}
/{objectID}
Retrieves an indexed object.
Path variables
The name of the index.
The name of the type.
The object ID.
Request headers
Request headers
Request body
Responses
Body
{indexName}
/{typeName}
/{objectID}
/partialThis method updates part of an object (if the object does not exist, it will be created. You can avoid an automatic creation of the object by passing createIfNotExists=false as query argument).
Path variables
The name of the index.
The name of the type.
The object ID.
Request parameters
Create the object if it doesn’t exist. Default: true.
Request headers
Request body
Responses
Body
{indexName}
/{typeName}
/{objectID}
This method deletes an existing object from the index.
Path variables
The name of the index.
The name of the type.
The object ID
Request headers
Responses
Body
Ranking query.
{indexNames}
/{typeNames}
/{objectID}
{indexNames}
/{typeNames}
{indexNames}
/{typeNames}
/{objectID}
Return objects ranked by similarity with the query.
Path variables
The name of the index, or a list of indexes separated by commas, or _all for all indexes.
The name of the type, or a list of types separated by commas, or _all for all types.
The object ID.
Request parameters
Pagination parameter used to select the page to retrieve. Page is zero-based and defaults to 0. Thus, to retrieve the 10th page you need to set page=9.
Pagination parameter used to select the number of hits per page. Defaults to 40.
Request headers
Responses
Body
{indexNames}
/{typeNames}
Return objects ranked by similarity with the query.
Path variables
The name of the index, or a list of indexes separated by commas, or _all for all indexes.
The name of the type, or a list of types separated by commas, or _all for all types.
Request parameters
The image URL query.
Pagination parameter used to select the page to retrieve. Page is zero-based and defaults to 0. Thus, to retrieve the 10th page you need to set page=9.
Pagination parameter used to select the number of hits per page. Defaults to 40.
Request headers
Responses
Body
The model for an object which is posted or put in an index.
The list of images.
The image URL.
The cropping type. Possible values:
- manual: image is cropped only if bounding_box or polygon is provided by user. If cropped, it fires on_crop event.
- uniform: image is cropped only if uniform background is detected. If cropped, it fires on_crop event.
- detect: image is cropped only if the object type is detected. If cropped, it fires on_detect and on_crop event.
- segment: same as detect but the background is removed. If cropped, it fires on_detect and on_crop event.
Default is uniform. Values are ordered: e.g. a detect cropping type implies uniform and user.
The indexing type. Possible values:
- off: no indexing
- on_crop: indexed only if cropped.
- on_detect: indexed only if object is detected.
- on: indexed in any case.
Default value is on.
The indexing type. Possible values:
- off: no indexing
- on_crop: indexed only if cropped.
- on_detect: indexed only if object is detected.
- on: indexed in any case.
Default value is on_detect.
list
1
A list of indexes or types.
The index or type name.
The UTC creation time.
The last UTC update time.
The number of items.
Indicates the number of pending tasks for the index or type.
The status ID of an created or updated object.
Indicate if the object has been created or updated.
The last update UTC time.
The task ID.
The object ID.
The status ID of a deleted object.
The deletion UTC time.
A point model
The model for an object which retrieved by a GET method.
The list of images.
The image URL.
list
1
The response model.