REST Service API

Based on the REST Service Infrastructure introduced in Version 6 we created a set of services which allows you to read and write almost any data which is described by the repository. In general we provide services to create, read, update, and delete lists of entity items with a configurable set of field values.

If you would like to know more about REST in general, start with the Dare Obasanjo's blog post, Explaining REST to Damien Katz.

Available APIs

images/download/attachments/512832741/REST_API_Overview.png

List API

The REST List API provides searching, reporting, navigation and finally result listing of nearly all objects in the system. Based on a query a homogeneous list of objects of a certain type is returned. The queries are parameterized. The resulting list is a two dimensional table with a given set of columns to control the informational character of the result.

Management API

The .REST Management API v8.0 provides access to control the server side management processes like Import, Merge, Export, and others. Typically these processes will be able to be started or scheduled, the process status can be evaluated and the process results can be requested and accessed.

Enum API

The Enumeration API provides read-only access to all enumerations in Product 360. The enum entry keys are used in field values as well as for the qualification of fields.

Meta API

The REST Meta API provides meta-information on all available Product Manager objects. It provides access not only to the objects, but also to their field including names, data types, constraints, etc. Using this API you can build powerful generic clients which may work with different installations of the Product Manager with different Repository configurations.

Media API

The REST Media API provides access to all kinds of media assets in the Product Manager.

Security API

The REST Security API provides access to securities of the Product Manager.

Object API

With Version 10.5 we introduce an optimized version of the Read Object API and a new Write Object API. The usage of Version 1 of the Read Object Api is supported, but discouraged.

With this all typical CRUD (Create, Read, Update and Delete) operations can be performed for all repository based entities which support the object API.

Getting Started

Product Manager's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP/HTTPS request and parse the response. The Product Manager REST API uses JSON as its communication format, and the standard HTTP methods like GET, PUT, POST and DELETE. URIs for Product Manager's REST API resource have the following structure:

http://<host>:<port>/rest/<api-version>/<api>/<entity-identifier&gt;

  • <host>: The Product Manager application server host.

  • <port>: The http port which is configured in the server.properties file (see property http.port there), usually it's 1501.

  • <api-version>: The version of the API. The current API version is V2.0.

  • <api>: The specific api to call. See below for a list of the currently available APIs.

  • <entity-identifier>: The unique identifier of the Product Manager's resource (also known as entity).

Most API's have a dynamic character since the actual resources which are available for each of those API's depend on the actual repository configuration of the Product Manager installation. To make life easier for everyone we implemented some dynamic documentation lookup which provides all the needed parts. The documentation is provided as rich html, or as machine readable JSON depending on the requested format (html/json). The first "level" of documentation is the list of available api's which can be obtained by
http://<host>:<port>/rest/V1.0/info

Authentication

Every request to the REST API must be authenticated, anonymous access to the Product Managers resources is not possible. Additionally to that, the user which is used for the authentication must have the Service Logon action right assigned. The currently available authentication method is HTTP Basic. Most client software provides a simple mechanism for supplying a user name and password and will build the required authentication headers automatically. More details can be found at REST Service Authentication.

General Information

Data Representation

The .REST Service API v10.5 transfers all data physically as UTF-8 strings, either as JSON or XML representation. How numbers, dates, times and so on are formatted is described in REST Datatypes.

Entity Item Reference

Links to other objects, like other products or structure groups, are represented as entity item references. An entity item reference is a structured object containing the ID and the label.

Field Qualification

Qualified fields can be specified on different levels, for example when reading and writing data. Always the same syntax is used which is described in REST Field Qualification.

Search Query Language

We have defined a language for search expressions. The language is currently used in the bySearch report. The syntax of the search language is described in REST Search Query Language.

Rest Java Client

The Rest Service API of the Heiler Product Manager can be from every client technology which is able to handle HTTP requests. However, we expect that a lot of clients will be built based on some Java technology, and therefore we provide also a Java client for the Rest Service API. The Java client is part of the PIM 7 distribution. Rest Client Java sources are also available. Therefor also Javadoc can be viewed or created.

Rest API Versions

All API endpoints contain the Rest API Version. There are two versions available:

  • V1.0 is the first iteration and has been extended with several new endpoint over time

  • V2.0 provides the same functionality as V1.0 but comes with different defaults and semantics. Changes have been made based on experiences in the field.

In general, clients should always use the latest available version. Older versions might become deprecated and be removed in the future.

List API changes in V2.0

Change

Description

formatData

In V1.0, setting formatData to false didn't have an impact on fields with enumeration, like Article.CurrentStatus. When formatData is set to false,

  • In V1.0 the enumeration label is returned

  • In V2.0 the enumeration key is returned.

includeLabels

  • New default value is false

  • If set to false, root objects in the result also don't have a label anymore. In V1.0 this only affected fields with object references.

cacheId

New default value in responses is no-cache for the case, the client doesn't request using caching.