Applying new port number.
to navigation to content

INNORIX Platform

48 GB Free
48 GB free in your server storage.
Language

IoT API Manual

With RESTful API, you can make IoT transfers in external applications.

API Overview

HTTP Address

Using the latest version : http://innorix.server.address/api/iot
Using specific version : http://innorix.server.address/api/iot/v2.0

HTTP Methods

Methods Actions Idempotent
POST Create No
GET Select Yes
DELETE Delete Yes

HTTP JSON Type

Request type : JSON Payload

{
    "name1" : "value",
    "name2" : ["value1", "value2"],
    "name3" : [
        {
            "name1" : "value1",
            "name2" : "value2"
        }
    ]
}

RESTful response status code

Code Description
200 200 Success - JSON payload succeeded
400 Bad Request - field validation failed
401 Unauthorized - API authorization failed
404 Not found – No resources
500 Internal Server Error – Server error

API authentication key

RESTful API Key

Authenticating APIs

Resource : POST, http://innorix.server.address/api/iot/{path}?api_key={authKey}
webpage) http://innorix.server.address/api/iot/schedule?api_key=NqfBvC3hu8pc6HFPPwF9

Request JSON
Key Value Description
authKey NqfBvC3hu8pc6HFPPwF9 RESTful API authentication key

Creating a repetitive transfer schedule

Resource : POST, http://innorix.server.address/api/iot/schedule?api_key={authKey}
ex) http://innorix.server.address/api/iot/schedule?api_key=NqfBvC3hu8pc6HFPPwF9U

Request JSON
Key Value Description
originID 141ace9d Origin device ID
destinationID 57fc704a Destination device ID
originFiles ["c:/img/filename.jpg", "c:/data"] Array of files of origin devices
If there is a folder path, IoT will transfer all subfolders and files inside the folder
savePath c:/storage/volume Save path in the destination devices
fileConditions all | change | new | regex all : All files in the folder
change : All files that changed size
new : All new files
regex: Use regular expressions
fileFilter
(fileConditions: regex)
{
  "regularExpr" : "*.txt;*.log",
  "caseInsensitive" : "true"
}
            
regularExpr
All files that match regular expressions
caseInsensitive
true : Case-sensitive
false : Not case-sensitive
duplicateFile overwrite | resume | skip | autoSave Process redundant files
overwrite : Overwrite
resume : Resume
skip : Skip
autoSave : Auto numbering such as (1), (2) and etc.
schedule
Every 3 days at 1PM
{
  "type" : "day",
  "time" : "13",
  "repeat" : "3"
}

On the first day of every month at 1PM
{
  "type" : "month",
  "time" : "13",
  "repeat" : "1"
}
type :
5 Kinds of schedules
day|week|hour|minute|month

time : The time to transfer [1~24]

repeat : Repetitive transfers
day - Transfer this every day
week - SUN | MON | TUE | WEN | THU | FRI | SAT
hour - Every this hours to transfer
minute - Every this minutes to transfer
month - Transfer this every day in a month
secureTransfer true | false true : Secure transfer
false :
fileIntegrity block | file | both | none block : By each block of a file
file : By a file
both : Both block and file
none :
monitorServer http://monitor.server.address InnoMT monitoring server address
ldapID LDAP ID Network ID
ldapPassword LDAP Password Network Password
callbackURL C:/storage/image.batch.cmd Right after transferring, execute commands in the destination devices
custom
{
  "seqnum" : "161224-01",
  "filedesc" : "CCTV Recode"
}
As additional values, developers can add what they need.

Deleting a schedule

Resource : DELETE, http://innorix.server.address/api/iot/schedule/{scheduleID}?api_key={authKey}
ex) http://innorix.server.address/api/iot/schedule/f675141ace9d-015b?api_key=NqfBvC3hu8pc6HFPPwF9

Request JSON
Key Value Description
scheduleID f675141ace9d-015b The schedule ID

Viewing a schedule

Resource : GET, http://innorix.server.address/api/iot/schedule/{scheduleID}?api_key={authKey}
ex) http://innorix.server.address/api/iot/schedule/f675141ace9d-015b?api_key=NqfBvC3hu8pc6HFPPwF9

Request JSON
Key Value Description
scheduleID f675141ace9d-015b The schedule ID
Response JSON
Key Value Description
originID 141ace9d Origin device ID
destinationID 57fc704a Destination device ID
originFiles ["c:/img/filename.jpg", "c:/data"] Array of files of origin devices
If there is a folder path, IoT will transfer all subfolders and files inside the folder
savePath /storage/volume Save path in the destination devices
fileConditions
(fileConditions: regex)
all | change | new | regex all : All files in the folder
change : All files that changed size
new : All new files regex : Use regular expressions
fileFilter
{
  "regularExpr" : "*.txt;*.log",
  "caseInsensitive" : "true"
}
regularExpr
All files that match regular expressions
caseInsensitive
true : Case-sensitive
false : Not case-sensitive
duplicateFile overwrite | resume | skip | autoSave overwrite | resume | skip | autoSave Process redundant files
overwrite : Overwrite
resume : Resume
skip : Skip
autoSave : Auto numbering such as (1), (2) and etc.
schedule
schedule	Every 3 days at 1PM
{
  "type" : "day",
  "time" : "13",
  "repeat" : "3"
}

On the first day of every month at 1PM
{
  "type" : "month",
  "time" : "13",
  "repeat" : "1"
}

type :
5 Kinds of schedules
day|week|hour|minute|month

time : The time to transfer [1~24]

repeat : Repetitive transfers
day - Every this hours to transfer
week - SUN | MON | TUE | WEN | THU | FRI | SAT
hour - Every this hours to transfer
minute - Every this minutes to transfer
month - Every this day in a month
secureTransfer true | false true : Secure transfer false :
fileIntegrity block | file | both | none block : By each block of a file file : By a file both : Both block and file none :
monitorServer http://monitor.server.address InnoMT monitoring server address
callbackURL http://your.callback.url/callback Right after transferring, callback URL
Use the same JSON data that is made when creating a schedule
callbackExcute C:/storage/image.batch.cmd Right after transferring, execute commands in the destination devices
custom
{
  "seqnum" : "161224-01",
  "filedesc" : "CCTV Recode"
}

As additional values, developers can add what they need.

Creating a one-time transfer schedule

Resource : POST, http://innorix.server.address/api/iot/instant?api_key={authKey}
ex) http://innorix.server.address/api/iot/instant?api_key=NqfBvC3hu8pc6HFPPwF9

Request JSON
Key Value Description
originID 141ace9d Origin device ID
destinationID 36ef5931 Destination device ID
originFiles ["c:/img/filename.jpg", "c:/data"] Array of files of origin devices
If there is a folder path, IoT will transfer all subfolders and files inside the folder
savePath c:/storage/volume Save path in the destination devices
fileConditions all | change | new | regex all : All files in the folder
change : All files that changed size
new : All new files
regex : Use regular expressions
fileFilter
(fileConditions: regex)
{
  "regularExpr" : "*.txt;*.log",
  "caseInsensitive" : "true"
}
regularExpr
All files that match regular expressions
caseInsensitive
true : Case-sensitive
false : Not case-sensitive
duplicateFile overwrite | resume | skip | autoSave Process redundant files
overwrite : Overwrite
resume : Resume
skip : Skip
autoSave : Auto numbering such as (1), (2) and etc.
secureTransfer true | false true : Secure transfer
false :
fileIntegrity none | block | file | both block : By each block of a file
file : By a file
both : Both block and file
none :
monitorServer http://monitor.server.address InnoMT monitoring server address
ldapID LDAP ID Network ID
ldapPassword LDAP Password Network Password
callbackURL http://your.callback.url/callback Right after transferring, callback URL
Use the same JSON data that is made when creating a schedule
callbackExcute C:/storage/image.batch.cmd Right after transferring, execute commands in the destination devices
custom
{
  "seqnum" : "161224-01",
  "filedesc" : "CCTV Recode"
}

As additional values, developers can add what they need.

Sample code to execute commands right after a one-time transfer

1) API authentication key

Click Settings > RESTful API Key

2) Requesting a device list

Resource : GET, http://innorix.server.address/api/iot/device?api_key=NqfBvC3hu8pc6HFPPwF9

// Response
[
    {
      "id" : "141ace9d",,
      "name" : "California-USA",
      ...
    },
    {
      "id" : "141ace9d",,
      "name" : "California-USA",
      ...
    },
]

3) Executing a command right after transferring an image file to the device in the device list

Resource : POST, http://innorix.server.address/api/iot/instant?api_key=NqfBvC3hu8pc6HFPPwF9

// Request Body
 {
    "originID" : "57fb1e0b25be7c371b485f8f",
    "destinationID" : "54fb1e0b25bed141231sdfd",
    "originFiles" : ["c:/img/pic.jpg", "c:/mov/cam.mp4", "c:/img/thumnails/"],
    "savePath" : "c:/storage/volume",
    "callbackExecute" : "C:/storage/batch.cmd"
    ...
 }

4) Right after transferring “C:/storage/batch.cmd" will be executed.

Viewing device list

Resource : GET, http://innorix.server.address/api/iot/device?api_key={authKey}
ex) http://innorix.server.address/api/iot/device?api_key=NqfBvC3hu8pc6HFPPwF9

Response JSON
Key Value Description
deviceID "141ace9d" devices names
name "California-USA" device names
ip "172.30.1.1" device IP addresses
os "windows" OS of devices
schedules
[
    {
        scheduleID : "f675141ac9d-015b",
        regDate    : "1476257307",
        type : "start"
    },
    {
        scheduleID : "f675141ac9d-015c",
        regDate    : "1476257370",
        type : "target"
    }
    ...
]
Schedule ID, registration date
state stable
Device states
stable
unstable
error

Viewing device information

Resource : GET, http://innorix.server.address/api/iot/device/{deviceID}?api_key={authKey}
ex) http://innorix.server.address/api/iot/device/57fb1e0b25be7c371b485f8f?api_key=NqfBvC3hu8pc6HFPPwF9

Response JSON
Key Value Description
deviceID "141ace9d" Devices names
name "California-USA" Device names
ip "172.30.1.1" Device IP addresses
os "windows" OS of devices
schedules
[
    {
        scheduleID : "f675141ac9d-015b",
        regDate    : "1476257307",
        type : "start"
    },
    {
        scheduleID : "f675141ac9d-015c",
        regDate    : "1476257370",
        type : "target"
    }
    ...
]
Schedule ID, registration date
state stable
Device states
stable
unstable
error
System Message
It can not be changed in Live Demo.
if (!empty($subMenuActive) && !empty($menuActive)) { $testActive = function ($sub) use ($subMenuActive, $menuActive) { return $sub === $menuActive . '/' . $subMenuActive ? 'on' : 'off'; }; } else { $testActive = function () { return ''; }; }