R-Scan API


Variants to label wheels

One Step image labeling (Answer direct in upload response)
  1. Post image to /api/uploadWait
  2. Wait for response
  3. Get all images and Labels that are needed
  4. Jump back to step 1 for each image to label
Two Step image labeling (Ask for yourself for a result)
  1. Post image to /api/upload save {uuid}
  2. Check /api/results/{uuid} to get result
  3. Repeat step 2 until result is received
  4. Repeat step 1 for each image to label

Upload a vehicle image, label or a correction

POST /api/upload (Upload an image with or without xml to the API)
Headers
name type description
token string API access token
Parameters
name type content-type description
file form-data image/jpg image as jpg
xmlString form-data application/xml (as string) (optional) xml as string
xmlFile form-data application/xml (as file) (optional) xml as file
description form-data application/text (as string) (optional) description to the data e.g. employee number by the person who shoot the image

xmlString and xmlFile cannot be used together

Responses
http code content-type response
201 application/json {"id": <uuid>, "unrolledImageUrl": <url to unrolledImage>, "unrolledBoxImageUrl": <url to unrolledBoxImage>, "labelUrl": <url to uploaded label>, "resultUrlUrl": <url to results>}, "descriptionUrl": <url to description>, "eanUrl": <url to possible ean>}
400 application/text Only xmlfile or xmlString is allowed, not both
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" -F "xmlFile=@labels.xml" 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
xmlString form-data application/xml (as string) (optional) xml as string
xmlFile form-data application/xml (as file) (optional) xml as file
description form-data application/text (as string) (optional) description to the data e.g. employee number by the person who shoot the image

xmlString and xmlFile cannot be used together

Responses
http code content-type response
201 application/json {"id": <uuid>, "unrolledImageUrl": <url to unrolledImage>, "unrolledBoxImageUrl": <url to unrolledBoxImage>, "labelUrl": <url to uploaded label>, "resultUrl": <url to results>}, "descriptionUrl": <url to description>, "eanUrl": <url to possible ean>}
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
POST /api/correction/{uuid} (Post a correction to the api)
Headers
name type description
token string API access token
Parameters

There are two accepted ways

name type content-type description
file form-data application/json correction as json format

or

name type content-type description
- raw application/json correction as json format
Responses
http code content-type response
201 application/json None
400 text/html;charset=utf-8 None (json object wrong?)
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
422 text/plain;charset=UTF-8 (Small hint where the problem in the json is)
Example cURL
 curl -k -X POST -H "Content-Type: application/json" -H "token: {token}" -d "{json_data}" https://api.detection-x.de/api/correction/{uuid}
POST /api/ean/{uuid} (Post an ean correction to the api)
Headers
name type description
token string API access token
Parameters

There are two accepted ways

name type content-type description
raw application/json {"corrected_ean": <ean as String>}
Responses
http code content-type response
201 application/json None
400 text/html;charset=utf-8 None (json object wrong?)
403 application/json {"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/upload"}
404 application/json None (UUID not existing or not belong to Token)
415 text/html;charset=utf-8 None
422 text/plain;charset=UTF-8 (Small hint where the problem in the json is)
Example cURL
 curl -k -X POST -H "Content-Type: application/json" -H "token: {token}" -d "{json_data}" https://api.detection-x.de/api/ean/{uuid}
------------------------------------------------------------------------------------------

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/xml or application/json xml or json string in your preferred format
204 None None
401 application/json {"timestamp": <timestamp>,"status": 401,"error": "unauthorized","message": <error_hint>,"path": "/api/results"}
404 None None
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/results/{uuid}
GET /api/labels/{uuid} (Get the uploaded 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/xml xml 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/labels"}
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/labels/{uuid}
GET /api/unrolledImages/{uuid} (Get unrolled 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
204 None None
403 application/json {"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/unrolledImages"}
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/unrolledImages/{uuid}
GET /api/unrolledBoxImages/{uuid} (Get unrolled image with bounding boxes 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
204 None None
403 application/json {"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/unrolledBoxImages"}
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/unrolledBoxImages/{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/description"}
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/description/{uuid}
GET /api/ean/{uuid} (Get all possible eans that fit to the tire on the 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 {"eans": [<List of possible eans>]}
204 None None
403 application/json {"timestamp": "2022-08-01T11:26:28.096+00:00", "status": 403, "error": "Forbidden", "message": "Access Denied", "path": "/api/description"}
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/ean/{uuid}
GET /api/features (Get all Features, that are in the model)
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 with all features
401 application/json {"timestamp": <timestamp>,"status": 401,"error": "unauthorized","message": <error_hint>,"path": "/api/features"}
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/features
GET /api/uses (Get count of uploads of a token)
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 {"uses": <number>, "token": <token>}
401 application/json {"timestamp": <timestamp>,"status": 401,"error": "unauthorized","message": <error_hint>,"path": "/api/uses"}
Example cURL
  curl -i -k -X GET -H "token: {token}" https://api.detection-x.de/api/uses

Variables

name description
uuid image uuid
token API access token
json_data Json object for the method it's used in
number A number
timestamp A timestamp
error_hint A hint what's going wrong

This API is under continuous development, any advisement's and ideas are welcome. Contact at lukas.berner@detection-x.de