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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...