Forum Discussion

ramansingh89's avatar
04-02-2024
Solved

API to update group parameter

Hi Experts

I wonder if there is any API that i can use to create/update group parameters in sisense?

  • JeremyFriedel's avatar
    JeremyFriedel
    04-04-2024

    Hi @ramansingh89,

     

    The payload would look something like this to the endpoint POST /api/v1/user-parameters (Not all the parameters will match exactly on your server and use case, 660e9f7464a70f002df9a38c is the group ID of clientabc in this example)

     

    {
      "name": "Example",
      "displayName": "Example",
      "hidden": false,
      "type": "string",
      "applicableAreas": [
        "Connections"
      ],
      "description": "",
      "users": {},
      "groups": {
        "660e9f7464a70f002df9a38c": {
          "contextId": "660e9f7464a70f002df9a38c",
          "contextType": "groups",
          "value": "ABC",
          "priority": 0
        }
      },
      "default": {}
    }

     

     

    The group name is not directly used, the group ID is used, which can be found in the Get Groups API endpoint, and for the current user with the prism.user.groupsName console command.

     

    It may be helpful to create a few example parameters using the parameter GUI interface, and observe the POST /api/v1/user-parameters payloads generated by the Sisense UI in the browser developer tools network tab, this can be useful in learning the exact format for different parameter types.

  • Hello ramansingh89 ,

    I wanted to follow up to see if the solution offered by JeremyFriedel worked for you.

    If so, please click the 'Accept as Solution' button so that other users with the same questions can find the answer faster. If not, please let us know so that we can continue to help.

    Thank you.

10 Replies