Siemens Inventory REST API

InventoryRecord

getInventoryRecord

Gets Inventory Record based on inventoryRecordId


/inventory-records/{inventoryRecordId}

Usage and SDK Samples

curl -X GET "https://localhost/inventory-service/api/v1/inventory-records/{inventoryRecordId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryRecordApi;

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

public class InventoryRecordApiExample {

    public static void main(String[] args) {
        
        InventoryRecordApi apiInstance = new InventoryRecordApi();
        Long inventoryRecordId = 789; // Long | Inventory Record id to get
        try {
            InventoryRecord result = apiInstance.getInventoryRecord(inventoryRecordId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryRecordApi#getInventoryRecord");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryRecordApi;

public class InventoryRecordApiExample {

    public static void main(String[] args) {
        InventoryRecordApi apiInstance = new InventoryRecordApi();
        Long inventoryRecordId = 789; // Long | Inventory Record id to get
        try {
            InventoryRecord result = apiInstance.getInventoryRecord(inventoryRecordId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryRecordApi#getInventoryRecord");
            e.printStackTrace();
        }
    }
}
Long *inventoryRecordId = 789; // Inventory Record id to get

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

// Gets Inventory Record based on inventoryRecordId
[apiInstance getInventoryRecordWith:inventoryRecordId
              completionHandler: ^(InventoryRecord output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

var api = new SiemensInventoryRestApi.InventoryRecordApi()

var inventoryRecordId = 789; // {Long} Inventory Record id to get


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

namespace Example
{
    public class getInventoryRecordExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryRecordApi();
            var inventoryRecordId = 789;  // Long | Inventory Record id to get

            try
            {
                // Gets Inventory Record based on inventoryRecordId
                InventoryRecord result = apiInstance.getInventoryRecord(inventoryRecordId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryRecordApi.getInventoryRecord: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryRecordApi();
$inventoryRecordId = 789; // Long | Inventory Record id to get

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

my $api_instance = WWW::SwaggerClient::InventoryRecordApi->new();
my $inventoryRecordId = 789; # Long | Inventory Record id to get

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

try: 
    # Gets Inventory Record based on inventoryRecordId
    api_response = api_instance.get_inventory_record(inventoryRecordId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryRecordApi->getInventoryRecord: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryRecordId*
Long (int64)
Inventory Record id to get
Required

Responses

Status: 200 - The Inventory Record

Status: 404 - Requested Inventory Record does not exist.


getInventoryRecords

Gets all Inventory Records


/inventory-records

Usage and SDK Samples

curl -X GET "https://localhost/inventory-service/api/v1/inventory-records"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryRecordApi;

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

public class InventoryRecordApiExample {

    public static void main(String[] args) {
        
        InventoryRecordApi apiInstance = new InventoryRecordApi();
        try {
            array[InventoryRecord] result = apiInstance.getInventoryRecords();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryRecordApi#getInventoryRecords");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryRecordApi;

public class InventoryRecordApiExample {

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

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

// Gets all Inventory Records
[apiInstance getInventoryRecordsWithCompletionHandler: 
              ^(array[InventoryRecord] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

var api = new SiemensInventoryRestApi.InventoryRecordApi()

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

namespace Example
{
    public class getInventoryRecordsExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryRecordApi();

            try
            {
                // Gets all Inventory Records
                array[InventoryRecord] result = apiInstance.getInventoryRecords();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryRecordApi.getInventoryRecords: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Gets all Inventory Records
    api_response = api_instance.get_inventory_records()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryRecordApi->getInventoryRecords: %s\n" % e)

Parameters

Responses

Status: 200 - All Inventory Records


updateInventoryRecord

Updates an Inventory Record


/inventory-records/{inventoryRecordId}

Usage and SDK Samples

curl -X PUT "https://localhost/inventory-service/api/v1/inventory-records/{inventoryRecordId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryRecordApi;

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

public class InventoryRecordApiExample {

    public static void main(String[] args) {
        
        InventoryRecordApi apiInstance = new InventoryRecordApi();
        Long inventoryRecordId = 789; // Long | Inventory Record id to update
        InventoryRecord body = ; // InventoryRecord | Inventory Record object that needs to be updated
        try {
            InventoryRecord result = apiInstance.updateInventoryRecord(inventoryRecordId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryRecordApi#updateInventoryRecord");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryRecordApi;

public class InventoryRecordApiExample {

    public static void main(String[] args) {
        InventoryRecordApi apiInstance = new InventoryRecordApi();
        Long inventoryRecordId = 789; // Long | Inventory Record id to update
        InventoryRecord body = ; // InventoryRecord | Inventory Record object that needs to be updated
        try {
            InventoryRecord result = apiInstance.updateInventoryRecord(inventoryRecordId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryRecordApi#updateInventoryRecord");
            e.printStackTrace();
        }
    }
}
Long *inventoryRecordId = 789; // Inventory Record id to update
InventoryRecord *body = ; // Inventory Record object that needs to be updated

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

// Updates an Inventory Record
[apiInstance updateInventoryRecordWith:inventoryRecordId
    body:body
              completionHandler: ^(InventoryRecord output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SiemensInventoryRestApi = require('siemens_inventory_rest_api');

var api = new SiemensInventoryRestApi.InventoryRecordApi()

var inventoryRecordId = 789; // {Long} Inventory Record id to update

var body = ; // {InventoryRecord} Inventory Record object 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.updateInventoryRecord(inventoryRecordId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateInventoryRecordExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryRecordApi();
            var inventoryRecordId = 789;  // Long | Inventory Record id to update
            var body = new InventoryRecord(); // InventoryRecord | Inventory Record object that needs to be updated

            try
            {
                // Updates an Inventory Record
                InventoryRecord result = apiInstance.updateInventoryRecord(inventoryRecordId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryRecordApi.updateInventoryRecord: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryRecordApi();
$inventoryRecordId = 789; // Long | Inventory Record id to update
$body = ; // InventoryRecord | Inventory Record object that needs to be updated

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

my $api_instance = WWW::SwaggerClient::InventoryRecordApi->new();
my $inventoryRecordId = 789; # Long | Inventory Record id to update
my $body = WWW::SwaggerClient::Object::InventoryRecord->new(); # InventoryRecord | Inventory Record object that needs to be updated

eval { 
    my $result = $api_instance->updateInventoryRecord(inventoryRecordId => $inventoryRecordId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryRecordApi->updateInventoryRecord: $@\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.InventoryRecordApi()
inventoryRecordId = 789 # Long | Inventory Record id to update
body =  # InventoryRecord | Inventory Record object that needs to be updated

try: 
    # Updates an Inventory Record
    api_response = api_instance.update_inventory_record(inventoryRecordId, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryRecordApi->updateInventoryRecord: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryRecordId*
Long (int64)
Inventory Record id to update
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Updated Inventory Record

Status: 404 - Specified Inventory Record does not exist.


Generated 2018-12-11T17:24:08.334+01:00