Getting Data In

REST API Install local App

sushantvn
Engager

Hello,

I would like to install an app on my local computer to a remote Splunk instance using rest api. I get the following error.

This is the rest call that I'm trying

curl -X POST \
  https://splunk-dev.company.com/services/apps/local \
  -H 'Authorization: Splunk sessionKey' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'name=/tmp/splunk-add-on-1.0.tgz&update=True&filename=True&auth=sessionKey&session=sessionKey'

I get a response

<messages>
    <msg type="ERROR">Error during app install: failed to extract app from /tmp/splunk-add-on-1.0.tgz to /opt/splunk/var/run/splunk/bundle_tmp/0fdba2269ccdff6e: No such file or directory</msg>
</messages>

The app is packaged into a tarball using a jenkins job and now I would like to upload it to the test server.
Do I have to make the tarball available on the Splunk server?

1 Solution

renjith_nair
SplunkTrust
SplunkTrust

Hi @sushantvn,

The app file should be available to the splunk server where it's being installed.
Please refer to https://answers.splunk.com/answers/122655/using-the-rest-api-to-install-an-app-from-a-file.html

Happy Splunking!

View solution in original post

0 Karma

renjith_nair
SplunkTrust
SplunkTrust

Hi @sushantvn,

The app file should be available to the splunk server where it's being installed.
Please refer to https://answers.splunk.com/answers/122655/using-the-rest-api-to-install-an-app-from-a-file.html

Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

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 ...

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, ...