Skip to content

Latest commit

 

History

History
170 lines (118 loc) · 5.08 KB

DevicesApi.md

File metadata and controls

170 lines (118 loc) · 5.08 KB

DevicesApi

All URIs are relative to https://api.kinow.com/api

Method HTTP request Description
createDevices POST /devices
deleteDevice DELETE /devices/{device_id}
getCustomerDevices GET /devices/{customer_id}

createDevices

\Kinow\Client\Model\DeviceResponse createDevices($body)

Create new devices

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\DevicesApi();
$body = new \Kinow\Client\Model\CreateDeviceRequest(); // \Kinow\Client\Model\CreateDeviceRequest | 

try {
    $result = $api_instance->createDevices($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesApi->createDevices: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Kinow\Client\Model\CreateDeviceRequest

Return type

\Kinow\Client\Model\DeviceResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteDevice

deleteDevice($device_id)

Delete Device

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\DevicesApi();
$device_id = 789; // int | Device ID to delete

try {
    $api_instance->deleteDevice($device_id);
} catch (Exception $e) {
    echo 'Exception when calling DevicesApi->deleteDevice: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
device_id int Device ID to delete

Return type

void (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCustomerDevices

\Kinow\Client\Model\DeviceListResponse getCustomerDevices($customer_id, $page, $per_page)

Get customer devices list

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\DevicesApi();
$customer_id = 789; // int | Customer ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 

try {
    $result = $api_instance->getCustomerDevices($customer_id, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesApi->getCustomerDevices: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_id int Customer ID to fetch
page int [optional]
per_page int [optional]

Return type

\Kinow\Client\Model\DeviceListResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined