No Results
Web Data Action Example

To create and test a Web Data action, do the following:

Step 1: Create a Web Data Connection

  1. Click .
    The Connections page is displayed.
  2. Click + in the lower-left corner to create a new connection.
    A pop-up for choosing a connection type is displayed.
  3. In the pop-up, select Web Data.
  4. Click Use Selected.
    A new page is displayed.
  5. In Connection Name, enter a name (for example, Web Data).
  6. Make sure the Enable Connection toggle is on and click Next.
  7. On the Endpoints tab, do the following:
    a) Make sure the Enable Endpoint toggle switch is enabled.
    b) In Destination, enter the base address/URL of the server that the web application is running on (for example, https://en.wikipedia.org).
    c) Select SSO Handler.
    d) Click Next.
    You are taken to the Test Connection tab where the confirmation message Connection test was successful is displayed.
  8. Click Save and Close.
    The newly created connection is displayed in the list of Connections and in the Pipeline.

 

Step 2: Create a Server Action off of the Web Data Connection

  1. Click the gear icon button in the previously created Web Data connection.
  2. Select + and then New Server Action.
    A new page is displayed.
  3. On the Configure tab, do the following:
    a) In Action Name, enter a name for the action (for example, Web data action).
    b) Enable or disable the Wait for server response toggle switch.
    If enabled, the user will be blocked from interacting with the user interface until the action is completed. If disabled, the user can continue interacting with the user interface and will be notified via a message when the server action is completed.
    c) In User Notification, specify whether the user should be notified when the server action is completed.
    – If always is selected, the user will be notified whenever the server action is completed successfully or when there is an error.
    – If never is selected, all messages for the server action will be suppressed.
    –  If on error is selected, the user will be notified when there is an error.
    d) In Start URl, specify the root-relative URl for this action. Note that the URl needs to start with /, for example /w/api.php?action=query&list=search&srsearch={nodeVar.searchVar}&format=json
    e) In HTTP Method, select the HTTP method that will be used for the request made for this action.
    f) In Logging, select the level of logging for this action. Available options are Production and Debug.
    g) Click Manage Variables in the bottom left corner to add a variable. As seen in our Start URl example above, we have created a variable called searchVar. The default value of our variable is edge.
    h) Click Next.
  4. On the Refresh tab, you can specify whether any Feeds should be updated after the server action is performed. When you add a Feed to this list, any dataset off of that Feed will automatically refresh.
  5. Click Save and Close.
    The created action is displayed in the Pipeline.

 

Step 3: Add the Web Data Action to any Visualization

  1. Go to any page that contains a visualization.
    For the purpose of this exercise, we have chosen a table visualization.
  2. Click Edit in the upper right corner.
    You are now in the Edit mode.
  3. In the visualization, click the three dots and select Edit Actions.
    A pop-up is displayed.
  4. In the pop-up, click + > Click Row > Server Action.
    A new page is displayed.
  5. On the Base Config tab, do the following:
    a) In Server Action, select the Web Data action you previously created.
    The server action details you have set are displayed (Wait for server response, User Notification, Start URl, HTTP method).
    b) Select the variable. As mentioned before, we have created a searchVar whose default value is edge, so we will select Default.
    c) Click Next.
    No changes are needed on the Conditions tab, so click Next. On the Permissions tab, you can exclude certain roles from accessing the action you are creating, but in this case, leave the Allow all users access to action toggle switch on.
  6. Click Save and Close.
    The action you have just created is displayed in the Manage Actions pop-up.
  7. In the pop-up, click Close.
  8. Click on any row in the visualization to perform the server action.
    Since we have configured the action to always notify the user, a message is displayed in the banner. Additionally, a more detailed message is also logged in the system menu > Messages.

 

Related page: Server Action


Terms | Privacy