Keboola WIKI‎ > ‎Old Articles‎ > ‎GoodData Writer‎ > ‎

MUFs by Keboola API

Author: tomas@keboola.com

This is a super simple trick on how to quickly create and assign a MUF by cURL
  • You need to create a filter and name it, place this whole text in terminal and replace variables:
curl --include \
     --request POST \
     --header "X-StorageApi-Token: YOUR-SAPI-TOKEN-HERE" \
     --header "Accept: application/json" \
     --data-binary '{ 
    "writerId": "YOUR-WRITER-ID", 
    "pid": "YOUR-GOODDATA-PID", 
    "name": "YOUR-DESIRED-NAME", 
    "attribute": "SOMETHING-LIKE-out.c-main.Customers.CustomerDataID", 
    "value": "lalalala_we_are_almost_done" }' \
https://syrup.keboola.com/gooddata-writer/filters

  • Now we just need to assign the filter to a user:
curl --include \
     --request POST \
     --header "X-StorageApi-Token: YOUR-SAPI-TOKEN-HERE" \
     --header "Accept: application/json" \
     --data-binary '{ 
    "writerId": "YOUR-WRITER-ID", 
    "email": "GOODDATA'S-USER-EMAIL",
    "filters": ["THE-FILTER-NAME-FROM-PREVIOUS-STEP"] }' \
     https://syrup.keboola.com/gooddata-writer/filters-users

YOURE DONE!

P.S. To be able to check the filters, activate this here: 
  1. https://secure.gooddata.com/labs/apps/ -- FEATURE FLAGS -- Display MUFs in user profile page
  2. Go to Manage--users section in GoodData to click on a specific user and view the MUFs assigned

Comments