All Apps and Add-ons

Splunk Add-on Builder: How to resolve "[ERROR] - [test] The response status=403" error while testing REST API?

Esky73
Builder

I have followed the walkthrough to add a NY Times app to Splunk and that works fine as documented here :

http://dev.splunk.com/view/addon-builder/SP-CAAAFCD

I have tried similar using the Guardian API - i get the following issue when running the test on the 'edit data input' page ..

2017-04-21 01:57:53,716 - test_theguardian - [ERROR] - [test] The response status=403 for request which url=https://content.guardianapis.com/search?q=monaco&api-key=XXX and method=GET.

So went to cmd line and that failed - but i resolved this by adding '' around the URI like so :

*** SNIPPET ***

[splunk@centos-6-1 splunk_app_add_on_builder]$ curl -k 'https://content.guardianapis.com/search?q=monaco&api-key=XXX'
{"response":{"status":"ok","userTier":"developer","total":7622,"startIndex":1,"pageSize":10,"currentPage":1,"pages":763,"orderBy":"relevance","results":[{"id":"football
/2017/apr/19/kylian-mbappe-teenage-monaco-striker-champions-league","type":"article","sectionId":"football","sectionName":"Football","webPublicationDate":"2017-04-19T08
:00:15Z","webTitle":"Kylian Mbappé: the teenage Monaco striker taking Europe by storm","webUrl":"https://www.theguardian.com/football/2017/apr/19/kylian-mbappe-teenage-
monaco-striker-champions-league","apiUrl":"https://content.guardianapis.com/football/2017/apr/19/kylian-mbappe-teenage-monaco-striker-champions-league","isHosted":false
},{"id":"football/2017/apr/13/uefa-dortmund-jurgen-klopp-monaco-champions-league-coach-bomb","type":"article","sectionId":"football","sectionName":"Football","webPublic
ationDate":"2017-04-13T21:37:11Z","webTitle":"Jürgen Klopp says Uefa hasty in rescheduling Dortmund v Monaco","webUrl":"https://www.theguardian.com/football/2017/apr/13
/uefa-dortmund-jurgen-klopp-monaco-champions-league-coach-bomb","apiUrl":"https://content.guardianapis.com/football/2017/apr/13/uefa-dortmund-jurgen-klopp-monaco-champi
ons-league-coach-bomb","isHosted":false},{"id":"football/2017/apr/11/borussia-dortmund-monaco-beds-for-away-fans","type":"article","sectionId":"football","sectionName":
"Football","webPublicationDate":"2017-04-11T23:20:47Z","webTitle":"#bedsforawayfans: Dortmund and Monaco supporters show solidarity after attack","webUrl":"https://www.
theguardian.com/football/2017/apr/11/borussia-dortmund-monaco-beds-for-away-fans","apiUrl":"https://content.guardianapis.com/football/2017/apr/11/borussia-dortmund-mona
co-beds-for-away-fans","isHosted":false},{"id":"football/2017/mar/15/monaco-manchester-city-champions-league-french-football","type":"article","sectionId":"football","s
ectionName":"Football","webPublicationDate":"2017-03-15T10:00:27Z","webTitle":"Monaco out to restore French football’s pride against Manchester City","webUrl":"https://
www.theguardian.com/football/2017/mar/15/monaco-manchester-city-champions-league-french-football","a...
-manchester-city-champions-league-french-football","isHosted":false},{"id":"football/blog/2017/feb/13/football-transfer-rumours-arsenal-to-sign-kylian-mbappe-from-monac ..
[splunk@centos-6-1 splunk_app_add_on_builder]$

I can't see how to incorporate the '' using the Splunk Add-on Builder ?

0 Karma

Esky73
Builder

My API Key was incorrect ...

0 Karma

Esky73
Builder

My API Key was incorrect ...

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...