GithubHelp home page GithubHelp logo

Comments (5)

bparmar-splunk avatar bparmar-splunk commented on August 11, 2024

Hi @nhalstead,
We have tested SavedSearch using Postman and yes attributes do exist. Whereas in case of fetching those attributes from SDK, it is possible to fetch all the above mentioned values. Please find below code snippet for reference.

SavedSearchCollection collection = service.getSavedSearches(); // service is instance of Service class.
if (collection != null && collection.size() > 0) {

    collection.keySet().forEach(key -> {

        SavedSearch savedSearch = collection.get(key);
        if (savedSearch != null && savedSearch.getBoolean("action.correlationsearch.enabled", false)) {

            System.out.println(
                    "Label : " + savedSearch.get("action.correlationsearch.label")
                    + ", Notable : " + savedSearch.get("action.notable")
                    + ", Sec. Domain : " + savedSearch.get("action.notable.param.security_domain")
                    + ", Severity : " + savedSearch.get("action.notable.param.severity")
                    + ", Risk Score : " + savedSearch.get("action.risk.param._risk_score"));
        }
    });
}

Please check at your end and let us know, if you still face any issues.

from splunk-sdk-java.

bparmar-splunk avatar bparmar-splunk commented on August 11, 2024

Hi @nhalstead,
We didn't receive any update from your side. So it seems all the required attributes are fetched by referring above snippet.
We are closing this ticket.

from splunk-sdk-java.

bparmar-splunk avatar bparmar-splunk commented on August 11, 2024

Hi @nhalstead,
We hope you might have successfully fetched all the required attributes by referring above snippet.
Since there is no update from your side, we are closing this ticket.

from splunk-sdk-java.

nhalstead avatar nhalstead commented on August 11, 2024

Hi @bparmar-splunk, appreciate the response, finally had time to test it out.

The method getBoolean is not exported from the package (it has no access modifier so it's only available at the package level), so I'm not able to call that method!

My test code:
image

splunk-1.6.5.0.jar: com.splunk.Entity
image

from splunk-sdk-java.

nhalstead avatar nhalstead commented on August 11, 2024

There is a possible workaround since Entity::get is public, I can duplicate the getBoolean method to run the same check.

from splunk-sdk-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.