Specification of OpenAPI

Description of communication specification.

Protocol

RESTFul - HTTP/JSON

Content-Type: application/json

Character-Set: UTF-8

Response

HTTP response: Usually 200, Other case is only 404(No found) and so on(Web server's errors).

In case of Success: response json message

In case of Failure: failure json message(code, message)

If you receive 401, please try to server/auth process again.

{
    "code" : "401"
    "message" : "Not Authorized"
}
					

Authentication

A session key through company administrator's ID and interaction password

How to get a session key? see below Sequence Diagram.

Security

SSL/TLS communication

ID/Password authentication

One time session key

IP Filtering

Objects

Channel : Channels of company or service

URIMethod
channels GET(getChannels), POST(createChannel)
channels/purgeAll POST(purgeAll)
channels/{cid} GET(getChannel), PUT(updateChannel), DELETE(deleteChannel)
channels/{cid}/users GET(getUsersOfChannel)
channels/{cid}/users/{id} POST(linkUserToChannel),PUT(updateUserOfChannel),DELETE(unlinkUserToChannel)
channels/{cid}/records GET(getRecordsOfChannel)
channels/{cid}/sync POST(syncChannel)
channels/{cid}/sendMessage POST(sendMessageToChannel)
channels/{cid}/sendSOS POST(sendSOSToChannel)
channels/{cid}/sendAlert POST(sendAlertToChannel)
channels/{cid}/sendCustomMessage POST(sendCustomMessageToChannel)

User : Users of company or service

URIMethod
users GET(getUsers), POST(createUser)
users/{id} GET(getUser), PUT(updateUser), DELETE(deleteUser)
users/{id}/sendMessage POST(sendMessageToUser)

Organization : User group of company or service

URIMethod
organizations GET(getOrganizations)
organizations/{id} GET(getOrganization)
organizations/{id}/users GET(getUsersOfOrganization)

Record : Records

URIMethod
records GET(getRecords)
records/{id} GET(getRecord)

Sequence Diagram

Join server and get channel list

1) get servers' URL to connect and Rand.

2) get a session key from server by Rand. (Please note the Rand would be reset.)

3) get information through the session key

4) send keepalive every 3 minutes

5) get information through the session key