Deployment Architecture

How to programmatically add an application to a server class in deployment server?

wegscd
Contributor

I have to create and configure a few dozen serverclasses. Trying to script it.

I can create the serverclasses just fine with the deployment/server/serverclasses/{name} REST endpoint, and can use the link rel="edit" endpoint from that to make changes to the newly created serverclass and add hosts to the whitelist. Works great.

What I can NOT figure out how to do is to add applications to the serverclass. The XML indicates that there may be a link for accessing the applications (see the rel="applications"):

 <link href="/servicesNS/nobody/system/deployment/server/serverclasses/app0" rel="list"/>
 <link href="/servicesNS/nobody/system/deployment/server/serverclasses/app0/_reload" rel="_reload"/>
 <link href="/servicesNS/nobody/system/deployment/server/serverclasses/app0" rel="edit"/>
 <link href="/servicesNS/nobody/system/deployment/server/serverclasses/app0" rel="remove"/>
 <link href="/servicesNS/nobody/system/deployment/serverclasses/app0/applications" rel="applications"/>
 <link href="/servicesNS/nobody/system/deployment/serverclasses/app0/clients" rel="clients"/>
 <link href="/servicesNS/nobody/system/deployment/serverclasses/app0/reload" rel="reload"/>

But that /servicesNS/nobody/system/deployment/serverclasses/app0/applications URL is giving me a 404. (There is a
servicesNS/nobody/search/deployment/server/serverclasses/app0/applications URL, but the XML I get back doesn't have an link rel="edit" endpoint listed, so I don't see where that's going to be the solution).

How does one programmatically add an application to a serverclass?

0 Karma
1 Solution

wegscd
Contributor

That's it! You don't add applications to a serverclass, you add and remove serverclasses to/from the application.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...