This app contains the search command "curl", which polls data from a REST API. The syntax is as follows, with the question mark indicating the optional Options.
| curl url paramMap? output? timeout? auth? headers? proxies? unsetProxy?
Option | Type | Value |
---|---|---|
url | string | http://my_rest_api/endpoint |
paramMap | string | param1=val1, param2=val2 |
output | string | json OR text (default: json) |
timeout | int | 0..∞ |
auth | string | Basic, User, Password |
headers | json | {'option1': 'val1', 'option2': 'val2'} |
proxies | string | http_proxy, https_proxy |
unsetProxy | bool | true OR false (default: false) |
Returns the data from the endpoint as json
| curl url="https://reqres.in/api/users"
Basic login at the Github API with reponse as plain text
| curl url="https://api.github.com/user" auth="basic, user, password" output=text
Access InfluxDB with token
| curl url="http://influx:3000/api/datasources/proxy/1/query" paramMap="db=statsdemo, q=show tag keys" headers="{'Authorization': 'Bearer token'}"
Source: https://github.com/bmacher/splunk-curl-command
Copyright © 2018 Benjamin Macher
Curl command with basic functionality.
As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.