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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...