Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Table of Contents
maxLevel1

Fetch Information from LPG via API

REQUEST

HTTP method:  POST

URL:  https://<host>/pricefx/<partition>/pricegridmanager.fetch/<PG id>

HEADERS: 

Key

Value

Content-Type

application/json

Accept

application/json

Authorization

Basic <credentials>, where credentials is

the 

the base64

 encoding

 encoding of id and password joined by a single

colon 

colon :.  Where id is partition and username joined by slash / .

BODY:

paste-code-macro
languagejsontitleBody simplegroovy
{
  "operationType": "fetch",
  "startRow": 0,
  "endRow": 300,
  "textMatchStyle": "substring",
  "data": {
    
  },
  "oldValues": null
}

BODY example with filtering criteria:

paste-code-macro
languagejsontitleBodygroovy
{
  "operationType": "fetch",
  "startRow": 0,
  "endRow": 300,
  "textMatchStyle": "substring",
  "data": {
    "operator": "and",
    "_constructor": "AdvancedCriteria",
    "criteria": [
      {
        "fieldName": "attribute14",
        "operator": "iContains",
        "value": "CABLES",
        "_constructor": "AdvancedCriteria"
      }
    ]
  },
  "oldValues": null
}

RESPONSE:

...

CURL:

paste-code-macro
curl{
-X POST \
https://<host>/pricefx/<partition>/pricegridmanager.fetch/<PG id> \
-H 'Accept: application/json' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Basic c25iLWRldi9pbnRlZ3JhdGlvbjpTdGFydDEyMw==' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 142' \
-H 'Content-Type: application/json' \
-d '{
"operationType": "fetch",
"startRow": 0,
"endRow": 1,
"textMatchStyle": "substring",
"data": {},
"operationType": "fetch",
  "startRow": 0,
  "endRow": 300,
  "textMatchStyle": "substring",
  "data": {
    "operator": "and",
    "_constructor": "AdvancedCriteria",
    "criteria": [
      {
        "fieldName": "attribute14",
        "operator": "iContains",
        "value": "CABLES",
        "_constructor": "AdvancedCriteria"
      }
    ]
  },
  "oldValues": null
}'

Postman Request Definition

Here is a definition of the same request in Postman (https://www.getpostman.com/). Just import it and change the hostname and username + password.

 

View file
namepfx.postman_collection.jsonheight250