Splunk® Answers and Splunkbase

Splunk Apps Entitlement API Reference

Download manual as PDF

Download topic as PDF

About the Splunkbase Entitlement API

The goal of the Splunkbase Entitlement API is to provide programmatic hooks for app developers and owners to grant and track access to restricted apps in Splunkbase.

Access to entitlement data

To access entitlement data, you must be logged into a splunk.com account on Splunkbase. This account must have the appropriate permissions to access and alter the entitlements in question and have retrieved the App ID for the app.

After prompting you for the splunk.com username and password, splunkd makes a call to Splunkbase for an authentication token. This call is an HTTP POST to https://splunkbase.splunk.com/api/account:login/ with the parameters "username" and "password". The response is an XML-Atom with the element "id" containing the 100+ character authentication token. If the username/password was invalid, SB will respond with an HTTP 401 response (Unauthorized) with the header text "Invalid login".

Here's an example using curl on the command line:

[fflanda ~]$ curl -d "username=fflanda_test&password=XXXXXXXX" https://splunkbase.splunk.com/api/account:login/
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Authentication Token</title>

Subsequent calls to Splunkbase API endpoints should have this authentication token passed to the server in a "X-Auth-Token" header (Splunkbase doesn't use the "Authorization" digest header as defined in RFC2617). This token will last for 24 hours. There is no need to re-request new copies of the token. When it expires, an API call attempt will result in an HTTP 400 response "Token Expired". As an example of using this token, here is downloading an app via the command line with curl:

curl -v -H"X-Auth-Token: IU+3FCriPoyBTtdfcEMf3e7MqM44/+GSgHIwFJ382bRUtmVUSy7/m77wnlPCkrba0ijqNgvxxeiaGJ9edMXArbt8p3IyKgIcRq4Hk+D04v4=" https://splunkbase.splunk.com/api/apps:download/Splunk+for+Unix+and+Linux/4.2.0/unix.spl > unix.spl
Last modified on 12 November, 2016
What is supported by this API

This documentation applies to the following versions of Splunk® Answers and Splunkbase: splunkbase

Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters