Back to top

mui v1 API

v1 API is for communication between mui and client.

Base URL(for testing) : https://mui-api-test.mybluemix.net/api

Message

Message

Set Message
POST/v1/messages{?apiKey}

This API allows client to set instant message through mui.

Example URI

POST /v1/messages?apiKey=ad32sfKJLkjlk
URI Parameters
HideShow
apiKey
string (required) Example: ad32sfKJLkjlk

API Key(not use for testing)

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "address": "test_id",
  "contents": "this is message"
}
Response  200

Message

Get Message
GET/v1/messages{?apiKey,address}

Example URI

GET /v1/messages?apiKey=ad32sfKJLkjlk&address=test_id
URI Parameters
HideShow
apiKey
string (required) Example: ad32sfKJLkjlk

API Key(not use for testing)

address
string (required) Example: test_id

address of mui

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "address": "test_id",
  "contents": "this is message"
}

Whisper

“Whisper” is having optionally set time lag until showing message through mui(not instant message)

Whisper

Set Whisper
POST/v1/whisper{?apiKey}

This API allows client to set “whisper” message through mui.

Example URI

POST /v1/whisper?apiKey=ad32sfKJLkjlk
URI Parameters
HideShow
apiKey
string (required) Example: ad32sfKJLkjlk

API Key(not use for testing)

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
    "state":1,  // currently always set 1
    "contents":"this is whisper"
}
Response  200

Get Message
GET/v1/whisper{?apiKey}

Example URI

GET /v1/whisper?apiKey=ad32sfKJLkjlk
URI Parameters
HideShow
apiKey
string (required) Example: ad32sfKJLkjlk

API Key(not use for testing)

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "address": "test_id",
  "contents": "this is message"
}

Voice Mail

mui can record voice datas and send to server it. This API allows client to receive recorded data as “Voice Mail”.

Get Next Voice Mail ID

Get Next Voice Mail ID
GET/v1/voices{?apiKey,currentId}

To obtain Voice Mail which has been sent from mui in series, it needs to have un-acquired ID through this API.

Example URI

GET /v1/voices?apiKey=ad32sfKJLkjlk&currentId=ada13094kjakkcvmle
URI Parameters
HideShow
apiKey
string (required) Example: ad32sfKJLkjlk

API Key(not use for testing)

currentId
string (required) Example: ada13094kjakkcvmle

Voice Mail ID(for first time, please set “-1”)

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "id":"3slkfjlsjmslkfjweru3234",  // use next request
        "data":
        {
            "time":1490260000000,       // recorded time(UNIX time)
            "sender":"test_id"          // mui's ID which recorded voice data
        }
    }
]
Response  200

Get Voice Mail by ID

Get Voice Mail by ID
GET/v1/voices/{voiceId}{?apiKey}

Example URI

GET /v1/voices/3slkfjlsjmslkfjweru3234?apiKey=ad32sfKJLkjlk
URI Parameters
HideShow
voiceId
string (required) Example: 3slkfjlsjmslkfjweru3234

Voice Mail ID which want to acquired.

apiKey
string (required) Example: ad32sfKJLkjlk

API Key(not use for testing)

Response  200
HideShow

Response by URL of Audio files.

Headers
Content-Type: application/text
Body
https://xxxxxxx-blumix.cloudant.com/mui/xxxxx/input.wav 

Send Voice Mail

Send Voice Mail
POST/v1/voices{?apiKey}

Example URI

POST /v1/voices?apiKey=ad32sfKJLkjlk
URI Parameters
HideShow
apiKey
string (required) Example: ad32sfKJLkjlk

API Key(not use for testing)

Request
HideShow
Headers
Content-Type: multipart/form-data
Body
{
  "sender": "test_id",
  "voice": "input.wav"
}
Schema
{
  "type": "object",
  "properties": {
    "sender": {
      "type": "string"
    },
    "voice": {
      "type": "string",
      "description": "Voice Mail Data binry file."
    }
  },
  "required": [
    "sender",
    "voice"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200

Generated by aglio on 07 Apr 2017