Forum Discussion

ssmith-nova's avatar
ssmith-nova
Contributor
3 days ago
Solved

Pass parameters through Rest API

Hi All,

This is probably an easy one, but I am stuck.

I have a Dashboard dataset rule that used FDX to run a query.  It takes two input values. 

I have a data adapter that calls that BR and I can hardcode parameters in there to pass to the BR.  

Now I am trying to call that Data Adapter using the REST API.  I am trying to pass parameters using CustomSubstVarsAsCommaSeparatedPairs.   

How should I have the Data Adapter set up to accept these parameters.  For reference the hardcoded query looks like this:

{_GetData}{GetDataSet}{ScenarioName=Actual, TimeName = 2024M3}

What do I need to change "Actual" and "2024M3" to in order for it to use the values from the REST API call?

Thanks,

Scott

  • In your original call, {_GetData}{GetDataSet}{ScenarioName=Actual, TimeName = 2024M3} replace the two values with parameter names (the parameters do not need to exist as parameters anywhere else) like this: 

    {_GetData}{GetDataSet}{ScenarioName=|!prm_ScenName!|, TimeName = |!prm_TimeName!|}

    And then in your CustomSubstVarsAsCommaSeparatedPairs simply reference those parameters, like this:
    "CustomSubstVarsAsCommaSeparatedPairs":"prm_ScenName=Budget, prm_TimeName=2025M12"

    Joakim

1 Reply

  • In your original call, {_GetData}{GetDataSet}{ScenarioName=Actual, TimeName = 2024M3} replace the two values with parameter names (the parameters do not need to exist as parameters anywhere else) like this: 

    {_GetData}{GetDataSet}{ScenarioName=|!prm_ScenName!|, TimeName = |!prm_TimeName!|}

    And then in your CustomSubstVarsAsCommaSeparatedPairs simply reference those parameters, like this:
    "CustomSubstVarsAsCommaSeparatedPairs":"prm_ScenName=Budget, prm_TimeName=2025M12"

    Joakim