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/count POST(getChannelCount)
channels/purgeAll POST(purgeAll)
channels/{cid} GET(getChannel), PUT(updateChannel), DELETE(deleteChannel)
channels/{cid}/users GET(getUsersOfChannel)
channels/{cid}/users/count GET(getUserCountOfChannel)
channels/{cid}/users/{id} POST(linkUserToChannel),PUT(updateUserOfChannel),DELETE(unlinkUserToChannel)
channels/{cid}/records GET(getRecordsOfChannel)
channels/{cid}/records/count GET(getRecordCountOfChannel)
channels/{cid}/uploads GET(getUploadsOfChannel)
channels/{cid}/uploads/count GET(getUploadCountOfChannel)
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/count GET(getUserCount)
users/{id} GET(getUser), PUT(updateUser), DELETE(deleteUser)
users/{id}/channels GET(getChannelsOfUser)
users/{id}/channels/count GET(getChannelCountOfUser)
users/{id}/uploads GET(getUploadsOfUser)
users/{id}/uploads/count GET(getUploadCountOfUser)
users/{id}/sendMessage POST(sendMessageToUser)

Organization : User group of company or service

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

Record : Records

URIMethod
records GET(getRecords)
records/count GET(getRecordCount)
records/byVideoChannelId GET(byVideoChannelId)
records/{id} GET(getRecord)

Upload : Uploads

URIMethod
uploads GET(getUploads)
uploads/count GET(getUploadCount)

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