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/{id} GET(getChannel), PUT(updateChannel), DELETE(deleteChannel)
channels/users GET(getUsersOfChannel)
channels/users/{id} POST(linkUserToChannel),DELETE(unlinkUserToChannel)
channels/records GET(getRecordsOfChannel)
channels/sendMessage POST(sendMessageToChannel)
channels/sendSOS POST(sendSOSToChannel)
channels/sendAlert POST(sendAlertToChannel)
channels/sendCustomMessage POST(sendCustomMessageToChannel)

User : Users of company or service

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

Organization : User group of company or service

URIMethod
organizations GET(getOrganizations)
organizations/{id} GET(getOrganization)
organizations/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