MUF Guide

by adam.hu@keboola.com



TT: There is an easier way now (https://sites.google.com/a/keboola.com/kds/home/mufs-by-keboola-api)

MM: Anothe way is to Create MUF with POSTMAN Chrome Extension and then Assign MUF with POSTMAN Chrome extension




Part 1: Creating the User Filter


Step 1: Go to your browser Address Bar and copy the address. Then delete the crossed out portion while copying the rest:


https://secure.gooddata.com/#s=/gdc/projects/k506f8l5z9kgqznds5n00v8nacppvdab|projectDashboardPage|/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/obj/40100|ae83f61b8cbe


Project ID

Object ID

Function


Step 2: Open a new tab, paste, and then go to the web address:


https://secure.gooddata.com/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/obj


Result:

Figure 1


Step 3: Type or copy and paste the following, replacing each part with the specifics of your project:


{

    "userFilter": {

        "content": {

            "expression": "[/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/obj/3127]=[/gdc/ md/k506f8l5z9kgqznds5n00v8nacppvdab/obj/3127/elements?id=5512]"

        },

        "meta": {

            "category": "userFilter",

            "title": "Example"

        }

    }

}

/or this (inserted by TT)


2
3
4
5
6
7
8
9
10
11
{
    "userFilter": {
        "content": {
            "expression": "[/gdc/md/{project-id}/obj/{object-id}]=[/gdc/md/{project-id}/obj/{object-id}/elements?id={element-id}]"
        },
        "meta": {
            "category": "userFilter",
            "title": "My User Filter Name"
        }
    }
}



Then, it’s time to find and replace the values specific to your project.


Step 4: Finding AttributeName, Object ID, and Element ID


a) Copy the current web address (same as Step 2 web address)


b) Leave that screen as is and open a new tab, pasting web address from part a), then, delete     obj     and replace it with     query/attributes:


https://secure.gooddata.com/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/query/attributes


This will give you a list of all the attributes available in the project. Find the attribute that you want to apply the mandatory filter to, and this is your AttributeName.


c) Click the AttributeName and you will see the Object ID as per the image below:


Figure 2

d) A bit further down in the same page, you will see this:

Figure 3


Click the boxed link, and scroll down in the new page to see a list of possible attribute values, along with their Element ID:

Figure 4


Find the attribute value you are going to be applying the mandatory filters to, and then copy the appropriate Element ID.


Step 5:

Now you have all the separate parts to fill in Step 3, so go back to your original tab, paste the necessary information and then press submit.

The resulting screen looks as follows:

Figure 5

It is important that you retain the User Filter Object ID for the Part 2.

End Part 1













Part 2: Assigning the User Filter

Now that the filter has been created and submitted, it’s time to find users in the project to assign the filter to.


Step 1:


Once again starting from a regular GoodData tab, get the web address:

https://secure.gooddata.com/#s=/gdc/projects/k506f8l5z9kgqznds5n00v8nacppvdab|projectDashboardPage|/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/obj/40100|ae83f61b8cbe


Delete the struck out parts, and add userfilters at the end. This results in:

https://secure.gooddata.com/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/userfilters


You will arrive at the resulting screen:


Figure 6


Step 2:

Copy and paste the following into the “User Filters” text box.



{

    "userFilters": {

        "items": [

            {

                "user": "/gdc/account/profile/UserID",

                "userFilters": [

                    "/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/obj/41517"

                ]

            }

        ]

    }

}


Project ID

User Filter Object ID (From Part 1)

User ID


Step 3:

Now we have to find the User ID.

Once again start with the standard web address, copy it and open a new tab.


https://secure.gooddata.com/#s=/gdc/projects/k506f8l5z9kgqznds5n00v8nacppvdab|projectDashboardPage|/gdc/md/k506f8l5z9kgqznds5n00v8nacppvdab/obj/40100|ae83f61b8cbe


Replace md with projects, and obj with users, and copy the result:


https://secure.gooddata.com/gdc/projects/k506f8l5z9kgqznds5n00v8nacppvdab/users


Paste that into a new tab and go to the web address. This will bring you to a page with all the users who are currently invited to the project:

Figure 7


Find the “self” row, and copy the highlighted portion, which is the User ID.


Step 4:

Copy and paste the User ID as appropriate into the tab from Step 2.

Next, copy the entire row of “self”:


/gdc/account/profile/046d3675fec54472488elb71f23ad94d


and paste this into the “User” box. Submit it, and this concludes Part 2.


/tt:



End Part 2