Getting Data In

How to create a dashboard and set the sharing to "app"?

khairulidris
New Member

I got this error message

com.splunk.HttpException: HTTP 400 -- Argument "eai:acl:sharing" is not supported by this handler.

 

This is my code.

private JobArgs createArgs(com.splunk.Service service,
final Dashboard dashboard,
final Zones zones,
final List<GlobalProperties> globalVars) {

JobArgs jobargs = new JobArgs();

jobargs.put(DASHBOARD_NAME.value(), dashboard.getName());
jobargs.put(EAI_TYPE.value(), "views");
jobargs.put(EAI_DATA.value(), translateData(zones,dashboard,globalVars));
jobargs.put("eai:acl:sharing", "app");
jobargs.put(TEMP_SPLUNK_APP.value(), zones.getSplunk_app() == null ? "search" : zones.getSplunk_app());

return jobargs;
}

I am trying to set this key "sharing"

 

<s:key name="eai:acl">
<s:dict>
<s:key name="app">search</s:key>
<s:key name="can_change_perms">1</s:key>
<s:key name="can_list">1</s:key>
<s:key name="can_share_app">1</s:key>
<s:key name="can_share_global">0</s:key>
<s:key name="can_share_user">1</s:key>
<s:key name="can_write">1</s:key>
<s:key name="modifiable">1</s:key>
<s:key name="owner">svc-gps</s:key>
<s:key name="perms" />
<s:key name="removable">1</s:key>
<s:key name="sharing">user</s:key>
</s:dict>
</s:key>

 

I dont see it is supported in https://docs.splunk.com/Documentation/Splunk/7.2.0/RESTREF/RESTknowledge#data.2Fui.2Fviews.2F.7Bname...

 

Is there any other way?

Thank you.

 

Regards,

Khairul

0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...