NAV Navbar

Introduction to IVEN

Welcome to IVEN!

What is IVEN?

IVEN, founded in 2015, is an IoT enabler company that offers an easy, rapid & affordable IoT Platform for the companies that are seeking for IoT solutions. Companies who aims to use IVEN's product(s) generally intend to (1) explore some new revenue opportunities that the Internet of Things brings, (2) reduce their after sales or operational costs, (3) follow up the data that their devices generate in order to support R&D activities.

Why IVEN?

IVEN wants to solve their problems with IoT from any aspect. There are plenty diversified amount of markets, businesses, their problems and level of technology out there and for them to find solutions to their problems, IoT enablement comes into place for action. IoT enablement, as the name implies, is our concept that stands for transforming a legacy solution into an IoT solution. This has a very wide ranging from hardware to analytics and Iven can provide a solution or solutions for any step. You can be either a customer success manager of a white goods company that wants to monitor and control their goods remotely to satisfy customers, a business developer of a router company that wants to extract analytics to increase efficiency or an IoT enthusiast developer that wants to create a smart home application for your own home to make your life easier. These are all real cases out in the world; you have and will have problems that locks you without an IoT solution and Iven is your key for it.

Considering the fact that the market will have 20+ billion devices and endpoints will spend $3 trillion by 2020, IVEN positions itself directly on this market and will chase a cut from this huge market.

Vision

Concepts

Account

Account is the highest management layer of IVEN Platform. Every user must have have an account in order to enable operations in the platform.

Space

Space is the name of the management layer which contains devices who somehow have a connection between each other in IVEN Platform.

Device

Device is the thing which is defined in the IVEN Platform, produces data and has a physical existence.

Device Template

It is the template that contains properties and variables of devices that are planned to be added in the platform. Multiple and/or single devices can be added to the platform using device templates.

Advanced Function

Advance functions are functions that are defined under device templates, which are aiming to transform, decode and enrich real time device data.

Secret Key

Secret Key is the security sector standard for device-cloud connectivity.

Registration of Device

Registration to IVEN

Registration is defining the properties of a device in the IVEN Platform.

Connection to IVEN

Connection is the connectivity of the registered device with the MQTT Broker.

Activation of Device

Activation is the state of the registered and connected device which is able to send and receive data.

Device Connectivity

Cloud-to-Device

Cloud-to-Device connectivity is sending data from the cloud to the device via MQTT Broker.

Firmware Definition

Firmware Definition is defining the firmware and the version info on the IVEN Platform and making the firmware ready for deployment to activated devices.

Firmware Deployment

Firmware Deployment is deploying device firmwares to the correlated devices from the IVEN Platform.

Command

Command is sending data from the cloud to the device aiming to trigger defined actions on the device.

Device-to-Cloud

Publish Data

Publish Data is sending data from the device via MQTT Broker to the platform.

Real Time Data Display

Real Time Data Display(Device Shadow) is the methodolgy for showing real time data of the device which is physically existing. This is simply a virtual copy of the physical device.

Real Time Rule Engine

Real Time Rule Engine is the structure which enables users to define rules on the real time device data in order to take actions for the business need.

MQTT

What is MQTT?

MQTT(Message Queuing Telemetry Transport) is light weigth publish/subscribe based messaging protocol. MQTT is the popular message transport protocol for IoT(Internet of Things) ecosystem. The main difference between HTTP(Hyper Text Transport Protocol) and MQTT is the packet sizes of the messages. In MQTT packet sizes are much more smaller than HTTP packet sizes. This is an important advantange for Machine to Machine (M2M) messages in IoT ecosystem. Additionaly, MQTT supports bidirectional connection for any system.

Connect/Disconnect

Client want to send a message to a device or take a message from the device, however the device must be connected to IVEN Platform. When the device status in IVEN Platform shows CONNECTED than device can take control of device. When the device connected to MQTT Broker, device or device can send or take any messages. After session ends broker close the device connection and device connection status displays as DISCONNECTED. Additionally, if device wants to close the connection, device is able do so.

MQTT Requirements

IVEN uses password based authentication connection for connecting the MQTT broker.

MQTT Broker Host : mqtt://mqtt.qa.ivenplatform.com
MQTT Broker Port : 1883
Protocol : mqtt/tcp
Username :
Password :
Keep Alive : 30

Publish/Subscribe

Topic

A device needs to pull(subscribe) or send(publish) message to the producer. Therefore, the device needs a topic in order to identify the action.

Subscribe

Subscribe is needed for pulling messages from IVEN Platform. If a device subscribe to a topic, than the device can take the data sended to that topic using the MQTT Broker.

Publish

Publish is needed for sending messages to IVEN Platform. If the user publish a message from IVEN Platform, than the message is transmitted to the devices which are subscribed to the related topic.

IVEN MQTT Topics

IVEN MQTT Topic Formats

{
  "type": "act",
  "topicName": "v1/act/<accessToken>",
}
{
  "type": "cmd",
  "topicName": "v1/cmd/<deviceId>",
}
{
  "type": "frm",
  "topicName": "v1/frm/<deviceId>",
}
{
  "type": "evt",
  "topicName": "v1/evt/<deviceId>",
}
{
  "type": "fdb-frm",
  "topicName": "v1/fdb-frm/<deviceId>",
}
{
  "type": "fdb-cmd",
  "topicName": "v1/fdb-cmd/<deviceId>",
}
{
  "type": "test",
  "topicName": "v1/test/<deviceId>",
}
{
  "type": "syslog",
  "topicName": "v1/syslog/<deviceId>",
}
Topic Name Topic Type Description
act SUBSCRIBE After device registration, a space member has a Device ID and Activation token.User can have this topic Connected Device subscribes to v1/act/activationToken in order to get activation info (part of registration).By using activation token, user can learn topics to subscribe or publish. After device get activation, then device automatically
cmd SUBSCRIBE Devices will publish to following topics in order to notify the system about previously sending commands statuses
frm SUBSCRIBE Devices will subscribe to following topics for getting update firmware requests
evt PUBLISH Devices will publish to following topics in order to notify the system about device streaming
fdb-frm PUBLISH Devices will publish to following topics in order to notify the system about previously sending firmwares statuses
fdb-cmd PUBLISH Devices will publish to following topics in order to notify the system about previously sending commands statuses
test PUBLISH Devices will publish to following topic for testing connectivity
syslog PUBLISH Device will publish to following topic for logging all activities of the device

IVEN Step By Step Platform Documentation

Space Management

User Management

Register

If you do not have you can create quickly. register

Login

Enter your email and password login

Space Create

A space is the first step to start an IOT solution. By creating a space, a user can be space owner to manage space settings. In IVEN platform, space creator will be invite other users to work at same space in the future.

space

Click “create space” and enter your space.

space

Step by Step Device Management

Device Registration

An IoT lifecycle starts with device registration. User must create a device in IVEN platform by providing following informations

Creating Single Device

device

Device Information

device

Register

Select a Secret Key

Generating New Secret Key

Using Existing Secret Key

Secret Key Creation

If you do not have any secretkey, you have to create a secret key.

secret

After click “Generate a new Secret Key” button

secret

Enter Secret Key name value

secret

After copying and/or downloading your secret, click “I’ve got my Secret Key” and close the window.

Now you can register a device with the generated secret key.

Click the device and register device with the generated secret key.

secret

Select your secret key and continue registering your device.

Bulk Device Registration

Bulk Device registration is use for collective device register operation.

As a pre-requisite, we must have a device template for Bulk Device Registration.

Device Template Creation

template

If you didn’t create a device template before, create your first template.

Provide information(properties and tags) for the template like creating a new device, however without unique identifier.

template template

After finishing click “Create New Template”.

template

Note: If you want to create more templates, you will simply use this page and click “Create New Template” button for new templates.

Also you can use templates for “Create Single Device” and “Create Bulk Devices” operations.

If you choose “Create Single Device” option with the created template, than you will provide Unique Identifier for the device and a Device Name. Also you can add new property or tag for the device.

device

If you choose “Create Bulk Devices” you have to provide a .CSV file which includes device IDs of the devices.

device

When you upload .CSV file you will look this page and display contains that will be create device number.

If your space does not have any Secret Key, firstly you have to generate a new key.

device

Secret Key is a pre-requisite for bulk device registration. If you do not have a secret key, than you have to create one in order to continue you registration.

In this page you will see template details for bulk device registration.

After controlling the template, click “Start Bulk Creation & Registration” and you will be directed to Operational Logs page.

task

In task detail you will see all the necessary information about the operation.

task

Device Connection

After registering your Device to IVEN Platform successfully, now you can connect to with your device IVEN Platform.

We can test with Mqttbox program. Download MQTTBOX

First create a mqtt client.

mqttbox

Copy client id and mqtt host from IVEN platform.

mqttbox

Enter clientid and mqtt host link to mqttbox.

Fill the provided field to MqqtBox as following:

mqttbox

After Save..

mqttbox

mqttbox

Congratulations! You have successfully connected your Device to IVEN Platform!

Device Activation

Now you can test sending data from MQTT Box to the platform

mqttbox

mqttbox

After subscribe topic Activation Status is done

mqttbox

With evt event publish an empty JSON object for testing. After publishing an empty JSON object Data Received process is done.

mqttbox

mqttbox

After data received we can see device topic items with description.

mqttbox

Now we can go detailed device page with clicking "Take me to Device's page”.

platform

Lets publish data and check device last state,for example temperature=24 ;

platform

View Single Device Detail

platform

Device information section shows us name, description, ID, unique Identifier and tags.

Device last state section shows us device shadow. Device shadow is the virtual twin of the physical device. Device shadow is used for storing physical device's last state and retrieving last state along with updated property statistics. So, IVEN Platform can request device's last state and property statistics whenever it is necessary. When device status is offline, device last state update commands are kept on device shadow to actuate physical device later.

For historic data of the device, click “See Historical Data” and add a date for filtering.

In device logs section we can add filter and see device logs.

Device Test Mode

Devices will publish to following topic for testing connectivity.The topic is v1/test.If the test mode is turned on, the transmitted data will not affect the device last state.Test mode button is under the device logs section.

Firmwares

Create Firmware

We need to create a firmware for sending device or devices firmware updates from firmware tab.

For the first time;

firmware

If you have a firmware;

firmware

We need to enter a firmware name and metadata to create a firmware.

firmware

firmware

Click the created firmware and create new firmware version.

firmware

Enter the firmware version name or number or link.

API Documentation

Account Management API

The API to login and edit profile information inside the platform.

POST : Register

Create Account

{
  "email":"test@mail.com",
  "password":"S1fre8char",
  "firstName":"test",
  "lastName":"test",
  "company":"ivenOptional",
  "telephone":"5554443322"
}

Expected Response (200)

{
    "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiVXNlciIsInN1YiI6Ijk3NjY3MzQ3LWI3YzctNGY1Ni1iNDZmLWMyZTAzMmYzMDhlNyIsImV4cCI6MTU0MDIwMDEwNH0.DDll23ZeMta_L4VMx37sIiKMWJOS2lejYQ1Qi-0QYPc",
    "refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiVXNlciIsInN1YiI6Ijk3NjY3MzQ3LWI3YzctNGY1Ni1iNDZmLWMyZTAzMmYzMDhlNyIsImV4cCI6MTU0MDI4NjIwNH0.8rYID3UhFUfLIalmSzbR7vA1OKc3Tisy-kht-e2RhsE",
    "fullName": "iven test"
}

Already Existing Account Response (409)

{
    "httpStatus":409,
    "errorCode":"080010",
    "domain":"AUTH",
    "devMessage":"Check provided email, Already exists exception",
    "userMessage":"User with provided email already taken",
    "time":1542008550161
}

POST http://ivenplatform.com/api/auth/register

Request Parameters

parameter description
email for login operation use a valid mail address (required)
password for login operaion use a valid password. Password can least 8 character and number or word parameters are acceptable, special characters are unacceptable. (required)
firstName account owner's name (required)
lastName account owner's surname (required)
company acoount owner's company (optinal)
telephone account owner's telephone (optional)

Response Parameters

parameter description
accessToken header parameter to authorize user to IVEN Platform
refreshToken header parameter to authorize user to IVEN Platform
fullName account owner's name

POST : Login

Login

{
  "email":"testaccount@mail.com",
  "password":"S1fre8char"
}

Expected Response (200)

{
    "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiVXNlciIsInN1YiI6Ijk3NjY3MzQ3LWI3YzctNGY1Ni1iNDZmLWMyZTAzMmYzMDhlNyIsImV4cCI6MTU0MDIwMDE2Mn0.ITwmCrDPXSRv9gfHgE3rTCA1nMVcfjvPvyBUsj1-Dl4",
    "refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiVXNlciIsInN1YiI6Ijk3NjY3MzQ3LWI3YzctNGY1Ni1iNDZmLWMyZTAzMmYzMDhlNyIsImV4cCI6MTU0MDI4NjI2Mn0.MGnQBCOWqESUxjBfYE31yyuHB_6BSoc582PURiKLwx0",
    "fullName": "iven test"
}

Not Existing Account Response (401)

{
    "httpStatus":401,
    "errorCode":"080003",
    "domain":"AUTH",
    "devMessage":"Check provided credentials, Unauthorized",
    "userMessage":"User not found",
    "time":1542008165839
}

POST http://ivenplatform.com/api/auth/login

Request Parameters

parameter description
email registered user mail address
password user password

Response Parameters

parameter description
accessToken header parameter to authorize user to IVEN Platform
refreshToken header parameter to authorize user to IVEN Platform
fullName account owner's name

POST : Logout

Logout

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Expired Token (401)

{
    "httpStatus":401,
    "errorCode":"023",
    "domain":"AUTH",
    "devMessage":"Token is expired",
    "userMessage":null,
    "time":null
}

Already Logout (401)

{
    "httpStatus":401,
    "errorCode":"080026",
    "domain":"AUTH",
    "devMessage":"This user has no available token",
    "userMessage":"This user has no available token",
    "time":1542008450595
}

POST http://ivenplatform.com/api/auth/logout

Header Parameters

parameter description
Authorization Bearer refreshToken

Request Parameters

An empty json

Response Parameters

parameter description
done boolean result of operation

Space Management API

The API to create a space for managing the devices and users that somehow has a connection between each other.

POST : Create Space

Create Device on IVEN Platform

{
    "name":"test-space"
}

Expected Response (200)

{
    "id": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/spaces

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
name specific name for describe space name

Response Parameters

parameter description
id given space id by IVEN Platform (UUID)

GET : Get My Spaces

Expected Response (200)

{
    "spaces": {
        "items": [
            {
                "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
                "name": "test-space",
                "createdBy": ""
            }
        ],
        "page": 1,
        "pageSize": 1,
        "count": 1,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/spaces/me?spaceId=<spaceId>&pageNo=<pageNo>&pageSize=<pageSize>&sort=<sort>&sortType=<sortType>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameters

parameter description
spaceId which space will create secret (UUID)
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ASC) - type = string (Optional)

Response Parameter

parameter description
id given space id from IVEN Platform (UUID)
name given space name by space member
createdBy who created the space

GET : Get Space

Expected Response (200)

{
    "id": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "name": "test-space",
    "createdBy": ""
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/spaces/<spaceId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
spaceId spaceId that want to see details (UUID)

Response Parameter

parameter description
id given space id from IVEN Platform (UUID)
name given space name by space member
createdBy who created the space

Device Management API

The API to create devices, monitor data streaming, manage connectivity and send commands to the devices under the same space.

POST : Device Create

Create Device on IVEN Platform

{
    "propertiesSchema": {
       "$schema": "http://json-schema.org/draft-04/schema#",
       "type": "object",
       "properties": {
           "temp": {
               "type": "number"
           },
           "high_temp": {
               "type": "boolean",
               "function": "temp>81"
           },
           "temp_kelvin":{
               "type": "number",
               "function":"temp+273"
           }
       }
   },
    "tags":{
        "tagName":"deneme"

    },
    "verifyPayload":false,
    "name":"test-device",
    "uniqueId":"3oy59n5cpkdw2glh16ge",
    "spaceId":"bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea"
}

Expected Response (200)

{
    "id": "214e68fd-8b59-4e72-aa9d-058433a44328"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/devices

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
propertiesSchema device properties that send/receive data types to device. Additionaly IVEN Platform supports MVEL. With MVEL operations space member can describe a special property of change of any property.
Example: Space member describe "temp" property to data operations and member can describe a new property that control/check/type transformation etc. of "temp" property. "high_temp" is a boolean parameter and checks "temp" bigger "81" or not. "temp_kelvin" is a number parameter and transform Calcius to Kelvin.
tags device specific tags for grouping devices
verifyPayload
name device name (should be unique)
uniqueId device specific id (should be unique) (UUID)
spaceId space id of creating device

Response Parameters

parameter description
id special id of created device (UUID)

GET : Device Details With DeviceId

Expected Response (200)

{
    "id": "214e68fd-8b59-4e72-aa9d-058433a44328",
    "name": "test-device",
    "description": null,
    "uniqueId": "3oy59n5cpkdw2glh16ge",
    "templateId": null,
    "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "assignedFirmwareVersion": null,
    "assignedFirmwareId": null,
    "reportedFirmwareVersion": null,
    "testModeActivated": true,
    "tags": {
        "tagName": "deneme"
    },
    "propertiesSchema": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
            "temp": {
                "type": "number"
            },
            "high_temp": {
                "type": "boolean",
                "function": "temp>81"
            },
            "temp_kelvin": {
                "type": "number",
                "function": "temp+273"
            }
        }
    },
    "status": "ACTIVE",
    "connectionStatus": "DISCONNECTED",
    "topicInfoDeliveryStatus": "TOPIC_INFO_SENT",
    "currentSecretId": "c500b5eb-b76b-43e2-a0d8-988c6fa45f1f",
    "desiredSecretId": null
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/devices/<deviceId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceID deviceId that want to see details (UUID)

Response Parameter

parameter description
id given device id from IVEN Platform (UUID)
name given device name by space member
description given device description by space member
uniqueId given unique id by space member
templateId reference template id for tags and properties
spaceId which space belong to given device
assignedFirmwareVersion which firmware version assigned to given device
assignedFirmwareId assigned firmware id to device
reportedFirmwareVersion which firmware version accepted by device
testModeActivated test mode status (TRUE/FALSE)
tags given device tags by space member
propertiesSchema given device properties by space member
status device status
connectionStatus device connection status
topicInfoDeliveryStatus topic info delivery status
currentSecretId which secret id hashed with device id at device register
desiredSecretId which secret key is acceptaple alternatively
Device Status Parameters
NOT_CREATED
CREATED
ACTIVE
PASSIVE
DELETED
Device Connection Status Parameters
UNKNOWN
CONNECTED
DISCONNECTED
Topic Information Status Parameters
TOPIC_INFO_NOT_PUBLISHED
TOPIC_INFO_PUBLISHED
TOPIC_INFO_SENT
TOPIC_INFO_DELIVERED

GET : Device Details With UniqueId

Expected Response (200)

{
    "id": "214e68fd-8b59-4e72-aa9d-058433a44328",
    "name": "test-device",
    "description": null,
    "uniqueId": "3oy59n5cpkdw2glh16ge",
    "templateId": null,
    "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "assignedFirmwareVersion": null,
    "assignedFirmwareId": null,
    "reportedFirmwareVersion": null,
    "testModeActivated": true,
    "tags": {
        "tagName": "deneme"
    },
    "propertiesSchema": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
            "temp": {
                "type": "number"
            },
            "high_temp": {
                "type": "boolean",
                "function": "temp>81"
            },
            "temp_kelvin": {
                "type": "number",
                "function": "temp+273"
            }
        }
    },
    "status": "ACTIVE",
    "connectionStatus": "DISCONNECTED",
    "topicInfoDeliveryStatus": "TOPIC_INFO_SENT",
    "currentSecretId": "c500b5eb-b76b-43e2-a0d8-988c6fa45f1f",
    "desiredSecretId": null
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/devices/uniqueId/<uniqueId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
uniqueId device uniqueId that want to see details (UUID)

Response Parameter

parameter description
id given device id from IVEN Platform (UUID)
name given device name by space member
description given device description by space member
uniqueId given unique id by space member
templateId reference template id for tags and properties
spaceId which space belong to given device
assignedFirmwareVersion which firmware version assigned to given device
assignedFirmwareId assigned firmware id to device
reportedFirmwareVersion which firmware version accepted by device
testModeActivated test mode status (TRUE/FALSE)
tags given device tags by space member
propertiesSchema given device properties by space member
status device status
connectionStatus device connection status
topicInfoDeliveryStatus topic info delivery status
currentSecretId which secret id hashed with device id at device register
desiredSecretId which secret key is acceptaple alternatively
Device Status Parameters
NOT_CREATED
CREATED
ACTIVE
PASSIVE
DELETED
Device Connection Status Parameters
UNKNOWN
CONNECTED
DISCONNECTED
Topic Information Status Parameters
TOPIC_INFO_NOT_PUBLISHED
TOPIC_INFO_PUBLISHED
TOPIC_INFO_SENT
TOPIC_INFO_DELIVERED

PUT : Activate Device

Device Activate

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

Already Activated Device Response (400)

{
    "httpStatus": 400,
    "errorCode": "020005",
    "domain": "DEVICE",
    "devMessage": "Command io.iven.platform.device.impl.cmd.ActivateDevice@59f827d1 is invalid in the current state of app 214e68fd-8b59-4e72-aa9d-058433a44328 (ACTIVE)",
    "userMessage": "Invalid command",
    "time": 1542024888138
}

PUT http://api.ivenplatform.com/devices/<deviceId>/activate

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

URL Request Parameter

parameter description
done gives boolean result of operation

PUT : Deactivate Device

Device Deactivate Test Mode

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

Already Deactivated Device Response (400)

{
    "httpStatus": 400,
    "errorCode": "020005",
    "domain": "DEVICE",
    "devMessage": "Command io.iven.platform.device.impl.cmd.DeactivateDevice@560be9a2 is invalid in the current state of app 214e68fd-8b59-4e72-aa9d-058433a44328 (PASSIVE)",
    "userMessage": "Invalid command",
    "time": 1542024916337
}

PUT http://api.ivenplatform.com/devices/<deviceId>/deactivate

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

URL Request Parameter

parameter description
done gives boolean result of operation

POST : Create Secret

Create Secret

{
    "name": "secretKey",
    "spaceId" : "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2e"
}

Expected Response (200)

{
    "id": "c500b5eb-b76b-43e2-a0d8-988c6fa45f1f",
    "key": "3c303f664fe4ea927b4a888aa28d9671"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

Already Exists Secret Key Response (409)

{
    "httpStatus": 409,
    "errorCode": "050011",
    "domain": "DEVICE_AUTH",
    "devMessage": "Secret with provided name exists for space",
    "userMessage": "Secret with provided name exists for space",
    "time": 1542019079047
}

POST http://api.ivenplatform.com/secrets

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
name secret key name (should be unique)
spaceId which space will create secret (UUID)

Response Parameter

parameter description
id special id of created secret key (for public use) (UUID)
key special key of created secret key (for private use)

GET : Secret Key List

Expected Response (200)

{
    "secrets": {
        "items": [
            {
                "id": "d02cc413-4819-41dd-94b2-78a7e74ef310",
                "name": "s-key",
                "enabled": true,
                "createdAt": 1540191915305,
                "updatedAt": 1540191915305,
                "createUserId": "",
                "updateUserId": ""
            },
            {
                "id": "f724af49-43b6-41be-847e-f5d1a51a6355",
                "name": "very-secret-key",
                "enabled": true,
                "createdAt": 1539608753700,
                "updatedAt": 1539608753700,
                "createUserId": "",
                "updateUserId": ""
            },
            {
                "id": "7cd85b73-dbae-4951-a954-2ec72d897c91",
                "name": "secret-key",
                "enabled": true,
                "createdAt": 1539587665106,
                "updatedAt": 1539587665106,
                "createUserId": "",
                "updateUserId": ""
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 3,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/secrets?spaceID=<spaceId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameters

parameter description
spaceId which space will create secret (UUID)

Response Parameter

parameter description
id special id of created secret key (for public use) (UUID)
name special key of created secret key (for private use)
enabled gives secret key status (TRUE/FALSE)
createdAt when created the secret key
updatedAt when last updated the secret key
createUserId who created the secret key information
updateUserId who last updated the secret key information

PUT : Enable Secret Key

Enable Secret Key

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/secrets/<secretId>/enable

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

URL Request Parameter

parameter description
done gives boolean result of operation

PUT : Disable Secret Key

Disable Secret Key

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/secrets/<secretId>/disable

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

URL Request Parameter

parameter description
done gives boolean result of operation

PUT : Device Register

Device Register

{
    "secretId":"c500b5eb-b76b-43e2-a0d8-988c6fa45f1f"
}

Expected Response (200)

{
    "accessToken": "2f97d26007339785e41723d4442d1c4c",
    "deviceTopicItem": [
        {
            "type": "act",
            "topicName": "v1/act/2f97d26007339785e41723d4442d1c4c"
        },
        {
            "type": "evt",
            "topicName": "v1/evt/214e68fd-8b59-4e72-aa9d-058433a44328"
        },
        {
            "type": "cmd",
            "topicName": "v1/cmd/214e68fd-8b59-4e72-aa9d-058433a44328"
        },
        {
            "type": "frm",
            "topicName": "v1/frm/214e68fd-8b59-4e72-aa9d-058433a44328"
        },
        {
            "type": "fdb-frm",
            "topicName": "v1/fdb-frm/214e68fd-8b59-4e72-aa9d-058433a44328"
        },
        {
            "type": "fdb-cmd",
            "topicName": "v1/fdb-cmd/214e68fd-8b59-4e72-aa9d-058433a44328"
        },
        {
            "type": "test",
            "topicName": "v1/test/214e68fd-8b59-4e72-aa9d-058433a44328"
        },
        {
            "type": "syslog",
            "topicName": "v1/syslog/214e68fd-8b59-4e72-aa9d-058433a44328"
        }
    ]
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

Not Exists Secret Key Response (404)

{
    "httpStatus": 404,
    "errorCode": "050100",
    "domain": "DEVICE_AUTH",
    "devMessage": "secret not found",
    "userMessage": "Secret not found",
    "time": 1542019181063
}

Not Exists Device Register Response (400)

{
    "httpStatus": 400,
    "errorCode": "020005",
    "domain": "DEVICE",
    "devMessage": "Command io.iven.platform.device.impl.cmd.GetDevice@59e647e3 is invalid in the current state of app 9082797b-1061-48fb-acb9-60efde5b6aba (NOT_CREATED)",
    "userMessage": "Invalid command",
    "time": 1542019239871
}

POST http://api.ivenplatform.com/devices/<deviceId>/register

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

Request Parameter

parameter description
secretId want to hash with given deviceId at url (UUID)

Response Parameter

parameter description
accessToken for use device connection operation

deviceTopicItem gives usable topic names with how to use (accessToken or deviceId)

POST : Update Device Secret Key

Update Device Secret Key

{
    "secretId":"f724af49-43b6-41be-847e-f5d1a51a6355"
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

After Update Secret Key Control Device

{
    "id": "214e68fd-8b59-4e72-aa9d-058433a44328",
    "name": "test-device",
    "description": null,
    "uniqueId": "3oy59n5cpkdw2glh16ge",
    "templateId": null,
    "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "assignedFirmwareVersion": null,
    "assignedFirmwareId": null,
    "reportedFirmwareVersion": null,
    "testModeActivated": true,
    "tags": {
        "tagName": "deneme"
    },
    "propertiesSchema": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
            "temp": {
                "type": "number"
            },
            "high_temp": {
                "type": "boolean",
                "function": "temp>81"
            },
            "temp_kelvin": {
                "type": "number",
                "function": "temp+273"
            }
        }
    },
    "status": "ACTIVE",
    "connectionStatus": "DISCONNECTED",
    "topicInfoDeliveryStatus": "TOPIC_INFO_SENT",
    "currentSecretId": "c500b5eb-b76b-43e2-a0d8-988c6fa45f1f",
    "desiredSecretId": "f724af49-43b6-41be-847e-f5d1a51a6355"
}

POST http://api.ivenplatform.com/devices/<deviceId>/updateSecret

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

URL Request Parameter

parameter description
done gives boolean result of operation

GET : Device Topic List

Expected Response (200)

{
    "topicItems": [
        {
            "type": "act",
            "topicName": "v1/act/b10246ad6ecc37850e6ec18347b6217b"
        },
        {
            "type": "evt",
            "topicName": "v1/evt/4932833e-6b84-46c7-ba0e-85be1e5fb132"
        },
        {
            "type": "cmd",
            "topicName": "v1/cmd/4932833e-6b84-46c7-ba0e-85be1e5fb132"
        },
        {
            "type": "frm",
            "topicName": "v1/frm/4932833e-6b84-46c7-ba0e-85be1e5fb132"
        },
        {
            "type": "fdb-frm",
            "topicName": "v1/fdb-frm/4932833e-6b84-46c7-ba0e-85be1e5fb132"
        },
        {
            "type": "fdb-cmd",
            "topicName": "v1/fdb-cmd/4932833e-6b84-46c7-ba0e-85be1e5fb132"
        },
        {
            "type": "test",
            "topicName": "v1/test/4932833e-6b84-46c7-ba0e-85be1e5fb132"
        },
        {
            "type": "syslog",
            "topicName": "v1/syslog/4932833e-6b84-46c7-ba0e-85be1e5fb132"
        }
    ],
    "activationTopic": null,
    "eventTopic": null,
    "commandTopic": null,
    "firmwareTopic": null,
    "feedbackFirmwareTopic": null,
    "feedbackCommandTopic": null,
    "testTopic": null,
    "sysTopic": null
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/devices/<deviceId>/topics

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Response Parameter

parameter description
type gives IVEN Kafka Topic types
topicName gives IVEN Kafka Topic names with how to use

PUT : Device Activate Test Mode

Device Activate Test Mode

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/devices/<deviceId>/activateTest

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

URL Request Parameter

parameter description
done gives boolean result of operation

PUT : Device Deactivate Test Mode

Device Deactivate Test Mode

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/devices/<deviceId>/deactivateTest

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
deviceId deviceId that want to hash (UUID)

URL Request Parameter

parameter description
done gives boolean result of operation

SUBSCRIBE : Device Activate

Subcribe Response Message

{
  "messageId":"7d62267c-8b5b-46d5-aef6-67a91de538d5",
  "data":{
    "deviceId":"214e68fd-8b59-4e72-aa9d-058433a44328",
    "topicInfo":{
      "fdb-cmd":{
        "name":"v1/fdb-cmd/214e68fd-8b59-4e72-aa9d-058433a44328",
        "access":"PUBLISH"
      },
      "fdb-frm":{
        "name":"v1/fdb-frm/214e68fd-8b59-4e72-aa9d-058433a44328",
        "access":"PUBLISH"
      },
      "syslog":{
        "name":"v1/syslog/214e68fd-8b59-4e72-aa9d-058433a44328",
        "access":"PUBLISH"
      },
      "cmd":{
        "name":"v1/cmd/214e68fd-8b59-4e72-aa9d-058433a44328",
        "access":"SUBSCRIBE"
      },
      "evt":{
        "name":"v1/evt/214e68fd-8b59-4e72-aa9d-058433a44328",
        "access":"PUBLISH"
      },
      "frm":{
        "name":"v1/frm/214e68fd-8b59-4e72-aa9d-058433a44328",
        "access":"SUBSCRIBE"
      },
      "test":{
        "name":"v1/test/214e68fd-8b59-4e72-aa9d-058433a44328",
        "access":"PUBLISH"
      }
    }
  }
}

SUBSCRIBE v1/act/2f97d26007339785e41723d4442d1c4c

Request Parameter

v1/act/<accessToken> : after successfull connection, subscribe to this topic for take usable topic names to device

Reponse Parameters

messageId : IVEN Platform

PUBLISH : Data Send Request

Publish Request Message

{
  "temp":45,
}

After send data

{
    "deviceId": "214e68fd-8b59-4e72-aa9d-058433a44328",
    "connectionInfo": {
        "lastStatusUpdateTime": 1539790668656,
        "lastStatus": "CONNECTED"
    },
    "state": {
        "reported": {
            "temp": {
                "value": 45,
                "timestamp": 1539791149224
            },
            "high_temp": {
                "value": false,
                "timestamp": 1539791149224
            },
            "temp_kelvin": {
                "value": 318,
                "timestamp": 1539791149224
            }
        },
        "delta": {
            "temp": {
                "value": null,
                "timestamp": null
            },
            "high_temp": {
                "value": null,
                "timestamp": null
            },
            "temp_kelvin": {
                "value": null,
                "timestamp": null
            }
        }
    }
}

PUBLISH v1/evt/214e68fd-8b59-4e72-aa9d-058433a44328

Request Parameters

v1/evt/<deviceId> : after subscribe to act topic, for send data to IVEN Platform publish to this topic (UUID)

deviceProperties : want to send parameters that given device properties when device create operation

Response Parameters

After publish operation do not expect any response.

Data Control

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

For control device details use GET http://api.ivenplatform.com/devices/<deviceId>

Response Parameters

parameter description
deviceId given device id (UUID)
connectionInfo currently device state
state given device property results

Device Template Management API

The API to create templates for devices in order to add and manage devices easily.

POST : Create Template

Create Template

{
    "name":"device-template-test",
    "description":"template-description",
    "tags": {
        "year":"2018"

    },
    "spaceId":"bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "propertiesSchema":{
        "$schema":"http://json-schema.org/draft-04/schema#","type":"object",
        "properties": {
           "temp": {
               "type": "number"
           },
           "high_temp": {
               "type": "boolean",
               "function": "temp>81"
           }
       }
    }
}

Expected Response (200)

{
    "templateId": "b1d7b7fc-d832-4686-9103-616faf090b50"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/device-templates

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
name specific template name
description template description for content
tags device specific tags for grouping devices
spaceId space id of template create (UUID)
propertiesSchema device properties that send/receive data types to device.

Response Parameter

parameter description
templateId created template id (UUID)

GET : Template Details

Expected Response

{
    "template": {
        "id": "b1d7b7fc-d832-4686-9103-616faf090b50",
        "name": "device-template-test",
        "description": "template-description",
        "tags": {
            "year": "2018"
        },
        "propertiesSchema": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
                "temp": {
                    "type": "number"
                },
                "high_temp": {
                    "type": "boolean",
                    "function": "temp>81"
                }
            }
        },
        "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
        "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
        "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
        "createdAt": 1540210787149,
        "updatedAt": 1540210787149
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/device-templates/<templateId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
templateId templateId that want to see details (UUID)

Response Parameter

parameter description
templateId given template id from IVEN Platform (UUID)
name given template name by space member
description given template description by space member
tags given template tags by space member
propertiesSchema given template properties by space member
spaceId given space id by space member (UUID)
createdBy who create this template
updatedBy who last update this template
createdAt when created this temlate
updatedAt when last updated this template

PUT : Update Template

Update Template

{
  "name": "device-template-test",
    "description": "device-description",
    "propertiesSchema": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
            "temperature": {
                "type": "number"
            },
            "high_temp": {
                "type": "boolean",
                "function": "temperature>80"
            },
            "counter": {
                "type": "number"
            }
        }
    },
    "tags": {
        "year" : "2018",
        "label" : "machine"
    }
}

Expected Response (200)

{
    "template": {
        "id": "b1d7b7fc-d832-4686-9103-616faf090b50",
        "name": "device-template-test",
        "description": "device-description",
        "tags": {
            "year": "2018",
            "label": "machine"
        },
        "propertiesSchema": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
                "temperature": {
                    "type": "number"
                },
                "high_temp": {
                    "type": "boolean",
                    "function": "temperature>80"
                },
                "counter": {
                    "type": "number"
                }
            }
        },
        "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
        "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
        "updatedBy": null,
        "createdAt": 1540212193704,
        "updatedAt": 1540212193704
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/device-templates/<templateId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
templateId templateId that want to see details (UUID)

Request Parameters

parameter description
name altered name
description altered description
tags add/change/remove device tag
propertiesSchema add/change/remove property

Response Parameters

parameter description
templateId given template id from IVEN Platform (UUID)
name given template name by space member
description given template description by space member
tags given template tags by space member
propertiesSchema given template properties by space member
spaceId given space id by space member (UUID)
createdBy who create this template
updatedBy who last update this template
createdAt when created this temlate
updatedAt when last updated this template

GET : Template List At Given Space

Expected Result (200)

{
    "templates": {
        "items": [
            {
                "templateId": "9fbad838-658f-4afd-a767-0cf8726296bf",
                "name": "test-template",
                "createdAt": 1539608425288
            },
            {
                "templateId": "b1d7b7fc-d832-4686-9103-616faf090b50",
                "name": "device-template-test",
                "createdAt": 1540210789054
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 2,
        "first": true,
        "last": true,
        "pageCount": 1,
        "paged": false,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/device-templates?spaceId=<spaceId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
spaceId spaceId that want to see template details (UUID)

Request Parameters

parameter description
spaceId (Required)
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ) - type = string (Optional)

Response Parameters

parameter description
templates/items gives template list
templateId gives found template id's (UUID)
name gives found template name's
createdAt gives when created template

Firmware Management API

The API to send and manage firmware actions between device and the cloud.

POST : Create Firmware

Create Firmware

{
  "name": "test-firmware",
  "description":"firmware-description",
  "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea"
}

Expected Response (200)

{
    "firmwareId": "72fd00f4-4790-4bb6-a1f0-341769d1a831"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/firmwares

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
name specific firmware name
description firmware description for additional information
spaceId space id that will be create firmware (UUID)

Response Parameters

parameter description
firmwareId IVEN Platform give an unique id for firmware (UUID)

GET : Firmware Details

Expected Response (200)

{
    "firmware": {
        "id": "72fd00f4-4790-4bb6-a1f0-341769d1a831",
        "metadata": {
            "name": "test-firmware",
            "description": "firmware-description",
            "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
            "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
            "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
            "createdAt": 1540213769835,
            "updatedAt": 1540213769835
        },
        "versions": []
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/firmwares/<firmwareId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
firmwareId firmwareId that want to see details (UUID)

Response Parameters

parameter description
id gives firmware's id
name gives firmware's name
description gives firmware's description
spaceId gives firmware's space id (UUID)
createdBy who created the firmware
updatedBy who last updated the firmware
createdAt when created the firmware
updatedAt when last updated the firmware

GET : List Firmwares

Expected Response (200)

{
    "firmwareItems": {
        "items": [
            {
                "id": "72fd00f4-4790-4bb6-a1f0-341769d1a831",
                "name": "test-firmware",
                "description": "firmware-description",
                "createdAt": 1540213770022,
                "updatedAt": 1540213770022
            },
            {
                "id": "96822364-3de0-4640-bd09-d462909b893f",
                "name": "test-firmware-2",
                "description": "fw-description",
                "createdAt": 1540214475018,
                "updatedAt": 1540214475018
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 2,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/firmwares?spaceId=<spaceId>&pageNo=<pageNo>&pageSize=<pageSize>&sort=<sort>&sortType=<sortType>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
spaceId spaceId that want to see firmware details (UUID) (Required)
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ) - type = string (Optional)

Response Parameters

parameter description
firmwareItems/items list of created firmwares
id gives found firmware id (UUID)
name gives found firmware name
description gives firmware description
createdAt who create the firmware
updatedAt who last update the firmware

GET : --List My Firmwares

Expected Response (200)

{
    "firmwareItems": {
        "items": [
            {
                "id": "72fd00f4-4790-4bb6-a1f0-341769d1a831",
                "name": "test-firmware",
                "description": "firmware-description",
                "createdAt": 1540213770022,
                "updatedAt": 1540213770022
            },
            {
                "id": "96822364-3de0-4640-bd09-d462909b893f",
                "name": "test-firmware-2",
                "description": "fw-description",
                "createdAt": 1540214475018,
                "updatedAt": 1540214475018
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 2,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/firmwares/me?pageNo=<pageNo>?pageSize=<pageSize>?sort=<sort>?sortType=<sortType>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ) - type = string (Optional)

Response Parameters

parameter description
firmwareItems/items list of created firmwares
id gives found firmware id (UUID)
name gives found firmware name
description gives firmware description
createdAt who create the firmware
updatedAt who last update the firmware

PATCH : --Update Firmware Metadata

Update Firmware Request

{
  "name": "test-firmware",
  "description":"fw-description-new",
  "updatedById": "bc3e01ca-12cd-439e-a799-98ee64d453a2"
}

Expected Response (200)

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PATCH http://api.ivenplatform.com/firmwares/<firmwareId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
firmwareId firmwareId that want to update details (UUID)

Request Parameters

parameter description
name want to change to new firmware name
description want to change to firmware description
updatedBy who updated the firmware metadata

Response Parameters

parameter description
``

POST : Add Firmware Version

Add Firmware Version

{
    "link": "http://www.link.com/v1-0",
}

Expected Response (200)

{
    "version": "v1-0",
    "link": "http://www.link.com/v1-0",
    "type": "link"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/firmwares?type=<upload_type>&name=<firmware_name>

upload types
FILE
ZIP
RAR

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
type will describe file type
name will give firmare name (should be unique)

Request Parameters

parameter description
link uploaded file url for download version

Response Parameters

parameter description
version added firmware version name
link given url on body
type which type has given

GET : List Firmware Versions

Expected Response (200)

{
    "versionListItem": [
        {
            "version": "v1-0",
            "link": "http://www.link.com/v1-0",
            "createdAt": 1540216266093
        },
        {
            "version": "v1-1",
            "link": "http://www.link.com/v1-1",
            "createdAt": 1540216389088
        },
        {
            "version": "v1-2",
            "link": "http://www.link.com/v1-2",
            "createdAt": 1540216398087
        }
    ]
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/firmwares/<firmwareId>/versions

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
firmwareId firmwareId that want to see details (UUID)

Response Parameters

parameter description
version firmware version
link firmware version link
createdAt when created firmware

GET : --List Space Firmware Versions

Expected Response (200)


Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/firmwares/versions?spaceId=<spaceId>&pageNo=<pageNo>&pageSize=<pageSize>&sort=<sort>&sortType=<sortType>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
spaceId spaceId that want to see firmware version details (UUID) (Required)
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ) - type = string (Optional)

Response Parameters

parameter description
version firmware version
link firmware version link
createdAt when created firmware

GET : Firmware with Version

Expected Response (200)

{
    "name": "test-firmware",
    "version": {
        "name": "v1-0",
        "link": "http://www.link.com/v1-0",
        "additionalParams": null
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/firmwares/<firmwareId>/versions/<version_name>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
firmwareId firmwareId that want to see details (UUID)
version_name will show specific firmware version details

Response Parameters

parameter description
name given firmware name
version/name given firmware version name on given url
version/link given firmware version link on given body
version/additionalParams

DELETE : --Delete Firmware Versions

Delete Firmware Version Request

{
    "version":""
}

Expected Response (200)


Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

DELETE http://api.ivenplatform.com/firmwares/<firmwareId>/versions

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
firmwareId firmwareId that want to delete (UUID)

Response Parameters

parameter description
``

GET : --Download Firmware Version File

Expected Response (200)


Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/firmwares/<firmwareId>/versions/<version_name>/download

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
firmwareId want to download firmware file (UUID)
version_name will download specific firmware version

Response Parameters

parameter description
``

Rule Management API

The API to create, edit, update and delete rules to satisfy the business need for the devices and applications.

POST : Create Alarm Definition

Create Alarm Definition

{
    "spaceId":"bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "name":"SampleAlarmDefiniton",
    "severity":"WARNING"
}

Expected Response (200)

{
    "id": "aafc75d6-65c7-4f03-b4ff-25a854548530"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/alarms/definitions

Severity Types
CRITICAL
ERROR
WARNING
INFO

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
spaceId space for creating alarm definition (UUID)
name alarm definitions unique name
description alarm definitions additional informations
severity alarm definition type

Response Parameters

parameter description
id IVEN Platform give an unique id for alarm definiton (UUID)

GET : Alarm Definiton Details

Expected Response (200)

{
    "id": "aafc75d6-65c7-4f03-b4ff-25a854548530",
    "name": "SampleAlarmDefiniton",
    "description": null,
    "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "severity": "WARNING",
    "createdAt": 1540974813186,
    "updatedAt": 1540974813186,
    "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
    "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
    "alarms": {
        "items": [],
        "page": 1,
        "pageSize": 5,
        "count": 0,
        "pageCount": 1,
        "first": true,
        "last": true,
        "paged": false,
        "empty": true
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/alarms/definitions/<alaramDefinitionId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
alarmDefinitionId alarmDefinitonId that want to see details (UUID)

Response Parameters

parameter description
alarmDefinitionId gives alarm definition's unique id
name gives alarm definition's unique name
description gives alarm definition's description
spaceId gives alarm definition's space id (UUID)
severity gives alarm severity type
createdBy who created the alarm definition
updatedBy who last updated the alarm definition
createdAt when created the alarm definition
updatedAt when last updated the alarm definition
alarms gives defined alarm relations

GET : List Alarm Definitons by Space Id

Expected Response (200)

{
    "alarmDefinitions": {
        "items": [
            {
                "id": "8a938757-ba29-4ead-a60d-2376ed7bb8da",
                "name": "High Temperature",
                "description": null,
                "severity": "CRITICAL",
                "createdAt": 1540975307695,
                "updatedAt": 1540975307695,
                "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "alarmStatuses": {},
                "alarmCount": 0
            },
            {
                "id": "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
                "name": "Example-AlarmDefiniton",
                "description": null,
                "severity": "WARNING",
                "createdAt": 1540975245005,
                "updatedAt": 1540975245005,
                "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "alarmStatuses": {},
                "alarmCount": 0
            },
            {
                "id": "aafc75d6-65c7-4f03-b4ff-25a854548530",
                "name": "SampleAlarmDefiniton",
                "description": null,
                "severity": "WARNING",
                "createdAt": 1540974813186,
                "updatedAt": 1540974813186,
                "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "alarmStatuses": {},
                "alarmCount": 0
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 3,
        "pageCount": 1,
        "first": true,
        "last": true,
        "paged": false,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/alarms/definitions?spaceId=<spaceId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
spaceId spaceId that want to see alarm definition details (UUID)

Request Parameters

parameter description
spaceId which space will be displayed (Required)
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: "severity", default settings at "createAt") - type = string (Optional)
sortType how will be sort items (Ex: "ASC") - type = string (Optional)

Response Parameters

parameter description
id gives alarm definition's unique id
name gives alarm definition's unique name
description gives alarm definition's description
severity gives alarm severity type
createdBy who created the alarm definition
updatedBy who last updated the alarm definition
createdAt when created the alarm definition
updatedAt when last updated the alarm definition
alarmStatuses item counts of alarm statuses that fired
alarmCount how many times that alarm fired

POST : Create Rule

Create Rule Request Body

{
    "spaceId":"bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "name": "example_rule",
    "description": "rule-dscription",
    "triggerEvent":"DeviceDataReceived",
    "condition" : {
            "eventCondition" : {
                "expression" : "metadata.tags.year == 2017"
            }
        },
    "actions" : [
            {
            "type" : "CREATE_ALARM",
            "entityId" : "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
            "payload" : {
                "message" : "custom rule message"
                }
            }
        ]
}

Expected Response (200)

{
    "id": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/rules

Action Types
CREATE_ALARM
CLEAR_ALARM

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
spaceId space id for creating rule
name rule's unique name
description additional information for rule
triggerEvent describe how triggered a rule
condition/eventCondition/expression which device property/tag listen for trigger a rule
actions/type alarm type
actions/entityId alarm definition id for create relation (UUID)
actions/payload/message custom message when rule triggered

Response Parameters

parameter description
id IVEN Platform gives unique id for created rule

GET : Rule Details

Expected Response (200)

{
    "rule": {
        "id": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb",
        "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
        "name": "example_rule",
        "description": "rule-dscription",
        "triggerEvent": "DeviceDataReceived",
        "condition": {
            "eventCondition": {
                "expression": "metadata.tags.year == 2017"
            }
        },
        "windowOperation": null,
        "actions": [
            {
                "type": "CREATE_ALARM",
                "entityId": "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
                "payload": {
                    "message": "custom rule message"
                }
            }
        ],
        "status": "ENABLED"
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/rules/<ruleId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
ruleId ruleId that want to see rule details (UUID)

Response Parameters

parameter description
id gives which rule is lokking for
spaceId gives which space is looking for
name gives rule name
description gives rule description
triggerEvent gives which event triggered with this request
condition gives which condition is controlling
windowOperation
actions gives which operation will apply
status gives rule status (ENABLED/DISABLED)

PUT : Update Rule

Update Request Body

{
    "name": "test-rule-updated",
    "description": "updated-rule-dscription"
}

Expected Response (200)

{
    "ruleId": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb",
    "name": "example_rule_updated",
    "description": "updated-rule-dscription"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/rules/<ruleID>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
ruleId ruleId that want to see rule details (UUID)

Request Parameters

parameter description
name rule name want to change
description rule description want to change

Response Parameters

parameter description
ruleId gives which rule looking for
name gives updated rule name
description gives update rule description

PUT : Enable Rule

Request Body

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/rules/<ruleId>/enable

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
ruleId ruleId that want to see rule details (UUID)

Response Parameters

parameter description
done boolen result of operation

PUT : Disable Rule

Request Body

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/rules/<ruleId>/disable

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
ruleId ruleId that want to see rule details (UUID)

Response Parameters

parameter description
done boolen result of operation

GET : List Rules of Space

Expected Response (200)

{
    "rules": {
        "items": [
            {
                "ruleId": "51d8d979-ec21-4bbc-b23a-c733ceeeefc6",
                "name": "test-rule",
                "createdAt": 1540976503966,
                "createdBy": "",
                "status": "DISABLED",
                "updatedAt": 1540977577966,
                "updatedBy": ""
            },
            {
                "ruleId": "2487dc25-7253-4004-8fc0-abb949ac9827",
                "name": "high_temp_rule",
                "createdAt": 1540982058135,
                "createdBy": "",
                "status": "ENABLED",
                "updatedAt": 1540982058135,
                "updatedBy": ""
            },
            {
                "ruleId": "5059ddca-46ed-45b0-b41c-eb3740c43558",
                "name": "high_temperature_rule",
                "createdAt": 1540982172134,
                "createdBy": "",
                "status": "ENABLED",
                "updatedAt": 1540982172134,
                "updatedBy": ""
            },
            {
                "ruleId": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb",
                "name": "example_rule",
                "createdAt": 1540982383964,
                "createdBy": "",
                "status": "ENABLED",
                "updatedAt": 1540982383964,
                "updatedBy": ""
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 5,
        "first": true,
        "last": true,
        "pageCount": 1,
        "paged": false,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}
```> Logout Account Response / Expired Token Response (401)

```json
{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/rules?spaceId=<spaceId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
spaceId spaceId that want to see rule list (UUID)

Request Parameters

parameter description
spaceId (Required)
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ) - type = string (Optional)

Response Parameters

parameter description
ruleId
name
createdAt when last updated the alarm definition
createBy who created the alarm definition
status
updatedAt when created the alarm definition
updatedBy who last updated the alarm definition
``

DELETE : Delete Rule

Request Body

{
    //Empty JSON Body
}

Expected Response (200)

{
    "done": true
}

After Delete Rule Control the Rule List

{
    "rules": {
        "items": [
            {
                "ruleId": "51d8d979-ec21-4bbc-b23a-c733ceeeefc6",
                "name": "test-rule",
                "createdAt": 1540976503966,
                "createdBy": "",
                "status": "DISABLED",
                "updatedAt": 1540977577966,
                "updatedBy": ""
            },
            {
                "ruleId": "5059ddca-46ed-45b0-b41c-eb3740c43558",
                "name": "high_temperature_rule",
                "createdAt": 1540982172134,
                "createdBy": "",
                "status": "ENABLED",
                "updatedAt": 1540982172134,
                "updatedBy": ""
            },
            {
                "ruleId": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb",
                "name": "example_rule",
                "createdAt": 1540982383964,
                "createdBy": "",
                "status": "ENABLED",
                "updatedAt": 1540982383964,
                "updatedBy": ""
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 5,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

DELETE http://api.ivenplatform.com/rules/<ruleId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
ruleId ruleId that want to delete (UUID)

Response Parameters

parameter description
done boolen result of operation

GET : List Alarms by Space Id

Expected Response (200)

{
    "alarms": {
        "items": [
            {
                "id": "37dbaaa9-fdd4-4c8d-8260-0c00737f6480",
                "alarmDefinitionId": "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
                "groupingType": "SINGLE",
                "deviceId": "969597bf-31cb-4ad1-9ab8-8f33615c2f91",
                "ruleId": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb",
                "alarmStatus": "ACTIVE",
                "count": 2,
                "createdAt": 1540982479122,
                "updatedAt": 1540982523070,
                "lastTriggerData": {
                    "temp": 45
                },
                "lastPayload": "custom rule message"
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 1,
        "pageCount": 1,
        "first": true,
        "last": true,
        "paged": false,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/alarms?spaceId=<spaceId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
spaceId spaceId that want to see alarm list (UUID)

Request Parameters

parameter description
spaceId (Required)
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ) - type = string (Optional)

Response Parameters

parameter description
id gives alarm's unique id by IVEN Platform
alarmDefinitionId gives alarm definition's id
groupingType
deviceId which device triggered the rule
ruleId which rule related with the alarm
alarmStatus alarm status is ready for trigger or not
count how many times alarm triggered
createdAt when created the alarm
updatedAt when created the alarm
lastTriggerData/<propertyName(s)> last triggered property name for given alarm
lastPayload last published message

GET : Alarm Details

Expected Response (200)

{
    "id": "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
    "alarmDefinitionId": "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
    "groupingType": "SINGLE",
    "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "alarmStatus": "ACTIVE",
    "deviceId": "969597bf-31cb-4ad1-9ab8-8f33615c2f91",
    "ruleId": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb",
    "count": 2,
    "createdAt": 1540982479122,
    "updatedAt": 1540982523070,
    "createdBy": null,
    "updatedBy": null
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/alarms/<alarmId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
alarmId alarmId that want to see alarm details (UUID)

Response Parameters

parameter description
id gives alarm's unique id by IVEN Platform
alarmDefinitionId gives alarm definition's id
groupingType
spaceId which space includes the given alarm
alarmStatus alarm status is ready for trigger or not
deviceId which device triggered the rule
ruleId which rule related with the alarm
count how many times alarm triggered
createdAt when created the alarm
updatedAt when last updated the alarm
createdBy who created the alarm
updatedBy who last updated the alarm

PUT : Update Alarm Status

Request Body

{
    "alarmStatus":"ACKNOWLEDGED"
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

After Update Alarm Status Control the Alarm Details

{
    "id": "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
    "alarmDefinitionId": "0178c406-0c90-4fbe-93f4-8d3205aa7f1a",
    "groupingType": "SINGLE",
    "spaceId": "bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "alarmStatus": "ACKNOWLEDGED",
    "deviceId": "969597bf-31cb-4ad1-9ab8-8f33615c2f91",
    "ruleId": "e5ed598f-7fc2-463e-afa5-20abddc9f3eb",
    "count": 2,
    "createdAt": 1540982479122,
    "updatedAt": 1540982523070,
    "createdBy": null,
    "updatedBy": null
}

PUT http://api.ivenplatform.com/alarms/<alarmId>

Alarm Statuses
ACTIVE
ACKNOWLEDGED
CLEARED

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameter

parameter description
alarmId ruleId that want to update alarm status (UUID)

Request Parameters

parameter description
alarmStatus which status will be effect to alarm

Response Parameters

parameter description
done boolen result of operation

Association Management API

The API to manage devices via 3rd party applications.

POST : Create Application

Request Body

{
    "spaceId":"bc9fae7f-6acc-4f6f-918f-5fe3d5e8a2ea",
    "name":"sample-app"
}

Expected Response (200)

{
    "id": "f2a0296f-2250-49db-9c31-8a87fb7da922",
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiQXBpIiwic3ViIjoiZjJhMDI5NmYtMjI1MC00OWRiLTljMzEtOGE4N2ZiN2RhOTIyIiwiZXhwIjoxNTcyNTMwODgyfQ.UFe59tP_CpOZLWW9r6WmDbBSSI-remCaRjIU75m_1qM"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

Already Associated Device Response (409)

{
    "httpStatus": 409,
    "errorCode": "080051",
    "domain": "AUTH",
    "devMessage": "Provided name is already used for space",
    "userMessage": "Provided name is already used for space",
    "time": 1542014445799
}

POST http://api.ivenplatform.com/applications

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

Request Parameters

parameter description
spaceId which space that will add an application
name application name (unique)

Response Parameters

parameter description
id gives an applicationId (UUID)
token gives a token that connect to IVEN Platform for application

GET : Application Details

Expected Response (200)

{
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiQXBpIiwic3ViIjoiZjJhMDI5NmYtMjI1MC00OWRiLTljMzEtOGE4N2ZiN2RhOTIyIiwiZXhwIjoxNTcyNTMwODgyfQ.UFe59tP_CpOZLWW9r6WmDbBSSI-remCaRjIU75m_1qM",
    "name": "sample-app",
    "createdAt": 1540994882170,
    "updatedAt": 1540994882170,
    "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
    "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/applications/<applicationId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameters

parameter description
applicationId applicationId that want to see application details (UUID)

Response Parameters

parameter description
token gives a token to connect to IVEN PLatform for application
name gives application name
createdAt when created the application
updatedAt when last updated the application
CreatedBy who created the application
updatedBy who last updated the application

PUT : Update Applicaiton

Request Body

{
    "name":"sample-application"
}

Expected Response (200)

{
    //Empty JSON Body
}

After Update Application Control the Application Details

{
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiQXBpIiwic3ViIjoiZjJhMDI5NmYtMjI1MC00OWRiLTljMzEtOGE4N2ZiN2RhOTIyIiwiZXhwIjoxNTcyNTMwODgyfQ.UFe59tP_CpOZLWW9r6WmDbBSSI-remCaRjIU75m_1qM",
    "name": "sample-application",
    "createdAt": 1540994882170,
    "updatedAt": 1540995296432,
    "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
    "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

PUT http://api.ivenplatform.com/applications/<applicationId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameters

parameter description
applicationId applicationId that want to update details

Request Parameters

parameter description
name which application name will be change

GET : List Applications By Space

Expected Response (200)

{
    "applicationTokens": {
        "items": [
            {
                "id": "f2a0296f-2250-49db-9c31-8a87fb7da922",
                "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiQXBpIiwic3ViIjoiZjJhMDI5NmYtMjI1MC00OWRiLTljMzEtOGE4N2ZiN2RhOTIyIiwiZXhwIjoxNTcyNTMwODgyfQ.UFe59tP_CpOZLWW9r6WmDbBSSI-remCaRjIU75m_1qM",
                "name": "sample-application",
                "createdAt": 1540994882170,
                "updatedAt": 1540995296432,
                "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85"
            },
            {
                "id": "1998ac02-f97e-4633-8f24-27c2212c8c1e",
                "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiQXBpIiwic3ViIjoiMTk5OGFjMDItZjk3ZS00NjMzLThmMjQtMjdjMjIxMmM4YzFlIiwiZXhwIjoxNTcyNTMxNjgxfQ.AA8INYxbt17THUtsOe1-Gdyc9JEE8p-iY4DlPxdmfSY",
                "name": "test-app",
                "createdAt": 1540995681380,
                "updatedAt": 1540995681380,
                "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85"
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 2,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/applications?spaceId=<spaceId>&pageNo=<pageNo>&pageSize=<pageSize>&sort=<sort>&sortType=<sortType>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameters

parameter description
spaceId spaceId that want to see application list
pageNo page number that will be displayed - type = integer (Optional)
pageSize item count that will be displayed - type = integer (Optional)
sort which parameter to sort (Ex: ) - type = string (Optional)
sortType how will be sort items (Ex: ASC) - type = string (Optional)

Response Parameters

parameter description
id gives applicationId
token gives token to connect to IVEN Platform for application
createdAt when created the application
updatedAt when last updated the application
createdBy who created the application
updatedBy who last updated the application

DELETE : Delete Application

Request Body

{
    //Empty JSON Body
}

Expected Response (200)

{
    //Empty JSON Body
}

After Delete Application Control the Application List

{
    "applicationTokens": {
        "items": [
            {
                "id": "f2a0296f-2250-49db-9c31-8a87fb7da922",
                "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWJUeXBlIjoiQXBpIiwic3ViIjoiZjJhMDI5NmYtMjI1MC00OWRiLTljMzEtOGE4N2ZiN2RhOTIyIiwiZXhwIjoxNTcyNTMwODgyfQ.UFe59tP_CpOZLWW9r6WmDbBSSI-remCaRjIU75m_1qM",
                "name": "sample-application",
                "createdAt": 1540994882170,
                "updatedAt": 1540995296432,
                "createdBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85",
                "updatedBy": "1eef3a0d-26f0-4ac1-80b7-67cabf9cde85"
            }
        ],
        "page": 1,
        "pageSize": 5,
        "count": 1,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

DELETE http://api.ivenplatform.com/applications/<applicationId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameters

parameter description
applicationId applicationId that want to delete

POST : Create Association

Request Body

{
    "deviceUniqueId": "testing-device"
}

Expected Response (200)

{
    "associationId": "6f5d9e10-177d-4ba9-94c8-16e01fa27b1a",
    "deviceName": "testing-device",
    "deviceUniqueId": "testing-device",
    "tags": {
        "year": "2018"
    },
    "connectionStatus": "CONNECTED"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/associations

Header Parameters

Key Value
API-KEY token that comes from IVEN Platform
API-CLIENT-ID unique id from third party apps

Request Parameters

parameter description
deviceUniqueId which device will be associate

Response Parameters

parameter description
associationId gives associationId from IVEN Platform
deviceName gives associated device name
deviceUniqueId gives associated device unique id
tags gives applicable device tags
connectionStatus gives associated device connection status

GET : Association Details

Expected Response (200)

{
    "associationId": "6f5d9e10-177d-4ba9-94c8-16e01fa27b1a",
    "deviceName": "testing-device",
    "deviceUniqueId": "testing-device",
    "tags": {
        "year": "2018"
    },
    "connectionStatus": "CONNECTED"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/associations/<associationId>

Header Parameters

Key Value
API-KEY token that comes from IVEN Platform
API-CLIENT-ID unique id from third party apps

URL Request Parameters

parameter description
associationId associationId that want to see association details (UUID)

Response Parameters

parameter description
associationId gives associationId from IVEN Platform
deviceName gives associated device name
deviceUniqueId gives associated device unique id
tags gives applicable device tags
connectionStatus gives associated device connection status

GET : List Associations

Expected Response (200)

{
    "associations": {
        "items": [
            {
                "associationId": "6f5d9e10-177d-4ba9-94c8-16e01fa27b1a",
                "deviceName": "testing-device",
                "deviceUniqueId": "testing-device",
                "tags": {
                    "year": "2018"
                },
                "connectionStatus": "CONNECTED"
            },
            {
                "associationId": "e0812704-f244-439c-8680-3572ff64b945",
                "deviceName": "sample-device",
                "deviceUniqueId": "sample-device",
                "tags": {
                    "temp": "2018"
                },
                "connectionStatus": "DISCONNECTED"
            }
        ],
        "page": 1,
        "pageSize": 2,
        "count": 2,
        "first": true,
        "last": true,
        "paged": false,
        "pageCount": 1,
        "empty": false
    }
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/associations

Header Parameters

Key Value
API-KEY token that comes from IVEN Platform
API-CLIENT-ID unique id from third party apps

Response Parameters

parameter description
associationId gives associationId from IVEN Platform
deviceName gives associated device name
deviceUniqueId gives associated device unique id
tags gives applicable device tags
connectionStatus gives associated device connection status

GET : Association's Historic Data

Expected Response (200)

{
    "metadata": {
        "totalPageCount": 0,
        "totalItemCount": 1,
        "paged": false
    },
    "items": [
        {
            "timestamp": 1540996520318,
            "data": {
                "temp": 45
            }
        }
    ]
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/associations/<associationId>/historic-data?startDate=<startDate_as_timestamp>

Header Parameters

Key Value
API-KEY token that comes from IVEN Platform
API-CLIENT-ID unique id from third party apps

URL Request Parameters

parameter description
associationId which association will see
startDate interval start (timestamp) (Optional)
endDate interval end (timestamp) (Optional)
sortType how will sort the result list (Optional)
limitDate (Optional)
offset (Optional)

Response Parameters

parameter description
totalPageCount gives how many page will be display
totalItemCount gives how many times data send to device
paged gives pagination boolean status
timestamp gives when data send to device
data gives which data send to device

GET : Association's Last State

Expected Response (200)

{
    "reported": {
        "temp": {
            "value": 45,
            "timestamp": 1540996520318
        }
    },
    "delta": {
        "temp": {
            "value": null,
            "timestamp": null
        }
    },
    "connectionStatus": "CONNECTED"
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

GET http://api.ivenplatform.com/associations/<associationId>/last-state

Header Parameters

Key Value
API-KEY token that comes from IVEN Platform
API-CLIENT-ID unique id from third party apps

URL Request Parameters

parameter description
associationId associationId that want to see association details (UUID)

Response Parameters

parameter description
reported gives association device's last data that reported
delta
connectionStatus gives associated device connection status

POST : Send Command to Associated Device

Request Body

{
    "payload" : {
        "test":45
    }
}

Expected Response (200)

{
    "done": true
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

POST http://api.ivenplatform.com/associations/<associationId>/send-command

Header Parameters

Key Value
API-KEY token that comes from IVEN Platform
API-CLIENT-ID unique id from third party apps

URL Request Parameters

parameter description
associationId associationId that want to send command (UUID)

Request Parameters

parameter description
payload data that want to send to device

Response Parameters

parameter description
done boolean result of operation

DELETE : Delete Association

Request Body

{
    //Empty JSON Body
}

Expected Response (200)

{
    //Empty JSON Body
}

Logout Account Response / Expired Token Response (401)

{
    "httpStatus": "401",
    "errorCode": "000001",
    "domain": "AUTH",
    "userMessage": "Unathorized, please make sure you have required privileges"
}

DELETE http://api.ivenplatform.com/associations/<associationId>

Header Parameters

Key Value
Content-Type application/json
Authorization Bearer accessToken

URL Request Parameters

parameter description
associationId associationId that want to delete (UUID)