robbie.vision.rtc.http

Specification

RTC(Real Time Communications) Resource

For this HTTP API resource you will need a valid acces_token parameter.

Tip

For creating a valid token, please visit oAuth Token page.

Warning

NON-BASIC emotions and other advanced features might be ony available for premium tiers. Please see Pricing or contact sales@robbie.ai.

Base URL

https://visio.robbieapis.com/api/v1/rtc/

Spec

Action Method
CREATE POST /api/v1/rtc/create/
Create a new RTC Content
INGEST POST /api/v1/rtc/ingest/
Ingest a new image into the RTC Content
CREATE
Headers
Name Value
Content-Type application/json
Authorization Bearer access_token
Parameters
Parameter Type Description
source string Value SDK for Robbie Visio® API
Examples

Body:

1
2
3
{
    "source": "HTTP"
}

Curl:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
$ curl -i https://visio.robbieapis.com/api/v1/rtc/create/ \
    -X POST -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
    eyJ0ZW5hbnRfdWlkIjoidmlzaW9uLWIyZGEwMzI3N2M1MjQ4MDY4YTFhYzUyNTBlMjM0OD
    U2IiwiZXhwIjoxODA3NTYyMjU2LCJpc3MiOiJ2aXNpb24iLCJzY29wZXMiOlsiY29tbW9u
    cyJdLCJuYW1lc3BhY2UiOiJwcm9maWxlcy52aXNpb24udGVzdCIsIm9yZ2FuaXphdGlvbl
    91aWQiOiI1YTY2NGJlYjkyMjMzNzIwMzUzNTgzNzIzMjEjNzE2NTQ0IiwiYXVkIjoidmlz
    aW9uIiwiYWNjb3VudF91aWQiOiI4NGY2MDlmYTkyMjMzNzIwMzUzNTgzNzIzMTkjMDE3ND
    MzIiwiZW1haWwiOiJkZW1vQHJvYmJpZS5haSJ9.YXGAZ6nHwB_4-7litC8yMTywor7xmLR
    1bI2vA1FQ8b8" -X POST \
    -d '{ 
        "source": "HTTP" 
     }' \
     -H "Content-Type: application/json" 

Response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
HTTP/1.1 201 Created
Date: Sat, 03 Jun 2017 21:35:38 GMT
Content-Type: application/json
Content-Length: 192
Connection: keep-alive
Vary: Accept-Encoding
Server: Robbie
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
Access-Control-Expose-Headers: Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
1
2
3
{
    "id":"36df5d399223372035358250069#530959"
}
INGEST
Headers
Name Value
Content-Type application/json
Authorization Bearer access_token
Parameters
Parameter Type Description
source string Value SDK for Robbie Visio® API
Examples

Body:

1
2
3
4
5
6
7
8
{
   "labels": {
        "$id": "somefolk"
   },
   "timestamp": "2014-08-11T05:26:03.869245+00:00", 
   "content": "36df5d399223372035358250069#530959",
   "image": "@base64_encoded_image"
}

Curl:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
$ curl -i https://visio.robbieapis.com/api/v1/rtc/create/ \
    -X POST -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
    eyJ0ZW5hbnRfdWlkIjoidmlzaW9uLWIyZGEwMzI3N2M1MjQ4MDY4YTFhYzUyNTBlMjM0OD
    U2IiwiZXhwIjoxODA3NTYyMjU2LCJpc3MiOiJ2aXNpb24iLCJzY29wZXMiOlsiY29tbW9u
    cyJdLCJuYW1lc3BhY2UiOiJwcm9maWxlcy52aXNpb24udGVzdCIsIm9yZ2FuaXphdGlvbl
    91aWQiOiI1YTY2NGJlYjkyMjMzNzIwMzUzNTgzNzIzMjEjNzE2NTQ0IiwiYXVkIjoidmlz
    aW9uIiwiYWNjb3VudF91aWQiOiI4NGY2MDlmYTkyMjMzNzIwMzUzNTgzNzIzMTkjMDE3ND
    MzIiwiZW1haWwiOiJkZW1vQHJvYmJpZS5haSJ9.YXGAZ6nHwB_4-7litC8yMTywor7xmLR
    1bI2vA1FQ8b8" -X POST \
    -d '{
             "labels": {
                  "$id": "somefolk"
              },
             "timestamp": "2014-08-11T05:26:03.869245+00:00",
             "content": "36df5d399223372035361315390#889779" ,
             "image": @base64_encoded_image
        }' \
     -H "Content-Type: application/json" 

Warning

JSON Images: Due to JSON spec images or binary files are not supported, so @base64_encoded_image parameter must be replaced in the above call with the string representing the image encoded in Base64 to work. Know more about Base641 format and JSON spec2

Response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
HTTP/1.1 100 Continue

HTTP/1.1 201 Created
Date: Sat, 03 Jun 2017 22:01:41 GMT
Content-Type: application/json
Content-Length: 294
Connection: keep-alive
Vary: Accept-Encoding
Server: Robbie
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
Access-Control-Expose-Headers: Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
    "BASIC": {
        "DISGUST": 0.0,
        "HAPPINESS": 0.47,
        "SADNESS": 0.02, 
        "FEAR": 0.108, 
        "ANGER": 0.023, 
        "NEUTRAL": 0.116, 
        "SURPRISE": 0.262
    },
    "MAIN-NON-BASIC": "NON_BOREDOM",
    "FRAME": { 
         "id": "0#9223372035447041044869"
    },
    "TIME":1407734763.8692450523,
    "NON-BASIC": {
        "BOREDOM": 0.055,
        "NON_BOREDOM": 0.945
    },
    "MAIN-BASIC":"HAPPINESS"
}