Ruby Gem for ARTIK Cloud
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ARTIK Cloud Ruby SDK

Gem Version

This SDK helps you connect your Ruby scripts to ARTIK Cloud. The SDK exposes a number of methods to easily execute REST API calls to ARTIK Cloud.

  • Package version: 2.2.3


Build a gem

To build the Ruby code into a gem:

gem build artikcloud.gemspec

Then either install the gem locally:

gem install ./artikcloud-2.2.3.gem

(for development, run gem install --dev ./artikcloud-2.2.3.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'artikcloud', '~> 2.2.3'

Install from Git

If the Ruby gem is hosted at a git repository:, then add the following in the Gemfile:

gem 'artikcloud', :git => ''

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'artikcloud'

# Setup authorization
ArtikCloud.configure do |config|
  # Configure OAuth2 access token for authorization: artikcloud_oauth
  config.access_token = 'YOUR ACCESS TOKEN'

api_instance =

device_type_id = "device_type_id_example" # String | deviceTypeId

  #Get Available Manifest Versions
  result = api_instance.get_available_manifest_versions(device_type_id)
  p result
rescue ArtikCloud::ApiError => e
  puts "Exception when calling DeviceTypesApi->get_available_manifest_versions: #{e}"

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
ArtikCloud::DeviceTypesApi get_available_manifest_versions GET /devicetypes/{deviceTypeId}/availablemanifestversions Get Available Manifest Versions
ArtikCloud::DeviceTypesApi get_device_type GET /devicetypes/{deviceTypeId} Get Device Type
ArtikCloud::DeviceTypesApi get_device_types GET /devicetypes Get Device Types
ArtikCloud::DeviceTypesApi get_device_types_by_application GET /applications/{appId}/devicetypes Get Device Types by Application
ArtikCloud::DeviceTypesApi get_latest_manifest_properties GET /devicetypes/{deviceTypeId}/manifests/latest/properties Get Latest Manifest Properties
ArtikCloud::DeviceTypesApi get_manifest_properties GET /devicetypes/{deviceTypeId}/manifests/{version}/properties Get manifest properties
ArtikCloud::DevicesApi add_device POST /devices Add Device
ArtikCloud::DevicesApi delete_device DELETE /devices/{deviceId} Delete Device
ArtikCloud::DevicesApi delete_device_token DELETE /devices/{deviceId}/tokens Delete Device Token
ArtikCloud::DevicesApi get_device GET /devices/{deviceId} Get Device
ArtikCloud::DevicesApi get_device_presence GET /devices/{deviceId}/presence Get device presence information
ArtikCloud::DevicesApi get_device_token GET /devices/{deviceId}/tokens Get Device Token
ArtikCloud::DevicesApi update_device PUT /devices/{deviceId} Update Device
ArtikCloud::DevicesApi update_device_token PUT /devices/{deviceId}/tokens Update Device Token
ArtikCloud::DevicesManagementApi create_tasks POST /devicemgmt/tasks Create a new task for one or more devices
ArtikCloud::DevicesManagementApi delete_server_properties DELETE /devicemgmt/devices/{did}/serverproperties Deletes a device's properties.
ArtikCloud::DevicesManagementApi get_all_by_did GET /devicemgmt/devices/{did}/tasks Returns the list of tasks for a particular device id with optional status filter.
ArtikCloud::DevicesManagementApi get_device_types_info GET /devicemgmt/devicetypes/{dtid} Read a device type device management information.
ArtikCloud::DevicesManagementApi get_manifest_properties GET /devicemgmt/devicetypes/{dtid}/manifest/properties Get a device type's device management manifest properties
ArtikCloud::DevicesManagementApi get_properties GET /devicemgmt/devices/{did}/properties Read a device's properties.
ArtikCloud::DevicesManagementApi get_statuses GET /devicemgmt/tasks/{tid}/statuses Returns the details and status of a task id and the individual statuses of each device id in the list.
ArtikCloud::DevicesManagementApi get_statuses_history GET /devicemgmt/tasks/{tid}/statuses/history Returns the history of the status changes for a specific task id, or for a specific device id in that task.
ArtikCloud::DevicesManagementApi get_task_by_id GET /devicemgmt/tasks/{tid} Returns the details and global status of a specific task id.
ArtikCloud::DevicesManagementApi get_tasks GET /devicemgmt/tasks Returns the all the tasks for a device type.
ArtikCloud::DevicesManagementApi query_properties GET /devicemgmt/devices/properties Query device properties across devices.
ArtikCloud::DevicesManagementApi update_device_types_info PUT /devicemgmt/devicetypes/{dtid} Updates a device type information
ArtikCloud::DevicesManagementApi update_server_properties POST /devicemgmt/devices/{did}/serverproperties Updates a device's server properties.
ArtikCloud::DevicesManagementApi update_task PUT /devicemgmt/tasks/{tid} Updates a task for all devices - For now just allows changing the state to cancelled.
ArtikCloud::DevicesManagementApi update_task_for_device PUT /devicemgmt/tasks/{tid}/devices/{did} Updates a task for a specific device - For now just allows changing the state to cancelled.
ArtikCloud::DevicesSharesApi create_share_for_device POST /devices/{deviceId}/shares Share a device
ArtikCloud::DevicesSharesApi delete_sharing_for_device DELETE /devices/{deviceId}/shares/{shareId} Delete specific share of the given device id
ArtikCloud::DevicesSharesApi get_all_shares_for_device GET /devices/{deviceId}/shares List all shares for the given device id
ArtikCloud::DevicesSharesApi get_sharing_for_device GET /devices/{deviceId}/shares/{shareId} Get specific share of the given device id
ArtikCloud::DevicesStatusApi get_device_status GET /devices/{deviceId}/status Get Device Status
ArtikCloud::DevicesStatusApi get_devices_status GET /devices/status Get Devices Status
ArtikCloud::DevicesStatusApi put_device_status PUT /devices/{deviceId}/status Update Device Status
ArtikCloud::ExportApi export_request POST /messages/export Create Export Request
ArtikCloud::ExportApi get_export_history GET /messages/export/history Get Export History
ArtikCloud::ExportApi get_export_result GET /messages/export/{exportId}/result Get Export Result
ArtikCloud::ExportApi get_export_status GET /messages/export/{exportId}/status Check Export Status
ArtikCloud::MessagesApi get_aggregates_histogram GET /messages/analytics/histogram Get Normalized Message Histogram
ArtikCloud::MessagesApi get_field_presence GET /messages/presence Get normalized message presence
ArtikCloud::MessagesApi get_last_normalized_messages GET /messages/last Get Last Normalized Message
ArtikCloud::MessagesApi get_message_aggregates GET /messages/analytics/aggregates Get Normalized Message Aggregates
ArtikCloud::MessagesApi get_message_snapshots GET /messages/snapshots Get Message Snapshots
ArtikCloud::MessagesApi get_normalized_actions GET /actions Get Normalized Actions
ArtikCloud::MessagesApi get_normalized_messages GET /messages Get Normalized Messages
ArtikCloud::MessagesApi send_actions POST /actions Send Actions
ArtikCloud::MessagesApi send_message POST /messages Send Message
ArtikCloud::MonetizationApi create_pricing_tiers POST /pricing/devicetypes/{dtid}/pricingtiers Define devicetype's pricing tiers.
ArtikCloud::MonetizationApi get_pricing_tiers GET /pricing/devices/{did}/pricingtiers Get a device's pricing tiers
ArtikCloud::MonetizationApi get_the__pricing_tiers GET /pricing/devicetypes/{dtid}/pricingtiers Get devicetype's pricing tiers.
ArtikCloud::MonetizationApi get_upgrade_path GET /pricing/devices/{did}/revenueshare/upgradepath Get upgrade path
ArtikCloud::MonetizationApi set_pricing_tier PUT /pricing/devices/{did}/pricingtiers Set a device's pricing tier
ArtikCloud::RegistrationsApi confirm_user PUT /devices/registrations/pin Confirm User
ArtikCloud::RegistrationsApi get_request_status_for_user GET /devices/registrations/{requestId}/status Get Request Status For User
ArtikCloud::RegistrationsApi unregister_device DELETE /devices/{deviceId}/registrations Unregister Device
ArtikCloud::RulesApi create_rule POST /rules Create Rule
ArtikCloud::RulesApi delete_rule DELETE /rules/{ruleId} Delete Rule
ArtikCloud::RulesApi get_rule GET /rules/{ruleId} Get Rule
ArtikCloud::RulesApi update_rule PUT /rules/{ruleId} Update Rule
ArtikCloud::SubscriptionsApi create_subscription POST /subscriptions Create Subscription
ArtikCloud::SubscriptionsApi delete_subscription DELETE /subscriptions/{subId} Delete Subscription
ArtikCloud::SubscriptionsApi get_all_subscriptions GET /subscriptions Get All Subscriptions
ArtikCloud::SubscriptionsApi get_messages GET /notifications/{notifId}/messages Get Messages
ArtikCloud::SubscriptionsApi get_subscription GET /subscriptions/{subId} Get Subscription
ArtikCloud::SubscriptionsApi validate_subscription POST /subscriptions/{subId}/validate Validate Subscription
ArtikCloud::TagsApi get_tag_categories GET /tags/categories Get all categories
ArtikCloud::TagsApi get_tag_suggestions GET /tags/suggestions Get tag suggestions
ArtikCloud::TagsApi get_tags_by_categories GET /tags Get all tags of categories
ArtikCloud::TokensApi check_token POST /accounts/checkToken Check Token
ArtikCloud::TokensApi refresh_token POST /accounts/token Refresh Token
ArtikCloud::TokensApi token_info GET /accounts/tokenInfo Token Info
ArtikCloud::UsersApi create_user_properties POST /users/{userId}/properties Create User Application Properties
ArtikCloud::UsersApi delete_user_properties DELETE /users/{userId}/properties Delete User Application Properties
ArtikCloud::UsersApi get_self GET /users/self Get Current User Profile
ArtikCloud::UsersApi get_user_device_types GET /users/{userId}/devicetypes Get User Device Types
ArtikCloud::UsersApi get_user_devices GET /users/{userId}/devices Get User Devices
ArtikCloud::UsersApi get_user_properties GET /users/{userId}/properties Get User application properties
ArtikCloud::UsersApi get_user_rules GET /users/{userId}/rules Get User Rules
ArtikCloud::UsersApi list_all_shares_for_user GET /users/{userId}/shares Get User shares
ArtikCloud::UsersApi update_user_properties PUT /users/{userId}/properties Update User Application Properties
ArtikCloud::WhitelistingApi delete_vdid DELETE /devicetypes/{dtid}/whitelist/{vdid} Delete a vdid from the devicetype whitelist.
ArtikCloud::WhitelistingApi delete_whitelist_certificate DELETE /devicetypes/{dtid}/whitelist/certificates/{cid} Delete a whitelist certificate associated with a devicetype.
ArtikCloud::WhitelistingApi enable_whitelist PUT /devicetypes/:dtid/whitelist/enable Enable or disble whitelist feature of a device type
ArtikCloud::WhitelistingApi get_rejected_row_list GET /devicetypes/{dtid}/whitelist/{uploadId}/rejectedRows Get the list of rejected rows for an uploaded CSV file.
ArtikCloud::WhitelistingApi get_upload_status GET /devicetypes/{dtid}/whitelist/{uploadId}/status Get the status of a uploaded CSV file.
ArtikCloud::WhitelistingApi get_whitelist GET /devicetypes/{dtid}/whitelist Get whitelisted vdids of a device type.
ArtikCloud::WhitelistingApi get_whitelist_certificate GET /devicetypes/{dtid}/whitelist/certificates Get whitelist certificate of device type.
ArtikCloud::WhitelistingApi get_whitelist_status GET /devicetypes/{dtid}/whitelist/status Get the status of whitelist feature (enabled/disabled) of a device type.
ArtikCloud::WhitelistingApi upload_csv POST /devicetypes/{dtid}/whitelist Upload a CSV file related to the Device Type.

Documentation for Models

Documentation for Authorization


More about ARTIK Cloud

If you are not familiar with ARTIK Cloud, we have extensive documentation at

The full ARTIK Cloud API specification can be found at

Check out advanced sample applications at

To create and manage your services and devices on ARTIK Cloud, create an account at

Also see the ARTIK Cloud blog for tutorials, updates, and more:

License and Copyright

Licensed under the Apache License. See LICENSE.

Copyright (c) 2017 Samsung Electronics Co., Ltd.