Datapoint

Overview

Datapoints are the specification of API services that may be required by a page to GET or POST data. For more details on how to link a datapoint with an element in a page, refer to the section Linking a Variable with a Datapoint.

All datapoints which are created in a project are saved locally to that project. In a blueprint or public block, you can convert a datapoint as public. Hence, it will be visible in a project created using the blueprint or public block. You can convert a public datapoint as editable to noneditable (or vice-versa). By default, a public datapoint is noneditable.

How To

A user can:

Creating a Datapoint

You can create a datapoint that retrieves data from an API.

To create a datapoint,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel: 

  4. Select the DATAPOINTS option: 

  5. Click the Add Datapoint button: 

  6. In the pop-up, provide the required details: 

    The following table describes the fields that are required while creating a new datapoint:

    Field Description
    Datapoint Name Indicates the name of the datapoint.
    Datapoint Value Indicates the API URL of the datapoint. For example, https://<EnvironmentName>/orchestrationservices/storefront/customers/login?storeId=<StoreID>

    Note: If you are using a dynamic parameter in the URL, it should be given within the “_” (underscore) symbol. For example,
    https://<EnvironmentName>/orchestrationservices/storefront/catalogs/products/_@variable_?locale=<LocaleValue>&storeId=<StoreID>

    Note: Here, a variable can be a dynamic parameter. For more details on the dynamic parameter, refer to the section Enabling a Page as a Dynamic Page.

    Request Type Indicates the API type. Select:

    • GET – For a GET API call.
    • POST – For a POST API call.
  7. Click the Confirm button.
    A new datapoint is added to the project. 

Editing a Datapoint

You can edit a datapoint to set its query parameters, authorization token, HTTP headers, body parameter, response parser, and sample response.

To edit a datapoint,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:

  4. Select the DATAPOINTS option: 

  5. Select a datapoint to be edited: 

  6. Edit the required details as follows:
    Field Description
    Params You can specify the query parameters in the JSON format. These parameters will be appended to the URL as a query string.
    Authorization You can add the authentication details that may be required in an API call. The supported authorization type is bearer token. There are three different options to select a token source, that will be used to get an authorization token:

    • Static Token: You can simply pass a static authorization token as the token value.
    • Local Storage: You can pass a key, that will be used to fetch the authorization token from the local storage at run time.
    • Datapoint: You can select another datapoint that will be triggered to fetch the authorization token at run time.
    Headers You can specify the HTTP Headers of the API call.
    Note: Headers MUST be in JSON format.
    Body You can specify the request body in the JSON format, that will be used for the POST request.
    Parser You can write a JavaScript function, that will take the datapoint response as a parameter. If you need to process the response before passing it to a page, this parser function can be used to process it.
    Sample Response You can provide a sample response, that will imitate the response from the datapoint. If you want to configure a datapoint-linked variable or a live element, you may require the datapoint response. In this case, the provided sample response can be used.

    Note: You can use the Trigger button to trigger the API and get the response.

Deleting a Datapoint

You can delete a datapoint if it is no longer required.

To delete a datapoint,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required project or asset.
  3. Click available in the left panel:

  4. Select the DATA POINTS option: 

  5. Select a datapoint to be deleted: 

  6. Click available next to the datapoint name:
  7. Click the Delete button.
    The datapoint is deleted from the project.

Converting a Datapoint as Public in a Blueprint or Public Block

You can convert a datapoint as public in a blueprint or public block.

To convert a datapoint as public,

  1. Log in to the Infosys Equinox Studio environment with valid credentials provided to you.
  2. Open the required blueprint or public block.
  3. Click available in the left panel:

  4. Select the DATAPOINTS option:

  5. Select the required datapoint.
    The datapoint details appear.
  6. Click available in the datapoint panel:
    https://duseqpxtuo98y.cloudfront.net/studio/datapoint/studio-datapoints.png
  7. Select the Set as Public option
    The datapoint is converted as public: 
    https://duseqpxtuo98y.cloudfront.net/studio/datapoint/studio-datapoint-set-as-public.png
    Note:

    • To convert a public datapoint as editable, select the Set as Editable option.

    • To convert a public datapoint as private, select the Set as Private option

Revision History

Date   Description  Created By  Peer-Reviewed By  Approved By 
2023-06-22  Page created and content added.  AN JP Suganya