Maximo Visual Inspection API documentation version v8.3.0
http://IP:PORT/CONTEXT_ROOT/api
This document documents the ReST API for Maximo Visual Inspection release 8.2.0. It is backward compatible with all previous versions of IBM PowerAI Vision, IBM Visual Insights and Maximo Visual Inspection with the exception of the `/tokens` endpoint. Endpoints are listed in alphabetical order.
API Keys
APIs to manage a user's API Key
Get the API Key for the user associated with the athentication token
Create an API Key for the user associated with the authentication token. If an API Key already exists for the user, the existing key will be deleted before the new key is generated.
Deletes (revokes) the API Key for the user associated with the athentication token
get /api-keys
Get the API Key for the user associated with the athentication token
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
API Key exists for the given user
Body
Media type: application/json
Type: object
Example:
{
"api_key": "1234-abcd-WXYZ-0987"
}
HTTP status code 401
Given authentication token is not valid
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Failed to parse token."
}
HTTP status code 404
No API exists for the logged in user
Body
Media type: application/json
Type: object
Example:
{
"status": "Not Found",
"fault": "HTTP 404 Not Found",
"type": "NotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /api-keys
Create an API Key for the user associated with the authentication token. If an API Key already exists for the user, the existing key will be deleted before the new key is generated.
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
New API Key returned
Body
Media type: application/json
Type: object
Example:
{
"api_key": "1234-WXYZ-0987-abcd"
}
HTTP status code 401
Given authentication token is not valid
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Failed to parse token."
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /api-keys
Deletes (revokes) the API Key for the user associated with the athentication token
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
API Key exists for the given user
HTTP status code 401
Given authentication token is not valid
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Failed to parse token."
}
HTTP status code 404
No API exists for the logged in user
Body
Media type: application/json
Type: object
Example:
{
"status": "Not Found",
"fault": "HTTP 404 Not Found",
"type": "NotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Custom Inference Scripts (DNN Scripts)
APIs for managing custom inference scripts
Get all DNN scripts belonging to the user associated with provided token(from header "X-Auth-Token"). Results are ordered by creation date, newest to oldest.
Upload a DNN script. The DNN script must be a zip file, that contains a file called custom.py
get /dnn-script
Get all DNN scripts belonging to the user associated with provided token(from header "X-Auth-Token"). Results are ordered by creation date, newest to oldest.
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
Result is a list of DNN script objects. The list is ordered most recently created first.
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "9641385a-23cc-404b-a154-45b1e91c1baa",
"created_at": 1573057400217,
"description": "Description of DNN script",
"name": "Demo DNN script",
"owner": "admin"
}
]
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /dnn-script
Upload a DNN script. The DNN script must be a zip file, that contains a file called custom.py
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: multipart/form-data
Type: object
Properties- name: required (string)
The name of the DNN script. Name is limitted to 128 characters
- description: (string)
An optional description for the DNN script. The description is limitted to 2048 characters.
- file: required (string)
File to be uploaded as a DNN script. This must be a zip file.
Media type: examples
Type: object
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "9641385a-23cc-404b-a154-45b1e91c1baa",
"created_at": 1573057400217,
"description": "A description of the DNN Script",
"name": "Demo DNN script",
"owner": "admin"
}
HTTP status code 400
Creation failed due to user input problems.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Input name () has invalid length = 0. Length must be > 0 and <= 128",
"more_info": {
"name": " "
},
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get details for a DNN script
Delete a DNN script.
Update/Change a DNN script information.
Currently changes can be made to each of the fields that can be specified at creation time. These fields are described in the properties
section below. Only the supplied fields are modified and it is possible to modify multiple fields in a single call.
get /dnn-script/{id}
Get details for a DNN script
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
DNN Script UUID.
Example:
9641385a-23cc-404b-a154-45b1e91c1baa
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "9641385a-23cc-404b-a154-45b1e91c1baa",
"created_at": 1573057400217,
"description": "Description of DNN script",
"name": "Demo DNN script",
"owner": "admin"
}
HTTP status code 404
Could not find the indicated DNN script
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dnn-script id '9641385a-23cc-404b-a154-45b1e91c1baa' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /dnn-script/{id}
Delete a DNN script.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
DNN Script UUID.
Example:
9641385a-23cc-404b-a154-45b1e91c1baa
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "9641385a-23cc-404b-a154-45b1e91c1baa",
"name": "Demo DNN script",
"result": "success"
}
HTTP status code 404
The indicated DNN script could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dnn-script id '9641385a-23cc-404b-a154-45b1e91c1baa' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
put /dnn-script/{id}
Update/Change a DNN script information.
Currently changes can be made to each of the fields that can be specified at creation time. These fields are described in the properties
section below. Only the supplied fields are modified and it is possible to modify multiple fields in a single call.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
DNN Script UUID.
Example:
9641385a-23cc-404b-a154-45b1e91c1baa
Body
Media type: multipart/form-data
Type: object
Properties- name: required (string)
The name of the DNN script. Name is limitted to 128 characters
- description: (string)
An optional description for the DNN script. The description is limitted to 2048 characters.
- file: (string)
File to be uploaded as a DNN script. This must be a zip file.
Media type: examples
Type: object
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "9641385a-23cc-404b-a154-45b1e91c1baa",
"created_at": 1573057400217,
"description": "A new description of the DNN script",
"name": "Renamed DNN script",
"owner": "admin"
}
HTTP status code 400
Creation failed due to user input problems.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Input name () has invalid length = 0. Length must be > 0 and <= 128",
"more_info": {
"name": " "
},
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
DataSets
APIs for managing datasets
Get all datasets belonging to the user associated with provided token(from header "X-Auth-Token"). Results are ordered by creation date, newest to oldest.
Create a dataset
get /datasets
Get all datasets belonging to the user associated with provided token(from header "X-Auth-Token"). Results are ordered by creation date, newest to oldest.
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- type: (string)
Example:
sample
- sortby: (string)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Examples:
two field sort:
owner,name
descending sort:
owner DESC, name, created_at
HTTP status code 200
Result is a list of dataset objects based upon the filters. The list is ordered most recently created first.
Body
Media type: application/json
Type: object
Example:
[
{
// dataset object; see DB schema for details
}
]
HTTP status code 400
Bad input parameters.
Body
Media type: application/json
Type: object
Example:
{
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /datasets
Create a dataset
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Properties- name: required (string)
The name of the dataset.
Example:
{
name: "MyDataset",
}
Media type: example
Type:
{
name: "MyDataset",
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success",
dataset_id: "a48c3779-eb14-4697-a490-eeb0125196f4"
}
HTTP status code 400
Creation failed. Likely cause is filesystem IO issues (probably space).
Body
Media type: application/json
Type: object
Example:
{
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Provides actions for groups of datasets. All dataset selection operations are performed through this endpoint.
Perform the indicated action. Possible action
values are
- delete -- Delete the indicated set of datasets.
post /datasets/action
Perform the indicated action. Possible action
values are
- delete -- Delete the indicated set of datasets.
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Properties- action: required (delete)
Indicates the action to be performed on this dataset. Possible actions are
delete
-- deletes the indicated set of datasets
- dataset_id_list: required (list)
The
dataset_id_list
is a list of dataset UUID strings. The list should not contain duplicate ids and must have at least one item in the list.
Example:
{
action: "delete",
dataset_id_list: [ "datasetId1", "datasetID2" ]
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
success_count: 2
fail_count: 0
result_list : [
{
dataset_id: "datasetId1",
result: "success"
},
{
dataset_id: "datasetID2",
result: "success",
}
]
}
HTTP status code 422
Body
Media type: application/json
Type: object
Example:
{
success_count: 1,
fail_count: 1,
result_list : [
{
dataset_id: "datasetId1",
result: "success"
},
{
dataset_id: "datasetID2",
result: "fail",
}
]
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
import dataset from zip file
post /datasets/import
import dataset from zip file
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: multipart/form-data
Type: object
Examples:
post_params:
Content-Disposition: form-data;
[
name="files"; filename="safety.zip" Content-Type: multipart/form-data
]
HTML_usage:
<form enctype="multipart/form-data" action="{baseUri}/datasets/import" method="POST">
Choose zip file to upload:
<input name="files" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
curl_usage:
{
"curl -i -X POST -H \"Content-Type": "multipart/form-data\" -F \"files=@safety.zip\" {baseUri}/datasets/import"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success",
dataset_id: "78ebc41e-fd8b-4d22-ac16-53805e1921c7"
}
HTTP status code 400
The import failed for some reason. The fault
field should provide additional information about the failure reason.
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "File too large."
}
HTTP status code 422
The zip file could not be unzipped.
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Invalid zip format"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Imports a dataset using a file uploaded via the chunked upload service.
Note that the import is a background operation. Progress can be tracked via SSEs or querying for the returned dataset id.
post /datasets/import/upload/{upload_id}
Imports a dataset using a file uploaded via the chunked upload service.
Note that the import is a background operation. Progress can be tracked via SSEs or querying for the returned dataset id.
URI Parameters
- upload_id: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success",
dataset_id: "78ebc41e-fd8b-4d22-ac16-53805e1921c7"
}
HTTP status code 400
The import failed for some reason. The fault
field should provide additional information about the failure reason.
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "File too large."
}
HTTP status code 404
The identified chunked upload tracker id could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "AIVVS1000E: Chunked upload operation with id acbb1e6-6efc-420b-bb82-7c5e0717d150 could not be found.",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
HTTP status code 422
The zip file could not be unzipped.
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Invalid zip format"
}
Secured by
Get basic info of a dataset
Delete a dataset along with all files and metadata associated with it.
get /datasets/{id}
Get basic info of a dataset
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
refer to DB schema -> DataSets
HTTP status code 404
Could not find the indicated dataset
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Unknown dataset 'a48c3779-eb14-4697-a490-eeb0125196f4'"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /datasets/{id}
Delete a dataset along with all files and metadata associated with it.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- event_id: (string)
This query parameter is only relevant when an object store (such as swift) is being used. In this environment, if
event_id
is specified, an SSE will be generated when the object store completes its delete operation. The SSE will set theevent_id
to the value supplied with this query parameter.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Unexpected failure"
}
HTTP status code 404
The indicated dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Unknown dataset 'a48c3779-eb14-4697-a490-eeb0125196f4'"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Exports the contents of the dataset as a zip file stream.
get /datasets/{id}/export
Exports the contents of the dataset as a zip file stream.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/octet-stream
Type: object
HTTP status code 404
The indicated dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Unknown dataset 'a48c3779-eb14-4697-a490-eeb0125196f4'"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Perform action on the indicated dataset.
post /datasets/{id}/action
Perform action on the indicated dataset.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- action: required (string)
The
action
field identifies the action to be performed. Possible values arerename
-- renames the indicated datasetcalculate
-- returns the number of files in the the datasetmark_sample
-- marks the dataset as a sampleunmark_sample
-- removes the "sample" mark from the datasetclone
-- creates a new dataset by cloning the indicated datasetpreprocess
-- perform transformation on the dataset. Currently, the only supported transformation isdata_augmentation
. Note thatpreprocess
is a background operation. Progress can be monitored via the/event
endpoint.autolabel
-- performs an "autolabel" operation on the images in the dataset.
- data: (string)
This field only applies to the
rename
action and is required for that action. It identifies the new name for the dataset - event_id: (string)
This field only applies to the
clone
action and is optional for that action. If specified, SSE events will be generated. Theevent_id
in the SSE will be set to the string "clone_dataset
". - name: (string)
This field only applies to the
clone
action and is required for that action. It identifies the name for the dataset to be created. - detector: (string)
The
detector
property only applies to thepreprocess
action and is required for that action. It identifies the type of preprocessing to perform. Currently the only supported "detector" isdata_augmenation
. - parameters: (object)
The
parameters
property only applies to thepreprocess
action and is required for that action when performingdata_augmentation
preprocessing transformations. It identifies the set of augmentations to perform and the parameters for each of those augmentations that require parameters. The types of augmentations are- color -- manipulates color characteristics of the image
- crop -- performs random cropping of the image
- noise -- adds random noise to the new images
- rotation -- randomly rotates the image
- sharpness -- randomly increases the sharpness of the image
- flip_horizontal
- flip_vertical
- focus_blur -- randomly blurs the focus
- motion_blur -- randomly blurs motion
- dataset_name: (string)
This property is only relevant to the
preprocess
action and is required when performingdata_augmentation
. It identifies the name of the new dataset that will be created to hold the transformed images. Note that the original images will also be present in the new dataset. - id_list: (string)
This property is only relevant to the
preprocess
action. It identifies the set of files to be transformed. If not present, all files in the dataset will be transformed.
Examples:
rename:
{
"action": "rename",
"data": "New_dataset"
}
calculate:
{
"action": "calculate"
}
clone:
{
"action": "clone",
"event_id": "yes",
"name": "Dataset2"
}
preprocess:
{
"action": "preprocess",
"detector": "data_augmentation"
"parameters": {
"color": {
"brightness": 50,
"contrast": 50,
"hue": 20,
"saturation": 80,
"reps": 8
},
"crop": {
"max": 30,
"reps": 1
},
"noise": {
"max": 30,
"reps": 4
},
"rotation": {
"max": 150,
"reps": 5
},
"sharpness": {
"max": 30,
"reps": 2
},
"flip_horizontal": false,
"flip_vertical": true,
"focus_blur": {
"max": 30,
"reps": 3
},
"motion_blur": {
"max": 50,
"reps": 3
}
},
"dataset_name": "augmented dataset name",
"id_list": [ "file-id1", "file-id2", "file-id3" ]
}
HTTP status code 201
Body
Media type: application/json
Type: object
Examples:
rename_success:
{
"result": "success"
}
calculate_success:
{
"result": "success",
"size": 50
}
clone_success:
{
"result": "success",
"dataset_id": "a48c3779-eb14-4697-a490-eeb0125196f4" // the id of the cloned dataset
}
preprocess_success:
{
"result": "success",
"dataset_id": "a48c3779-eb14-4697-a490-eeb0125196f5" // the id of the preprocess generated dataset
}
HTTP status code 400
The requested action failed. The fault
field should have more information about the specific failure.
HTTP status code 404
The dataset id from the id
parameter could not be found.
HTTP status code 500
An unexpected error has occured. These are typically an exception and the fault
field will contain the exception message.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get action tags for the given dataset
Create action tag for a dataset
get /datasets/{id}/action-tags
Get action tags for the given dataset
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- sortby: (string)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "d7a0f470-2083-40e7-b849-9bce3940f37a",
"dataset_id": "9ac1ce8f-3493-4ef3-99cb-f890962606fc",
"name": "backhand",
"created_at": 1557277949160,
"label_count": 187
},
{
"_id": "40a35da0-2f93-48b9-8584-093bf2451974",
"dataset_id": "9ac1ce8f-3493-4ef3-99cb-f890962606fc",
"name": "forehand",
"created_at": 1557277949164,
"label_count": 229
}
]
HTTP status code 404
Could not find the dataset specified by the id
parameter
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Unknown dataset '5'"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /datasets/{id}/action-tags
Create action tag for a dataset
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- name: required (string)
Identifies the name of the tag (action) to create
Example:
{
name: "backhand"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success",
tag_id: "a48c3779-edef-4697-a490-eeb0125196f4"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '5' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete an action tag, but not the files associated with the tag.
delete /datasets/{id}/action-tags/{tag_id}
Delete an action tag, but not the files associated with the tag.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- tag_id: required (string)
HTTP status code 200
The indicated action tag was succesfully deleted
HTTP status code 404
Could not find the dataset specified by the id
parameter
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Could not find tag."
}
Secured by
Get categories of a dataset.
Create category for a dataset
get /datasets/{id}/categories
Get categories of a dataset.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- sortby: (string)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Example:
?sortyby=name DESC
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
array of dataset categories, refer to DB schema -> DataSetCategories
HTTP status code 404
The dataset id supplied in the id
path parameter could not be found.
HTTP status code 500
Unexpected problem with the database server. The fault
field should have more information at the issue.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /datasets/{id}/categories
Create category for a dataset
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- name: required (string)
The name of the new category
Example:
{
name: "myTestCategory"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success",
dataset_category_id: "a48c3779-edef-4697-a490-eeb0125196f4"
}
HTTP status code 400
General failure status. fault
field should have more specific information.
Body
Media type: application/json
Type: object
Example:
{
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete a dataset category, but not the files associated with it.
delete /datasets/{id}/categories/{category_id}
Delete a dataset category, but not the files associated with it.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- category_id: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
HTTP status code 404
The dataset identified by the id
path parameter could not be found.
Secured by
Perform action on a dataset category, The only supported actions are rename
, calculate
post /datasets/{id}/categories/{category_id}/action
Perform action on a dataset category, The only supported actions are rename
, calculate
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- category_id: required (string)
Body
Media type: application/json
Type: object
Properties- action: required (string)
Identifies the action to perform on the category. Supported actions are:
rename
-- change the name of the indicated categorycalculate
-- determine the number of files belonging to the category
- data: (string)
This property is only relevant to the
rename
operation. It is required forrename
. It identifies the new name for the category.
Examples:
rename:
{
action: "rename",
data: "New Category Name"
}
calculate:
{
action: "calculate"
}
Media type: properties
Type: object
Media type: examples
Type: object
HTTP status code 200
Body
Media type: application/json
Type: object
Examples:
rename:
{
result: "success"
}
calculate:
{
result: "success",
size: 50 // the file count of category
}
HTTP status code 400
Generic failure status. The fault
field should contain more information.
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get files of a dataset, optionally filtered by a query string. This query supports pagination via the limit
and skip
query parameters.
Upload one or more files to the dataset. Files maybe jpg, png, or mp4 video files. A zip file may be uploaded also, but any file that is not jpg, png, or mp4 will be ignored. If a category is supplied, the uploaded file(s) will be associated with the specified category.
get /datasets/{id}/files
Get files of a dataset, optionally filtered by a query string. This query supports pagination via the limit
and skip
query parameters.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- category_id: (string)
Filter the files returned such that only files in the given category are returned.
Example:
?category_id=8669b787-15b0-4731-be6c-a76dca76d466
- type: (string)
Can be used to get only
unlabeled
filesExample:
?type=unlabeled
- parent_id: (string)
optional parameter to limit files to those that have the given file ID as a parent. This query parameter can be used to get all frames capture/extracted from the indicated video file.
Example:
?parent_id=9059b787-15b0-4731-be6c-a76dca76d501
- sortby: (string)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Examples:
two field sort:
?sortby=original_file_name
descending sort:
?sortby=file_type DESC, original_file_name
- query: (string)
A string specifying "generic" query terms. Each query term is a tuple consisting of three items (field name, comparison operator, and value to compare). Each item must be separated by spaces. Multiple terms are allowed but must be separated by commas. Multiple terms are combined in an AND manner. There is currently no support for OR combination.
The field name can be any field in the File object. User metadata can be included by specifying
user_metadata.my-metadata-field-name
. The following comparison operators are supported.- == (equal)
- != (not equal)
- > (greater than)
- >= (greater than or equal)
- < (less than)
- <= (less than or equal)
String values must be enclosed in either single or double quotes.
If
query
is provided, other filter parameters are ignored.Examples:
single term query:
?query=user_metadata.quantity == 100
multi-term query:
?query=user_metadata.count == 6, user_metadata.type == 'lug nuts'
- limit: (integer)
optional parameter to limit the number of items to return
Example:
?limit=20 // limit the number of elements to return
- skip: (integer)
optional parameter to skip the number of items before including items in the return set
Example:
?skip=40 // skip 40 elements
HTTP status code 200
A Json list is returned. This list may be empty if no files matched the criteria.
Body
Media type: application/json
Type: object
Example:
array of dataset files, refer to DB schema -> DataSetFiles
HTTP status code 404
The dataset identified by the id
path parameter could not be found.
HTTP status code 500
Got an unexpected exception from the database server. The fault
field will contain additional information.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /datasets/{id}/files
Upload one or more files to the dataset. Files maybe jpg, png, or mp4 video files. A zip file may be uploaded also, but any file that is not jpg, png, or mp4 will be ignored. If a category is supplied, the uploaded file(s) will be associated with the specified category.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: multipart/form-data
Type: object
Properties- files: required (string)
File to be uploaded into the dataset. It is possible to upload multiple files in a single post operation.
- category_id: (string)
The UUID of the category with which the file is to be associated. This property is only relevant if the file is to be used in classification training
- category_name: (string)
The name of the category with which the file is to be associated. This parameter is only releveant if the file is to be used in classification training.
- labels: (object)
Optional labels to be saved with the uploaded file. The labels input is the same as the save-labels endpoint. Note that if labels are supplied, only 1 file can be uploaded.
- labels: required (array of object)
Items: items
- name: required (string)
Label name (aka tag name)
- confidence: (number)
If this label was generated by an inference, the confidence score from that inference
- generate_type: (one of manual, inferred)
How the label was generated. Default value is
manual
, but could beinferred
if the label was generated by an inference operation. - bndbox: required (object)
Bounding box for the label. Either the
bndbox
or thesegment_polygons
property is required. If both are provided,bndbox
is ignored. required: false- xmin: required (number - minimum: 0)
- ymin: required (number - minimum: 0)
- xmax: required (number - minimum: 0)
- ymax: required (number - minimum: 0)
- segment_polygons: (array)
segment_polygons
is a 3 dimensional array of points that represent the boundary of the object. The first dimension holds boundaries. It is an array to all for discontingous object identification which can happen when an object is occluded and essentially cut into pieces.The 2nd dimension contains arrays of points with each point array (the 3rd dimension) holding an 'x' and 'y' coordinate in that order.
- name: required (string)
- labels: required (array of object)
- user_metadata: (object)
Optional user metadata key/value pairs to be associated with the uploaded file. If multiple files are in the upload list, the metadata is applied to each file. However, metadata is not applied if the file is a zip file.
The input metadata is in the same format as described by the post to
datasets/{DSID}/files/{FILE_ID}/user-metadata
endpoint.
Examples:
example1:
// Post params
Content-Disposition: form-data;
[
name="files"; filename="flower5.jpg" Content-Type: image/jpeg => image binary data
name="category_id" => eg. "ef01b8b0-8d7b-4078-903d-6f1009b52998"
name="category_name" => eg. "Tree"
]
html_example:
<form enctype="multipart/form-data" action="{baseUri}/datasets/{id}/files" method="POST">
Choose jpg/png file to upload:
<input name="files" type="file" /><br />
<input name="category_id" type="text" value="ef01b8b0-8d7b-4078-903d-6f1009b52998" /><br />
<input name="category_name" type="text" value="Tree" /><br />
<input type="submit" value="Upload File" />
</form>
curl_example:
curl -i -X POST -H "Content-Type: multipart/form-data" -F "files=@mytemp.jpg" -F "category_id=ef01b8b0-8d7b-4078-903d-6f1009b52998 -F "category_name=Tree" baseURI/datasets/DS-UUID/files
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
single_success:
{
"result": "success"
"resultList": [
{
"source_filepath": "source/file/path",
"result": "success"
}
]
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
HTTP status code 422
One or more files failed to upload. Examine the fault
field in for each file result in the resultList
for more information.
Body
Media type: application/json
Type: object
Example:
single_failure:
{
"result": "fail",
"resultList": [
{
"source_filepath": "source/file/path",
"result": "fail",
"fault": "Cannot assign a video file to a category"
}
]
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Uploads a file into the given dataset using a file uploaded via the chunked upload service.
When using the large file (chunked upload) service, only the file can be uploaded. Supplemental metadata or label information cannot be included. As such, it is expected that this API will be used primarily to upload zip files.
post /datasets/{id}/files/upload/{upload_id}
Uploads a file into the given dataset using a file uploaded via the chunked upload service.
When using the large file (chunked upload) service, only the file can be uploaded. Supplemental metadata or label information cannot be included. As such, it is expected that this API will be used primarily to upload zip files.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- upload_id: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success",
dataset_id: "78ebc41e-fd8b-4d22-ac16-53805e1921c7"
}
HTTP status code 404
Either the dataset or the identified chunked upload tracker id could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "AIVVS1000E: Chunked upload operation with id acbb1e6-6efc-420b-bb82-7c5e0717d150 could not be found.",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
HTTP status code 422
The zip file could not be unzipped.
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "Invalid zip format"
}
Secured by
Perform an action on a group of files. All operations preformed on a file selection are performed through this endpoint.
Perform the indicated action. Possible action
values are...
- delete -- Delete the indicated set of files.
post /datasets/{id}/files/action
Perform the indicated action. Possible action
values are...
- delete -- Delete the indicated set of files.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- action: required (delete)
Indicates the action to be performed on this file. Possible actions are
delete
-- deletes the indicated set of files
- file_id_list: required (string)
The
file_id_list
is a list of file UUID strings. The list should not contain duplicate ids and must have at least one item in the list.
Example:
{
action: "delete",
file_id_list: [ "FileId1", "FileID2", "FileId3" ]
}
HTTP status code 200
A 200 response indicates that the request was processed and all files in the list successfully performed the requested action. The result of each file is included in the response
Body
Media type: application/json
Type: object
Example:
{
result: "success",
success_count: 2,
fail_count: 0,
result_list : [
{
dataset_id: "xyz",
file_id: "123",
result: "success"
},
{
dataset_id: "xyz",
file_id: "abc",
result: "success",
}
]
}
HTTP status code 400
At least one of the files failed the requested action. The result of each file operation is included in the result list.
Body
Media type: application/json
Type: object
Example:
{
result: "fail",
success_count: 1,
fail_count: 1,
result_list : [
{
dataset_id: "xyz",
file_id: "123",
result: "success"
},
{
dataset_id: "xyz",
file_id: "abc",
result: "fail",
}
]
}
HTTP status code 404
Indicates that the given dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Exports each files's user metadata key/value pairs in a Comma Separated Value format. A heading row is provided identifying the key to column mapping.Columns are ordered from oldest key on the left and newest on the right. Column order does not change unless a key is deleted.
Each row represents a single file's user metadata. Rows are ordered oldest file first and newest file last. Row order will not change unless a file is deleted.
String values are quoted while non-string values are not.
get /datasets/{id}/files/user-metadata
Exports each files's user metadata key/value pairs in a Comma Separated Value format. A heading row is provided identifying the key to column mapping.Columns are ordered from oldest key on the left and newest on the right. Column order does not change unless a key is deleted.
Each row represents a single file's user metadata. Rows are ordered oldest file first and newest file last. Row order will not change unless a file is deleted.
String values are quoted while non-string values are not.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
#file_id,EXIF_Version,EXIF_XResolution,EXIF_ThumbnailHeightPixels,EXIF_YResolution,station
e4b25810-f544-464b-88f3-79509e7217cf,"2.1.0","72 dots","0","72 dots","wheels"
77cdc93a-90b0-48c5-9571-2abba90d9dc7,"2.1.0","72 dots","0","72 dots",
9ceb062e-dcad-4dca-9e96-a1c7851a8367,"2.1.0","72 dots","0","72 dots",
907df4a0-f38c-4365-a352-0951faaf821d,"1.1","72 dots","0","72 dots",
857f0799-964d-4720-acfb-b293577dc0a4,"2.1.0","72 dots","0","72 dots",
e48df358-1b73-411a-9600-25e1d21f33cb,,,,,
HTTP status code 404
Indicates that the given dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete a dataset file
delete /datasets/{id}/files/{file_id}
Delete a dataset file
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Perform an action on the identified file. Possible actions are
autolabel
-- to automatically label frames from a videocapture
-- to capture one or more frames from a video
post /datasets/{id}/files/{file_id}/action
Perform an action on the identified file. Possible actions are
autolabel
-- to automatically label frames from a videocapture
-- to capture one or more frames from a video
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- action: (one of autolabel, capture, change_category ] required: true description: | Indicates the action to be performed on this file Possible actions are... - `autolabel` -- indicates that automatic labeling should be applied to the indicated video file. The user must provide the ID for the model with which to label. It is the users responsibility to train the model before attempting to auto-label. - `capture` -- indicates that a frame should be capture from the indicated video file. The `capture` action is only valid on video files. - `change_category` -- changes the category to which a file is assigned. method: enum: [ , anual", auto)
related to
capture
action to indicate the type of capture to perform. This property is required for thecapture
action. - model_id: (string)
related to the
autolabel
action. This property identifies the model to be used when performing the auto-label action. This property is required for theautolabel
action. - target_category_id: (string)
This property only applies to the
change_category
action and is required if that action is requested. The UUID of the category to change to is the parameter for this property. - time_interval: (integer)
relevant to the
autolabel
action and thecapture
action when themethod
is "auto". This property identifies the interval (in whole milliseconds) at which frames should be captured.
This property is required for theautolabel
action. - time_offset: (integer)
relevant only to the
capture
action to identify the time offset (in whole milliseconds) from the beginning of the video at which to capture a single frame.
This property is required for thecapture
action.
Examples:
autolabel_example:
{
action: "autolabel",,
time_interval: "5000",
model_id: "UUID_of_deployed_model"
}
manual_capture_example:
{
action: "capture",
time_offset : 1000,
method: "manual",
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
capture_action:
null
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
"fault": "reason for failure"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get action labels of the indicated dataset file
Create a single new action label. Note that this endpoint operates differently than labels
endpoint. It only creates a single new action label and it cannot be use to modify an exising action label (use the PUT
operation on a specific action label for that purpose)
get /datasets/{id}/files/{file_id}/action-labels
Get action labels of the indicated dataset file
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The body is an array of label objects. The array will be empty if there are no labels associated with the indicated file.
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "4dff86b4-37c5-4f27-aee2-7c169d023840",
"dataset_id": "9ac1ce8f-3493-4ef3-99cb-f890962606fc",
"file_id": "ba73901f-d22b-4571-b8de-f3931e1ce607",
"tag_id": "d7a0f470-2083-40e7-b849-9bce3940f37a",
"tag_name": "backhand",
"start_time": 1101060,
"end_time": 1101625,
"created_at": 1557334595700
},
{
"_id": "b7eb3e92-d5ad-4531-9e93-768d7aa92ff1",
"dataset_id": "9ac1ce8f-3493-4ef3-99cb-f890962606fc",
"file_id": "ba73901f-d22b-4571-b8de-f3931e1ce607",
"tag_id": "40a35da0-2f93-48b9-8584-093bf2451974",
"tag_name": "forehand",
"start_time": 1099970,
"end_time": 1100756,
"created_at": 1557334575899
}
]
HTTP status code 404
The dataset identified by the id
parameter could not be found.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /datasets/{id}/files/{file_id}/action-labels
Create a single new action label. Note that this endpoint operates differently than labels
endpoint. It only creates a single new action label and it cannot be use to modify an exising action label (use the PUT
operation on a specific action label for that purpose)
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- name: required (string)
Identifies the name of the action tag to which the label belongs.
- tag_id: required (string)
ID of the tag identified by the
name
property. - start_time: required (integer)
The time offset into the file at which the action starts. The offset is in whole milliseconds
- end_time: required (integer)
The time offset into the file at which the action ends. The offset is in whole milliseconds
Example:
{
"name": "backhand",
"tag_id": "40a35da0-2f93-48b9-8584-093bf2451974",
"start_time": 9010,
"end_time": 9527
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
"label_id": "84c42338-c65f-45ae-b48b-078d929b8251"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete the indicated action label
Updates/modifies an existing action label. Multiple modifications can be made in a single operation. Any unchanging properties/fields can be omitted from the input json object.
delete /datasets/{id}/files/{file_id}/action-labels/{label_id}
Delete the indicated action label
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- label_id: required (string)
Action Label UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
HTTP status code 404
Could not find a prerequisite resource (e.g. dataset, file, or action tag)
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id 'dsid' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
put /datasets/{id}/files/{file_id}/action-labels/{label_id}
Updates/modifies an existing action label. Multiple modifications can be made in a single operation. Any unchanging properties/fields can be omitted from the input json object.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- label_id: required (string)
Action Label UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- name: (string)
Identifies the name of the action tag to which the label should be changed.
- start_time: (integer)
The time offset into the file at which the action starts. The offset is in whole milliseconds
- end_time: (integer)
The time offset into the file at which the action ends. The offset is in whole milliseconds
Examples:
change_tag_association:
{
"name": "backhand"
}
change_times:
{
"start_time": 11010,
"end_time": 11527
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
HTTP status code 404
Could not find a prerequisite resource (e.g. dataset, file, or action tag)
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id 'dsid' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Downloads a file from a dataset as a byte stream.
get /datasets/{id}/files/{file_id}/download
Downloads a file from a dataset as a byte stream.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The file is streamed and must be saved by the caller.
HTTP status code 404
Given file ID
is not valid
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Downloads a file from a dataset as mime data in the response.
get /datasets/{id}/files/{file_id}/mime-download
Downloads a file from a dataset as mime data in the response.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The dataset file is included in the response body as mime data.
HTTP status code 404
Given file ID
is not valid
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
This endpoint has been deprecated as of release 1.1.5. You should use GET /datasets/{dsid}/files/{fid}/object-labels
instead (or GET /datasets/{dsid}/object-labels
if labels are needed across all files in the dataset). The new interface facilitates manipulating labels individually (similar to "action-labels" instead of having to work with the entire set of labels associated with a file.
This endpoint now returns label objects that support individual manipulation.
Saves a group of labels to the given file. This endpoint is similar to POST /datasets/{dsid}/files/{fid}/object-labels
except that this endpoint will create tags
if the label name does not exist as a tag. Generally speaking, it is safer to use the afore mentioned endpoint.
get /datasets/{id}/files/{file_id}/labels
This endpoint has been deprecated as of release 1.1.5. You should use GET /datasets/{dsid}/files/{fid}/object-labels
instead (or GET /datasets/{dsid}/object-labels
if labels are needed across all files in the dataset). The new interface facilitates manipulating labels individually (similar to "action-labels" instead of having to work with the entire set of labels associated with a file.
This endpoint now returns label objects that support individual manipulation.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The body is an array of label objects. The array will be empty if there are no labels associated with the indicated file.
Body
Media type: application/json
Type: object
Example:
refer to DB schema -> DataSetFileLabels
HTTP status code 404
The dataset identified by the id
parameter could not be found.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /datasets/{id}/files/{file_id}/labels
Saves a group of labels to the given file. This endpoint is similar to POST /datasets/{dsid}/files/{fid}/object-labels
except that this endpoint will create tags
if the label name does not exist as a tag. Generally speaking, it is safer to use the afore mentioned endpoint.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- name: required (string)
Identifies the name of the tag (class) to which the label belongs
- bndbox: required (object)
Identifies the upper left and lower right corners of the label's bounding box.
- xmin: required (integer)
Upper left corner 'x' coordinate
- ymin: required (integer)
Upper left corner 'y' coordinate
- xmax: required (integer)
Lower right corner 'x' coordinate
- ymax: required (integer)
Lower right corner 'y' coordinate
- xmin: required (integer)
- segment_polygons: (list)
segment_polygons
is a 3 dimensional array of points that represent the boundary of the object. The first dimension holds boundaries. It is an array to all for discontingous object identification which can happen when an object is occluded and essentially cut into pieces.The 2nd dimension contains arrays of points with each point array (the 3rd dimension) holding an 'x' and 'y' coordinate in that order.
Example:
[
{
"name": "badge",
"bndbox": {
"xmin": 999,
"ymin": 2009,
"xmax": 1452,
"ymax": 2522
},
"segment_polygons": [
[
[ 1225, 2009 ],
[ 1452, 2265 ],
[ 1225, 2522 ],
[ 999, 2265 ]
]
]
},
{
"name": "cap",
"bndbox": {
"xmin": 3112,
"ymin": 1226,
"xmax": 3542,
"ymax": 1766
}
}
]
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Downloads the thumbnail for a file from a dataset as a byte stream.
get /datasets/{id}/files/{file_id}/thumbnail/download
Downloads the thumbnail for a file from a dataset as a byte stream.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The file is streamed and must be saved by the caller.
HTTP status code 404
Given file ID
is not valid
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Downloads a file's thumbnail as mime data in the response.
get /datasets/{id}/files/{file_id}/thumbnail/mime-download
Downloads a file's thumbnail as mime data in the response.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The thumbnail image is included in the response body as mime data.
HTTP status code 404
Given file ID
is not valid
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Adds, or updates, user metadata key/value pairs associated with the given file. The body is application/json containing keys and values. If a key does not have a corresponding User Key object, one will be created. In either case, each of the given key's use_count
property is updated.
If a key/value pair is already associated with the file for a key in the input json, the value of the existing pair will be updated in the file. If multiple instances of a key are given in a single call, the last value in the json object will be used as the value.
Gets the user key/value metadata associated with the given file. All key/value pairs are returned.
Deletes 1 or more listed key/value pairs from the given file. Key/value pairs are identified by the key name.
post /datasets/{id}/files/{file_id}/user-metadata
Adds, or updates, user metadata key/value pairs associated with the given file. The body is application/json containing keys and values. If a key does not have a corresponding User Key object, one will be created. In either case, each of the given key's use_count
property is updated.
If a key/value pair is already associated with the file for a key in the input json, the value of the existing pair will be updated in the file. If multiple instances of a key are given in a single call, the last value in the json object will be used as the value.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Example:
{
“location”: “final axle assembly”,
“shift": “first”
}
HTTP status code 200
All key/value pairs supplied on input were successfully added to the file are returned in the user_metadata
property.
Body
Media type: application/json
Type: object
Example:
{
“user_metadata”: {
“location”: “final axle assembly”,
“shift”: “first”
}
}
HTTP status code 400
One or more (possibly all) of the key/value pairs failed to be added due to problems in the input data. The fail_list
identifies which pairs failed to be added and why it failed. The user_metadata
property identifies key/value pairs that were successfully added.
Body
Media type: application/json
Type: object
Example:
{
“user_metadata”: {
“location”: “final axle assembly”
},
“fail_list”: [
{
“key”: “shift/name”,
“value”: “first”,
“exception”: {
"status": "BAD_REQUEST",
"fault": "Illegal characters in key name",
"more_info": null,
"type": "VInvalidInputException",
"result": "fail"
}
}
]
}
HTTP status code 404
Indicates that either the indicated dataset or file could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find file with id 123.",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
get /datasets/{id}/files/{file_id}/user-metadata
Gets the user key/value metadata associated with the given file. All key/value pairs are returned.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"EXIF_Version": "1.1",
"station": "door inspection"
}
HTTP status code 404
Indicates that either the indicated dataset or the indicated file could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find file with id BAD-FILE",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /datasets/{id}/files/{file_id}/user-metadata
Deletes 1 or more listed key/value pairs from the given file. Key/value pairs are identified by the key name.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: array of string
Example:
[
"key-name",
"another key to delete"
]
HTTP status code 200
The deleted key names are returned in a list. Keys that were not found are assumed to be already deleted and left out of the list. This approach can result in an empty array being returned.
Body
Media type: application/json
Type: object
Examples:
keys deleted:
[
"EXIF_Version",
"EXIF_ThumbnailHeightPixels"
]
key not found:
[]
HTTP status code 404
Indicates that either the indicated dataset or the indicated file could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find file with id BAD-FILE",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Creates a single object-label. The indicated tag (class) must already exist.
Gets objects labels assocated with the given file in the given dataset.
Object-labels facilitate individual manipulation of each label in a manner similar to "action-labels". endpoint.
Deletes one or more object-labels associated with the given file and dataset that match the criteria specified via Query Parameters.
post /datasets/{id}/files/{file_id}/object-labels
Creates a single object-label. The indicated tag (class) must already exist.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- tag_id: required (string)
Identifies the name of the tag (class) to which the label belongs. This tag (class) must already exist.
- generate_type: (one of manual, auto, suggested, inferred)
Optional information about how the label was created. If not specified, the default is
manual
. - confidence: (number)
Optional confidence that the label is correct. Range is 0.0 to 1.0.
Example:
0.85
- model_id: (string)
UUID of the model that generated the label. Irrelevant for
manual
labels. - bndbox: required (object)
Identifies the upper left and lower right corners of the label's bounding box.
- xmin: required (integer)
Upper left corner 'x' coordinate
- ymin: required (integer)
Upper left corner 'y' coordinate
- xmax: required (integer)
Lower right corner 'x' coordinate
- ymax: required (integer)
Lower right corner 'y' coordinate
- xmin: required (integer)
- segment_polygons: (list)
segment_polygons
is a 3 dimensional array of points that represent the boundary of the object. The first dimension holds boundaries. It is an array to all for discontingous object identification which can happen when an object is occluded and essentially cut into pieces.The 2nd dimension contains arrays of points with each point array (the 3rd dimension) holding an 'x' and 'y' coordinate in that order.
NOTE: if
segment_polygons
is present, thebndbox
property is ignored and the bounding box information is calculated from the contents of this property.
Examples:
minimal_bbox_example:
{
"tag_id": UUID-OF_TAG,
"bndbox": {
"xmin": 999,
"ymin": 2009,
"xmax": 1452,
"ymax": 2522
}
}
minimal_segmentation_example:
{
"tag_id": UUID-OF_TAG,
"segment_polygons": [
[
[ 1225, 2009 ],
[ 1452, 2265 ],
[ 1225, 2522 ],
[ 999, 2265 ]
]
]
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"result": "success",
"id": "d9d4fdd8-676f-4753-9cab-38f710f06f71",
"dataset_id": "1738119b-d2b0-4d67-a05e-1835f09fd527",
"file_id": "7acec6ea-3058-4434-8b16-0baee01bed91",
"tag_id": "1738119b-d2b0-4d67-a05e-1835f09fd527-dog",
"name": "dog"
}
HTTP status code 400
Part of the input data is in valid
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "No 'bndbox' or 'segment_polygons' in request",
"more_info": {
"tag_id": "1738119b-d2b0-4d67-a05e-1835f09fd527-dog",
"model_id": "bcarl on mbp; 3",
"confidence": 0.89,
"generate_type": "suggested"
},
"type": "VInvalidInputException",
"result": "fail"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find file with id BAD_FILE",
"more_info": "{\"tag_id\": \"1738119b-d2b0-4d67-a05e-1835f09fd527-dog\", \"model_id\": \"bcarl on mbp; 3\", \"confidence\": 0.89, \"generate_type\": \"suggested\"}",
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
get /datasets/{id}/files/{file_id}/object-labels
Gets objects labels assocated with the given file in the given dataset.
Object-labels facilitate individual manipulation of each label in a manner similar to "action-labels". endpoint.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- ids: (string)
A comma separated list of tags UUIDs whose labels are to be retrieved
Example:
?ids=45123c471-15b0-4731-be6c-a76dca76d466,62ab4714-15b0-4731-be6c-a76dca76d420
- tag_ids: (string)
A comma separated list of object UUIDs to retrieve
Example:
?tag_ids=8669b787-15b0-4731-be6c-a76dca76d466,9769b787-15b0-4731-be6c-a76dca76d420
- model_id: (string)
UUID of the model that was used to generate the labels to be retrieved.
Example:
?model_id=tag_ids=a146cdb0-15b0-4731-be6c-a76dca76d424
- generate_type: (string)
The type of method used to create the labels. Possible values are
- manual -- entered by hand, or manually approved auto-label
- auto -- generated by an auto-label process
Example:
?generate_type=auto
- min_conf: (string)
The minimum confidence level of labels to be returned. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?min-conf=0.75
- max_conf: (string)
The maximum confidence level of labels to be returned. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?max-conf=0.49
- limit: (integer)
optional parameter to limit the number of items to return
Example:
?limit=20
- skip: (integer)
optional parameter to skip the number of items before including items in the return set
Example:
?skip=40
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "c6a2af01-72e7-4021-826d-241b423a1c2f",
"name": "safe",
"bndbox": {
"xmin": 0,
"ymin": 334,
"xmax": 1049,
"ymax": 520
},
"generate_type": "manual",
"dataset_id": "80895888-1fec-4941-a34f-8346872b9091",
"file_id": "a283b056-f5e3-43b2-a964-5ab1dde5bc45",
"tag_id": "80895888-1fec-4941-a34f-8346872b9091-safe"
}
]
HTTP status code 404
Either the given dataset or the given file could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find file with id BAD-FILE",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /datasets/{id}/files/{file_id}/object-labels
Deletes one or more object-labels associated with the given file and dataset that match the criteria specified via Query Parameters.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- ids: (string)
A comma separated list of tags UUIDs whose labels are to be deleted
Example:
?ids=45123c471-15b0-4731-be6c-a76dca76d466,62ab4714-15b0-4731-be6c-a76dca76d420
- tag_ids: (string)
A comma separated list of object UUIDs to delete
Example:
?tag_ids=8669b787-15b0-4731-be6c-a76dca76d466,9769b787-15b0-4731-be6c-a76dca76d420
- model_id: (string)
UUID of the model that was used to generate the labels to be deleted.
Example:
?model_id=tag_ids=a146cdb0-15b0-4731-be6c-a76dca76d424
- generate_type: (string)
The type of method used to create the labels. Possible values are
- manual -- entered by hand, or manually approved auto-label
- auto -- generated by an auto-label process
Example:
?generate_type=auto
- manual -- entered by hand, or manually approved auto-label
- min_conf: (string)
The minimum confidence level of labels to be deleted. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?min-conf=0.75
- max_conf: (string)
The maximum confidence level of labels to be deleted. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?max-conf=0.49
HTTP status code 200
The set of object-labels matching the criteria are returned to indicate which labels were deleted.
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "c6a2af01-72e7-4021-826d-241b423a1c2f",
"name": "safe",
"bndbox": {
"xmin": 0,
"ymin": 334,
"xmax": 1049,
"ymax": 520
},
"generate_type": "manual",
"dataset_id": "80895888-1fec-4941-a34f-8346872b9091",
"file_id": "a283b056-f5e3-43b2-a964-5ab1dde5bc45",
"tag_id": "80895888-1fec-4941-a34f-8346872b9091-safe"
}
]
HTTP status code 404
The dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Copies one or more files between datasets.
post /datasets/{id}/files/{file_id}/copy
Copies one or more files between datasets.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- target_dataset_id: required (string)
UUID of the destination dataset
- files: required (array of string)
Array of file UUIDs to copy
Example:
{
"target_dataset_id": "123",
"files": [
"e48df358-1b73-411a-9600-25e1d21f33cb"
]
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"success_count": 1,
"fail_count": 0,
"result_list": [
{
"original_file_id": "9725a8d5-5633-4f92-824c-65c0d74aa2d0",
"new_file_id": "d837a93c-4540-4158-8a00-12b4ae0ce383"
}
]
}
HTTP status code 404
One of the provided ids could not be found
Body
Media type: application/json
Type: object
Example:
{
"success_count": 0,
"fail_count": 1,
"result_list": [
{
"original_file_id": "e48df358-1b73-411a-9600-25e1d21f33cb",
"exception": {
"status": "NOT_FOUND",
"fault": "Could not find file id 'e48df358-1b73-411a-9600-25e1d21f33cb'",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
}
]
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Moves one or more files between datasets. This endpoint functions just Like the copy
endpoint except that the file is removed from the original dataset.
post /datasets/{id}/files/{file_id}/move
Moves one or more files between datasets. This endpoint functions just Like the copy
endpoint except that the file is removed from the original dataset.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- file_id: required (string)
Dataset File UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- target_dataset_id: required (string)
UUID of the destination dataset
- files: required (array of string)
Array of file UUIDs to copy
Example:
{
"target_dataset_id": "123",
"files": [
"e48df358-1b73-411a-9600-25e1d21f33cb"
]
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"success_count": 1,
"fail_count": 0,
"result_list": [
{
"original_file_id": "9725a8d5-5633-4f92-824c-65c0d74aa2d0",
"new_file_id": "d837a93c-4540-4158-8a00-12b4ae0ce383"
}
]
}
HTTP status code 404
One of the provided ids could not be found
Body
Media type: application/json
Type: object
Example:
{
"success_count": 0,
"fail_count": 1,
"result_list": [
{
"original_file_id": "e48df358-1b73-411a-9600-25e1d21f33cb",
"exception": {
"status": "NOT_FOUND",
"fault": "Could not find file id 'e48df358-1b73-411a-9600-25e1d21f33cb'",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
}
]
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Gets objects labels for all files in the given datasets.
Object-labels facilitate individual manipulation of each label in a manner similar to "action-labels".
Deletes one or more object-labels that match the criteria specified via Query Parameters.
get /datasets/{id}/object-labels
Gets objects labels for all files in the given datasets.
Object-labels facilitate individual manipulation of each label in a manner similar to "action-labels".
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- ids: (string)
A comma separated list of tags UUIDs whose labels are to be retrieved
Example:
?ids=45123c471-15b0-4731-be6c-a76dca76d466,62ab4714-15b0-4731-be6c-a76dca76d420
- tag_ids: (string)
A comma separated list of object UUIDs to retrieve
Example:
?tag_ids=8669b787-15b0-4731-be6c-a76dca76d466,9769b787-15b0-4731-be6c-a76dca76d420
- file_ids: (string)
A comma separated list of file UUIDs whose object labels are to be retrieved
Example:
?tag_ids=12345678-15b0-4731-be6c-a76dca76d466,abcdef05-15b0-4731-be6c-a76dca76d420
- model_id: (string)
UUID of the model that was used to generate the labels to be retrieved.
Example:
?model_id=tag_ids=a146cdb0-15b0-4731-be6c-a76dca76d424
- generate_type: (string)
The type of method used to create the labels. Possible values are
- manual -- entered by hand, or manually approved auto-label
- auto -- generated by an auto-label process
Example:
?generate_type=auto
- min_conf: (string)
The minimum confidence level of labels to be returned. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?min-conf=0.75
- max_conf: (string)
The maximum confidence level of labels to be returned. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?max-conf=0.49
- limit: (integer)
optional parameter to limit the number of items to return
Example:
?limit=20
- skip: (integer)
optional parameter to skip the number of items before including items in the return set
Example:
?skip=40
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "c6a2af01-72e7-4021-826d-241b423a1c2f",
"name": "safe",
"bndbox": {
"xmin": 0,
"ymin": 334,
"xmax": 1049,
"ymax": 520
},
"generate_type": "manual",
"dataset_id": "80895888-1fec-4941-a34f-8346872b9091",
"file_id": "a283b056-f5e3-43b2-a964-5ab1dde5bc45",
"tag_id": "80895888-1fec-4941-a34f-8346872b9091-safe"
}
]
HTTP status code 404
The dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /datasets/{id}/object-labels
Deletes one or more object-labels that match the criteria specified via Query Parameters.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- ids: (string)
A comma separated list of tags UUIDs whose labels are to be deleted
Example:
?ids=45123c471-15b0-4731-be6c-a76dca76d466,62ab4714-15b0-4731-be6c-a76dca76d420
- tag_ids: (string)
A comma separated list of object UUIDs to delete
Example:
?tag_ids=8669b787-15b0-4731-be6c-a76dca76d466,9769b787-15b0-4731-be6c-a76dca76d420
- file_ids: (string)
A comma separated list of file UUIDs whose object labels are to be deleted
Example:
?tag_ids=12345678-15b0-4731-be6c-a76dca76d466,abcdef05-15b0-4731-be6c-a76dca76d420
- model_id: (string)
UUID of the model that was used to generate the labels to be deleted.
Example:
?model_id=tag_ids=a146cdb0-15b0-4731-be6c-a76dca76d424
- generate_type: (string)
The type of method used to create the labels. Possible values are
- manual -- entered by hand, or manually approved auto-label
- auto -- generated by an auto-label process
Example:
?generate_type=auto
- manual -- entered by hand, or manually approved auto-label
- min_conf: (string)
The minimum confidence level of labels to be deleted. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?min-conf=0.75
- max_conf: (string)
The maximum confidence level of labels to be deleted. This filter only applies to labels that were generated by an auto-label operation. Value can range from 0.1 to 1.0.
Example:
?max-conf=0.49
HTTP status code 200
The set of object-labels matching the criteria are returned to indicate which labels were deleted.
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "c6a2af01-72e7-4021-826d-241b423a1c2f",
"name": "safe",
"bndbox": {
"xmin": 0,
"ymin": 334,
"xmax": 1049,
"ymax": 520
},
"generate_type": "manual",
"dataset_id": "80895888-1fec-4941-a34f-8346872b9091",
"file_id": "a283b056-f5e3-43b2-a964-5ab1dde5bc45",
"tag_id": "80895888-1fec-4941-a34f-8346872b9091-safe"
}
]
HTTP status code 404
The dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get detail information about a specific object label
Deletes a specific object label
Modifies properties in a specific Object label.
Multiple properties can be modified in a single API call.
get /datasets/{id}/object-labels/{label_id}
Get detail information about a specific object label
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- label_id: required (string)
Object Label UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "c6a2af01-72e7-4021-826d-241b423a1c2f",
"name": "safe",
"bndbox": {
"xmin": 0,
"ymin": 334,
"xmax": 1049,
"ymax": 520
},
"generate_type": "manual",
"dataset_id": "80895888-1fec-4941-a34f-8346872b9091",
"file_id": "a283b056-f5e3-43b2-a964-5ab1dde5bc45",
"tag_id": "80895888-1fec-4941-a34f-8346872b9091-safe"
}
HTTP status code 404
The dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /datasets/{id}/object-labels/{label_id}
Deletes a specific object label
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- label_id: required (string)
Object Label UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The deleted label is included in the response in JSON format.
Body
Media type: application/json
Type: object
Example:
{
"_id": "c6a2af01-72e7-4021-826d-241b423a1c2f",
"name": "safe",
"bndbox": {
"xmin": 0,
"ymin": 334,
"xmax": 1049,
"ymax": 520
},
"generate_type": "manual",
"dataset_id": "80895888-1fec-4941-a34f-8346872b9091",
"file_id": "a283b056-f5e3-43b2-a964-5ab1dde5bc45",
"tag_id": "80895888-1fec-4941-a34f-8346872b9091-safe"
}
HTTP status code 404
The dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
put /datasets/{id}/object-labels/{label_id}
Modifies properties in a specific Object label.
Multiple properties can be modified in a single API call.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- label_id: required (string)
Object Label UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- tag_id: (string)
Identifies the UUID of the tag (class) to which the label should belong.
- generate_type: (one of manual, auto, suggested)
Changes the
generate_type
of the label. - confidence: (number)
Changes the
confidence
property of the label. Confidance values range from 0.0 to 1.0.Example:
0.85
- model_id: (string)
Changes the
mode_id
of the label. - bndbox: (object)
Changes the bounding box for the label.
NOTE that the
bndbox
will be ignored if the object label contains asegment_polygons
property. In this case, the bounding box values are calculated from thesegment_polygons
value.- xmin: required (integer)
Upper left corner 'x' coordinate
- ymin: required (integer)
Upper left corner 'y' coordinate
- xmax: required (integer)
Lower right corner 'x' coordinate
- ymax: required (integer)
Lower right corner 'y' coordinate
- xmin: required (integer)
- segment_polygons: (list)
Changes the polygon information for the label. All points in the polygon must be provided when changing the polygon information.
segment_polygons
is a 3 dimensional array of points that represent the boundary of the object. The first dimension holds boundaries. It is an array to all for discontingous object identification which can happen when an object is occluded and essentially cut into pieces.The 2nd dimension contains arrays of points with each point array (the 3rd dimension) holding an 'x' and 'y' coordinate in that order.
NOTE: if
segment_polygons
is present, thebndbox
property is ignored and the bounding box information is calculated from the contents of this property.
Examples:
change_tag_example:
{
"tag_id": UUID-OF_TAG
}
change_polygon_example:
{
"segment_polygons": [
[
[ 1225, 2009 ],
[ 1452, 2265 ],
[ 1225, 2522 ],
[ 999, 2265 ]
]
]
}
change_polygon_and_gentype_example:
{
"generate_type": "manual"
"segment_polygons": [
[
[ 1225, 2009 ],
[ 1452, 2265 ],
[ 1225, 2522 ],
[ 999, 2265 ]
]
]
}
HTTP status code 200
The entire new label contents are returned in JSON format
Body
Media type: application/json
Type: object
Example:
{
"_id": "c6a2af01-72e7-4021-826d-241b423a1c2f",
"name": "safe",
"bndbox": {
"xmin": 0,
"ymin": 334,
"xmax": 1049,
"ymax": 520
},
"generate_type": "manual",
"dataset_id": "80895888-1fec-4941-a34f-8346872b9091",
"file_id": "a283b056-f5e3-43b2-a964-5ab1dde5bc45",
"tag_id": "80895888-1fec-4941-a34f-8346872b9091-safe"
}
HTTP status code 404
The dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id '123' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get tags of a dataset
Create tag for a dataset
get /datasets/{id}/tags
Get tags of a dataset
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Query Parameters
- sortby: (string)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
array of dataset tags, refer to DB schema -> DataSetTags
HTTP status code 404
Could not find the dataset specified by the id
parameter
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /datasets/{id}/tags
Create tag for a dataset
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- name: required (string)
Identifies the name of the tag (class) to create
Example:
{
name: "elephant"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success",
dataset_tag_id: "a48c3779-edef-4697-a490-eeb0125196f4"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete a tag (class), but not the files associated with the tag.
delete /datasets/{id}/tags/{tag_id}
Delete a tag (class), but not the files associated with the tag.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- tag_id: required (string)
Object Tag UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
result: "fail"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Perform action on a dataset tag. Currently, the only supported action is rename
post /datasets/{id}/tags/{tag_id}/action
Perform action on a dataset tag. Currently, the only supported action is rename
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- tag_id: required (string)
Object Tag UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- action: required (string)
Identifies the action to peform. Possible actions are
- rename - Change the name of the tag.
- data: (string)
The
data
property only applies to therename
action and is required for that action. It identifies the new name for the tag.
Example:
{
action: "rename",
data: "new_name"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
"result": "fail"
}
HTTP status code 404
Could not find the dataset specified by the id
parameter
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Downloads thumbnail file as a byte stream for a dataset.
get /datasets/{id}/thumbnail/download
Downloads thumbnail file as a byte stream for a dataset.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The file is streamed and must be saved by the caller.
HTTP status code 404
Given Dataset is not valid.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Downloads a dataset's thumbnail as mime data in the response.
get /datasets/{id}/thumbnail/mime-download
Downloads a dataset's thumbnail as mime data in the response.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The thumbnail image is included in the response body as mime data.
HTTP status code 404
Given file ID
is not valid
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Creates a new User Key object in the identified dataset.
Gets the entire set of User Keys for the identified dataset.
post /datasets/{id}/user-keys
Creates a new User Key object in the identified dataset.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Properties- name: required (string - minLength: 1 - maxLength: 64)
Name of the new user key.
- description: (string - minLength: 1 - maxLength: 128)
Optional description of the key (purpose, value format, etc).
Example:
{
"name": "new key",
"description": "description of the purpose of this key"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73:new key",
"name": "new key",
"description": "description of the purpose of this key"
"dataset_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73",
"use_count": 0,
"created_at": 1589985326694
}
HTTP status code 400
Indicates that input parameters are invalid.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Name contains invalid character(s).",
"more_info": "bad.name",
"type": "VInvalidInputException",
"result": "fail"
}
HTTP status code 404
Indicates that the identified dataset could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id 'bad-id' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
get /datasets/{id}/user-keys
Gets the entire set of User Keys for the identified dataset.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73:new key",
"name": "new key",
"dataset_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73",
"use_count": 0,
"created_at": 1589985326694
},
{
"_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73:station",
"name": "station",
"dataset_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73",
"use_count": 1,
"created_at": 1589913927739
}
]
HTTP status code 404
Indicates that the identified dataset could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id 'bad-id' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Gets the indicated user key object.
Deletes the named user key. Deleting a key also removes all key/value pairs with the same key name from all files in the dataset.
Updates the specified user key in the given dataset.
The name of the user key and the description can be modified. Only the properties being changed need be included in the body of the request.
If the name of the key is changed, all references to the old name in file user metadata key/value pairs are also updated.
get /datasets/{id}/user-keys/{key_name}
Gets the indicated user key object.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- key_name: required (string)
The name of the target key.
Example:
key-Name
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73:station",
"name": "station",
"dataset_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73",
"use_count": 1,
"created_at": 1589913927739
}
HTTP status code 404
Either the indicated dataset or the named key would not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find key with name 'missing key'",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /datasets/{id}/user-keys/{key_name}
Deletes the named user key. Deleting a key also removes all key/value pairs with the same key name from all files in the dataset.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- key_name: required (string)
The name of the target key.
Example:
key-Name
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73:new key",
"name": "new key",
"dataset_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73",
"use_count": 0,
"created_at": 1589984792772
}
HTTP status code 404
Either the indicated dataset or the named key would not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find key with name 'missing key'",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
put /datasets/{id}/user-keys/{key_name}
Updates the specified user key in the given dataset.
The name of the user key and the description can be modified. Only the properties being changed need be included in the body of the request.
If the name of the key is changed, all references to the old name in file user metadata key/value pairs are also updated.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- key_name: required (string)
The name of the target key.
Example:
key-Name
Body
Media type: application/json
Type: object
Properties- name: (string - minLength: 1 - maxLength: 64)
New name of the user key.
- description: (string - minLength: 1 - maxLength: 128)
New description of the user key.
Examples:
name change example:
{
"name": "changed key name"
}
both change example:
{
"name": "changed key name",
"description": "changed description"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73:new key",
"name": "changed key name",
"dataset_id": "0f584c90-adcb-4ab2-92d7-a9384cc18d73",
"use_count": 0,
"created_at": 1589985326694
"description": "changed description"
}
HTTP status code 400
Indicates that input parameters are invalid.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Name contains invalid character(s).",
"more_info": "bad.name",
"type": "VInvalidInputException",
"result": "fail"
}
HTTP status code 404
Indicates that the identified dataset could not be found.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find dataset id 'bad-id' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Deployed Models (WebAPIs)
APIs for managing deployed models
Get all web APIs belonging to the user associated with provided token(from header "X-Auth-Token").
Deploy a trained model (also known as a web API)
get /webapis
Get all web APIs belonging to the user associated with provided token(from header "X-Auth-Token").
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- sortby: (String)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Examples:
two field sort:
?sortby=name
descending sort:
?sortby=usage DESC, name
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "f52aca2c-e7be-40dc-a1e8-3336a0396f67",
"accel_type": "GPU",
"accuracy": "0.8381046396841066",
"categories": [
{
"category_id": "678b5bd8-8458-440a-bd85-3497d740e206-bottle",
"category_name": "bottle"
}
],
"container_id": "d50d0d35-92be-490d-baf8-3fe74d5a1e4a",
"created_at": 1574175315805,
"dataset_id": "678b5bd8-8458-440a-bd85-3497d740e206",
"dnnscript_id": null,
"embimg_id": null,
"group_id": 5,
"name": "COCO_30K_FR-CNN",
"nn_arch": "frcnn",
"owner": "admin",
"replicas": 1,
"save_inference": null,
"shareable_container": "yes",
"status": "ready",
"usage": "cod",
"userdnn_id": null
}
]
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /webapis
Deploy a trained model (also known as a web API)
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Properties- trained_model_id: required (string)
The UUID of the trained model to deploy.
- name: required (string)
The name of the deployed model.
- usage: required (string)
The usage by which the model was trained. Possible values are
cic
,cod
,act
. - accel_type: (string)
Optional field to identify the type of acceleration method to use. Possible values are
GPU
,GPU_TENSORRT
,CPU
,FPGA_XFDNN_8_BIT
,FPGA_XFDNN_16_BIT
- userdnn_id: (string)
The custom model UUID. This value is to be set when deploying a custom model.
- dnnscript_id: (string)
The DNN script UUID to use on inference.
- save_inference: (string)
The dataset UUID where all inference results performed on this webapi will be saved.
Example:
{
"trained_model_id:" "a48c3779-eb14-4697-a490-eeb0125196f4",
"name": "Deployed Model Name",
"usage": "cic",
"accel_type": "GPU"
}
Media type: properties
Type: object
Media type: example
Type:
{
"trained_model_id:" "a48c3779-eb14-4697-a490-eeb0125196f4",
"name": "Deployed Model Name",
"usage": "cic",
"accel_type": "GPU"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"result": "success",
"webapi_id": "fbb78a52-ae41-4000-bbe5-ad0d116c4e9d"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
"fault": "All GPU(s) are in use",
"more_info": {
"type": "GPU",
"total": 2,
"free": 0,
"used": 2,
"train_used": 0,
"infer_used": 2,
"external_used": 0
},
"result": "fail",
"status":"BAD_REQUEST",
"type": "NoAvailableDevicesException"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete a web API
delete /webapis/{id}
Delete a web API
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Deployed Model UUID (also known as a web API)
Example:
fbb78a52-ae41-4000-bbe5-ad0d116c4e9d
HTTP status code 204
Body
Media type: application/json
Type: object
Example:
{
"result": "success"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete a selection of web APIs
post /webapis/action
Delete a selection of web APIs
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Example:
{
"action": "delete",
"webapi_list": [ "WebAPIID1", "WebAPIID2" ] // IDs of deployed models to be deleted
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"success_count": 2,
"fail_count": 0,
"result_list" : [
{
"result": "success",
"webapi_id": "d0465e9d-a38a-4a52-aa36-0869ad8c3aae",
},
{
"result": "success",
"webapi_id": "d0465e9d-1234-4a52-aa36-456456456456",
}
]
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Events
API endpoint to monitor for SSE's reporting status of background operations.
get data service event stream through SSE
get /events
get data service event stream through SSE
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
Body
Media type: text/event-stream
Type: object
Example:
// event for clone/delete dataset
event: "1472194961377" // unique event id, refer to "DELETE /datasets/{id}" and "POST /datasets/{id}/action"
data:
{
dataset_id: "a48c3779-eb14-4697-a490-eeb0125196f4"
}
// event for action of a specific dataset
event: "a48c3779-eb14-4697-a490-eeb0125196f4" // id of dataset_id
data:
{
action: "dataset_item_preprocess", // dataset_item_create, dataset_item_delete, dataset_item_restore, dataset_item_preprocess
sum: 100,
processed: 60,
succeed: 58
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Monitor Platform Connections
APIs for managing monitor platform connections
Get details of device connections.
Create a device connection.
get /devices/connections
Get details of device connections.
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"result": "success"
"status": "Connected"
}
HTTP status code 400
Creation failed due to user input problems.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "One device is already connected. Only one connection is allowed.",
"more_info": null,
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /devices/connections
Create a device connection.
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Properties- device_name: required (string)
The name of the device connection. Name is limited to 128 characters
- wiotp_api_key: required (string)
API key for monitor platform
- wiotp_api_token: required (string)
API token for monitor platform
- wiotp_install_device_id: required (string)
ID of the Monitor platform device
- wiotp_install_device_type: required (string)
Type of the Monitor platform device
- wiotp_install_device_token: required (string)
Device token on the Monitor platform
- wiotp_install_domain: (string)
Monitor platform install domain
- wiotp_install_mvi_url: required (string)
Visual Inspection URL
- wiotp_install_orgid: required (string)
Organization ID of Monitor platform
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"result": "success"
"status": "Connected"
}
HTTP status code 400
Creation failed due to user input problems.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "One device is already connected. Only one connection is allowed.",
"more_info": null,
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get details for a connected Monitor Device
Update a connected Monitor Device, provide one or more the properties.
Delete a monitor platform device.
get /devices/connections/{id}
Get details for a connected Monitor Device
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Monitor Device Name
Example:
device1
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"device_name": "device1",
"device_type": "MAM",
"created_date": "2020-10-13T00:08:59.553817Z",
"status": "Connected",
"wiotp_api_key": "abc123456",
"wiotp_api_token": "123abd(Z",
"wiotp_install_device_id": "mvi_system1",
"wiotp_install_device_token": "AabDefg",
"wiotp_install_device_type": "MVI_system1_gateway",
"wiotp_install_domain": "internetofthings.ibmcloud.com",
"wiotp_install_mvi_url": "http://system1.domain.com",
"wiotp_install_orgid": "abcd1234"
}
HTTP status code 400
Could not find the indicated Monitor Device
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Device with name: device1 does not exist.",
"more_info": null,
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
put /devices/connections/{id}
Update a connected Monitor Device, provide one or more the properties.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Monitor Device Name
Example:
device1
Body
Media type: application/json
Type: object
Properties- device_name: required (string)
The name of the connected Monitor Device. Name is limited to 128 characters
- wiotp_api_key: required (string)
API key for monitor platform
- wiotp_api_token: required (string)
API token for monitor platform
- wiotp_install_device_id: required (string)
ID of the Monitor platform device
- wiotp_install_device_type: required (string)
Type of the Monitor platform device
- wiotp_install_device_token: required (string)
Device token on the Monitor platform
- wiotp_install_domain: (string)
Monitor platform install domain
- wiotp_install_mvi_url: required (string)
Visual Inspection URL
- wiotp_install_orgid: required (string)
Organization ID of Monitor platform
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"status": "Connected"
}
HTTP status code 400
Could not find the indicated Monitor Device
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Device with name: device1 does not exist.",
"more_info": null,
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /devices/connections/{id}
Delete a monitor platform device.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Monitor Device Name
Example:
device1
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{}
HTTP status code 400
The indicated Monitor Device could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Device name device2 does not exist",
"more_info": null,
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get status of a device on monitor platform. Have to provide body with all details.
get /devices/connections/{id}/status
Get status of a device on monitor platform. Have to provide body with all details.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Monitor Device Name
Example:
device1
Body
Media type: application/json
Type: object
Properties- device_name: required (string)
The name of the device connection. Name is limited to 128 characters
- wiotp_api_key: required (string)
API key for monitor platform
- wiotp_api_token: required (string)
API token for monitor platform
- wiotp_install_device_id: required (string)
ID of the Monitor platform device
- wiotp_install_device_type: required (string)
Type of the Monitor platform device
- wiotp_install_device_token: required (string)
Device token on the Monitor platform
- wiotp_install_domain: (string)
Monitor platform install domain
- wiotp_install_mvi_url: required (string)
Visual Inspection URL
- wiotp_install_orgid: required (string)
Organization ID of Monitor platform
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Inferencing (DLAPIs)
API endpoints for doing inferences on deployed models
Perform Inference on an image URL
Run API by upload a image
get /dlapis/{id}
Perform Inference on an image URL
URI Parameters
- id: required (string)
Unique ID of the deployed model
Example:
4c3259c3-e300-41a7-b031-d6fbf508cab7
Query Parameters
- imageUrl: required (string)
URL for an image. May be on the internet or a local file
Example:
http://IP/path/fff287bc-412b-4b5d-9f8a-a3af27ca74d7.jpg
- containHeatMap: (string)
Flag parameter to request inclusion of the heat map in classification results. This parameter is only applicable on classification models and is ignored on on all model types.
Possible values are "true" to include the heat map, or "false" to exclude the heat map.
The default value is "false" if the parameter is not provided. - containRle: (string)
Flag parameter to request inclusion of the compressed RLE string in object detection segmentaion results. This parameter is only applicable on object detection models that can provide instance segmentation results. It is ignored on on all model types. Possible values are "true" to include the compressed RLE string, or "false" to exclude it.>br> The default value is "false" if the parameter is not provided.
- containPolygon: (string)
Flag parameter to request inclusion of the polygon boundary information in object detection segmentaion results. This parameter is only applicable on object detection models that can provide instance segmentation results. It is ignored on on all model types.
Possible values are "true" to include the polygon information, or "false" to exclude it.
The default value is "true" if the parameter is not provided. - confthre: (float)
Parameter to specify the confidence threshold to use when providing results. This parameter applies to both classification and object detection models. It is a floating point value that specifies the threshold at which possible matches are to be excluded from the result set. A value of
0.5
will exclude possible matches with a confidence score below 50%.Possible values range from
0.0
to0.9
.
The default value is0.0
if this parameter is not specified. - clsnum: (integer)
This parameter is used to identify how many different possible matches are included in the results. For classification, this means that if there are multiple possible matches with a confidence score above the
confthre
value, up to the indicated value matches are included in the result. Values are integer values where0
is the default (which means to include all possible matches in the results). - waitForResults: (string)
This parameter is used for video inferencing. By default, video inference results are reported asynchronously -- meaning that the call to do the inference will return while processing continues on the video. Inference results are available via the
/inferences
endpoint.If this parameter is passed with a value of "true" (case is ignored), the endpoint will not return until the video has completed processing. The JSON results will be returned at that time. Note that the JSON results will also be available via the
/inferences
endpoint. - genCaption: (string)
This parameter is used for video inferencing. It controls whether or not a "captioned" video should be generated and stored with the inferencing results. The default varies by the detection being done. For Action Detection, the default is to generate a captioned video. For Object Detection, the default is to NOT generate a captioned video.
The captioned video is accessible via the
/inferences
endpoint.
HTTP status code 200
Body
Media type: application/json
Type: object
Examples:
classification-with-heatmap:
{
result: "success",
imageUrl: "http://IP/path/fff287bc-412b-4b5d-9f8a-a3af27ca74d7.jpg",
heatmap:"data:image/png;base64,XXXXXX...", // Base64 encoded picture string
classified:
{
store: "0.71855"
}
}
object-detection-with-segmentation:
{
result: "success",
imageUrl: "http://IP/path/fff287bc-412b-4b5d-9f8a-a3af27ca74d7.jpg",
classified: [
{
confidence: 0.9038739204406738,
label: 'badge',
ymax: 145,
xmax: 172,
xmin: 157,
ymin: 123
rle: "^e?:Q=01N1Ln<NXC001N3RC6W<LdC9Y<`0K5L3J5J6L3O1O10001O002L3N2DTNUEn1i",
polygons: [[[277, 148], [277, 173], [295, 174], [295, 148]]],
}
]
}
post /dlapis/{id}
Run API by upload a image
URI Parameters
- id: required (string)
Unique ID of the deployed model
Example:
4c3259c3-e300-41a7-b031-d6fbf508cab7
Body
Media type: multipart/form-data
Type: object
Properties- files: required (string)
octet file stream of the file to be inferred.
- containHeatMap: (string)
Flag parameter to request inclusion of the heat map in classification results. This parameter is only applicable on classification models and is ignored on on all model types.
Possible values are "true" to include the heat map, or "false" to exclude the heat map.>br> The default value is "false" if the parameter is not provided.
- containRle: (string)
Flag parameter to request inclusion of the compressed RLE string in object detection segmentaion results. This parameter is only applicable on object detection models that can provide instance segmentation results. It is ignored on on all model types. Possible values are "true" to include the compressed RLE string, or "false" to exclude it.
The default value is "false" if the parameter is not provided. - containPolygon: (string)
Flag parameter to request inclusion of the polygon boundary information in object detection segmentaion results. This parameter is only applicable on object detection models that can provide instance segmentation results. It is ignored on on all model types.
Possible values are "true" to include the polygon information, or "false" to exclude it.
The default value is "true" if the parameter is not provided. - confthre: (float)
Parameter to specify the confidence threshold to use when providing results. This parameter applies to both classification and object detection models. It is a floating point value that specifies the threshold at which possible matches are to be excluded from the result set. A value of
0.5
will exclude possible matches with a confidence score below 50%.Possible values range for
0.0
to0.9
.
The default value is0.0
if this parameter is not specified. - clsnum: (integer)
This parameter is used to identify how many different possible matches are included in the results. For classification, this means that if there are multiple possible matches with a confidence score above the
confthre
value, up to the indicated value matches are included in the result. Values are integer values where0
is the default (which means to include all possible matches in the results). - waitForResults: (string)
This parameter is used for video inferencing. By default, video inference results are reported asynchronously -- meaning that the call to do the inference will return while processing continues on the video. Inference results are available via the
/inferences
endpoint.If this parameter is passed with a value of "true" (case is ignored), the endpoint will not return until the video has completed processing. The JSON results will be returned at that time. Note that the JSON results will also be available via the
/inferences
endpoint. - genCaption: (string)
This parameter is used for video inferencing. It controls whether or not a "captioned" video should be generated and stored with the inferencing results. The default varies by the detection being done. For Action Detection, the default is to generate a captioned video. For Object Detection, the default is to NOT generate a captioned video.
The captioned video is accessible via the
/inferences
endpoint.
Media type: example
Type:
// Post params
Content-Disposition: form-data;
**** THIS EXAMPLE NEEDS TO BE UPDATED OR REMOVED ****
[
name="files"; filename="mytemp.jpg" Content-Type: image/jpeg => image binary data
]
// HTML usage
**** THIS EXAMPLE NEEDS TO BE UPDATED OR REMOVED ****
<form enctype="multipart/form-data" action="{baseUri}/dlapis/4c3259c3-e300-41a7-b031-d6fbf508cab7" method="POST">
Choose a file to upload:
<input name="files" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
// curl usage
curl -i -F files=@mytemp.jpg {baseUri}/dlapis/4c3259c3-e300-41a7-b031-d6fbf508cab7
HTTP status code 201
Body
Media type: application/json
Type: object
Example:
classification-with-heatmap:
{
"result": "success",
"imageUrl": "http://IP/path/fff287bc-412b-4b5d-9f8a-a3af27ca74d7.jpg",
"heatmap": "data:image/png;base64,XXXXXX...",
"// Base64 encoded picture string classified": null,
"tore": "0.71855"
}
Long Running Tasks (BGTasks)
APIs for managing PowerAI-Vision background tasks
Get all background tasks belonging to the user associated with the provided token (from header "X-Auth-Token"). Results are ordered by creation date, oldest to newest.
Delete all background tasks belonging to the user associated with the provided token(from header "X-Auth-Token") that are not currently active. Query parameters can be used to filter which tasks are to be deleted (instead of deleting inactive tasks)
get /bgtasks
Get all background tasks belonging to the user associated with the provided token (from header "X-Auth-Token"). Results are ordered by creation date, oldest to newest.
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- newer_than: required (string)
optional parameter to filter the background tasks to only get tasks with updates more recent than the given date/time stamp of the form "YYYY/MM/DD-HH:MM:SS".
Note that all times are UTC times.
Example:
?newer_than="2018/08/17-09:11:48"
- task_type: required (string)
optional parameter to filter the background tasks to only get tasks of the given type.
Example:
?task_type="auto-label"
- status: (string)
optional parameter to filter the background tasks to only get tasks with the given status. Possible values are
aborted
,completed
,failed
,starting
, orworking
.
HTTP status code 200
returns list of BG tasks meeting the filter criteria ordered oldest first (list may be empty)
Body
Media type: application/json
Type: object
Example:
{
"result": "success",
"task_list": [
]
}
HTTP status code 400
Failed to get the requested data from the metadata database
Body
Media type: application/json
Type: object
Example:
{
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /bgtasks
Delete all background tasks belonging to the user associated with the provided token(from header "X-Auth-Token") that are not currently active. Query parameters can be used to filter which tasks are to be deleted (instead of deleting inactive tasks)
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- older_than: (string)
optional parameter to filter the background tasks to only delete tasks with updates older than the given date/time stamp of the form "YYYY/MM/DD-HH:MM:SS".
Note that all times are UTC times.
Example:
?older_than="2018/08/17-09:11:48"
- task_type: (string)
optional parameter to filter the background tasks to only delete tasks of the given type.
Example:
?task_type="auto-label"
- status: (string)
optional parameter to filter the background tasks to only delete tasks with the given status. Possible values are identified in the GET operation.
Default value is '["aborted", "completed", "failed"]' if the parameter is not provided.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Model Training (DLTasks)
APIs for managing PowerAI-Vision training tasks
Get all PowerAI-Vision Training tasks that belong to the user associated with the provided token(from header "X-Auth-Token")
Create a PowerAI-Vision training task based upon the indicated action. Supported actions are pre-analysis
, pre-analysis-cod
, create
, create-cod-task
. When specifying a "pre-analysis" task, no training is performed; the dataset is analyzed to determine if it meets minimum training requirements.
get /dltasks
Get all PowerAI-Vision Training tasks that belong to the user associated with the provided token(from header "X-Auth-Token")
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- pg_id: (String)
Filter the returned list so that only training tasks belonging to the indicated project group are shown.
Example:
?pg_id=6e9f142d-6970-45c4-afac-5ac120631cab
- status: required (string)
Filter the returned list so that only training tasks with the indicated status are shown.
Example:
?status=failed
- sortby: (String)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Examples:
two field sort:
?sortby=name
descending sort:
?sortby=status DESC, name
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
array of vision-service tasks, refer to DB schema -> DLTasks
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /dltasks
Create a PowerAI-Vision training task based upon the indicated action. Supported actions are pre-analysis
, pre-analysis-cod
, create
, create-cod-task
. When specifying a "pre-analysis" task, no training is performed; the dataset is analyzed to determine if it meets minimum training requirements.
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Properties- action: required (string)
Indicates the training task to be created. Supported actions are
pre-analysis
-- analyze dataset to ensure minimum requirements for Image Classification training are met.create
-- start a training task for classification training.pre-analysis-cod
-- analyze dataset to ensure minimum requirements for Object Detection training are met.create-cod-task
-- start a training task for object detection training.
- dataset_id: required (string)
The UUID for the dataset to be trained.
- name: (string)
The name field gives a name to the training task. It is required for actions that create a training task, but it is not used for pre-analysis tasks.
- nn_arch: (string)
Optional parameter that applies only to COD training. This parameter identifies the type of COD training to perform. Possible values are...
tiny_yolo_v2
-- indicates training should be for tiny YOLO v2.frcnn
-- indicates FRCNN training should be performedfrcnn_mrcnn
-- indicates segmentation training should be performed
The default value is
frcnn
. - pretrained_model: (string)
Optional parameter to identify the trained model to use as the base neural network from which to start the transfer learning training.
- embing_id: (string)
Optional parameter that applies to COD training only.
- userdnn_id: (string)
Optional parameter to identify the user loaded custom DNN to use for training.
- bitwidth: (string)
Optional parameter that applies to COD YOLO training where the resulting model is to be used in an FPGA.
- strategy: (object)
Optional object use to modify default training hyperparameters. The content of the
strategy
document varies by training type and neural network architecture.- scenario: (string)
Optional parameter that applies to CIC training only. Possible values are
"flowers"
"chineseFood"
"general"
- max_iter: (string)
Number of iterations to train. Applies to all training types.
Values range from
100
to1,000,000
. Default value is as follows- for CIC training --
1,500
- for COD FRCNN training --
4,000
- for COD Tiny YOLO v2 --
40,000
- for COD Segmentation --
4,000
- for CIC training --
- test_iter: (string)
Optional parameter that applies to CIC training only.
Values range from
1
to1,000
. Default value is100
. - test_interval: (string)
Optional parameter that applies to CIC training only. This parameter indicates the iteration interval at which testing will be done. Values range from
1
to1,000
. Default value is20
. - learning_rate: (string)
Optional parameter that applies to all training types.
Possible values range from
0.0
to0.01
. - weight_decay: (string)
Optional parameter that applies to all training types.
Possible values range from
0.0
to0.5
. Default value is0.0005
- ratio: (string)
Optional parameter that applies to all types of COD training. It identifies the percentage of images to use for training, and inversely the percentage of images to reserve for testing.
Possible values range from
0.5
to1.0
. Default value is0.8
.
- scenario: (string)
Examples:
cic-pre-analysis:
{
"action": "pre-analysis", // pre analysis for cic task
"dataset_id": "6d69b787-15b0-4731-be6c-a76dca76d466",
"strategy": { // optional, if not set, will use default value
"max_iter": 1500, // optional, [100-1000000], default to 1500
"test_iter": 100, // optional, [1-1000], default to 100
"test_interval": 20, // optional, [1-1000], default to 20
"learning_rate": 0.001, // optional, (0-0.01], default to 0.001
"weight_decay": 0.0005 // optional, (0-0.5), default to 0.0005
}
}
cic-training:
{
"action": "create", // create cic task
"dataset_id": "6d69b787-15b0-4731-be6c-a76dca76d466",
"strategy": { // optional, if not set, will use default value
"max_iter": 1500, // optional, [100-1000000], default to 1500
"test_iter": 100, // optional, [1-1000], default to 100
"test_interval": 20, // optional, [1-1000], default to 20
"learning_rate": 0.001, // optional, (0-0.01], default to 0.001
"weight_decay": 0.0005 // optional, (0-0.5), default to 0.0005
}
"name": "cictest"
}
// reponse for action "pre-analysis"
{
"action": "pre-analysis-cod", // pre analysis for cod task
"dataset_id": "6d69b787-15b0-4731-be6c-a76dca76d466",
"strategy": { // optional, if not set, will use default value
"max_iter": 4000, // optional, [100-1000000], default to 4000
"momentum": 0.9, // optional, [0-1.0], default to 0.9
"ratio": 0.8, // optional, [0.5-1.0], default to 0.8
"learning_rate": 0.001, // optional, (0-0.01], default to 0.001
"weight_decay": 0.0005 // optional, (0-0.5), default to 0.0005
}
}
{
"action": "create-cod-task", // create cod task
"dataset_id": "6d69b787-15b0-4731-be6c-a76dca76d466",
"strategy": { // optional, if not set, will use default value
"max_iter": 4000, // optional, [100-1000000], default to 4000
"momentum": 0.9, // optional, [0-1.0], default to 0.9
"ratio": 0.8, // optional, [0.5-1.0], default to 0.8
"learning_rate": 0.001, // optional, (0-0.01], default to 0.001
"weight_decay": 0.0005 // optional, (0-0.5), default to 0.0005
}
"name": "codtest"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get basic info of a vision-service task
Delete a vision-service task
get /dltasks/{id}
Get basic info of a vision-service task
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
refer to DB schema -> DLTasks
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /dltasks/{id}
Delete a vision-service task
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 204
Body
Media type: application/json
Type: object
Example:
{
result: "success",
code: 200
}
{
result: "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Perform action on a vision-service task
post /dltasks/{id}/action
Perform action on a vision-service task
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
Body
Media type: application/json
Type: object
Example:
{
action: "rename",
data: "xxx" // the new name of task
}
HTTP status code 201
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
{
result: "fail",
fault: "some reason"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get vision-service task status data
get /dltasks/{id}/status
Get vision-service task status data
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 201
Body
Media type: application/json
Type: object
Example:
{
result: "success",
status: "idle" // idle, preprocessing, completed, aborted
}
{
result: "success",
status: "training",
data: // array of "train_msg" and "test_msg"
[
{
loss: "5.45491",
timestamp: "2016-05-16T06:29:56",
remain_time: "487", // seconds
iter: "1",
total_iter: "1000",
progress: "0.010",
type: "train_msg"
},
{
loss: "0.81959",
accuracy: "0.71429",
type: "test_msg",
iter: "20",
timestamp: "2016-05-16T06:30:18"
}
]
}
{
result: "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Profiles
API for manage profiles
Get current profile info
get /profiles
Get current profile info
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"login_user_id": "dlaastest", // null if no session info(not login)
"apikey": "testkey", // null if no session info(not login)
"sso_entry_url": "http://172.71.0.131:8080/dlaas/home.jsp",
"base_image_url": "http://172.71.0.131:8080/dlaas/uploads
}
Project Groups
APIs for managing Project Groups
Get all projects belonging to the user associated with provided token(from header "X-Auth-Token"). Results are ordered by creation date, newest to oldest.
Create a project group.
get /projects
Get all projects belonging to the user associated with provided token(from header "X-Auth-Token"). Results are ordered by creation date, newest to oldest.
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- sortby: (String)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Examples:
two field sort:
owner,name
descending sort:
owner DESC, name, created_at
HTTP status code 200
Result is a list of project group objects. The list is ordered most recently created first.
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "5d332791-d111-4a11-879c-8aa0daad037b",
"owner": "admin",
"name": "demo project",
"description": "",
"enforce_pwf": "false",
"auto_deploy": "false",
"created_at": 1571926927565,
"dataset_count": 2,
"model_count": 0,
"updated_at": 1573073632375,
"latest_deployed_model": "32786c4e-13e2-44ac-a5fe-8b45322126cc"
}
]
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /projects
Create a project group.
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Properties- name: required (string)
The name of the project group. Name is limitted to 128 characters
- description: (string)
An optional description for the project group. The description is limitted to 2048 characters.
- enforce_pwf: (string)
True/False string to turn on enforcement/tracking of Production Work Flow Strategy.
- auto_deploy: (string)
True/False string to turn on automatic deployement of models. This feature requires "enforce_pwf" to be True.
Examples:
minimal:
{
"name": "Demo Project"
}
with-description:
{
"name": "Descriptive Project",
"description": "A longer description of the project. It can include multiple lines."
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "59bd043b-22b3-4bd3-927d-e4289c217147",
"owner": "admin",
"name": "demo 2",
"description": "",
"enforce_pwf": "false",
"auto_deploy": "false",
"created_at": 1573480252559
}
HTTP status code 400
Creation failed due to user input problems.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Input name () has invalid length = 0. Length must be > 0 and <= 128",
"more_info": {
"name": " "
},
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get metadata details for a project group
Delete a project group.
Update/Change a project group metadata information.
Currently changes can be made to each of the fields that can be specified at creation time. These fields are described in the properties
section below. Only the supplied fields are modified and it is possible to modify multiple fields in a single call.
get /projects/{id}
Get metadata details for a project group
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "5d332791-d111-4a11-879c-8aa0daad037b",
"owner": "admin",
"name": "demo project",
"description": "",
"enforce_pwf": "false",
"auto_deploy": "false",
"created_at": 1571926927565,
"dataset_count": 2,
"model_count": 0,
"updated_at": 1573073632375,
"latest_deployed_model": "32786c4e-13e2-44ac-a5fe-8b45322126cc",
"datasets": [
{
"_id": "808645e1-9ce6-4f73-8e9b-5ab79674d823",
"name": "new data",
"usage": "generic",
"scenario": "",
"pre_process": "data_augmentation",
"owner": "admin",
"locked": 0,
"type": 0,
"created_at": 1571926997309,
"updated_at": 1572620707215,
"project_group_id": "5d332791-d111-4a11-879c-8aa0daad037b",
"project_group_name": "demo project",
"thumbnail_path": "uploads/admin/datasets/808645e1-9ce6-4f73-8e9b-5ab79674d823/thumbnails/01522136-ac4c-492c-843f-4d18946e7537.jpg",
"total_file_count": 8
}
],
"trained_models": [],
"deployed_models": []
}
HTTP status code 404
Could not find the indicated project group
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find project-group id '5d332791-d111-4a11-879c-8aa0daad037' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /projects/{id}
Delete a project group.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "59bd043b-22b3-4bd3-927d-e4289c217147",
"name": "demo 2",
"result": "success"
}
HTTP status code 404
The indicated dataset could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find project-group id '5d332791-d111-4a11-879c-8aa0daad037' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
put /projects/{id}
Update/Change a project group metadata information.
Currently changes can be made to each of the fields that can be specified at creation time. These fields are described in the properties
section below. Only the supplied fields are modified and it is possible to modify multiple fields in a single call.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
Body
Media type: application/json
Type: object
Properties- name: required (string)
The name of the project group. Name is limitted to 128 characters
- description: (string)
An optional description for the project group. The description is limitted to 2048 characters.
- enforce_pwf: (string)
True/False string to turn on enforcement/tracking of Production Work Flow Strategy.
- auto_deploy: (string)
True/False string to turn on automatic deployement of models. This feature requires "enforce_pwf" to be True.
Media type: examples
Type: object
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id":"59bd043b-22b3-4bd3-927d-e4289c217147",
"owner":"admin",
"name":"demo 2",
"description":"",
"enforce_pwf":"true",
"auto_deploy":"true",
"created_at":1573480252559
}
HTTP status code 400
Creation failed due to user input problems.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "Input name () has invalid length = 0. Length must be > 0 and <= 128",
"more_info": {
"name": " "
},
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get metadata details for a trained model
get /projects/{id}/models/{mid}
Get metadata details for a trained model
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
- mid: required (string)
Model identier.
Project group supports "shortcuts" for accessing models associated with the project group. The purpose of these shortcuts is to facilitate easier access to the "latest" model by mobile or edge based applications. Shortcuts are accessed via themid
(model id) path variable.It should be noted that latest is always based upon the time that the model was trained (even for deployed models, latest is determined by the time the model was trained).
Supported
mid
(model id) values are:- latest -- The meaning of
latest
varies depending upon the "enforce_pwf" setting. If PWF is enforced,latest
is a synonym forproduction
. If PWF is not enforced,latest
tracks the most recently trained model. - production --
production
is only tracked if PWF is being enforced. It tracks the most recently trained model that has been marked "production ready" - untested --
untested
is only tracked if PWF is being enforced. It tracks the most recently trained model that has not been marked "production reacy" or "rejected"
It is also possible to supply the model UUID via themid
(model id).
Examples:
uuid:
59bd043b-22b3-4bd3-927d-e4289c217147
latest:
latest
production:
production
- latest -- The meaning of
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "137077be-4e84-4d7c-9fe3-84258f273217",
"name": "JJ Classifier GOLDEN_model",
"dataset_id": "3f59db5b-9ea3-4a61-8d4f-bc1efafad8ca",
"usage": "cic",
"nn_arch": "google_net",
"userdnn_id": null,
"method": "FineTuning",
"strategy": {
"max_iter": 1000,
"test_iter": "100",
"test_interval": "20",
"learning_rate": "0.001",
"weight_decay": "0.0005",
"ratio": "0.8"
},
"dataset_summary": {
"image_count": 1559,
"class_count": 2,
"class_list": [
{
"category_id": "cce9e78d-eb43-4e8d-8812-f712f38989a2",
"category_name": "defect",
"image_count": 656
},
{
"category_id": "1e601574-f213-4ce8-b264-f4cfd001348c",
"category_name": "good",
"image_count": 903
}
]
},
"project_group_id": "b7b2eebc-4eb4-4a14-ad7f-ddc4b34991b2",
"project_group_name": "Deploy/Predict Test Group",
"production_status": "untested",
"categories": [
{
"category_id": "cce9e78d-eb43-4e8d-8812-f712f38989a2",
"category_name": "defect"
},
{
"category_id": "1e601574-f213-4ce8-b264-f4cfd001348c",
"category_name": "good"
}
],
"owner": "admin",
"deployed": 0,
"type": 0,
"eval_data": {
"loss": "0.10321",
"timestamp": "2019-10-30T14:19:54",
"iter": "1001",
"evaluate_data": {
"conf_matrix": {
"confusion_data": [
[
0.9852941176470589,
0
],
[
0.05,
0.95
]
],
"class_ids": [
"cce9e78d-eb43-4e8d-8812-f712f38989a2",
"1e601574-f213-4ce8-b264-f4cfd001348c"
]
},
"avg_pr": {
"recall_average": [
1,
0.99,
0.99,
0.99,
0.98,
0.98,
0.98,
0.98,
0.97,
0.97,
0.88
],
"precision_average": [
0.33,
0.49,
0.58,
0.64,
0.69,
0.72,
0.75,
0.77,
0.79,
0.81,
0.81
]
},
"precision_recall": [
{
"class_id": "cce9e78d-eb43-4e8d-8812-f712f38989a2",
"recall": [
1,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0
],
"precision": [
0.39,
0.81,
0.88,
0.9,
0.92,
0.92,
0.95,
0.97,
0.97,
0.97,
0
]
},
{
"class_id": "1e601574-f213-4ce8-b264-f4cfd001348c",
"recall": [
1,
0.98,
0.98,
0.98,
0.97,
0.96,
0.95,
0.94,
0.93,
0.86,
0
],
"precision": [
0.56,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0
]
}
],
"roc": [
{
"class_id": "cce9e78d-eb43-4e8d-8812-f712f38989a2",
"roc_x": [
1,
0.13,
0.07,
0.06,
0.05,
0.04,
0.03,
0.02,
0.02,
0.02,
0
],
"roc_y": [
1,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0.99,
0
]
},
{
"class_id": "1e601574-f213-4ce8-b264-f4cfd001348c",
"roc_x": [
1,
0.01,
0.01,
0.01,
0.01,
0.01,
0.01,
0.01,
0.01,
0.01,
0
],
"roc_y": [
1,
0.98,
0.98,
0.98,
0.97,
0.96,
0.95,
0.94,
0.93,
0.86,
0
]
}
],
"class_summary": [
{
"class_id": "cce9e78d-eb43-4e8d-8812-f712f38989a2",
"data": {
"f1_measure": "0.957",
"recall": "0.985",
"precision": "0.931",
"accuracy": "0.931"
},
"weak_imgs": {
"img_id": "None",
"predict_class_id": "None",
"confidence_rate": 0
}
},
{
"class_id": "1e601574-f213-4ce8-b264-f4cfd001348c",
"data": {
"f1_measure": "0.971",
"recall": "0.954",
"precision": "0.989",
"accuracy": "0.989"
},
"weak_imgs": {
"img_id": "None",
"predict_class_id": "None",
"confidence_rate": 0
}
}
],
"avg_precision": "0.960",
"avg_recall": "0.970",
"avg_roc": {
"roc_x_average": [
1,
0.52,
0.36,
0.27,
0.22,
0.19,
0.16,
0.14,
0.13,
0.12,
0.11
],
"roc_y_average": [
1,
0.99,
0.99,
0.99,
0.98,
0.98,
0.98,
0.98,
0.97,
0.97,
0.88
]
}
},
"type": "test_msg",
"accuracy": "0.96591"
},
"accuracy": "0.96591",
"thumbnail_path": "uploads/admin/trained-models/thumbnails/137077be-4e84-4d7c-9fe3-84258f273217.jpg",
"created_at": 1572445194204,
"pre_process": "",
"assets": [
{
"asset_type": "coreml",
"file_size": 29309331
}
]
}
HTTP status code 404
Could not find either either indicated project group or the indicated model. The fault
message will indicate which could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find project-group id '5d332791-d111-4a11-879c-8aa0daad037' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
This endpoint is the shortcut for /trained-models/{modelid}/export
.
Please refer to that endpoints documentation for detailed information.
get /projects/{id}/models/{mid}/export
This endpoint is the shortcut for /trained-models/{modelid}/export
.
Please refer to that endpoints documentation for detailed information.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
- mid: required (string)
Model identier.
Project group supports "shortcuts" for accessing models associated with the project group. The purpose of these shortcuts is to facilitate easier access to the "latest" model by mobile or edge based applications. Shortcuts are accessed via themid
(model id) path variable.It should be noted that latest is always based upon the time that the model was trained (even for deployed models, latest is determined by the time the model was trained).
Supported
mid
(model id) values are:- latest -- The meaning of
latest
varies depending upon the "enforce_pwf" setting. If PWF is enforced,latest
is a synonym forproduction
. If PWF is not enforced,latest
tracks the most recently trained model. - production --
production
is only tracked if PWF is being enforced. It tracks the most recently trained model that has been marked "production ready" - untested --
untested
is only tracked if PWF is being enforced. It tracks the most recently trained model that has not been marked "production reacy" or "rejected"
It is also possible to supply the model UUID via themid
(model id).
Examples:
uuid:
59bd043b-22b3-4bd3-927d-e4289c217147
latest:
latest
production:
production
- latest -- The meaning of
HTTP status code 404
Could not find either either indicated project group or the indicated model. The fault
message will indicate which could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find project-group id '5d332791-d111-4a11-879c-8aa0daad037' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
This endpoint is the shortcut for /trained-models/{modelid}/export
.
Please refer to that endpoints documentation for detailed information.
post /projects/{id}/models/{mid}/deploy
This endpoint is the shortcut for /trained-models/{modelid}/export
.
Please refer to that endpoints documentation for detailed information.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
- mid: required (string)
Model identier.
Project group supports "shortcuts" for accessing models associated with the project group. The purpose of these shortcuts is to facilitate easier access to the "latest" model by mobile or edge based applications. Shortcuts are accessed via themid
(model id) path variable.It should be noted that latest is always based upon the time that the model was trained (even for deployed models, latest is determined by the time the model was trained).
Supported
mid
(model id) values are:- latest -- The meaning of
latest
varies depending upon the "enforce_pwf" setting. If PWF is enforced,latest
is a synonym forproduction
. If PWF is not enforced,latest
tracks the most recently trained model. - production --
production
is only tracked if PWF is being enforced. It tracks the most recently trained model that has been marked "production ready" - untested --
untested
is only tracked if PWF is being enforced. It tracks the most recently trained model that has not been marked "production reacy" or "rejected"
It is also possible to supply the model UUID via themid
(model id).
Examples:
uuid:
59bd043b-22b3-4bd3-927d-e4289c217147
latest:
latest
production:
production
- latest -- The meaning of
HTTP status code 404
Could not find either either indicated project group or the indicated model. The fault
message will indicate which could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find project-group id '5d332791-d111-4a11-879c-8aa0daad037' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
This endpoint is the shortcut for POST /dlapis/{modelid}
.
Please refer to that endpoints documentation for detailed information.
This endpoint is the shortcut for GET /trained-models/{modelid}
.
Please refer to that endpoints documentation for detailed information.
post /projects/{id}/models/{mid}/predict
This endpoint is the shortcut for POST /dlapis/{modelid}
.
Please refer to that endpoints documentation for detailed information.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
- mid: required (string)
Model identier.
Project group supports "shortcuts" for accessing models associated with the project group. The purpose of these shortcuts is to facilitate easier access to the "latest" model by mobile or edge based applications. Shortcuts are accessed via themid
(model id) path variable.It should be noted that latest is always based upon the time that the model was trained (even for deployed models, latest is determined by the time the model was trained).
Supported
mid
(model id) values are:- latest -- The meaning of
latest
varies depending upon the "enforce_pwf" setting. If PWF is enforced,latest
is a synonym forproduction
. If PWF is not enforced,latest
tracks the most recently trained model. - production --
production
is only tracked if PWF is being enforced. It tracks the most recently trained model that has been marked "production ready" - untested --
untested
is only tracked if PWF is being enforced. It tracks the most recently trained model that has not been marked "production reacy" or "rejected"
It is also possible to supply the model UUID via themid
(model id).
Examples:
uuid:
59bd043b-22b3-4bd3-927d-e4289c217147
latest:
latest
production:
production
- latest -- The meaning of
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
get /projects/{id}/models/{mid}/predict
This endpoint is the shortcut for GET /trained-models/{modelid}
.
Please refer to that endpoints documentation for detailed information.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
- mid: required (string)
Model identier.
Project group supports "shortcuts" for accessing models associated with the project group. The purpose of these shortcuts is to facilitate easier access to the "latest" model by mobile or edge based applications. Shortcuts are accessed via themid
(model id) path variable.It should be noted that latest is always based upon the time that the model was trained (even for deployed models, latest is determined by the time the model was trained).
Supported
mid
(model id) values are:- latest -- The meaning of
latest
varies depending upon the "enforce_pwf" setting. If PWF is enforced,latest
is a synonym forproduction
. If PWF is not enforced,latest
tracks the most recently trained model. - production --
production
is only tracked if PWF is being enforced. It tracks the most recently trained model that has been marked "production ready" - untested --
untested
is only tracked if PWF is being enforced. It tracks the most recently trained model that has not been marked "production reacy" or "rejected"
It is also possible to supply the model UUID via themid
(model id).
Examples:
uuid:
59bd043b-22b3-4bd3-927d-e4289c217147
latest:
latest
production:
production
- latest -- The meaning of
HTTP status code 404
Could not find either either indicated project group or the indicated model. The fault
message will indicate which could not be found
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find project-group id '5d332791-d111-4a11-879c-8aa0daad037' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
This endpoint is the shortcut for /trained-models/{modelid}/{assettype}/download
.
Please refer to that endpoint's documentation for detailed information.
get /projects/{id}/models/{mid}/{assettype}/download
This endpoint is the shortcut for /trained-models/{modelid}/{assettype}/download
.
Please refer to that endpoint's documentation for detailed information.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Project Group UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
- mid: required (string)
Model identier.
Project group supports "shortcuts" for accessing models associated with the project group. The purpose of these shortcuts is to facilitate easier access to the "latest" model by mobile or edge based applications. Shortcuts are accessed via themid
(model id) path variable.It should be noted that latest is always based upon the time that the model was trained (even for deployed models, latest is determined by the time the model was trained).
Supported
mid
(model id) values are:- latest -- The meaning of
latest
varies depending upon the "enforce_pwf" setting. If PWF is enforced,latest
is a synonym forproduction
. If PWF is not enforced,latest
tracks the most recently trained model. - production --
production
is only tracked if PWF is being enforced. It tracks the most recently trained model that has been marked "production ready" - untested --
untested
is only tracked if PWF is being enforced. It tracks the most recently trained model that has not been marked "production reacy" or "rejected"
It is also possible to supply the model UUID via themid
(model id).
Examples:
uuid:
59bd043b-22b3-4bd3-927d-e4289c217147
latest:
latest
production:
production
- latest -- The meaning of
- assettype: required (string)
Downloadable Asset Type Indentifier.
Currently the only supported downloadable "asset type" iscoreml
. The coreml asset is generated at model training time. The asset is associated with the trained model and can only be downloaded relative to the trained model.
HTTP status code 200
The file is streamed and must be saved by the caller.
HTTP status code 404
Either one of the ID parameters in path variables cannot be found or the assettype could not be found. The fault
message will identify which one is the problem.
Body
Media type: application/json
Type: object
Example:
{
"status": "NOT_FOUND",
"fault": "Could not find project-group id '5d332791-d111-4a11-879c-8aa0daad037' in DB",
"more_info": null,
"type": "DataNotFoundException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Tokens
This API is deprecated and disabled as of verion 8.0.0 of Maximo Visual Inspection. User login is now handled by the Maximo Application Suite core services and requires an OIDC flow which can only be done via a browser.
Programatic API access is still supported, but requires an API Key be generated from the browser. The generated API key will be used just like the token that was created by this API. It is passed using the X-Auth_Token
header. The only real difference is that the API Key does not expire.
TrainedModels
APIs for managing PowerAI-Vision trained models
Get all PowerAI-Vision trained models belonging to the user associated with provided token(from header "X-Auth-Token")
Import a previously exported PowerAI Vision trained model. Note that the zip file must be a zip file created by a previous export trained model operation.
get /trained-models
Get all PowerAI-Vision trained models belonging to the user associated with provided token(from header "X-Auth-Token")
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- usage: (String)
Filter the returned list so that only trained models trained for the indicated usage are shown. Possible usage values are "cic", "cod", or "act"
Example:
?usage:cod
- pg_id: (String)
Filter the returned list so that only trained models belonging to the indicated project group are shown.
Example:
?pg_id=6e9f142d-6970-45c4-afac-5ac120631cab
- production_status: required (string)
Filter the returned list so that only trained models with the indicated production_status are shown.
Example:
?production_status=rejected
- sortby: (String)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Examples:
two field sort:
?sortby=name
descending sort:
?sortby=status DESC, name
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
array of trained models, refer to DB schema -> TrainedModels
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /trained-models
Import a previously exported PowerAI Vision trained model. Note that the zip file must be a zip file created by a previous export trained model operation.
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: multipart/form-data
Type: object
Example:
// Post params
Content-Disposition: form-data;
[
name="files"; filename="mymodel.tar.gz" Content-Type: .tar.gz => binary data
]
// HTML usage
<form enctype="multipart/form-data" action="{baseUri}/trained-models" method="POST">
Choose a file to upload:
<input name="files" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
// curl usage
curl -i -X POST -H "Content-Type: multipart/form-data" -F "files=@mymodel.tar.gz" {baseUri}/trained-models
HTTP status code 201
Body
Media type: application/json
Type: object
Example:
{
result: "success",
trained_model_id: "a48c3779-eb14-4697-a490-eeb0125196f4"
}
{
result: "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete a trained model
delete /trained-models/{id}
Delete a trained model
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 409
Deployed trained-models cannot be deleted; undeploy the model and try again
Body
Media type: application/json
Type: object
Example:
{
result: "fail",
fault: "Please remove deployed Web API first!"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
get /trained-models/{id}/thumbnail/download
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The file is streamed and must be saved by the caller.
HTTP status code 404
Given trained-model ID could not be found
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Downloads a trained model's thumbnail as mime data in the response.
get /trained-models/{id}/thumbnail/mime-download
Downloads a trained model's thumbnail as mime data in the response.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
The thumbnail image is included in the response body as mime data.
HTTP status code 404
Given model Id could not be found.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Exports the given trained model
Get assets for a trained model
get /trained-models/{id}/assets
Get assets for a trained model
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"result":"success"
"assets":[
{ "asset_type" : "coreml" ,
"file_size" : 29367244
}
]
}
HTTP status code 404
Given trained-model ID could not be found
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Delete an asset
delete /trained-models/{id}/assets/{assettype}
Delete an asset
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- assettype: required (string)
The type of asset on which to operate.
Currently the supported asset types arecoreml
andtensorrt
.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"result":"success"
}
HTTP status code 400
Given assettype
is not valid
HTTP status code 404
Given trained-model ID could not be found
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Downloads the requested asset type for the given trained model.
get /trained-models/{id}/assets/{assettype}/download
Downloads the requested asset type for the given trained model.
URI Parameters
- id: required (string)
Example:
a48c3779-eb14-4697-a490-eeb0125196f4
- assettype: required (string)
The type of asset on which to operate.
Currently the supported asset types arecoreml
andtensorrt
.
perform the indicated action upon a set of trained models. All group (aka selection) operations on trained models flow through this endpoint. The only supported action is delete
.
post /trained-models/action
perform the indicated action upon a set of trained models. All group (aka selection) operations on trained models flow through this endpoint. The only supported action is delete
.
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Example:
{
action: "delete",
model_list: [ "modelID1", "modelID2" ] //IDs of trained models to be deleted
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
success_count: 2,
fail_count: 0,
result_list : [
{
result: "success",
model_id: "d0465e9d-a38a-4a52-aa36-0869ad8c3aae",
},
{
result: "success",
model_id: "d0465e9d-1234-4a52-aa36-456456456456",
}
]
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Version Info
API to get server version information
Get product version information
get /version-info
Get product version information
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"version": "8.0.0-pre.dev82",
"mode": "prod",
"mas_home": "home.bcarl.apps.bcarl-dev1.os.fyre.ibm.com"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Video Inference Results (inferences)
APIs for managing PowerAI-Vision Video Inference Resuls
Retrieve all active and completed video inference results. Video inferences are Action Detection inferences and Video Object Detection inferences. Results are ordered by creation date, oldest to newest.
Delete all inferences belonging to the user associated with the provided token(from header "X-Auth-Token") that are not currently active. Query parameters can be used to filter which inferences are to be deleted (instead of deleting inactive ones)
get /inferences
Retrieve all active and completed video inference results. Video inferences are Action Detection inferences and Video Object Detection inferences. Results are ordered by creation date, oldest to newest.
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- newer_than: (string)
optional parameter to filter the inference results to only get results with updates more recent than the given date/time stamp of the form "YYYY/MM/DDTHH:MM:SS". Note that all times are UTC times.
Example:
?newer_than="2019/06/01T09:11:48"
- model_id: (string)
Optional parameter to limit results to those inference performed by the given model.
Example:
?model_id="model-id-string"
- status: (string)
optional parameter to filter the background tasks to only get tasks with the given status. Possible status values are
starting
,working
,completed
, andfailed
. - sortby: (String)
A comma separated string of field names on which to sort. Add " DESC" after a field name to change to a descending sort.
Examples:
two field sort:
?sortby=model_id
descending sort:
?sortby=model_id, status DESC, total_frames
HTTP status code 200
returns list of inference results meeting the filter criteria ordered oldest first (list may be empty)
Body
Media type: application/json
Type: object
Example:
{
"inferences_list": [
{
"_id": "7e70236e-e935-4bb0-91c8-26407e3d5838",
"status": "completed",
"video_in": "/uploads/inferences/7e70236e-e935-4bb0-91c8-26407e3d5838/tennis1.mp4",
"video_out": null,
"model_id": "78821f2d-a893-469c-a156-aae03fdd7d23",
"percent_complete": 100.0,
"processed_frames": 1163,
"total_frames": 1163,
"sequence_number": 8,
"usage": "act",
"params": {
"genCaption": "false",
"videourl": "file:///opt/powerai-vision/data/inferences/7e70236e-e935-4bb0-91c8-26407e3d5838/tennis1.mp4",
"confthre": "0.5",
"attrthre": "10"
},
"created_date": "2019-06-06T16:13:19.028",
"updated_date": "2019-06-06T16:13:53.839",
"thumbnail_path": "/uploads/inferences/7e70236e-e935-4bb0-91c8-26407e3d5838/thumbnail.jpg"
},
{
"_id": "e769a143-3fff-4259-9d83-58dae1139514",
"status": "completed",
"video_in": "/uploads/inferences/e769a143-3fff-4259-9d83-58dae1139514/trim.mp4",
"video_out": "/uploads/inferences/e769a143-3fff-4259-9d83-58dae1139514/trim_out.mp4",
"model_id": "f6871ea1-131a-484d-a9ac-3571573c38bf",
"percent_complete": 100.0,
"processed_frames": 48,
"total_frames": 48,
"sequence_number": 272,
"usage": "cod",
"params": {
"genCaption": "true",
"videourl": "file:///opt/powerai-vision/data/inferences/e769a143-3fff-4259-9d83-58dae1139514/trim.mp4",
"confthre": "0.5"
},
"created_date": "2019-06-07T18:15:22.495",
"updated_date": "2019-06-07T18:16:42.938",
"thumbnail_path": "/uploads/inferences/e769a143-3fff-4259-9d83-58dae1139514/thumbnail.jpg"
}
]
}
HTTP status code 400
Failed to get the requested data from the metadata database
Body
Media type: application/json
Type: object
Example:
{
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /inferences
Delete all inferences belonging to the user associated with the provided token(from header "X-Auth-Token") that are not currently active. Query parameters can be used to filter which inferences are to be deleted (instead of deleting inactive ones)
utilize X-Auth-Token for authenticating all API requests.
Query Parameters
- older_than: (string)
optional parameter to filter the inferences to only delete those with updates older than the given date/time stamp of the form "YYYY/MM/DD-HH:MM:SS".
Note that all times are UTC times.
Example:
?older_than="2018/08/17-09:11:48"
- model_id: (string)
Optional parameter to limit results to those inference performed by the given model.
Example:
?model_id="model-id-string"
- status: (string)
optional parameter to filter the background tasks to only get tasks with the given status. Possible status values are
starting
,working
,completed
, andfailed
.
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get detail information about a specific video inference. Detail information includes general information about the inference and all of the detections found. The limit
and skip
query parameters can be used to effectively page the detection list (though you will always get the general inference info).
Delete the indicated video inference result.
get /inferences/{id}
Get detail information about a specific video inference. Detail information includes general information about the inference and all of the detections found. The limit
and skip
query parameters can be used to effectively page the detection list (though you will always get the general inference info).
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
7e70236e-e935-4bb0-91c8-26407e3d5838
Query Parameters
- include-details: (string)
Optional parameter to exclude the detection results if only the overall info is desired. Default value is 'true'. Use the value 'false' to exclude the detection details.
Example:
?include-details=false
- limit: required (string)
optional parameter to limit the number of items to be returned.
Example:
?limit=20
- skip: (string)
optional parameter to skip the number of items before including items in the return set
Example:
?skip=40
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "97a8106f-71b5-471f-a7ec-555e02548425",
"status": "working",
"video_in": "/uploads/inferences/97a8106f-71b5-471f-a7ec-555e02548425/tennisAo2019.mp4",
"video_out": null,
"model_id": "abf7efb3-c9df-4ab4-8477-441fe23de9fb",
"percent_complete": 11.51454,
"processed_frames": 2740,
"total_frames": 23796,
"sequence_number": 4,
"usage": "act",
"params": {
"genCaption": "false",
"videourl": "file:///opt/powerai-vision/data/inferences/97a8106f-71b5-471f-a7ec-555e02548425/tennisAo2019.mp4",
"confthre": "0.2",
"attrthre": "10"
},
"created_date": "2019-06-13T18:58:39.992",
"updated_date": "2019-06-13T18:59:53.659",
"thumbnail_path": "/uploads/inferences/97a8106f-71b5-471f-a7ec-555e02548425/thumbnail.jpg",
"classified": [
{
"_id": "97a8106f-71b5-471f-a7ec-555e02548425.1",
"start_time": 23823,
"confidence": 0.9035080442061791,
"end_time": 24224,
"label": "backhand",
"sequence_number": 1,
"infer_id": "97a8106f-71b5-471f-a7ec-555e02548425"
},
{
"_id": "97a8106f-71b5-471f-a7ec-555e02548425.2",
"start_time": 26326,
"confidence": 0.8938037864863873,
"end_time": 26826,
"label": "backhand",
"sequence_number": 2,
"infer_id": "97a8106f-71b5-471f-a7ec-555e02548425"
},
{
"_id": "97a8106f-71b5-471f-a7ec-555e02548425.3",
"start_time": 37003,
"confidence": 0.8409789383411408,
"end_time": 37470,
"label": "backhand",
"sequence_number": 3,
"infer_id": "97a8106f-71b5-471f-a7ec-555e02548425"
},
{
"_id": "97a8106f-71b5-471f-a7ec-555e02548425.4",
"start_time": 42208,
"confidence": 0.765489106066525,
"end_time": 42709,
"label": "backhand",
"sequence_number": 4,
"infer_id": "97a8106f-71b5-471f-a7ec-555e02548425"
}
]
}
HTTP status code 404
Could not find the indicated inference result
Body
Media type: application/json
Type: object
Example:
[object Object]
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /inferences/{id}
Delete the indicated video inference result.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
7e70236e-e935-4bb0-91c8-26407e3d5838
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
result: "success"
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
"result": "fail",
}
HTTP status code 404
Could not find the indicated inference result body
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Exports the indicated video inferences results as a zip file. The zip file will include the inference general information, the detection details, and the annotated video if one was requested at inference time).
get /inferences/{id}/export
Exports the indicated video inferences results as a zip file. The zip file will include the inference general information, the detection details, and the annotated video if one was requested at inference time).
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Dataset UUID.
Example:
7e70236e-e935-4bb0-91c8-26407e3d5838
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Chunked Uploads
APIs for uploading large files in multiple smaller file chunks.
Get all known chunked upload operations.
Create a chunked upload operation.
get /uploads
Get all known chunked upload operations.
utilize X-Auth-Token for authenticating all API requests.
HTTP status code 200
Result is a list of chunked upload operations. The list is ordered with most recently created last.
Body
Media type: application/json
Type: object
Example:
[
{
"_id": "a3bc8387-5490-4afe-9f5c-0fa87622ce89",
"owner": "testuser1",
"status": "completed",
"status_msg": null,
"file_name": "test_dataset.zip",
"file_size": 59401262,
"total_parts": 6,
"number_of_parts_received": 6,
"parts_status": [
"received",
"received",
"received",
"received",
"received",
"received"
],
"created_at_millis": 1616593865316,
"last_updated_millis": 1616593869583,
"closed_millis": 1616593869629
},
"",
{
"_id\"": "abc0f5b5-566c-457d-9e96-d473322bc32b"
},
{
"owner": "testuser1"
},
{
"status": "completed"
},
{
"status_msg": null
},
{
"file_name": "Arduino.zip"
},
{
"file_size": 13268108
},
{
"total_parts": 2
},
{
"number_of_parts_received": 2
},
{
"parts_status": [
"received",
"received"
]
},
{
"created_at_millis": 1616596347695
},
{
"last_updated_millis": 1616596351114
},
{
"closed_millis": 1616596351525
},
"",
"",
{
"_id\"": "7acbb1e6-6efc-420b-bb82-7c5e0717d150"
},
{
"owner": "testuser1"
},
{
"status": "starting"
},
{
"status_msg": null
},
{
"file_name": "dataset1.zip"
},
{
"file_size": 202400
},
{
"total_parts": 2
},
{
"number_of_parts_received": 0
},
{
"parts_status": [
"unknown",
"unknown"
]
},
{
"created_at_millis": 1616678128684
},
{
"last_updated_millis": 0
},
{
"closed_millis": 0
},
""
]
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /uploads
Create a chunked upload operation.
utilize X-Auth-Token for authenticating all API requests.
Body
Media type: application/json
Type: object
Properties- file_name: required (string)
The name of the original (whole) file.
- file_size: required (integer)
The size of the original file in bytes.
- number_of_parts: required (integer)
The number of file parts to be uploaded.
Example:
{
"file_name": "dataset1.zip",
"file_size": 202400,
"number_of_parts": 2
}
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "7acbb1e6-6efc-420b-bb82-7c5e0717d150",
"owner": "testuser1",
"status": "starting",
"status_msg": null,
"file_name": "dataset1.zip",
"file_size": 202400,
"total_parts": 2,
"number_of_parts_received": 0,
"parts_status": [
"unknown",
"unknown"
],
"created_at_millis": 1616678128684,
"last_updated_millis": 0,
"closed_millis": 0
}
HTTP status code 400
Creation failed due to user input problems.
Body
Media type: application/json
Type: object
Example:
{
"status": "BAD_REQUEST",
"fault": "AIVVS1003E: The input file name cannot be missing or empty.",
"more_info": null,
"type": "VInvalidInputException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Get details about a specific chunked upload operation.
Upload a single file part (chunk) associated with this upload operation.
Each uploaded file part must follow a specific naming convention. The file name must contain the original file name (e.g. dataset1.zip
) with a suffix that identifies the part number of the file. This part number suffix must be 3 decimal digits with leading zeros present (e.g. .001
). The first file starts with suffix .000
(e.g. dataset1.zip.000
) .
Deletes a specific chunked upload operation.
Delete will remove the upload tracking document and all uploaded file parts that have been received.
get /uploads/{id}
Get details about a specific chunked upload operation.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Upload Tracker UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "7acbb1e6-6efc-420b-bb82-7c5e0717d150",
"owner": "testuser1",
"status": "starting",
"status_msg": null,
"file_name": "dataset1.zip ",
"file_size": 202400,
"total_parts": 2,
"number_of_parts_received": 0,
"parts_status": [
"unknown",
"unknown"
],
"created_at_millis": 1616678128684,
"last_updated_millis": 0,
"closed_millis": 0
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
post /uploads/{id}
Upload a single file part (chunk) associated with this upload operation.
Each uploaded file part must follow a specific naming convention. The file name must contain the original file name (e.g. dataset1.zip
) with a suffix that identifies the part number of the file. This part number suffix must be 3 decimal digits with leading zeros present (e.g. .001
). The first file starts with suffix .000
(e.g. dataset1.zip.000
) .
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Upload Tracker UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
Body
Media type: multipart/form-data
Type: object
Example:
Content-Disposition: form-data;
[
name="files"; filename="safety.zip.001" Content-Type: multipart/form-data
]
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "7acbb1e6-6efc-420b-bb82-7c5e0717d150",
"owner": "testuser1",
"status": "receiving",
"status_msg": null,
"file_name": "dataset1.zip ",
"file_size": 202400,
"total_parts": 2,
"number_of_parts_received": 1,
"parts_status": [
"received",
"unknown"
],
"created_at_millis": 1616678128684,
"last_updated_millis": 1616678200000,
"closed_millis": 0
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
delete /uploads/{id}
Deletes a specific chunked upload operation.
Delete will remove the upload tracking document and all uploaded file parts that have been received.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
Upload Tracker UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "7acbb1e6-6efc-420b-bb82-7c5e0717d150",
"owner": "testuser1",
"status": "receiving",
"status_msg": null,
"file_name": "dataset1.zip ",
"file_size": 202400,
"total_parts": 2,
"number_of_parts_received": 0,
"parts_status": [
"receiving",
"unknown"
],
"created_at_millis": 1616678128684,
"last_updated_millis": 0,
"closed_millis": 0
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).
Aborts a specific chunked upload operation.
Abort makes the upload operation unusable and will cause any addition file part uploads to be rejected. It does not delete the tracker document or any already received file parts.
post /uploads/{id}/abort
Aborts a specific chunked upload operation.
Abort makes the upload operation unusable and will cause any addition file part uploads to be rejected. It does not delete the tracker document or any already received file parts.
URI Parameters
- id: required (string)
Upload Tracker UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "7acbb1e6-6efc-420b-bb82-7c5e0717d150",
"owner": "testuser1",
"status": "aborted",
"status_msg": null,
"file_name": "dataset1.zip",
"file_size": 202400,
"total_parts": 2,
"number_of_parts_received": 1,
"parts_status": [
"received",
"unknown"
],
"created_at_millis": 1616678128684,
"last_updated_millis": 1616678250000,
"closed_millis": 0
}
Commits a specific chunked upload operation.
Commit requires all parts to have been received and makes the uploaded file parts available for importing into the rest of the system.
post /uploads/{id}/commit
Commits a specific chunked upload operation.
Commit requires all parts to have been received and makes the uploaded file parts available for importing into the rest of the system.
URI Parameters
- id: required (string)
Upload Tracker UUID.
Example:
59bd043b-22b3-4bd3-927d-e4289c217147
HTTP status code 200
Body
Media type: application/json
Type: object
Example:
{
"_id": "7acbb1e6-6efc-420b-bb82-7c5e0717d150",
"owner": "testuser1",
"status": "completed",
"status_msg": null,
"file_name": "dataset1.zip",
"file_size": 202400,
"total_parts": 2,
"number_of_parts_received": 2,
"parts_status": [
"received",
"received"
],
"created_at_millis": 1616678128684,
"last_updated_millis": 1616678250000,
"closed_millis": 0
}
User Information
APIs to access user information
Get user information for the given userID or API Key. Only a user with Admin Role can get user information by user id. All non-Admin users will be rejected with 401. Non-admin users are allowed to get the user information for the user associated with an API key. The requested API key must be the same one provied in the X-AUTH-Token
header.
get /users/{id}
Get user information for the given userID or API Key. Only a user with Admin Role can get user information by user id. All non-Admin users will be rejected with 401. Non-admin users are allowed to get the user information for the user associated with an API key. The requested API key must be the same one provied in the X-AUTH-Token
header.
utilize X-Auth-Token for authenticating all API requests.
URI Parameters
- id: required (string)
User Id or API Key.
Example:
ab01-wXYZ-0987-23cd
HTTP status code 200
User information for the user associated with the given API key
Body
Media type: application/json
Type: object
Example:
{
"username": "tstuser1",
"createdTimestamp": 1602193758274,
"enabled": true,
"email": "tu1@nowhere.no"
}
HTTP status code 401
Given authentication token is not valid
Body
Media type: application/json
Type: object
Examples:
Bad Authentication Token:
{
"result": "fail",
"fault": "Failed to parse token."
}
non-admin user - Id Parameter does not match token:
{
"status": "UNAUTHORIZED",
"fault": "Non-admin users cannot access the 'users' APIs",
"more_info": null,
"type": "VNotAuthorizedException",
"result": "fail"
}
Secured by X-Auth-Token
Headers
- X-Auth-Token: required (string)
Used to send a valid Maximo Visual Inspect ReST API Key.
HTTP status code 401
API Key is not valid. This can happen if the API Key is incorrect (mis-typed) or has been invalidated (revoked).