Getting Data In

How to create a new rest command that creates new stanzas from setmup.xml?

fk319
Builder

I would like to create a new rest command that creates new stanzas from setmup.xml.
I can add/edit entries to an existing stanza.

restmap.conf:

# Admin: catches the url
[admin:owm_config]
match = /owm
members = config, city

# Admin_External: where to send members
[admin_external:config]
handlertype = python
handlerfile = OWM_config_handler.py
handleractions = list, edit

[admin_external:city]
handlertype = python
handlerfile = OWM_city_handler.py
handleractions = create, list, edit

In OWM_city_handler.py
I have the setup(), handleCreate(), handleList(), handleEdit()
When I call this with _new, self.requestedAction reports 64/?, 1/create, 4/list
I do not know what to do with self.requestedAction=64 and I cannot get any of the handlers called.
When I call with anything besides _new, it all works as expected.

Any Ideas?

0 Karma
1 Solution

fk319
Builder

The problem was in my default/setup.xml I need a field called name.
It seems the name field is special. Once I passed it to the endpoint, things started happening again. Thanks for all those that helped.

View solution in original post

0 Karma

fk319
Builder

The problem was in my default/setup.xml I need a field called name.
It seems the name field is special. Once I passed it to the endpoint, things started happening again. Thanks for all those that helped.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...