SlideShare a Scribd company logo
1 of 34
Download to read offline
Copyright	
  ©	
  2014	
  Splunk,	
  Inc.	
  
Splunk’s	
  API	
  
How	
  we	
  built	
  it!	
  
Agenda	
  
Why	
  we	
  built	
  Splunk’s	
  API	
  
	
  
How	
  we	
  built	
  Splunk’s	
  API	
  
What	
  is	
  Splunk	
  
A	
  product	
  for	
  handling	
  REALLY	
  large	
  and	
  varied	
  sets	
  of	
  evented	
  data	
  
What	
  is	
  Splunk	
  
From	
  megabytes	
  to	
  hundreds	
  of	
  terabytes	
  daily	
  
What	
  is	
  Splunk	
  
It	
  is	
  highly	
  scalable	
  and	
  distributed	
  
What	
  is	
  Splunk	
  
Useful	
  in	
  many	
  domains:	
  IT/Ops/DevOps,	
  security,	
  healthcare,	
  
financial,IOT/Devices	
  
7	
  
	
  	
  
Splunk	
  storage	
   Other	
  Big	
  Data	
  stores	
  
Developer	
  
Pla6orm	
  
Data	
  collecUon	
  
and	
  indexing	
  
Report	
  and	
  	
  
analyze	
  
Custom	
  	
  
dashboards	
  
Monitor	
  	
  
and	
  alert	
  
Ad	
  hoc	
  	
  
search	
  
Why	
  –	
  Product	
  need	
  
Need	
  to	
  build	
  a	
  Splunk	
  UI	
  that	
  surfaces	
  all	
  of	
  Splunk’s	
  capabiliUes	
  
Why	
  –	
  Customer	
  need	
  
Need	
  to	
  allow	
  customers	
  to	
  integrate	
  their	
  applicaUons	
  	
  
and	
  scripts	
  with	
  Splunk	
  
Why	
  –	
  Cost	
  
Less	
  code	
  to	
  maintain,	
  a	
  single	
  source	
  of	
  truth	
  
Why	
  –	
  Reach	
  
HTTP	
  is	
  ubiquitous,	
  every	
  plaZorm	
  has	
  a	
  client	
  
The	
  arch	
  
12	
  
Server	
  Tech	
  Stack	
  
13	
  
	
  
C/C++	
  
Python	
  –	
  Cherry	
  PI	
  
Python	
  –	
  Django	
  
Javascript	
  
Node	
  
	
  
Client	
  Tech	
  Stack	
  
14	
  
	
  
Javascript	
  
Node	
  
Python	
  
Ruby	
  
PHP	
  
C#	
  
	
  
The	
  API	
  
15	
  
Log	
  directly	
  to	
  
Splunk	
  via	
  HTTP	
  
Run	
  historical	
  and	
  
real-­‐Ume	
  searches	
  
What	
  can	
  you	
  do	
  with	
  Splunk’s	
  API?	
  
16	
  
Search	
   Manage	
  
Add/Delete	
  Users	
  
ReporUng/Alerts	
  
Manage	
  Inputs	
  
ConfiguraUon	
  
Index	
  
Login	
  to	
  a	
  Splunk	
  
instance	
  and	
  get	
  a	
  
session	
  token	
  
Auth	
  
The	
  API	
  design	
  
17	
  
Service	
  
Categories	
  
Endpoints	
  
Endpoints	
  
The	
  API	
  design	
  -­‐	
  Categories	
  
18	
  
The	
  API	
  design	
  –	
  Endpoints	
  
19	
  
The	
  API	
  design	
  –	
  Endpoints	
  
20	
  
Responses	
  -­‐	
  Feeds	
  and	
  Hypermedia	
  
<entry	
  
	
  	
  	
  	
  	
  	
  	
  xmlns="hjp://www.w3.org/2005/Atom"	
  
	
  	
  	
  	
  	
  	
  	
  xmlns:s="hjp://dev.splunk.com/ns/rest"	
  
	
  	
  	
  	
  	
  	
  	
  xmlns:opensearch="hjp://a9.com/-­‐/spec/opensearch/1.1/">	
  
	
  	
  <Utle>search	
  index</Utle>	
  
	
  	
  <id>hjps://localhost:8089/services/search/jobs/mysearch_02151949</id>	
  
	
  	
  <updated>2011-­‐07-­‐07T20:49:58.000-­‐07:00</updated>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949"	
  rel="alternate"/>	
  
	
  	
  <published>2011-­‐07-­‐07T20:49:57.000-­‐07:00</published>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949/search.log"	
  rel="search.log"/>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949/events"	
  rel="events"/>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949/results"	
  rel="results"/>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949/results_preview"	
  rel="results_preview"/>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949/Umeline"	
  rel="Umeline"/>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949/summary"	
  rel="summary"/>	
  
	
  	
  <link	
  href="/services/search/jobs/mysearch_02151949/control"	
  rel="control"/>	
  
</entry>	
  
21	
  
Auth	
  
22	
  
HTTP	
  Basic	
  
Token	
  based	
  
LDAP/AD	
  
Cookie	
  based	
  
Auth	
  –	
  HTTP	
  Basic	
  
23	
  
curl	
  -­‐k	
  -­‐u	
  admin:changeme	
  	
  hjps://localhost:8089/services/auth/login	
  -­‐
d	
  username="admin"	
  -­‐d	
  password="changeme"	
  	
  
Auth	
  –	
  Splunk	
  Token	
  
24	
  
curl	
  -­‐k	
  -­‐H	
  "AuthorizaUon:	
  Splunk	
  
SfH2D^zvPyLu^mO61C9kWtB7TOuQs0i9oSzh4lD7ho7Gvw26I61VYRjXkgj
LQlJDJ0hER^q^A6v0BHYiKNba^CMbOmC63frGCrDqr2Zt"	
  hjps://
localhost:8089/services/search/jobs	
  -­‐d	
  output_mode="json"	
  -­‐-­‐get	
  
Search	
  –	
  Oneshot	
  –	
  Get	
  me	
  results!	
  
25	
  
curl	
  -­‐u	
  admin:changeme	
  -­‐k	
  hjps://localhost:8089/services/search/jobs	
  -­‐
d	
  search="search	
  sourcetype=sysmon	
  |	
  head	
  5"	
  -­‐d	
  
exec_mode="oneshot"	
  	
  
Search	
  –	
  Oneshot	
  –	
  Get	
  me	
  results	
  in	
  json	
  
26	
  
curl	
  -­‐u	
  admin:changeme	
  -­‐k	
  hjps://localhost:8089/services/search/jobs	
  -­‐
d	
  search="search	
  sourcetype=sysmon	
  |	
  head	
  5"	
  -­‐d	
  
exec_mode="oneshot"	
  –d	
  output_mode="json"	
  	
  
Search	
  –	
  Oneshot	
  –	
  Get	
  me	
  json	
  columns	
  
27	
  
curl	
  -­‐u	
  admin:changeme	
  -­‐k	
  hjps://localhost:8089/services/search/jobs	
  -­‐
d	
  search="search	
  sourcetype=sysmon	
  |	
  head	
  5"	
  -­‐d	
  
exec_mode="oneshot"	
  –d	
  output_mode="json_cols"	
  
Search	
  –	
  Oneshot	
  –	
  Get	
  me	
  json	
  rows	
  
28	
  
curl	
  -­‐u	
  admin:changeme	
  -­‐k	
  hjps://localhost:8089/services/search/jobs	
  -­‐
d	
  search="search	
  sourcetype=sysmon	
  |	
  head	
  5"	
  -­‐d	
  
exec_mode="oneshot"	
  –d	
  output_mode="json_cols"	
  
Search	
  –	
  Blocking	
  –	
  Wait	
  Ull	
  done!	
  
29	
  
curl	
  -­‐u	
  admin:changeme	
  -­‐k	
  hjps://localhost:8089/services/search/jobs	
  -­‐
d	
  search="search	
  sourcetype=sysmon	
  |	
  head	
  5”	
  -­‐d	
  
exec_mode=”blocking”	
  output_mode="json”	
  |	
  python	
  -­‐mjson.tool	
  
	
  
curl	
  -­‐u	
  admin:changeme	
  /services/search/jobs/{sid}/results	
  -­‐d	
  
output_mode="json"	
  –get	
  |	
  python	
  -­‐mjson.tool	
  
Search	
  –	
  List	
  search	
  jobs	
  
30	
  
curl	
  -­‐u	
  admin:changeme	
  -­‐k	
  hjps://localhost:8089/services/search/jobs	
  -­‐
d	
  output_mode="json"	
  -­‐-­‐get	
  |	
  python	
  -­‐mjson.tool	
  
Search	
  –	
  Normal–	
  Run	
  in	
  the	
  background	
  
31	
  
curl	
  -­‐u	
  admin:changeme	
  -­‐k	
  hjps://localhost:8089/services/search/jobs	
  -­‐
d	
  search="search	
  sourcetype=sysmon	
  |	
  head	
  10000"	
  -­‐d	
  
exec_mode="normal"	
  output_mode="json"|	
  python	
  -­‐mjson.tool	
  
	
  
curl	
  -­‐u	
  admin:changeme	
  /services/search/jobs/{sid}/results	
  -­‐d	
  
output_mode="json"	
  –get	
  |	
  python	
  -­‐mjson.tool	
  
Search	
  -­‐	
  Export	
  
32	
  
curl	
  -­‐k	
  -­‐u	
  admin:changeme	
  hjps://localhost:8089/servicesNS/admin/
search/search/jobs/export	
  -­‐d	
  search="search	
  index%3D_internal	
  |	
  head	
  
100000"	
  -­‐d	
  output_mode="raw"	
  
Search	
  –	
  Export	
  REALTIME	
  
33	
  
curl	
  -­‐k	
  -­‐u	
  admin:changeme	
  hjps://localhost:8089/servicesNS/admin/
search/search/jobs/export	
  -­‐d	
  search="search	
  index%3D_internal"	
  -­‐d	
  
output_mode="raw"	
  earliest_Ume="rt-­‐1m"	
  latest_Ume="rt"	
  
Copyright	
  ©	
  2014	
  Splunk,	
  Inc.	
  
Splunk’s	
  API	
  
How	
  we	
  built	
  it!	
  
dev.splunk.com	
  
	
  
splunk.com/jobs	
  
	
  

More Related Content

Similar to Splunk's api how we built it

Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseShannon Cuthbertson
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseSplunk
 
SplunkLive! Introduction to the Splunk Developer Platform
SplunkLive! Introduction to the Splunk Developer PlatformSplunkLive! Introduction to the Splunk Developer Platform
SplunkLive! Introduction to the Splunk Developer PlatformSplunk
 
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)Issac Buenrostro
 
Presentation : Business Process Management with mobile routes
Presentation : Business Process Management with mobile routesPresentation : Business Process Management with mobile routes
Presentation : Business Process Management with mobile routesCharif Mahmoudi
 
Getting started with Splunk Breakout Session
Getting started with Splunk Breakout SessionGetting started with Splunk Breakout Session
Getting started with Splunk Breakout SessionSplunk
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseSplunk
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open StandardsAPIsecure_ Official
 
Top 10 most interesting vulnerabilities and attacks in SAP
Top 10 most interesting vulnerabilities and attacks in SAPTop 10 most interesting vulnerabilities and attacks in SAP
Top 10 most interesting vulnerabilities and attacks in SAPERPScan
 
Learning the basics of Apache NiFi for iot OSS Europe 2020
Learning the basics of Apache NiFi for iot OSS Europe 2020Learning the basics of Apache NiFi for iot OSS Europe 2020
Learning the basics of Apache NiFi for iot OSS Europe 2020Timothy Spann
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework BasicMario Romano
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack APIKrunal Jain
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterSachin G Kulkarni
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with SolrErik Hatcher
 
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...BrianFraser29
 
CI/CD and TDD in deploying kamailio
CI/CD and TDD in deploying kamailioCI/CD and TDD in deploying kamailio
CI/CD and TDD in deploying kamailioAleksandar Sosic
 
Getting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout SessionGetting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout SessionSplunk
 
SplunkLive! Hamburg / München Advanced Session
SplunkLive! Hamburg / München Advanced SessionSplunkLive! Hamburg / München Advanced Session
SplunkLive! Hamburg / München Advanced SessionGeorg Knon
 
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration)
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration) SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration)
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration) Surendar S
 

Similar to Splunk's api how we built it (20)

Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk Enterprise
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk Enterprise
 
SplunkLive! Introduction to the Splunk Developer Platform
SplunkLive! Introduction to the Splunk Developer PlatformSplunkLive! Introduction to the Splunk Developer Platform
SplunkLive! Introduction to the Splunk Developer Platform
 
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
Open Source LinkedIn Analytics Pipeline - BOSS 2016 (VLDB)
 
Presentation : Business Process Management with mobile routes
Presentation : Business Process Management with mobile routesPresentation : Business Process Management with mobile routes
Presentation : Business Process Management with mobile routes
 
Getting started with Splunk Breakout Session
Getting started with Splunk Breakout SessionGetting started with Splunk Breakout Session
Getting started with Splunk Breakout Session
 
Getting Started with Splunk Enterprise
Getting Started with Splunk EnterpriseGetting Started with Splunk Enterprise
Getting Started with Splunk Enterprise
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards
 
Top 10 most interesting vulnerabilities and attacks in SAP
Top 10 most interesting vulnerabilities and attacks in SAPTop 10 most interesting vulnerabilities and attacks in SAP
Top 10 most interesting vulnerabilities and attacks in SAP
 
Learning the basics of Apache NiFi for iot OSS Europe 2020
Learning the basics of Apache NiFi for iot OSS Europe 2020Learning the basics of Apache NiFi for iot OSS Europe 2020
Learning the basics of Apache NiFi for iot OSS Europe 2020
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
 
CI/CD and TDD in deploying kamailio
CI/CD and TDD in deploying kamailioCI/CD and TDD in deploying kamailio
CI/CD and TDD in deploying kamailio
 
Getting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout SessionGetting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout Session
 
Nmap scripting engine
Nmap scripting engineNmap scripting engine
Nmap scripting engine
 
SplunkLive! Hamburg / München Advanced Session
SplunkLive! Hamburg / München Advanced SessionSplunkLive! Hamburg / München Advanced Session
SplunkLive! Hamburg / München Advanced Session
 
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration)
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration) SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration)
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration)
 

More from Glenn Block

Api Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talkApi Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talkGlenn Block
 
Serverless Extensibility
Serverless ExtensibilityServerless Extensibility
Serverless ExtensibilityGlenn Block
 
Deploying web apis on core clr to docker
Deploying web apis on core clr to dockerDeploying web apis on core clr to docker
Deploying web apis on core clr to dockerGlenn Block
 
HTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer LoggingHTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer LoggingGlenn Block
 
Liberate your Application Logging
Liberate your Application LoggingLiberate your Application Logging
Liberate your Application LoggingGlenn Block
 
A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3Glenn Block
 
Islands of Node in a sea of big data
Islands of Node in a sea of big dataIslands of Node in a sea of big data
Islands of Node in a sea of big dataGlenn Block
 
Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions Glenn Block
 
Splunk for net developers
Splunk for net developersSplunk for net developers
Splunk for net developersGlenn Block
 
Dev sum hypemedia talk
Dev sum hypemedia talkDev sum hypemedia talk
Dev sum hypemedia talkGlenn Block
 
Realtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js devRealtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js devGlenn Block
 
Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise ClassGlenn Block
 
Node js on Windows Azure
Node js on Windows AzureNode js on Windows Azure
Node js on Windows AzureGlenn Block
 
Building systems with rest
Building systems with restBuilding systems with rest
Building systems with restGlenn Block
 
Building Extensible RIAs with MEF
Building Extensible RIAs with MEFBuilding Extensible RIAs with MEF
Building Extensible RIAs with MEFGlenn Block
 

More from Glenn Block (18)

Api Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talkApi Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talk
 
Serverless Extensibility
Serverless ExtensibilityServerless Extensibility
Serverless Extensibility
 
Deploying web apis on core clr to docker
Deploying web apis on core clr to dockerDeploying web apis on core clr to docker
Deploying web apis on core clr to docker
 
HTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer LoggingHTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer Logging
 
Liberate your Application Logging
Liberate your Application LoggingLiberate your Application Logging
Liberate your Application Logging
 
A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3
 
Islands of Node in a sea of big data
Islands of Node in a sea of big dataIslands of Node in a sea of big data
Islands of Node in a sea of big data
 
Splunk and node
Splunk and nodeSplunk and node
Splunk and node
 
Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions
 
Splunk for net developers
Splunk for net developersSplunk for net developers
Splunk for net developers
 
Dev sum hypemedia talk
Dev sum hypemedia talkDev sum hypemedia talk
Dev sum hypemedia talk
 
Edge
EdgeEdge
Edge
 
Hypermedia
HypermediaHypermedia
Hypermedia
 
Realtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js devRealtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js dev
 
Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise Class
 
Node js on Windows Azure
Node js on Windows AzureNode js on Windows Azure
Node js on Windows Azure
 
Building systems with rest
Building systems with restBuilding systems with rest
Building systems with rest
 
Building Extensible RIAs with MEF
Building Extensible RIAs with MEFBuilding Extensible RIAs with MEF
Building Extensible RIAs with MEF
 

Recently uploaded

Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfchwongval
 

Recently uploaded (20)

Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdf
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 

Splunk's api how we built it

  • 1. Copyright  ©  2014  Splunk,  Inc.   Splunk’s  API   How  we  built  it!  
  • 2. Agenda   Why  we  built  Splunk’s  API     How  we  built  Splunk’s  API  
  • 3. What  is  Splunk   A  product  for  handling  REALLY  large  and  varied  sets  of  evented  data  
  • 4. What  is  Splunk   From  megabytes  to  hundreds  of  terabytes  daily  
  • 5. What  is  Splunk   It  is  highly  scalable  and  distributed  
  • 6. What  is  Splunk   Useful  in  many  domains:  IT/Ops/DevOps,  security,  healthcare,   financial,IOT/Devices  
  • 7. 7       Splunk  storage   Other  Big  Data  stores   Developer   Pla6orm   Data  collecUon   and  indexing   Report  and     analyze   Custom     dashboards   Monitor     and  alert   Ad  hoc     search  
  • 8. Why  –  Product  need   Need  to  build  a  Splunk  UI  that  surfaces  all  of  Splunk’s  capabiliUes  
  • 9. Why  –  Customer  need   Need  to  allow  customers  to  integrate  their  applicaUons     and  scripts  with  Splunk  
  • 10. Why  –  Cost   Less  code  to  maintain,  a  single  source  of  truth  
  • 11. Why  –  Reach   HTTP  is  ubiquitous,  every  plaZorm  has  a  client  
  • 13. Server  Tech  Stack   13     C/C++   Python  –  Cherry  PI   Python  –  Django   Javascript   Node    
  • 14. Client  Tech  Stack   14     Javascript   Node   Python   Ruby   PHP   C#    
  • 16. Log  directly  to   Splunk  via  HTTP   Run  historical  and   real-­‐Ume  searches   What  can  you  do  with  Splunk’s  API?   16   Search   Manage   Add/Delete  Users   ReporUng/Alerts   Manage  Inputs   ConfiguraUon   Index   Login  to  a  Splunk   instance  and  get  a   session  token   Auth  
  • 17. The  API  design   17   Service   Categories   Endpoints   Endpoints  
  • 18. The  API  design  -­‐  Categories   18  
  • 19. The  API  design  –  Endpoints   19  
  • 20. The  API  design  –  Endpoints   20  
  • 21. Responses  -­‐  Feeds  and  Hypermedia   <entry                xmlns="hjp://www.w3.org/2005/Atom"                xmlns:s="hjp://dev.splunk.com/ns/rest"                xmlns:opensearch="hjp://a9.com/-­‐/spec/opensearch/1.1/">      <Utle>search  index</Utle>      <id>hjps://localhost:8089/services/search/jobs/mysearch_02151949</id>      <updated>2011-­‐07-­‐07T20:49:58.000-­‐07:00</updated>      <link  href="/services/search/jobs/mysearch_02151949"  rel="alternate"/>      <published>2011-­‐07-­‐07T20:49:57.000-­‐07:00</published>      <link  href="/services/search/jobs/mysearch_02151949/search.log"  rel="search.log"/>      <link  href="/services/search/jobs/mysearch_02151949/events"  rel="events"/>      <link  href="/services/search/jobs/mysearch_02151949/results"  rel="results"/>      <link  href="/services/search/jobs/mysearch_02151949/results_preview"  rel="results_preview"/>      <link  href="/services/search/jobs/mysearch_02151949/Umeline"  rel="Umeline"/>      <link  href="/services/search/jobs/mysearch_02151949/summary"  rel="summary"/>      <link  href="/services/search/jobs/mysearch_02151949/control"  rel="control"/>   </entry>   21  
  • 22. Auth   22   HTTP  Basic   Token  based   LDAP/AD   Cookie  based  
  • 23. Auth  –  HTTP  Basic   23   curl  -­‐k  -­‐u  admin:changeme    hjps://localhost:8089/services/auth/login  -­‐ d  username="admin"  -­‐d  password="changeme"    
  • 24. Auth  –  Splunk  Token   24   curl  -­‐k  -­‐H  "AuthorizaUon:  Splunk   SfH2D^zvPyLu^mO61C9kWtB7TOuQs0i9oSzh4lD7ho7Gvw26I61VYRjXkgj LQlJDJ0hER^q^A6v0BHYiKNba^CMbOmC63frGCrDqr2Zt"  hjps:// localhost:8089/services/search/jobs  -­‐d  output_mode="json"  -­‐-­‐get  
  • 25. Search  –  Oneshot  –  Get  me  results!   25   curl  -­‐u  admin:changeme  -­‐k  hjps://localhost:8089/services/search/jobs  -­‐ d  search="search  sourcetype=sysmon  |  head  5"  -­‐d   exec_mode="oneshot"    
  • 26. Search  –  Oneshot  –  Get  me  results  in  json   26   curl  -­‐u  admin:changeme  -­‐k  hjps://localhost:8089/services/search/jobs  -­‐ d  search="search  sourcetype=sysmon  |  head  5"  -­‐d   exec_mode="oneshot"  –d  output_mode="json"    
  • 27. Search  –  Oneshot  –  Get  me  json  columns   27   curl  -­‐u  admin:changeme  -­‐k  hjps://localhost:8089/services/search/jobs  -­‐ d  search="search  sourcetype=sysmon  |  head  5"  -­‐d   exec_mode="oneshot"  –d  output_mode="json_cols"  
  • 28. Search  –  Oneshot  –  Get  me  json  rows   28   curl  -­‐u  admin:changeme  -­‐k  hjps://localhost:8089/services/search/jobs  -­‐ d  search="search  sourcetype=sysmon  |  head  5"  -­‐d   exec_mode="oneshot"  –d  output_mode="json_cols"  
  • 29. Search  –  Blocking  –  Wait  Ull  done!   29   curl  -­‐u  admin:changeme  -­‐k  hjps://localhost:8089/services/search/jobs  -­‐ d  search="search  sourcetype=sysmon  |  head  5”  -­‐d   exec_mode=”blocking”  output_mode="json”  |  python  -­‐mjson.tool     curl  -­‐u  admin:changeme  /services/search/jobs/{sid}/results  -­‐d   output_mode="json"  –get  |  python  -­‐mjson.tool  
  • 30. Search  –  List  search  jobs   30   curl  -­‐u  admin:changeme  -­‐k  hjps://localhost:8089/services/search/jobs  -­‐ d  output_mode="json"  -­‐-­‐get  |  python  -­‐mjson.tool  
  • 31. Search  –  Normal–  Run  in  the  background   31   curl  -­‐u  admin:changeme  -­‐k  hjps://localhost:8089/services/search/jobs  -­‐ d  search="search  sourcetype=sysmon  |  head  10000"  -­‐d   exec_mode="normal"  output_mode="json"|  python  -­‐mjson.tool     curl  -­‐u  admin:changeme  /services/search/jobs/{sid}/results  -­‐d   output_mode="json"  –get  |  python  -­‐mjson.tool  
  • 32. Search  -­‐  Export   32   curl  -­‐k  -­‐u  admin:changeme  hjps://localhost:8089/servicesNS/admin/ search/search/jobs/export  -­‐d  search="search  index%3D_internal  |  head   100000"  -­‐d  output_mode="raw"  
  • 33. Search  –  Export  REALTIME   33   curl  -­‐k  -­‐u  admin:changeme  hjps://localhost:8089/servicesNS/admin/ search/search/jobs/export  -­‐d  search="search  index%3D_internal"  -­‐d   output_mode="raw"  earliest_Ume="rt-­‐1m"  latest_Ume="rt"  
  • 34. Copyright  ©  2014  Splunk,  Inc.   Splunk’s  API   How  we  built  it!   dev.splunk.com     splunk.com/jobs