ARTIK Cloud Python SDK
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
artikcloud
docs
test
.editorconfig
.gitignore
.swagger-codegen-ignore
.travis.yml
LICENSE
Makefile
README.md
artik.properties
dev-requirements.txt
git_push.sh
pom.xml
requirements.txt
setup.cfg
setup.py
test-all.sh
test-requirements.txt
test.sh
tox.ini

README.md

ARTIK Cloud Python SDK

PyPI version

This SDK helps you connect your Python scripts to ARTIK Cloud. The SDK helps authenticating with ARTIK Cloud, and exposes a number of methods to easily execute REST API calls to ARTIK Cloud.

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install artikcloud

(you may need to run pip with root permission: sudo pip install artikcloud)

Then import the package:

import artikcloud 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import artikcloud

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = artikcloud.DeviceTypesApi()
device_type_id = 'device_type_id_example' # str | deviceTypeId

try: 
    # Get Available Manifest Versions
    api_response = api_instance.get_available_manifest_versions(device_type_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling DeviceTypesApi->get_available_manifest_versions: %s\n" % e

Documentation for API Endpoints

All URIs are relative to https://api.artik.cloud/v1.1

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

Documentation For Models

Documentation For Authorization

artikcloud_oauth

Usage

Peek into tests for examples about how to use the SDK.

More about ARTIK Cloud

If you are not familiar with ARTIK Cloud, we have extensive documentation at https://developer.artik.cloud/documentation

The full ARTIK Cloud API specification can be found at https://developer.artik.cloud/documentation/api-reference/

Check out advanced sample applications at https://developer.artik.cloud/documentation/samples/

To create and manage your services and devices on ARTIK Cloud, create an account at https://developer.artik.cloud

Also see the ARTIK Cloud blog for tutorials, updates, and more: http://artik.io/blog/cloud

License and Copyright

Licensed under the Apache License. See LICENSE.

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