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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...