Splunk Dev

AppInspect command issue - Submit App for Validation

adnankhan5133
Communicator
Hey All - I ran into another issue using the AppInspect API. I'm attempting to follow the "Submit an app for validation" step listed here - https://dev.splunk.com/enterprise/docs/developapps/testvalidate/appinspect/splunkappinspectapi/runap....

However, I end up getting the below error. For the sake of simplicity and security, I shortened the token ID (which I received after following the first step to authenticate to the REST API endpoint using my Splunk credentials) to a few characters.Any idea where I could have gone wrong?

curl -X POST \ -H "Authorization: bearer
u8dhr7g4a" \ -H "Cache Control: no-cache" \ -F "app_package=@\"/opt/splunk/etc/apps/learned\\""\ --url "https://appinspect.splunk.com/v1/app/validate"
Here is the error that I encountered:

curl: (3) Host name ' -H' contains bad letter

curl: (3) Illegal characters found in URL
curl: (6) Could not resolve host: bearer
bash: u8dhr7g4a \ -H Cache: command not found
Labels (1)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The command I used successfully is similar, but lacks the backslash characters and has a full path to the app.

curl -X POST -H "Authorization: bearer 3wiO-MAo8fSb09s" -H "Cache-Control: no-cache" -F "app_package=@\"/opt/splunk/etc/system/static/app-packages/SA_mvstats.spl\"" --url "https://appinspect.splunk.com/v1/app/validate"

Try entering the command on a single line (I use notepad++ to build the line then paste it into the CLI). 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...