Skip to content

Latest commit

 

History

History
379 lines (288 loc) · 14.2 KB

File metadata and controls

379 lines (288 loc) · 14.2 KB

HistoryApi

All URIs are relative to https://backend.id4i.de

Method HTTP request Description
addItem POST /api/v1/history/{id4n} Add history item
filteredList GET /api/v1/history/{id4n} List history
list GET /api/v1/history/{id4n}/{organizationId} DEPRECATED - List history
retrieveItem GET /api/v1/history/{id4n}/{organizationId}/{sequenceId} Get history item
updateItem PATCH /api/v1/history/{id4n}/{organizationId}/{sequenceId} Update history item
updateItemVisibility PUT /api/v1/history/{id4n}/{organizationId}/{sequenceId}/visibility Set history item visibility

addItem

addItem(id4n, historyItem)

Add history item

Add a new history item

Example

// Import classes:
//import de.id4i.ApiClient;
//import de.id4i.ApiException;
//import de.id4i.Configuration;
//import de.id4i.auth.*;
//import de.id4i.api.HistoryApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Authorization
ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
Authorization.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.setApiKeyPrefix("Token");

HistoryApi apiInstance = new HistoryApi();
String id4n = "id4n_example"; // String | GUID to retrieve the history for
HistoryItem historyItem = new HistoryItem(); // HistoryItem | The history item to publish
try {
    apiInstance.addItem(id4n, historyItem);
} catch (ApiException e) {
    System.err.println("Exception when calling HistoryApi#addItem");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id4n String GUID to retrieve the history for
historyItem HistoryItem The history item to publish

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

filteredList

PaginatedResponseOfHistoryItem filteredList(id4n, includePrivate, organization, type, qualifier, fromDate, toDate, offset, limit)

List history

Lists the history of a GUID

Example

// Import classes:
//import de.id4i.ApiClient;
//import de.id4i.ApiException;
//import de.id4i.Configuration;
//import de.id4i.auth.*;
//import de.id4i.api.HistoryApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Authorization
ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
Authorization.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.setApiKeyPrefix("Token");

HistoryApi apiInstance = new HistoryApi();
String id4n = "id4n_example"; // String | GUID to retrieve the history for
Boolean includePrivate = true; // Boolean | Also return private history entries
String organization = "organization_example"; // String | Show only entries created by one of the given organizations. This parameter can be used multiple times.
List<String> type = Arrays.asList("type_example"); // List<String> | Show only entries matching one of the given history item types. This parameter can be used multiple times.
List<String> qualifier = Arrays.asList("qualifier_example"); // List<String> | Show only entries matching one of the given history item qualifiers (additional property de.id4i.history.item.qualifier). This parameter can be used multiple times.
LocalDateTime fromDate = new LocalDateTime(); // LocalDateTime | From date time as UTC Date-Time format
LocalDateTime toDate = new LocalDateTime(); // LocalDateTime | To date time as UTC Date-Time format
Integer offset = 56; // Integer | Start with the n-th element
Integer limit = 56; // Integer | The maximum count of returned elements
try {
    PaginatedResponseOfHistoryItem result = apiInstance.filteredList(id4n, includePrivate, organization, type, qualifier, fromDate, toDate, offset, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling HistoryApi#filteredList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id4n String GUID to retrieve the history for
includePrivate Boolean Also return private history entries [optional] [default to true]
organization String Show only entries created by one of the given organizations. This parameter can be used multiple times. [optional]
type List<String> Show only entries matching one of the given history item types. This parameter can be used multiple times. [optional] [enum: CREATED, DESTROYED, RECYCLED, SHIPMENT_PREPARED, STORED, RETRIEVED_FROM_STORAGE, PACKAGED, DISPATCHED, RECEIVED, DELIVERY_REFUSED, REPROCESSING_STARTED, REPROCESSING_STEP_STARTED, REPROCESSING_STEP_CANCELLED, REPROCESSING_STEP_FINISHED, REPROCESSING_CANCELLED, REPROCESSING_FINISHED, DISASSEMBLED, MAINTENANCE_STARTED, MAINTENANCE_STEP_STARTED, MAINTENANCE_STEP_CANCELLED, MAINTENANCE_STEP_FINISHED, MAINTENANCE_CANCELLED, MAINTENANCE_FINISHED, PRODUCTION_STARTED, PRODUCTION_CANCELLED, PRODUCTION_FINISHED, PRODUCTION_STEP_STARTED, PRODUCTION_STEP_CANCELLED, PRODUCTION_STEP_FINISHED, QUALITY_CHECK_PERFORMED]
qualifier List<String> Show only entries matching one of the given history item qualifiers (additional property de.id4i.history.item.qualifier). This parameter can be used multiple times. [optional]
fromDate LocalDateTime From date time as UTC Date-Time format [optional]
toDate LocalDateTime To date time as UTC Date-Time format [optional]
offset Integer Start with the n-th element [optional]
limit Integer The maximum count of returned elements [optional]

Return type

PaginatedResponseOfHistoryItem

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

list

PaginatedResponseOfHistoryItem list(id4n, organizationId, includePrivate, offset, limit)

DEPRECATED - List history

DEPRECATED - please use filteredList with organization parameter to achieve the same functionality

Example

// Import classes:
//import de.id4i.ApiClient;
//import de.id4i.ApiException;
//import de.id4i.Configuration;
//import de.id4i.auth.*;
//import de.id4i.api.HistoryApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Authorization
ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
Authorization.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.setApiKeyPrefix("Token");

HistoryApi apiInstance = new HistoryApi();
String id4n = "id4n_example"; // String | GUID to retrieve the history for
String organizationId = "organizationId_example"; // String | organizationId
Boolean includePrivate = true; // Boolean | Also return private history entries
Integer offset = 56; // Integer | Start with the n-th element
Integer limit = 56; // Integer | The maximum count of returned elements
try {
    PaginatedResponseOfHistoryItem result = apiInstance.list(id4n, organizationId, includePrivate, offset, limit);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling HistoryApi#list");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id4n String GUID to retrieve the history for
organizationId String organizationId
includePrivate Boolean Also return private history entries [optional] [default to true]
offset Integer Start with the n-th element [optional]
limit Integer The maximum count of returned elements [optional]

Return type

PaginatedResponseOfHistoryItem

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

retrieveItem

HistoryItem retrieveItem(id4n, organizationId, sequenceId)

Get history item

Example

// Import classes:
//import de.id4i.ApiClient;
//import de.id4i.ApiException;
//import de.id4i.Configuration;
//import de.id4i.auth.*;
//import de.id4i.api.HistoryApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Authorization
ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
Authorization.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.setApiKeyPrefix("Token");

HistoryApi apiInstance = new HistoryApi();
String id4n = "id4n_example"; // String | GUID to retrieve the history for
String organizationId = "organizationId_example"; // String | organizationId
Integer sequenceId = 56; // Integer | sequenceId
try {
    HistoryItem result = apiInstance.retrieveItem(id4n, organizationId, sequenceId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling HistoryApi#retrieveItem");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id4n String GUID to retrieve the history for
organizationId String organizationId
sequenceId Integer sequenceId

Return type

HistoryItem

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

updateItem

HistoryItem updateItem(id4n, organizationId, sequenceId, update)

Update history item

Example

// Import classes:
//import de.id4i.ApiClient;
//import de.id4i.ApiException;
//import de.id4i.Configuration;
//import de.id4i.auth.*;
//import de.id4i.api.HistoryApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Authorization
ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
Authorization.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.setApiKeyPrefix("Token");

HistoryApi apiInstance = new HistoryApi();
String id4n = "id4n_example"; // String | GUID to retrieve the history for
String organizationId = "organizationId_example"; // String | organizationId
Integer sequenceId = 56; // Integer | sequenceId
HistoryItemUpdate update = new HistoryItemUpdate(); // HistoryItemUpdate | update
try {
    HistoryItem result = apiInstance.updateItem(id4n, organizationId, sequenceId, update);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling HistoryApi#updateItem");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id4n String GUID to retrieve the history for
organizationId String organizationId
sequenceId Integer sequenceId
update HistoryItemUpdate update

Return type

HistoryItem

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json

updateItemVisibility

HistoryItem updateItemVisibility(id4n, organizationId, sequenceId, visibility)

Set history item visibility

Example

// Import classes:
//import de.id4i.ApiClient;
//import de.id4i.ApiException;
//import de.id4i.Configuration;
//import de.id4i.auth.*;
//import de.id4i.api.HistoryApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Authorization
ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
Authorization.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.setApiKeyPrefix("Token");

HistoryApi apiInstance = new HistoryApi();
String id4n = "id4n_example"; // String | GUID to retrieve the history for
String organizationId = "organizationId_example"; // String | organizationId
Integer sequenceId = 56; // Integer | sequenceId
Visibility visibility = new Visibility(); // Visibility | History item visibility restrictions
try {
    HistoryItem result = apiInstance.updateItemVisibility(id4n, organizationId, sequenceId, visibility);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling HistoryApi#updateItemVisibility");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id4n String GUID to retrieve the history for
organizationId String organizationId
sequenceId Integer sequenceId
visibility Visibility History item visibility restrictions

Return type

HistoryItem

Authorization

Authorization

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/xml, application/json