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

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...