F-Scan API
Variants to label vehicle licences
One Step image labeling (Answer direct in upload response)
- Post image to
/api/uploadWait
- Wait for response
- Get all images and Labels that are needed
- Jump back to step 1 for each image to label
Two Step image labeling (Ask for yourself for a result)
- Post image to
/api/upload save {uuid}
- Check
/api/results/{uuid} to get result
- Repeat step 2 until result is received
- Repeat step 1 for each image to label
Upload a vehicle licence image
POST /api/upload (Upload an image)
Headers
| name |
type |
description |
| token |
string |
API access token |
Parameters
| name |
type |
content-type |
description |
| file |
form-data |
image/jpg |
image as jpg |
| description |
form-data |
application/text (as string) |
(optional) description to the data e.g. employee number by the person who shoot the image |
Responses
| http code |
content-type |
response |
201 |
application/json |
{"id": <uuid>, "resultUrl": <url to results>}, "description": <url to description>} |
400 |
application/text |
There is something wrong with the image parameter |
403 |
application/json |
{"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/upload"} |
415 |
text/html;charset=utf-8 |
None |
Example cURL
curl -k -X POST -H "Content-Type: multipart/form-data" -H "token: {token}" -F "file=@image.jpg" https://api.detection-x.de/api/upload
POST /api/uploadWait (Upload an image to the API and immediately return links to the results)
Headers
| name |
type |
description |
| token |
string |
API access token |
Parameters
| name |
type |
content-type |
description |
| file |
form-data |
image/jpg |
image as jpg or png |
| description |
form-data |
application/text (as string) |
(optional) description to the data e.g. employee number by the person who shoot the image |
Responses
| http code |
content-type |
response |
201 |
application/json |
{"id": <uuid>, "resultUrl": <url to results>, "description": <url to description>} |
400 |
application/text |
There is something wrong with the image parameter |
403 |
application/json |
{"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/upload"} |
415 |
text/html;charset=utf-8 |
None |
Example cURL
curl -k -X POST -H "Content-Type: multipart/form-data" -H "token: {token}" -F "file=@image.jpg" https://api.detection-x.de/api/uploadWait
Get image, label or predicted label
GET /api/images (Get the latest image uuids from the API)
Headers
| name |
type |
description |
| token |
string |
API access token |
Path parameters
| name |
type |
default |
description |
| count |
int |
10 |
Number of tire UUIDs |
Parameters
| name |
type |
content-type |
description |
| None |
None |
None |
None |
Responses
| http code |
content-type |
response |
200 |
application/json |
json string with image uuids and timestamps |
401 |
application/json |
{"timestamp": <timestamp>,"status": 401,"error": "unauthorized","message": <error_hint>,"path": "/api/images"} |
404 |
None |
None |
Example cURL
curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/images?count={number}
GET /api/images/{uuid} (Get an image from the API)
Headers
| name |
type |
description |
| token |
string |
API access token |
Parameters
| name |
type |
content-type |
description |
| None |
None |
None |
None |
Responses
| http code |
content-type |
response |
200 |
application/jpg |
Image data |
401 |
None |
None |
404 |
None |
None |
Example cURL
curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/images/{uuid}
GET /api/results/{uuid} (Get the predicted label from the API)
Headers
| name |
type |
description |
| token |
string |
API access token |
Parameters
| name |
type |
content-type |
description |
| None |
None |
None |
None |
Responses
| http code |
content-type |
response |
200 |
application/json |
json string |
204 |
None |
None |
403 |
application/json |
{"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/results"} |
Example cURL
curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/results/{uuid}
GET /api/description/{uuid} (Get the description of an image)
Headers
| name |
type |
description |
| token |
string |
API access token |
Parameters
| name |
type |
content-type |
description |
| None |
None |
None |
None |
Responses
| http code |
content-type |
response |
200 |
application/text |
description text |
204 |
None |
None |
403 |
application/json |
{"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/allresults"} |
Example cURL
curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/description/{uuid}
Variables
| name |
description |
| uuid |
image uuid |
| token |
API access token |
This API is under continuous development, any advisement's and ideas are welcome. Contact at lukas.berner@detection-x.de