Getting Data In

Is there an API to add new server to a serverclass without specifying a whitelist number?

New Member

I want to know if there's an API to add a new server (app05) to serverClass:Legacy_App and it will auto generate the next whitelist.# number?

I don't want to specify whitelist.2=legacy305 in the api because I will have a lot of servers in Legacy_App, can't remember what the next whitelist number every time I try to add a new server.

whitelist.2=app305                want to be automatic ( no need to specify whitelist.2)
0 Karma


Unfortunately the lack of answer for this required me to work in the other direction.

I created an app that included a script to run against the inventory system's API to create a text file of the "active" assets. The serverclass is then setup through serverclass.conf to ingest that file for the list of active assets.

whitelist.from_pathname = etc/apps/illinois-urbana-splunkmgmt-deploymentserver-SMG-serverlist-APP/lookup/smg_active_server_list

It would be great if I could have figured out how to just add a single server to an existing server class without having to build something external.

0 Karma

0 Karma

New Member

this curl -k -u admin:pass https://localhost:8089/services/deployment/server/serverclasses -d name=sc_apps_ombra is for creating serverclass.

there's a request parameter for whitelist* but i have to specify an ordinal number.

whitelist. String List of hosts to accept for this server class. For each whitelist, replace with an ordinal number to specify additional whitelists. Filter ordinals must start at 0 and be consecutive.

is there a way to add whitelist.* automatically with consecutive number?

0 Karma


That's what I want to know. I have read a few REST API posts on here and I still don't see an answer. Please post if you figured this out. Having ordinals in the serverclass may have made sense at one point but now with those of us wanting to automate this is a challenge.

0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!