CloudDot Rest API Documentation

Channel Methods

Channel Schema

id: The unique id for this channel.

name: The display name of this channel.

inputConnection: Which input are you trying to connect to? AIN0, FIO3, ect.

register: The modbus register associated with the inputConnection. Set automatically when inputConnection is set.

payloadFormat: The what is expected back from the register in struct.unpack format. Set automatically when inputConnection is set.

displayOrder: The display number for this channel. Lists of channels are sorted by displayOrder.

device_id: The ID of the device this channel is connected to.

created_at: The timestamp of when the channel object was created.

updated_at: The timestamp of the last time the channel was updated.

converter_id: The ID of the converter associated with this channel. Set to 0 for no converter.

nickname: The nickname for this channel. Must contain only letters and numbers and can't start with a number.

readOnly: Set to true for input only channels, like AINs. False for virtual and output channels.

virtual: Set to true if your channel is virtual, else false.

disabled: Set to false to schedule this channel. Virtual channels cannot be scheduled.

private: True means the channel is private. A private channel can only be seen if a request is authenticated.

calendar_id: The ID of the Google Calendar. Can be 0 for no calendar.

latestReading: A Record object of the latest reading on that channel.

units: The units for the channel. Can be set to set the units for channels without converters.

Channels List

URL: http://cloudapi.labjack.com/USERNAME/channels.json

Example: http://cloudapi.labjack.com/apitest/channels.json

Method: GET

Authentication required? (About Authenication): Loose

Parameters: userName (Optional), apiKey (Optional)

Returns: A list of channel objects; each object contains the configuration of each channel, including its latest reading. Send userName and apiKey to see both public and private channels.

Channels Basics

URL: http://cloudapi.labjack.com/USERNAME/channels/basics.json

Example: http://cloudapi.labjack.com/apitest/channels/basics.json

Method: GET

Authentication required? (About Authenication): Loose

Parameters: userName (Optional), apiKey (Optional)

Returns: A list of channel objects without the latest reading. Send userName and apiKey to see both public and private channels.

Create A Channel

URL: http://cloudapi.labjack.com/USERNAME/channels.json

Example: http://cloudapi.labjack.com/apitest/channels.json

Method: POST

Authentication required? (About Authenication): Yes, Strict

Parameters: channel, a channel object

Returns: The newly created channel object, or, 422 if there are errors.

Edit A Channel

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME.json

Example: http://cloudapi.labjack.com/apitest/channels/Random.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict

Parameters: channel, a channel object

Returns: The newly edited channel object, or, 422 if there are errors.

Delete A Channel

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME.json

Example: http://cloudapi.labjack.com/apitest/channels/Random.json

Method: DELETE

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: The deleted channel object.

Channel's Details

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME.json

Example: http://cloudapi.labjack.com/apitest/channels/Random.json

Method: GET

Authentication required? (About Authenication): Loose

Parameters: userName (Optional), apiKey (Optional)

Returns: A single channel object, or 404, if channel is private, but no authorization was given.

Toggle Your Script

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME/toggle.json

Example: http://cloudapi.labjack.com/apitest/channels/InternalTemperature/toggle.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict.

Parameters: None

Returns: Toggles the disabled state of your channel.

Latest Reading

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME/latest.json

Example: http://cloudapi.labjack.com/apitest/channels/Random/latest.json

Method: GET

Authentication required? (About Authenication): Loose

Parameters: count (Optional), userName (Optional), apiKey (Optional)

Returns: The latest reading on that channel, or 404 if there is no latest reading. If a count is given, a list of the latest number of readings is given. The maximum number of records returned is 400. If there are no readings and a count is specified, an empty list is returned.

Write A Value

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME/write.json

Example: http://cloudapi.labjack.com/apitest/channels/Random/write.json

Method: POST

Authentication required? (About Authenication): Yes, Strict.

Parameters: value

Returns: Writes the rawValue to the output channel, just as if it were typed into the text box labeled "Write new reading: Channel.NICKNAME = _____" on the Channels page.

Sample A Channel

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME/sample.json

Example: http://cloudapi.labjack.com/apitest/channels/InternalTemperature/sample.json

Method: POST

Authentication required? (About Authenication): Yes, Strict.

Parameters: None

Returns: Collects a new sample on the input channel, just as if "Sample from channel" were clicked on the Channels page.

Order Your Channels

URL: http://cloudapi.labjack.com/USERNAME/channels/order.json

Example: http://cloudapi.labjack.com/apitest/channels/order.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict.

Parameters: orders, a JSON encoded list of channel ids and display orders. [ { id => <channel id>, displayOrder => <order> }, ... , ]

Returns: The full set of channels in their new order.

Range of Readings

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME/range.json

Example: http://cloudapi.labjack.com/apitest/channels/InternalTemperature/range.json

Method: GET

Authentication required? (About Authenication): Loose

Parameters: start, in UTC epoch seconds; end, in UTC epoch seconds. Defaults to now. (Optional)

Returns: A sampling of the readings in that range. No more than 400 readings will be returned from this call.

Dashboard Readings

URL: http://cloudapi.labjack.com/USERNAME/channels/NICKNAME/dashboardReadings/DASHBOARD_TYPE.json

Example: http://cloudapi.labjack.com/apitest/channels/InternalTemperature/dashboardReadings/hour.json

Method: GET

Authentication required? (About Authenication): Loose

Parameters: None. DASHBOARD_TYPE can be either: "hour" or "today"

Returns: All the readings in the last 60 minutes or 24 hours. There is no cap on how many readings can be returned (Except for the js version, just so Google and your computer don't catch fire).

Script Methods

Script Schema

id: The unique id for the script.

code: The code for the script.

name: The display name of the script.

nickname: The nickname for the script. Must contain only letters and numbers and can't start with a number.

scriptType: The type of script. 0 means time based, 1 means reading based

schedulingInfo: A json encoded dictionary of the scheduling parameters

Time Based: Your script is scheduled every . Every 5 minutes, 2 days, ect.
  • runTime: Number of time units to wait until running the script.
  • units: The units runTime is in. Can be "seconds, minutes, hours, days".
Reading Based: Your script is cheduled to run every readings on channel with id
  • readingsStepSize: The number of reading before a script should be run.

channel_id: The channel for the reading based scripts. Means nothing on time based scripts.

created_at: The timestamp of when the script object was created.

updated_at: The timestamp of the last time the script was updated.

displayOrder: The display number for this script.

disabled: Set to false to schedule this script.

calendar_id: The ID of the Google Calendar. Can be 0 for no calendar.

lastRunOn: Not yet implimented.

List Your Scripts

URL: http://cloudapi.labjack.com/USERNAME/scripts.json

Example: http://cloudapi.labjack.com/apitest/scripts.json

Method: GET

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: A list of all your scripts.

Create A Script

URL: http://cloudapi.labjack.com/USERNAME/scripts.json

Example: http://cloudapi.labjack.com/apitest/scripts.json

Method: POST

Authentication required? (About Authenication): Yes, Strict

Parameters: script, a script object

Returns: The newly created script object, or, 422 if there are errors.

Script's Details

URL: http://cloudapi.labjack.com/USERNAME/scripts/NICKNAME.json

Example: http://cloudapi.labjack.com/apitest/scripts/MyScript.json

Method: GET

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: A single script object.

Edit A Script

URL: http://cloudapi.labjack.com/USERNAME/scripts/NICKNAME.json

Example: http://cloudapi.labjack.com/apitest/scripts/MyScript.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict

Parameters: script, a script object

Returns: The newly edited script object, or, 422 if there are errors.

Delete A Script

URL: http://cloudapi.labjack.com/USERNAME/scripts/NICKNAME.json

Example: http://cloudapi.labjack.com/apitest/scripts/MyScript.json

Method: DELETE

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: The deleted script object.

Order Your Scripts

URL: http://cloudapi.labjack.com/USERNAME/scripts/order.json

Example: http://cloudapi.labjack.com/apitest/scripts/order.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict.

Parameters: orders, a JSON encoded list of script ids and display orders. [ { id => <script id>, displayOrder => <order> }, ... , ]

Returns: The full set of scripts in their new order.

Run Your Script

URL: http://cloudapi.labjack.com/USERNAME/scripts/NICKNAME/runNow.json

Example: http://cloudapi.labjack.com/apitest/scripts/MyScript/runNow.json

Method: POST

Authentication required? (About Authenication): Yes, Strict.

Parameters: None

Returns: The result of the script, and an error code.

Run Your Script (without waiting for output)

URL: http://cloudapi.labjack.com/USERNAME/scripts/NICKNAME/asyncRun.json

Example: http://cloudapi.labjack.com/apitest/scripts/MyScript/asyncRun.json

Method: POST

Authentication required? (About Authenication): Yes, Strict.

Parameters: None

Returns: Ok.

Toggle Your Script

URL: http://cloudapi.labjack.com/USERNAME/scripts/NICKNAME/toggle.json

Example: http://cloudapi.labjack.com/apitest/scripts/MyScript/toggle.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict.

Parameters: None

Returns: Toggles the disabled state of your script.

Access The Script Library

URL: http://cloudapi.labjack.com/scriptsLibrary.json

Method: get

Authentication required? (About Authenication): None

Parameters: None

Returns: Returns the Script Library.

Converter Methods

Converter Schema

id: The unique id for the converter.

code: The code for the converter.

name: The display name of the converter.

nickname: The nickname for the converter. Must contain only letters and numbers and can't start with a number.

units: The units for this converter.

created_at: The timestamp of when the converter object was created.

updated_at: The timestamp of the last time the converter was updated.

displayOrder: The display number for this converter.

List Your Converters

URL: http://cloudapi.labjack.com/USERNAME/converters.json

Example: http://cloudapi.labjack.com/apitest/converters.json

Method: GET

Authentication required? (About Authenication): None

Parameters: None

Returns: A list of all your converters.

Create A Converter

URL: http://cloudapi.labjack.com/USERNAME/converters.json

Example: http://cloudapi.labjack.com/apitest/converters.json

Method: POST

Authentication required? (About Authenication): Yes, Strict

Parameters: converter, a converter object

Returns: The newly created converter object, or, 422 if there are errors.

Converter's Details

URL: http://cloudapi.labjack.com/USERNAME/converters/ID.json

Example: http://cloudapi.labjack.com/apitest/converters/15.json

Method: GET

Authentication required? (About Authenication): None

Parameters: None

Returns: A single converter object.

Edit A Converter

URL: http://cloudapi.labjack.com/USERNAME/converters/ID.json

Example: http://cloudapi.labjack.com/apitest/converters/15.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict

Parameters: converter, a converter object

Returns: The newly edited converter object, or, 422 if there are errors.

Delete A Converter

URL: http://cloudapi.labjack.com/USERNAME/converters/ID.json

Example: http://cloudapi.labjack.com/apitest/converters/15.json

Method: DELETE

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: The deleted converter object.

Order Your Converters

URL: http://cloudapi.labjack.com/USERNAME/converters/order.json

Example: http://cloudapi.labjack.com/apitest/converters/order.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict

Parameters: orders, a JSON encoded list of converters ids and display orders. [ { id => <converters id>, displayOrder => <order> }, ... , ]

Returns: The full set of converters in their new order.

Test Your Converters

URL: http://cloudapi.labjack.com/USERNAME/converters/ID/testConvert.json

Example: http://cloudapi.labjack.com/apitest/converters/17/testConvert.json

Method: POST

Authentication required? (About Authenication): Yes, Strict

Parameters: value, the raw value to be test converted

Returns: The result of the converter, and an error code.

Access The Converter Library

URL: http://cloudapi.labjack.com/convertersLibrary.json

Method: get

Authentication required? (About Authenication): None

Parameters: None

Returns: Returns the Converter Library.

Devices Methods

Device Schema

id: The unique ID for the device.

name: The display name of the device.

serial: The device's serial number.

pollingTime: The time, in seconds, between reading collections

deviceType: A string representing what type of device. U3, UE9, U6, ect.

created_at: The timestamp of when the device object was created.

updated_at: The timestamp of the last time the device was updated.

displayOrder: The display number for this device.

lat: The latitude for the device. Used to place pins on the Google Map on the devices page.

long: The longitude for the device. Used to place pins on the Google Map on the devices page.

connected: True if the device is connected, false if not.

lastConnectEvent: The timestamp the last time the connected state changed.

List Your Devices

URL: http://cloudapi.labjack.com/USERNAME/devices.json

Example: http://cloudapi.labjack.com/apitest/devices.json

Method: GET

Authentication required? (About Authenication): None

Parameters: None

Returns: A list of all your devices.

Create A Device

URL: http://cloudapi.labjack.com/USERNAME/devices.json

Example: http://cloudapi.labjack.com/apitest/devices.json

Method: POST

Authentication required? (About Authenication): Yes, Strict

Parameters: device, a device object

Returns: The newly created device object, or, 422 if there are errors.

Device's Details

URL: http://cloudapi.labjack.com/USERNAME/devices/ID.json

Example: http://cloudapi.labjack.com/apitest/devices/15.json

Method: GET

Authentication required? (About Authenication): None

Parameters: None

Returns: A single device object.

Edit A Device

URL: http://cloudapi.labjack.com/USERNAME/devices/ID.json

Example: http://cloudapi.labjack.com/apitest/devices/15.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict

Parameters: device, a device object

Returns: The newly edited device object, or, 422 if there are errors.

Delete A Device

URL: http://cloudapi.labjack.com/USERNAME/devices/ID.json

Example: http://cloudapi.labjack.com/apitest/devices/15.json

Method: DELETE

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: The deleted device object.

Order Your Devices

URL: http://cloudapi.labjack.com/USERNAME/devices/order.json

Example: http://cloudapi.labjack.com/apitest/devices/order.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict

Parameters: orders, a JSON encoded list of device ids and display orders. [ { id => <device id>, displayOrder => <order> }, ... , ]

Returns: The full set of devices in their new order.

Ping Your Device

URL: http://cloudapi.labjack.com/USERNAME/devices/ID/ping.json

Example: http://cloudapi.labjack.com/apitest/devices/ID/ping.json

Method: GET

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: The device object.

Users Methods

User Schema

id: The unique ID for the user.

displayName: The display name of the user.

userName: The name used to authenticate. Only letters and numbers, and cannot start with a number.

apiKey: The API Key used to authenticate that user.

created_at: The timestamp of when the user object was created.

updated_at: The timestamp of the last time the user was updated.

tzOffset: The timezone offset from GMT for that user.

credits: The number of dots that users has.

server_id: The device id of the user's server.

email: The user's email.

plan: A numerical version of what plan the user is on.

planStartDate: A timestamp for when the user's plan started.

accessToken: The user's google spreadsheets access token.

accessTokenSecret: The user's google spreadsheets access token secret.

Get Your User Info

URL: http://cloudapi.labjack.com/USERNAME/info.json

Example: http://cloudapi.labjack.com/apitest/info.json

Method: GET

Authentication required? (About Authenication): Yes, Strict

Parameters: None

Returns: Your user object.

Get Edit User Info

URL: http://cloudapi.labjack.com/USERNAME/users/USERNAME.json

Example: http://cloudapi.labjack.com/apitest/users/apitest.json

Method: PUT

Authentication required? (About Authenication): Yes, Strict

Parameters: user, a user object

Returns: Your edited user object.

What are the authentication types?