Top Level Namespace

Defined Under Namespace

Modules: Splunk, Synonyms Classes: String

Instance Method Summary collapse

Instance Method Details

#ambiguous_entity_referenceObject

Provides the Collection class, which represents a collection in Splunk.



21
# File 'lib/splunk-sdk-ruby/collection.rb', line 21

require_relative 'ambiguous_entity_reference'

#singletonObject

Ruby representations of Splunk namespaces.

Splunk’s namespaces give access paths to objects. Each application, user, search job, saved search, or other entity in Splunk has a namespace, and when you access an entity via the REST API, you include a namespace in your query. What entities are visible to your query depends on the namespace you use for the query.

Some namespaces can contain wildcards or default values filled in by Splunk. We call such namespaces wildcard, since they cannot be the namespace of an entity, only a query. Namespaces that can be the namespace of an entity are called exact.

We distinguish six kinds of namespace, each of which is represented by a separate class:

  • DefaultNamespace, used for queries where you want to use whatever would be default for the user you are logged into Splunk as, and is the namespace of applications (which themselves determine namespaces, and so have to have a special one).

  • GlobalNamespace, which makes an entity visible anywhere in Splunk.

  • SystemNamespace, which is used for entities like users and roles that are part of Splunk. Entities in the system namespace are visible anywhere in Splunk.

  • AppNamespace, one per application installed in the Splunk instance.

  • AppReferenceNamespace, which is the namespace that applications themselves live in. It differs from DefaultNamespace only in that it is a exact namespace.

  • The user namespaces, which are defined by a user and an application.

In the user and application namespaces, you can use “-” as a wildcard in place of an actual user or application name.

These are all represented in the Ruby SDK by correspondingly named classes: DefaultNamespace, GlobalNamespace, SystemNamespace, AppNamespace, and UserNamespace. Each of these have an empty mixin Namespace, so an instance of any of them will respond to #is_a?(Namespace) with true.

Some of these classes are singletons, some aren’t, and to avoid confusion or having to remember which is which, you should create namespaces with the namespace function.

What namespace the eai:acl fields in an entity map to is determined by what the path to that entity should be. In the end, a namespace is a way to calculate the initial path to access an entity. For example, applications all have sharing=“app” and app=“” in their eai:acl fields, but their path uses the services/ prefix, so that particular combination, despite what it appears to be, is actually an AppReferenceNamespace.



68
# File 'lib/splunk-sdk-ruby/namespace.rb', line 68

require 'singleton'

#xml_shimObject

Defines an exception to carry all errors returned by Splunk.



22
# File 'lib/splunk-sdk-ruby/atomfeed.rb', line 22

require_relative 'xml_shim'