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
|