title: Python: .json data from splunk
body: <p>Following problem: 
  For my university project I uploaded a json file to splunk and now I want to use this in python as a dataframe object.</p>
  
  <p>Code:</p>
  
  <pre><code>import urllib3
  import requests
  import json
  import pandas as pd
  
  urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  
  
  server = 'localhost'
  port = 8089
  username = 'testuid'
  password = 'testpw'
  url='https://'+ server +':' + str(port)
  param = {'shortname', 'permissionId'}
  
  search='?search=search source%3D%22events.json%22%20host%3D%22DESKTOP-9QDQ0FT%22%20index%3D%22projektseminar%22%20sourcetype%3D%22_json%22%20%7Chead%2020%20%7Ctable%20shortname%20permissionId'
  
  output_type =  '&amp;output_mode=json'
  search_url = url + '/servicesNS/nobody/search/search/jobs/export' + search + output_type
  
  r = requests.get(search_url, auth=(username, password), verify=False)
  </code></pre>
  
  <p>Works well to this point. 
  Now I want this specific "r" response object as an dataframe object with the 2 columns "shortname" and "permissionId". There are several problems I have with this.
  First of all the json I get from the Rest API is with the columns "preview", "offset" and "results".
  I want a dataframe with the columns "shortname" and "permissionId". 
  The problem is I can't use things like <code>json.load(r)</code> or <code>r.json()</code> or similiar, there always comes "Extra Data" Error.
  So I'm a beginner with splunk and python so maybe there is a better way to do so... 
  Another idea I didn't tried yet is to use a csv output instead of json. 
  Would be nice if you guys would've some suggestion how to solve this problem.</p>
  
  <p>thx</p>