All Apps and Add-ons

Web Tools Add on (TA-webtools): Curl command sends error

suser2019
Explorer

I am using this app https://splunkbase.splunk.com/app/4146
The curl command is not picking up method=POST and always returning error 405 and

{"error":{"detail":"GET method not supported for API","message":"Method not Supported"},"status":"failure"}
I used this command

| eval header="{\"Content-Type\":\"application/json\", \"Accept\":\"application/json\"}" 
| curl method=post uri=url-rest-api user=username pass=password headerfield= header

Now I am not sure how to make a POST call to an external API from Splunk search. Every time it is being detected as GET.

0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust

Please try the latest version of the app 1.2.4 which contains many bug fixes.

https://splunkbase.splunk.com/app/4146

View solution in original post

0 Karma

jkat54
SplunkTrust
SplunkTrust

Please try the latest version of the app 1.2.4 which contains many bug fixes.

https://splunkbase.splunk.com/app/4146

0 Karma

jkat54
SplunkTrust
SplunkTrust
0 Karma

suser2019
Explorer

I made the changes suggested in the link.. Here is what I see after this:

| curl method=post uri=<servicenow-link-incident-creation> splunkauth=false

{"error":{"message":"Method not Supported","detail":"GET method not supported for API"},"status":"failure"}

| curl method=post uri=<servicenow-link-incident-creation> splunkauth=true

{"error":{"message":"User Not Authenticated","detail":"Required to provide Auth information"},"status":"failure"}

0 Karma

jkat54
SplunkTrust
SplunkTrust

Are you trying to use my curl command to integrate with service now?

0 Karma

suser2019
Explorer

yes I am .. would you foresee an issue?

0 Karma

jkat54
SplunkTrust
SplunkTrust

You should be able to do it yes, but there's an app for service now. Why not use it instead?

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...