-
-
Notifications
You must be signed in to change notification settings - Fork 48
RESTful Endpoint API
matiasdelellis edited this page Dec 20, 2018
·
1 revision
Test it in your application, and can discuss ideas by posting issues on github.
- Authentication is done via HTTP auth.
- Root URL is https://
<host>
/<folder>
/index.php/apps/facerecognition
- 'url' => '/persons'
- 'verb' => 'GET'
Parameters
- None
Response
- A json array with the people and the files and the associated faces.
Response Example
[
{
"name":"Matias",
"id":1,
"faces": [
{"id":1,"file-id":"531"},
{"id":6,"file-id":"30648"},
...,
{"id":35,"file-id":"1835"}
]
},
...
{
"name":"Branko",
"id":12,
"faces": [
{"id":3,"file-id":"21"},
{"id":6,"file-id":"5068"},
...,
{"id":34,"file-id":"8793"}
]
}
]
- 'url' => '/file?fullpath=
{fullPath}
' - 'verb' => 'GET'
Parameters
-
fullPath
: Full path of inmage. e.g:/Images/IMG-20170316-WA0016.jpg
Response
- A json with info of image, and the associated persons and faces.
Response Example
{
"image_id":699,
"is_processed":"1",
"error":null,
"persons":[
{
"name":"Matias",
"person_id":1,
"face: {
"id":4,
"image":null,
"person":null,
"left":"409","right":"737","top":"464","bottom":"792",
"descriptor":null,
"creation_time":null
}
},
...
{
"name":"Branko",
"person_id":2,
"face": {
"id":5,
"image":null,
"person":null,
"left":"756","right":"1149","top":"482","bottom":"875",
"descriptor":null,
"creation_time":null
}
}
]
}
- 'url' => '/face/
{id}
/thumb/{size}
' - 'verb' => 'GET'
Parameters
-
{id}
: FaceId -
{size}
: Size of square thumbnail
Response
- A jpeg image showing the face in the indicated size.
Response Example
IMAGE THUMB JPEG
- 'url' => '/person/
{id}
' - 'verb' => 'PUT'
Parameters
-
{id}
: PersonId - PUT Content:
{"name": "NewPersonName"}
Response
- A json with the new name if change correctly
Response Example
{
"id":5,
"user":null,
"name":"NewPersonName",
"is_valid":null,
"last_generation_time":null,
"linked_user":null
}
- 'url' => '/process'
- 'verb' => 'GET'
Parameters
- None
Response
- A json with status of analysis.
Response Example
{
"status":true,
"estimatedFinalize": 936,
"totalImages":1255,
"processedImages":1316
}