-
Notifications
You must be signed in to change notification settings - Fork 61
/
apiary.apib
55 lines (50 loc) · 1.76 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
HOST: http://akkapatterns.eigengo.com/
--- Akka Patterns ---
---
The Akka Patterns API
---
--
Recognition resources
Akka Patterns can perform computer vision operation to recognise images being presented to it using this API. There is the future streaming API, which
will handle video streams.
The processing begins by POST to ``/recog/image/begin``, which obtains a session identifier. You then submit individual images to the ``/recog/image/{id}``
endpoint and receive either HTTP statuses:
* ``200`` if the recognition has complete; there are no more images to send,
* ``202`` if the image is OK, but there are more images to send,
* ``400`` if the submitted image has not passed its checks
--
Begins the recognition session, returns the session identifier. The session expires in 300 seconds.
POST /recog/image/begin
> Accept: application/json
< 200
< Content-Type: application/json
"a00ad7ef-99a3-4a6f-a2fb-571f4ce96978"
Submit the last accepted image to the recogniser core
POST /recog/image/{id}
> Accept: application/base64
"AAASBF="
< 200
< Content-Type: application/json
{ "token": "de0ad7ef-99a3-4a6f-a2fb-571f4ce96978" }
Submit an intermediate accepted image to the recogniser core
POST /recog/image/{id}
> Accept: application/base64
"AAASBF="
< 202
< Content-Type: application/json
{
"histogram":{"tooLight":false, "tooDark":false, "tooSaturated":false, "tooUnsaturated":false},
"focus":{"notInFocus":false},
"recog":{"notRecognised":false}
}
Submit an unacceptable image to the recogniser core
POST /recog/image/{id}
> Accept: application/base64
"AAASBF="
< 400
< Content-Type: application/json
{
"histogram":{"tooLight":false, "tooDark":true, "tooSaturated":false, "tooUnsaturated":false},
"focus":{"notInFocus":true},
"recog":{"notRecognised":false}
}