All URIs are relative to https://api.artik.cloud/v1.1
| Method | HTTP request | Description |
|---|---|---|
| add_device | POST /devices | Add Device |
| delete_device | DELETE /devices/{deviceId} | Delete Device |
| delete_device_token | DELETE /devices/{deviceId}/tokens | Delete Device Token |
| get_device | GET /devices/{deviceId} | Get Device |
| get_device_presence | GET /devices/{deviceId}/presence | Get device presence information |
| get_device_token | GET /devices/{deviceId}/tokens | Get Device Token |
| update_device | PUT /devices/{deviceId} | Update Device |
| update_device_token | PUT /devices/{deviceId}/tokens | Update Device Token |
DeviceEnvelope add_device(device)
Add Device
Create a device
from __future__ import print_statement
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.DevicesApi()
device = artikcloud.Device() # Device | Device to be added to the user
try:
# Add Device
api_response = api_instance.add_device(device)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->add_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device | Device | Device to be added to the user |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceEnvelope delete_device(device_id)
Delete Device
Deletes a device
from __future__ import print_statement
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.DevicesApi()
device_id = 'device_id_example' # str | deviceId
try:
# Delete Device
api_response = api_instance.delete_device(device_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->delete_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceTokenEnvelope delete_device_token(device_id)
Delete Device Token
Deletes a device's token
from __future__ import print_statement
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.DevicesApi()
device_id = 'device_id_example' # str | deviceId
try:
# Delete Device Token
api_response = api_instance.delete_device_token(device_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->delete_device_token: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceEnvelope get_device(device_id)
Get Device
Retrieves a device
from __future__ import print_statement
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.DevicesApi()
device_id = 'device_id_example' # str | deviceId
try:
# Get Device
api_response = api_instance.get_device(device_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->get_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PresenceEnvelope get_device_presence(device_id)
Get device presence information
Return the presence status of the given device along with the time it was last seen
from __future__ import print_statement
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.DevicesApi()
device_id = 'device_id_example' # str | Device ID.
try:
# Get device presence information
api_response = api_instance.get_device_presence(device_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->get_device_presence: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | Device ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceTokenEnvelope get_device_token(device_id)
Get Device Token
Retrieves a device's token
from __future__ import print_statement
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.DevicesApi()
device_id = 'device_id_example' # str | deviceId
try:
# Get Device Token
api_response = api_instance.get_device_token(device_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->get_device_token: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceEnvelope update_device(device_id, device)
Update Device
Updates a device
from __future__ import print_statement
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.DevicesApi()
device_id = 'device_id_example' # str | deviceId
device = artikcloud.Device() # Device | Device to be updated
try:
# Update Device
api_response = api_instance.update_device(device_id, device)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->update_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | deviceId | |
| device | Device | Device to be updated |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceTokenEnvelope update_device_token(device_id)
Update Device Token
Updates a device's token
from __future__ import print_statement
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.DevicesApi()
device_id = 'device_id_example' # str | deviceId
try:
# Update Device Token
api_response = api_instance.update_device_token(device_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DevicesApi->update_device_token: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | deviceId |
- Content-Type: text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]