AL-KO Gardentech IoT API

Access

thingsThingnameAccessesGet

Reads all accesses to a thing. Only possible if requester is admin of device


/things/{thingname}/accesses

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.al-ko.com/v1/iot/things/{thingname}/accesses"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccessApi;

import java.io.File;
import java.util.*;

public class AccessApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        AccessApi apiInstance = new AccessApi();
        String thingname = thingname_example; // String | 
        try {
            array[Access] result = apiInstance.thingsThingnameAccessesGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessApi#thingsThingnameAccessesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccessApi;

public class AccessApiExample {

    public static void main(String[] args) {
        AccessApi apiInstance = new AccessApi();
        String thingname = thingname_example; // String | 
        try {
            array[Access] result = apiInstance.thingsThingnameAccessesGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessApi#thingsThingnameAccessesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *thingname = thingname_example; // 

AccessApi *apiInstance = [[AccessApi alloc] init];

[apiInstance thingsThingnameAccessesGetWith:thingname
              completionHandler: ^(array[Access] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.AccessApi()
var thingname = thingname_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thingsThingnameAccessesGet(thingname, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsThingnameAccessesGetExample
    {
        public void main()
        {


            var apiInstance = new AccessApi();
            var thingname = thingname_example;  // String | 

            try
            {
                array[Access] result = apiInstance.thingsThingnameAccessesGet(thingname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccessApi.thingsThingnameAccessesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiAccessApi();
$thingname = thingname_example; // String | 

try {
    $result = $api_instance->thingsThingnameAccessesGet($thingname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessApi->thingsThingnameAccessesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccessApi;


my $api_instance = WWW::SwaggerClient::AccessApi->new();
my $thingname = thingname_example; # String | 

eval { 
    my $result = $api_instance->thingsThingnameAccessesGet(thingname => $thingname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessApi->thingsThingnameAccessesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.AccessApi()
thingname = thingname_example # String | 

try: 
    api_response = api_instance.things_thingname_accesses_get(thingname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessApi->thingsThingnameAccessesGet: %s\n" % e)

Parameters

Path parameters
Name Description
thingname*
String
Required

Responses

Status: 200 - OK

Status: 403 - Access to the resource is forbidden

Status: 404 - The specified resource was not found


Attributes

thingsThingnameAttributesGet

Reads the attributes of a thing


/things/{thingname}/attributes

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.al-ko.com/v1/iot/things/{thingname}/attributes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttributesApi;

import java.io.File;
import java.util.*;

public class AttributesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        AttributesApi apiInstance = new AttributesApi();
        String thingname = thingname_example; // String | 
        try {
            ThingAttributes result = apiInstance.thingsThingnameAttributesGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttributesApi#thingsThingnameAttributesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttributesApi;

public class AttributesApiExample {

    public static void main(String[] args) {
        AttributesApi apiInstance = new AttributesApi();
        String thingname = thingname_example; // String | 
        try {
            ThingAttributes result = apiInstance.thingsThingnameAttributesGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttributesApi#thingsThingnameAttributesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *thingname = thingname_example; // 

AttributesApi *apiInstance = [[AttributesApi alloc] init];

[apiInstance thingsThingnameAttributesGetWith:thingname
              completionHandler: ^(ThingAttributes output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.AttributesApi()
var thingname = thingname_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thingsThingnameAttributesGet(thingname, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsThingnameAttributesGetExample
    {
        public void main()
        {


            var apiInstance = new AttributesApi();
            var thingname = thingname_example;  // String | 

            try
            {
                ThingAttributes result = apiInstance.thingsThingnameAttributesGet(thingname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttributesApi.thingsThingnameAttributesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiAttributesApi();
$thingname = thingname_example; // String | 

try {
    $result = $api_instance->thingsThingnameAttributesGet($thingname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttributesApi->thingsThingnameAttributesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttributesApi;


my $api_instance = WWW::SwaggerClient::AttributesApi->new();
my $thingname = thingname_example; # String | 

eval { 
    my $result = $api_instance->thingsThingnameAttributesGet(thingname => $thingname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttributesApi->thingsThingnameAttributesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.AttributesApi()
thingname = thingname_example # String | 

try: 
    api_response = api_instance.things_thingname_attributes_get(thingname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttributesApi->thingsThingnameAttributesGet: %s\n" % e)

Parameters

Path parameters
Name Description
thingname*
String
Required

Responses

Status: 200 - OK

Status: 403 - Access to the resource is forbidden

Status: 404 - The specified resource was not found


Info

thingsGet

Reads all things the user has access to


/things

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.al-ko.com/v1/iot/things?pimInfo=&thingState=&accesses=&thingCategory="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InfoApi;

import java.io.File;
import java.util.*;

public class InfoApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        InfoApi apiInstance = new InfoApi();
        Boolean pimInfo = true; // Boolean | If true: the response contains product information
        Boolean thingState = true; // Boolean | If true, the response contains the state of the things
        Boolean accesses = true; // Boolean | If true: the response contains the accesses to the thing (only if admin)
        String thingCategory = thingCategory_example; // String | Filters the returned things by its thing type
        try {
            array[FullThing] result = apiInstance.thingsGet(pimInfo, thingState, accesses, thingCategory);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#thingsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InfoApi;

public class InfoApiExample {

    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        Boolean pimInfo = true; // Boolean | If true: the response contains product information
        Boolean thingState = true; // Boolean | If true, the response contains the state of the things
        Boolean accesses = true; // Boolean | If true: the response contains the accesses to the thing (only if admin)
        String thingCategory = thingCategory_example; // String | Filters the returned things by its thing type
        try {
            array[FullThing] result = apiInstance.thingsGet(pimInfo, thingState, accesses, thingCategory);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#thingsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Boolean *pimInfo = true; // If true: the response contains product information (optional) (default to false)
Boolean *thingState = true; // If true, the response contains the state of the things (optional) (default to false)
Boolean *accesses = true; // If true: the response contains the accesses to the thing (only if admin) (optional) (default to false)
String *thingCategory = thingCategory_example; // Filters the returned things by its thing type (optional)

InfoApi *apiInstance = [[InfoApi alloc] init];

[apiInstance thingsGetWith:pimInfo
    thingState:thingState
    accesses:accesses
    thingCategory:thingCategory
              completionHandler: ^(array[FullThing] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.InfoApi()
var opts = { 
  'pimInfo': true, // {{Boolean}} If true: the response contains product information
  'thingState': true, // {{Boolean}} If true, the response contains the state of the things
  'accesses': true, // {{Boolean}} If true: the response contains the accesses to the thing (only if admin)
  'thingCategory': thingCategory_example // {{String}} Filters the returned things by its thing type
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thingsGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsGetExample
    {
        public void main()
        {


            var apiInstance = new InfoApi();
            var pimInfo = true;  // Boolean | If true: the response contains product information (optional)  (default to false)
            var thingState = true;  // Boolean | If true, the response contains the state of the things (optional)  (default to false)
            var accesses = true;  // Boolean | If true: the response contains the accesses to the thing (only if admin) (optional)  (default to false)
            var thingCategory = thingCategory_example;  // String | Filters the returned things by its thing type (optional) 

            try
            {
                array[FullThing] result = apiInstance.thingsGet(pimInfo, thingState, accesses, thingCategory);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InfoApi.thingsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiInfoApi();
$pimInfo = true; // Boolean | If true: the response contains product information
$thingState = true; // Boolean | If true, the response contains the state of the things
$accesses = true; // Boolean | If true: the response contains the accesses to the thing (only if admin)
$thingCategory = thingCategory_example; // String | Filters the returned things by its thing type

try {
    $result = $api_instance->thingsGet($pimInfo, $thingState, $accesses, $thingCategory);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->thingsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InfoApi;


my $api_instance = WWW::SwaggerClient::InfoApi->new();
my $pimInfo = true; # Boolean | If true: the response contains product information
my $thingState = true; # Boolean | If true, the response contains the state of the things
my $accesses = true; # Boolean | If true: the response contains the accesses to the thing (only if admin)
my $thingCategory = thingCategory_example; # String | Filters the returned things by its thing type

eval { 
    my $result = $api_instance->thingsGet(pimInfo => $pimInfo, thingState => $thingState, accesses => $accesses, thingCategory => $thingCategory);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->thingsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.InfoApi()
pimInfo = true # Boolean | If true: the response contains product information (optional) (default to false)
thingState = true # Boolean | If true, the response contains the state of the things (optional) (default to false)
accesses = true # Boolean | If true: the response contains the accesses to the thing (only if admin) (optional) (default to false)
thingCategory = thingCategory_example # String | Filters the returned things by its thing type (optional)

try: 
    api_response = api_instance.things_get(pimInfo=pimInfo, thingState=thingState, accesses=accesses, thingCategory=thingCategory)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->thingsGet: %s\n" % e)

Parameters

Query parameters
Name Description
pimInfo
Boolean
If true: the response contains product information
thingState
Boolean
If true, the response contains the state of the things
accesses
Boolean
If true: the response contains the accesses to the thing (only if admin)
thingCategory
String
Filters the returned things by its thing type

Responses

Status: 200 - OK

Status: 400 - Invalid Parameters

Status: 403 - Access to the resource is forbidden


thingsThingnameGet

Reads one specific thing


/things/{thingname}

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.al-ko.com/v1/iot/things/{thingname}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InfoApi;

import java.io.File;
import java.util.*;

public class InfoApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        InfoApi apiInstance = new InfoApi();
        String thingname = thingname_example; // String | 
        try {
            FullThing result = apiInstance.thingsThingnameGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#thingsThingnameGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InfoApi;

public class InfoApiExample {

    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        String thingname = thingname_example; // String | 
        try {
            FullThing result = apiInstance.thingsThingnameGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#thingsThingnameGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *thingname = thingname_example; // 

InfoApi *apiInstance = [[InfoApi alloc] init];

[apiInstance thingsThingnameGetWith:thingname
              completionHandler: ^(FullThing output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.InfoApi()
var thingname = thingname_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thingsThingnameGet(thingname, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsThingnameGetExample
    {
        public void main()
        {


            var apiInstance = new InfoApi();
            var thingname = thingname_example;  // String | 

            try
            {
                FullThing result = apiInstance.thingsThingnameGet(thingname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InfoApi.thingsThingnameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiInfoApi();
$thingname = thingname_example; // String | 

try {
    $result = $api_instance->thingsThingnameGet($thingname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->thingsThingnameGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InfoApi;


my $api_instance = WWW::SwaggerClient::InfoApi->new();
my $thingname = thingname_example; # String | 

eval { 
    my $result = $api_instance->thingsThingnameGet(thingname => $thingname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->thingsThingnameGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.InfoApi()
thingname = thingname_example # String | 

try: 
    api_response = api_instance.things_thingname_get(thingname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->thingsThingnameGet: %s\n" % e)

Parameters

Path parameters
Name Description
thingname*
String
Required

Responses

Status: 200 - OK

Status: 403 - Access to the resource is forbidden

Status: 404 - The specified resource was not found


State

thingsThingnameStateDesiredGet

Reads the desired state of a device


/things/{thingname}/state/desired

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.al-ko.com/v1/iot/things/{thingname}/state/desired"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StateApi;

import java.io.File;
import java.util.*;

public class StateApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        try {
            inline_response_200_2 result = apiInstance.thingsThingnameStateDesiredGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateDesiredGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StateApi;

public class StateApiExample {

    public static void main(String[] args) {
        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        try {
            inline_response_200_2 result = apiInstance.thingsThingnameStateDesiredGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateDesiredGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *thingname = thingname_example; // 

StateApi *apiInstance = [[StateApi alloc] init];

[apiInstance thingsThingnameStateDesiredGetWith:thingname
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.StateApi()
var thingname = thingname_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thingsThingnameStateDesiredGet(thingname, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsThingnameStateDesiredGetExample
    {
        public void main()
        {


            var apiInstance = new StateApi();
            var thingname = thingname_example;  // String | 

            try
            {
                inline_response_200_2 result = apiInstance.thingsThingnameStateDesiredGet(thingname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StateApi.thingsThingnameStateDesiredGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiStateApi();
$thingname = thingname_example; // String | 

try {
    $result = $api_instance->thingsThingnameStateDesiredGet($thingname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StateApi->thingsThingnameStateDesiredGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StateApi;


my $api_instance = WWW::SwaggerClient::StateApi->new();
my $thingname = thingname_example; # String | 

eval { 
    my $result = $api_instance->thingsThingnameStateDesiredGet(thingname => $thingname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StateApi->thingsThingnameStateDesiredGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.StateApi()
thingname = thingname_example # String | 

try: 
    api_response = api_instance.things_thingname_state_desired_get(thingname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StateApi->thingsThingnameStateDesiredGet: %s\n" % e)

Parameters

Path parameters
Name Description
thingname*
String
Required

Responses

Status: 200 - OK

Status: 403 - Access to the resource is forbidden

Status: 404 - The specified resource was not found


thingsThingnameStateDesiredPatch

Sets a desired state to a device (use this to request state changes)


/things/{thingname}/state/desired

Usage and SDK Samples

curl -X PATCH\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Content-Type: application/json"\
"https://api.al-ko.com/v1/iot/things/{thingname}/state/desired"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StateApi;

import java.io.File;
import java.util.*;

public class StateApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        State_desired_body body = ; // State_desired_body | 
        try {
            apiInstance.thingsThingnameStateDesiredPatch(thingname, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateDesiredPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StateApi;

public class StateApiExample {

    public static void main(String[] args) {
        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        State_desired_body body = ; // State_desired_body | 
        try {
            apiInstance.thingsThingnameStateDesiredPatch(thingname, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateDesiredPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *thingname = thingname_example; // 
State_desired_body *body = ; //  (optional)

StateApi *apiInstance = [[StateApi alloc] init];

[apiInstance thingsThingnameStateDesiredPatchWith:thingname
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.StateApi()
var thingname = thingname_example; // {{String}} 
var opts = { 
  'body':  // {{State_desired_body}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.thingsThingnameStateDesiredPatch(thingname, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsThingnameStateDesiredPatchExample
    {
        public void main()
        {


            var apiInstance = new StateApi();
            var thingname = thingname_example;  // String | 
            var body = new State_desired_body(); // State_desired_body |  (optional) 

            try
            {
                apiInstance.thingsThingnameStateDesiredPatch(thingname, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StateApi.thingsThingnameStateDesiredPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiStateApi();
$thingname = thingname_example; // String | 
$body = ; // State_desired_body | 

try {
    $api_instance->thingsThingnameStateDesiredPatch($thingname, $body);
} catch (Exception $e) {
    echo 'Exception when calling StateApi->thingsThingnameStateDesiredPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StateApi;


my $api_instance = WWW::SwaggerClient::StateApi->new();
my $thingname = thingname_example; # String | 
my $body = WWW::SwaggerClient::Object::State_desired_body->new(); # State_desired_body | 

eval { 
    $api_instance->thingsThingnameStateDesiredPatch(thingname => $thingname, body => $body);
};
if ($@) {
    warn "Exception when calling StateApi->thingsThingnameStateDesiredPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.StateApi()
thingname = thingname_example # String | 
body =  # State_desired_body |  (optional)

try: 
    api_instance.things_thingname_state_desired_patch(thingname, body=body)
except ApiException as e:
    print("Exception when calling StateApi->thingsThingnameStateDesiredPatch: %s\n" % e)

Parameters

Path parameters
Name Description
thingname*
String
Required
Body parameters
Name Description
body

Responses

Status: 200 - OK


thingsThingnameStateGet

Reads the whole state (reported, desired, delta, meta) of a device


/things/{thingname}/state

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.al-ko.com/v1/iot/things/{thingname}/state"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StateApi;

import java.io.File;
import java.util.*;

public class StateApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        try {
            inline_response_200 result = apiInstance.thingsThingnameStateGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StateApi;

public class StateApiExample {

    public static void main(String[] args) {
        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        try {
            inline_response_200 result = apiInstance.thingsThingnameStateGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *thingname = thingname_example; // 

StateApi *apiInstance = [[StateApi alloc] init];

[apiInstance thingsThingnameStateGetWith:thingname
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.StateApi()
var thingname = thingname_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thingsThingnameStateGet(thingname, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsThingnameStateGetExample
    {
        public void main()
        {


            var apiInstance = new StateApi();
            var thingname = thingname_example;  // String | 

            try
            {
                inline_response_200 result = apiInstance.thingsThingnameStateGet(thingname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StateApi.thingsThingnameStateGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiStateApi();
$thingname = thingname_example; // String | 

try {
    $result = $api_instance->thingsThingnameStateGet($thingname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StateApi->thingsThingnameStateGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StateApi;


my $api_instance = WWW::SwaggerClient::StateApi->new();
my $thingname = thingname_example; # String | 

eval { 
    my $result = $api_instance->thingsThingnameStateGet(thingname => $thingname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StateApi->thingsThingnameStateGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.StateApi()
thingname = thingname_example # String | 

try: 
    api_response = api_instance.things_thingname_state_get(thingname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StateApi->thingsThingnameStateGet: %s\n" % e)

Parameters

Path parameters
Name Description
thingname*
String
Required

Responses

Status: 200 - OK

Status: 403 - Access to the resource is forbidden

Status: 404 - The specified resource was not found


thingsThingnameStateReportedGet

Reads the latest reported state of the device


/things/{thingname}/state/reported

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://api.al-ko.com/v1/iot/things/{thingname}/state/reported"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StateApi;

import java.io.File;
import java.util.*;

public class StateApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        try {
            inline_response_200_1 result = apiInstance.thingsThingnameStateReportedGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateReportedGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StateApi;

public class StateApiExample {

    public static void main(String[] args) {
        StateApi apiInstance = new StateApi();
        String thingname = thingname_example; // String | 
        try {
            inline_response_200_1 result = apiInstance.thingsThingnameStateReportedGet(thingname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StateApi#thingsThingnameStateReportedGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *thingname = thingname_example; // 

StateApi *apiInstance = [[StateApi alloc] init];

[apiInstance thingsThingnameStateReportedGetWith:thingname
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlKoGardentechIoTApi = require('al_ko_gardentech_io_t_api');
var defaultClient = AlKoGardentechIoTApi.ApiClient.instance;


var api = new AlKoGardentechIoTApi.StateApi()
var thingname = thingname_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.thingsThingnameStateReportedGet(thingname, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class thingsThingnameStateReportedGetExample
    {
        public void main()
        {


            var apiInstance = new StateApi();
            var thingname = thingname_example;  // String | 

            try
            {
                inline_response_200_1 result = apiInstance.thingsThingnameStateReportedGet(thingname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StateApi.thingsThingnameStateReportedGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiStateApi();
$thingname = thingname_example; // String | 

try {
    $result = $api_instance->thingsThingnameStateReportedGet($thingname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StateApi->thingsThingnameStateReportedGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StateApi;


my $api_instance = WWW::SwaggerClient::StateApi->new();
my $thingname = thingname_example; # String | 

eval { 
    my $result = $api_instance->thingsThingnameStateReportedGet(thingname => $thingname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StateApi->thingsThingnameStateReportedGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.StateApi()
thingname = thingname_example # String | 

try: 
    api_response = api_instance.things_thingname_state_reported_get(thingname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StateApi->thingsThingnameStateReportedGet: %s\n" % e)

Parameters

Path parameters
Name Description
thingname*
String
Required

Responses

Status: 200 - OK

Status: 403 - Access to the resource is forbidden

Status: 404 - The specified resource was not found