# Siemens Inventory REST API

## API and SDK Documentation

Version: 1.0.0

REST API for Inventory Service

# Device

# createDevice

Creates new Device

    /devices

### Usage and SDK Samples

    curl -X POST "https://localhost/inventory-service/api/v1/devices"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            Device body = ; // Device | Device object that needs to be created
            try {
                Device result = apiInstance.createDevice(body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#createDevice");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            Device body = ; // Device | Device object that needs to be created
            try {
                Device result = apiInstance.createDevice(body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#createDevice");
                e.printStackTrace();
            }
        }
    }

    Device *body = ; // Device object that needs to be created

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

    // Creates new Device
    [apiInstance createDeviceWith:body
                  completionHandler: ^(Device output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var body = ; // {Device} Device object that needs to be created

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.createDevice(body, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var body = new Device(); // Device | Device object that needs to be created

                try
                {
                    // Creates new Device
                    Device result = apiInstance.createDevice(body);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.createDevice: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $body = ; // Device | Device object that needs to be created

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $body = WWW::SwaggerClient::Object::Device->new(); # Device | Device object that needs to be created

    eval {
        my $result = $api_instance->createDevice(body => $body);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->createDevice: $@\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.DeviceApi()
    body =  # Device | Device object that needs to be created

    try:
        # Creates new Device
        api_response = api_instance.create_device(body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->createDevice: %s\n" % e)

## Parameters

Body parameters

Name | Description
--- | ---
body * |

## Responses

### Status: 201 - Device created

### Status: 405 - Invalid input

# deleteDevice

Deletes an device

    /devices/{deviceId}

### Usage and SDK Samples

    curl -X DELETE "https://localhost/inventory-service/api/v1/devices/{deviceId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            Long deviceId = 789; // Long | Device id to delete
            try {
                apiInstance.deleteDevice(deviceId);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#deleteDevice");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            Long deviceId = 789; // Long | Device id to delete
            try {
                apiInstance.deleteDevice(deviceId);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#deleteDevice");
                e.printStackTrace();
            }
        }
    }

    Long *deviceId = 789; // Device id to delete

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

    // Deletes an device
    [apiInstance deleteDeviceWith:deviceId
                  completionHandler: ^(NSError* error) {
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var deviceId = 789; // {Long} Device id to delete

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully.');
      }
    };
    api.deleteDevice(deviceId, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var deviceId = 789;  // Long | Device id to delete

                try
                {
                    // Deletes an device
                    apiInstance.deleteDevice(deviceId);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.deleteDevice: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $deviceId = 789; // Long | Device id to delete

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $deviceId = 789; # Long | Device id to delete

    eval {
        $api_instance->deleteDevice(deviceId => $deviceId);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->deleteDevice: $@\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.DeviceApi()
    deviceId = 789 # Long | Device id to delete

    try:
        # Deletes an device
        api_instance.delete_device(deviceId)
    except ApiException as e:
        print("Exception when calling DeviceApi->deleteDevice: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
deviceId* | Long (int64) Device id to delete Required

## Responses

### Status: 200 - Device was deleted.

### Status: 404 - Specified device does not exist.

# getDevice

Gets Device based on deviceId

    /devices/{deviceId}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/devices/{deviceId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            Long deviceId = 789; // Long | Device id to get
            try {
                Device result = apiInstance.getDevice(deviceId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevice");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            Long deviceId = 789; // Long | Device id to get
            try {
                Device result = apiInstance.getDevice(deviceId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevice");
                e.printStackTrace();
            }
        }
    }

    Long *deviceId = 789; // Device id to get

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

    // Gets Device based on deviceId
    [apiInstance getDeviceWith:deviceId
                  completionHandler: ^(Device output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var deviceId = 789; // {Long} Device id to get

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getDevice(deviceId, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var deviceId = 789;  // Long | Device id to get

                try
                {
                    // Gets Device based on deviceId
                    Device result = apiInstance.getDevice(deviceId);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.getDevice: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $deviceId = 789; // Long | Device id to get

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $deviceId = 789; # Long | Device id to get

    eval {
        my $result = $api_instance->getDevice(deviceId => $deviceId);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->getDevice: $@\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.DeviceApi()
    deviceId = 789 # Long | Device id to get

    try:
        # Gets Device based on deviceId
        api_response = api_instance.get_device(deviceId)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->getDevice: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
deviceId* | Long (int64) Device id to get Required

## Responses

### Status: 200 - The device

### Status: 404 - Requested device does not exist.

# getDeviceWithBarcodeNumber

Gets Device based on barcodeNumber

    /devices/barcodeNumber/{barcodeNumber}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/devices/barcodeNumber/{barcodeNumber}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            String barcodeNumber = barcodeNumber_example; // String | barcodeNumber of device
            try {
                Device result = apiInstance.getDeviceWithBarcodeNumber(barcodeNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDeviceWithBarcodeNumber");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            String barcodeNumber = barcodeNumber_example; // String | barcodeNumber of device
            try {
                Device result = apiInstance.getDeviceWithBarcodeNumber(barcodeNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDeviceWithBarcodeNumber");
                e.printStackTrace();
            }
        }
    }

    String *barcodeNumber = barcodeNumber_example; // barcodeNumber of device

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

    // Gets Device based on barcodeNumber
    [apiInstance getDeviceWithBarcodeNumberWith:barcodeNumber
                  completionHandler: ^(Device output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var barcodeNumber = barcodeNumber_example; // {String} barcodeNumber of device

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getDeviceWithBarcodeNumber(barcodeNumber, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var barcodeNumber = barcodeNumber_example;  // String | barcodeNumber of device

                try
                {
                    // Gets Device based on barcodeNumber
                    Device result = apiInstance.getDeviceWithBarcodeNumber(barcodeNumber);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.getDeviceWithBarcodeNumber: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $barcodeNumber = barcodeNumber_example; // String | barcodeNumber of device

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $barcodeNumber = barcodeNumber_example; # String | barcodeNumber of device

    eval {
        my $result = $api_instance->getDeviceWithBarcodeNumber(barcodeNumber => $barcodeNumber);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->getDeviceWithBarcodeNumber: $@\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.DeviceApi()
    barcodeNumber = barcodeNumber_example # String | barcodeNumber of device

    try:
        # Gets Device based on barcodeNumber
        api_response = api_instance.get_device_with_barcode_number(barcodeNumber)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->getDeviceWithBarcodeNumber: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
barcodeNumber* | String barcodeNumber of device Required

## Responses

### Status: 200 - The device

### Status: 404 - Requested device does not exist.

# getDeviceWithSerialNumber

Gets Device based on serialNumber

    /devices/serialNumber/{serialNumber}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/devices/serialNumber/{serialNumber}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            String serialNumber = serialNumber_example; // String | serialNumber of device
            try {
                Device result = apiInstance.getDeviceWithSerialNumber(serialNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDeviceWithSerialNumber");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            String serialNumber = serialNumber_example; // String | serialNumber of device
            try {
                Device result = apiInstance.getDeviceWithSerialNumber(serialNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDeviceWithSerialNumber");
                e.printStackTrace();
            }
        }
    }

    String *serialNumber = serialNumber_example; // serialNumber of device

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

    // Gets Device based on serialNumber
    [apiInstance getDeviceWithSerialNumberWith:serialNumber
                  completionHandler: ^(Device output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var serialNumber = serialNumber_example; // {String} serialNumber of device

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getDeviceWithSerialNumber(serialNumber, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var serialNumber = serialNumber_example;  // String | serialNumber of device

                try
                {
                    // Gets Device based on serialNumber
                    Device result = apiInstance.getDeviceWithSerialNumber(serialNumber);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.getDeviceWithSerialNumber: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $serialNumber = serialNumber_example; // String | serialNumber of device

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $serialNumber = serialNumber_example; # String | serialNumber of device

    eval {
        my $result = $api_instance->getDeviceWithSerialNumber(serialNumber => $serialNumber);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->getDeviceWithSerialNumber: $@\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.DeviceApi()
    serialNumber = serialNumber_example # String | serialNumber of device

    try:
        # Gets Device based on serialNumber
        api_response = api_instance.get_device_with_serial_number(serialNumber)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->getDeviceWithSerialNumber: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
serialNumber* | String serialNumber of device Required

## Responses

### Status: 200 - The device

### Status: 404 - Requested device does not exist.

# getDevices

Gets all Devices

    /devices

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/devices"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            try {
                array[Device] result = apiInstance.getDevices();
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevices");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            try {
                array[Device] result = apiInstance.getDevices();
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevices");
                e.printStackTrace();
            }
        }
    }

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

    // Gets all Devices
    [apiInstance getDevicesWithCompletionHandler:
                  ^(array[Device] output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getDevices(callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();

                try
                {
                    // Gets all Devices
                    array[Device] result = apiInstance.getDevices();
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.getDevices: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();

    eval {
        my $result = $api_instance->getDevices();
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->getDevices: $@\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.DeviceApi()

    try:
        # Gets all Devices
        api_response = api_instance.get_devices()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->getDevices: %s\n" % e)

## Parameters

## Responses

### Status: 200 - All Devices

### Status: 405 - Invalid input

# getDevicesBorrowedBy

Gets Devices borrowed by userScdId

    /devices/borrowed-by/{userScdId}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/devices/borrowed-by/{userScdId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            Long userScdId = 789; // Long | User
            try {
                array[Device] result = apiInstance.getDevicesBorrowedBy(userScdId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevicesBorrowedBy");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            Long userScdId = 789; // Long | User
            try {
                array[Device] result = apiInstance.getDevicesBorrowedBy(userScdId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevicesBorrowedBy");
                e.printStackTrace();
            }
        }
    }

    Long *userScdId = 789; // User

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

    // Gets Devices borrowed by userScdId
    [apiInstance getDevicesBorrowedByWith:userScdId
                  completionHandler: ^(array[Device] output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var userScdId = 789; // {Long} User

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getDevicesBorrowedBy(userScdId, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var userScdId = 789;  // Long | User

                try
                {
                    // Gets Devices borrowed by userScdId
                    array[Device] result = apiInstance.getDevicesBorrowedBy(userScdId);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.getDevicesBorrowedBy: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $userScdId = 789; // Long | User

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $userScdId = 789; # Long | User

    eval {
        my $result = $api_instance->getDevicesBorrowedBy(userScdId => $userScdId);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->getDevicesBorrowedBy: $@\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.DeviceApi()
    userScdId = 789 # Long | User

    try:
        # Gets Devices borrowed by userScdId
        api_response = api_instance.get_devices_borrowed_by(userScdId)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->getDevicesBorrowedBy: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
userScdId* | Long (int64) User Required

## Responses

### Status: 200 - Devices borrowed by userScdId

# getDevicesWithSerialNumberLike

Gets Devices based on serialNumber like

    /devices/serialNumber/like/{serialNumber}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/devices/serialNumber/like/{serialNumber}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            String serialNumber = serialNumber_example; // String | serialNumber of device
            try {
                array[Device] result = apiInstance.getDevicesWithSerialNumberLike(serialNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevicesWithSerialNumberLike");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            String serialNumber = serialNumber_example; // String | serialNumber of device
            try {
                array[Device] result = apiInstance.getDevicesWithSerialNumberLike(serialNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevicesWithSerialNumberLike");
                e.printStackTrace();
            }
        }
    }

    String *serialNumber = serialNumber_example; // serialNumber of device

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

    // Gets Devices based on serialNumber like
    [apiInstance getDevicesWithSerialNumberLikeWith:serialNumber
                  completionHandler: ^(array[Device] output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var serialNumber = serialNumber_example; // {String} serialNumber of device

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getDevicesWithSerialNumberLike(serialNumber, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var serialNumber = serialNumber_example;  // String | serialNumber of device

                try
                {
                    // Gets Devices based on serialNumber like
                    array[Device] result = apiInstance.getDevicesWithSerialNumberLike(serialNumber);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.getDevicesWithSerialNumberLike: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $serialNumber = serialNumber_example; // String | serialNumber of device

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $serialNumber = serialNumber_example; # String | serialNumber of device

    eval {
        my $result = $api_instance->getDevicesWithSerialNumberLike(serialNumber => $serialNumber);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->getDevicesWithSerialNumberLike: $@\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.DeviceApi()
    serialNumber = serialNumber_example # String | serialNumber of device

    try:
        # Gets Devices based on serialNumber like
        api_response = api_instance.get_devices_with_serial_number_like(serialNumber)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->getDevicesWithSerialNumberLike: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
serialNumber* | String serialNumber of device Required

## Responses

### Status: 200 - Devices with serial number like

# getDevicesWithSerialOrBarcodeNumberLike

Gets Devices based on serialNumber like

    /devices/serialOrBarcodeNumber/like/{serialBarcodeNumber}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/devices/serialOrBarcodeNumber/like/{serialBarcodeNumber}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            String serialBarcodeNumber = serialBarcodeNumber_example; // String | serial or barcode number of device
            try {
                array[Device] result = apiInstance.getDevicesWithSerialOrBarcodeNumberLike(serialBarcodeNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevicesWithSerialOrBarcodeNumberLike");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            String serialBarcodeNumber = serialBarcodeNumber_example; // String | serial or barcode number of device
            try {
                array[Device] result = apiInstance.getDevicesWithSerialOrBarcodeNumberLike(serialBarcodeNumber);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#getDevicesWithSerialOrBarcodeNumberLike");
                e.printStackTrace();
            }
        }
    }

    String *serialBarcodeNumber = serialBarcodeNumber_example; // serial or barcode number of device

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

    // Gets Devices based on serialNumber like
    [apiInstance getDevicesWithSerialOrBarcodeNumberLikeWith:serialBarcodeNumber
                  completionHandler: ^(array[Device] output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var serialBarcodeNumber = serialBarcodeNumber_example; // {String} serial or barcode number of device

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getDevicesWithSerialOrBarcodeNumberLike(serialBarcodeNumber, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var serialBarcodeNumber = serialBarcodeNumber_example;  // String | serial or barcode number of device

                try
                {
                    // Gets Devices based on serialNumber like
                    array[Device] result = apiInstance.getDevicesWithSerialOrBarcodeNumberLike(serialBarcodeNumber);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.getDevicesWithSerialOrBarcodeNumberLike: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $serialBarcodeNumber = serialBarcodeNumber_example; // String | serial or barcode number of device

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $serialBarcodeNumber = serialBarcodeNumber_example; # String | serial or barcode number of device

    eval {
        my $result = $api_instance->getDevicesWithSerialOrBarcodeNumberLike(serialBarcodeNumber => $serialBarcodeNumber);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->getDevicesWithSerialOrBarcodeNumberLike: $@\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.DeviceApi()
    serialBarcodeNumber = serialBarcodeNumber_example # String | serial or barcode number of device

    try:
        # Gets Devices based on serialNumber like
        api_response = api_instance.get_devices_with_serial_or_barcode_number_like(serialBarcodeNumber)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->getDevicesWithSerialOrBarcodeNumberLike: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
serialBarcodeNumber* | String serial or barcode number of device Required

## Responses

### Status: 200 - Devices with serial or barcode number like

# updateDevice

Updates Device based on deviceId

    /devices/{deviceId}

### Usage and SDK Samples

    curl -X PUT "https://localhost/inventory-service/api/v1/devices/{deviceId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.DeviceApi;

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

    public class DeviceApiExample {

        public static void main(String[] args) {

            DeviceApi apiInstance = new DeviceApi();
            Long deviceId = 789; // Long | Device id to update
            Device body = ; // Device | Device that needs to be updated
            try {
                Device result = apiInstance.updateDevice(deviceId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#updateDevice");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.DeviceApi;

    public class DeviceApiExample {

        public static void main(String[] args) {
            DeviceApi apiInstance = new DeviceApi();
            Long deviceId = 789; // Long | Device id to update
            Device body = ; // Device | Device that needs to be updated
            try {
                Device result = apiInstance.updateDevice(deviceId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling DeviceApi#updateDevice");
                e.printStackTrace();
            }
        }
    }

    Long *deviceId = 789; // Device id to update
    Device *body = ; // Device that needs to be updated

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

    // Updates Device based on deviceId
    [apiInstance updateDeviceWith:deviceId
        body:body
                  completionHandler: ^(Device output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

    var api = new SiemensInventoryRestApi.DeviceApi()

    var deviceId = 789; // {Long} Device id to update

    var body = ; // {Device} Device that needs to be updated

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.updateDevice(deviceId, body, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

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

                var apiInstance = new DeviceApi();
                var deviceId = 789;  // Long | Device id to update
                var body = new Device(); // Device | Device that needs to be updated

                try
                {
                    // Updates Device based on deviceId
                    Device result = apiInstance.updateDevice(deviceId, body);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling DeviceApi.updateDevice: " + e.Message );
                }
            }
        }
    }

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

    $api_instance = new Swagger\Client\Api\DeviceApi();
    $deviceId = 789; // Long | Device id to update
    $body = ; // Device | Device that needs to be updated

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

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::DeviceApi;

    my $api_instance = WWW::SwaggerClient::DeviceApi->new();
    my $deviceId = 789; # Long | Device id to update
    my $body = WWW::SwaggerClient::Object::Device->new(); # Device | Device that needs to be updated

    eval {
        my $result = $api_instance->updateDevice(deviceId => $deviceId, body => $body);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling DeviceApi->updateDevice: $@\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.DeviceApi()
    deviceId = 789 # Long | Device id to update
    body =  # Device | Device that needs to be updated

    try:
        # Updates Device based on deviceId
        api_response = api_instance.update_device(deviceId, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DeviceApi->updateDevice: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
deviceId* | Long (int64) Device id to update Required

Body parameters

Name | Description
--- | ---
body * |

## Responses

### Status: 201 - Device created

### Status: 404 - Device not found

Generated 2018-12-11T17:23:57.470+01:00