Versions Compared

Key

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

...

Let's assume we have the following end point endpoint defined

Code Block
languagejs
{
  "endpoints": {
    "ExamplesGetSingleProduct": {
      "route": {
        "httpMethod": "GET",
        "segments": {
          "examples": {
            "isLiteral": true,
            "type": "string"
          },
          "products": {
            "isLiteral": true,
            "type": "string"
          },
          "productId": {
            "isLiteral": false,
            "type": "long"
          }
        }
      },
      "businessLogic": {
        "allProductsRetrieval": {
          "executionType": "processFlow",
          "processFlowProperties": {
            "processFlowName": "Execute Data Object",
            "processFlowParameters": {
              "DataObjectName": "spGeteBusiness6_0ProductCatalog",
              "authenticatedAttributes": "@AuthenticatedAttributes"
            }
          }
        }
      }
	  //remaining metadata omitted
    }
  }
}

...

The system will automatically map those parameters for you.  @Request_ProductId will have the product ID from the URL, and @ AuthenticatedAttributes_AuthenticatedPrincipalRecordId will be the logged in person ID, or the anonymous person if the user is not authenticated.