The iPIM Server REST API exposes a few endpoints for search, like:
.../iPIM/rest/api/products/searchWeb
.../iPIM/rest/api/assets/searchStandard
.../iPIM/rest/api/assets/searchUsage
.../iPIM/rest/api/contentobjects/searchList
.../iPIM/rest/api/assettrees/nodes/search
.../iPIM/rest/api/categories/mappings/search
.../iPIM/rest/api/categories/search
.../iPIM/rest/api/logentries/search
.../iPIM/rest/api/ratings/search
Each endpoint handles the search differently:
Product search endpoints like the following, provide multiple search customizations:
.../iPIM/rest/api/products/searchStandard
.../iPIM/rest/api/products/searchList
.../iPIM/rest/api/products/searchList/nonMatchingParams
.../iPIM/rest/api/items/searchList
.../iPIM/rest/api/items/searchListModes
.../iPIM/rest/api/dimensions/searchStandard
.../iPIM/rest/api/dimensions/searchList
List search Use a list of search terms to search.
used to decide what to match the search terms to:
DIMENSION
VariantALL
PRODUCTNO
Product NumberITEMEXTID
External supplier numberARTICLENO
Item NumberSTD_EAN
Standard EANProduct search endpoints handle multiple search modes. The property search.list.default.mode
can be used to set a custom default search mode.
The search modes use the wildcard "%" in different ways which influences the search results as well as the search performance
Mode | Identifier | Description | Example |
---|---|---|---|
Standard (default) | SEARCH_MODE_STANDARD |
Places a % at the end of the term in the Value field, i.e. the term must occur at the beginning of the attribute field. | 1001% - yields results in the form of 100128, 100139, but also e.g. 100128_345 and the likes. |
Comfort (advanced search) | SEARCH_MODE_COMFORT |
Sets %search term%, i.e. the term must occur somewhere in the attribute field (slowest, most performance-intensive search variation). | %001% - yields 100128, 200128, 300145, 200328_001 etc. |
Professional | SEARCH_MODE_PROFESSIONAL |
You can set % yourself to define searches. | 1001%8 - yields 100128, 100158, 100168 etc. |
The search mode setting affects all search fields that represent a text field and all attributes that contain text. That includes the Product number and the Relation number.
Product search endpoints handle multiple match modes. The property search.match.mode.default
can be used to set a custom default match mode.
ALL
- returns all entities matching the search terms in responseFIRST_MATCH
- returns the first entity matching the search terms in response
createWorklist
(boolean) - if true a worklist will be created from the search results. Default: falseclientInheritance
(boolean) - if true data will be inherited from parent client levels. Default: falseattributes
(String) - list of attribute identifiers (comma separated). Default: ALLpartner
(string) - unique identifier for a partnersearchCap
(string) - limit of results to return in responsetype
, locale
, mainAsset
, assetSize
, include
For Example:
POST .../iPIM/rest/api/products/searchList?createWorklist=false&clientInheritance=false
Request
{
"parameter": "PRODUCTNO",
"list": [
"100990", "100050"
],
"showAttribute": false,
"responseAttributes": [
"Std_EAN"
],
"searchMode": "SEARCH_MODE_STANDARD",
"matchMode": "ALL"
}
Response
[
{
"productNo": "100050",
"articleNo": "100050",
"itemNo": "100050",
"description": "JUnit Testprodukt 2",
"match": "100050",
"state1": {
"state": "2"
},
"state2": {
"state": "2"
},
"state3": {
"state": "2"
},
"state4": {
"state": "2"
},
"objectType": "ARTICLE_TYPE_PRODUCT",
"productURI": "/iPIM/rest/api/products/100050",
"deleted": false,
"selfURI": "/iPIM/rest/api/products/100050",
"attributes": [],
"pimRef": 10128306
},
{
"productNo": "100990",
"articleNo": "100990",
"itemNo": "100990",
"description": "DatenfeedTestProdukt",
"match": "100990",
"state1": {
"state": "2"
},
"state2": {
"state": "2"
},
"state3": {
"state": "2"
},
"state4": {
"state": "2"
},
"objectType": "ARTICLE_TYPE_PRODUCT",
"productURI": "/iPIM/rest/api/products/100990",
"deleted": false,
"selfURI": "/iPIM/rest/api/products/100990",
"sequenceNo": 1,
"attributes": [
{
"identifier": "Std_EAN",
"type": "attribute",
"attributeDataType": "PLAIN_STRING",
"values": [
{
"value": "325648",
"inherited": false,
"isFromParent": false,
"client": {
"id": 1,
"pimRef": "1",
"identifier": "CUSTOMER"
}
}
]
}
],
"pimRef": 10007255
}
]