CINXE.COM
BugSnag docs › API › Data access
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- Always force latest IE rendering engine or request Chrome Frame --> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Access information about your organization, projects, errors, and more to build custom integrations."> <title>BugSnag docs › API › Data access</title> <link rel="icon" type="image/png" href="/assets/images/favicon3-96.png" sizes="96x96"> <link href="/assets/stylesheets/all.css" rel="stylesheet" /> <link rel="canonical" href="https://docs.bugsnag.com/api/data-access/"> <!-- BugSnag --> <script src="//d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js"></script> <script> Bugsnag.start({ apiKey: '1adb72945c3fe4df9da3638ec54c5e4f', enabledReleaseStages: ['preview', 'production'], releaseStage: 'production' }) </script> <!-- CookieHub --> <script type="text/javascript"> var cpm = {}; (function(h,u,b){ var d=h.getElementsByTagName("script")[0],e=h.createElement("script"); e.async=true;e.src='https://cookiehub.net/c2/93363859.js'; e.onload=function(){u.cookiehub.load(b);} d.parentNode.insertBefore(e,d); })(document,window,cpm); </script> <!-- Segment --> <script type="text/plain" data-consent="analytics"> !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0"; // Track page views in Segment unless PetalBot is the source of the request. // PetalBot requests translate to a lot of MTUs (unique monthly users) in Segment which are billable. if (!/PetalBot/i.test(window.navigator.userAgent)) { analytics.load("68nit8nqeCaJTiD3u6961Prq8ZrNFMSF"); analytics.page() }}}(); </script> <!-- Global site tag (gtag.js) - Google Ads: 987941250 --> <script type="text/plain" data-consent="marketing" async src="https://www.googletagmanager.com/gtag/js?id=AW-987941250"></script> <script type="text/plain" data-consent="marketing"> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-987941250'); </script> <!-- Event snippet for Sign-up 2020-04-30 conversion page In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. --> <script type="text/plain" data-consent="marketing"> function gtag_report_conversion(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-987941250/AllYCPWI684BEIKTi9cD', 'event_callback': callback }); return false; } </script> <!-- 6sense --> <script type="text/plain" data-consent="marketing"> window._6si = window._6si || []; window._6si.push(['enableEventTracking', true]); window._6si.push(['setToken', '8e0ea75c2ca92b31dec5baa7e7cf66be']); window._6si.push(['setEndpoint', 'b.6sc.co']); (function() { var gd = document.createElement('script'); gd.type = 'text/javascript'; gd.async = true; gd.src = '//j.6sc.co/6si.min.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gd, s); })(); </script> </head> <body class="api api_data-access api_data-access_index"> <div class="SmartBear-banner"></div> <div class="Main"> <nav class="Sidebar"> <button class="Sidebar-toggle" onclick="document.body.classList.toggle('show-sidebar')"> <img class="Sidebar-icon Sidebar-icon-menu no-open" src="/assets/images/icons/menu.svg" /> <img class="Sidebar-icon Sidebar-icon-close no-open" src="/assets/images/icons/close.svg" /> </button> <div class="Sidebar-content"> <a class="Sidebar-logo" href="/"></a> <div class="Sidebar-search"> <input class="Sidebar-searchInput js-searchInput" type="search" placeholder="Search docs..."/> </div> <div class="Sidebar-sectionsScrollbarHider "> <div class="Sidebar-sections"> <div class="Sidebar-section"> <div class="Sidebar-sectionHeader">Data access API</div> <a href="#versions" class="Sidebar-navLink"> Versions </a><a href="#specifying-a-version" class="Sidebar-navLink"> Specifying a version </a><a href="#ruby-api-toolkit" class="Sidebar-navLink"> Ruby API Toolkit </a><a href="#help-and-support" class="Sidebar-navLink"> Help and support </a> </div> <div class="Sidebar-section"> <div class="Sidebar-sectionHeader">Reference</div> <a href="https://bugsnagapiv2.docs.apiary.io" class="Sidebar-navLink"> Version 2 </a><a href="/api/data-access/examples/" class="Sidebar-navLink"> Example API requests </a><a href="/api/data-access/gdpr-examples/" class="Sidebar-navLink"> GDPR & CCPA API requests </a> </div> </div> </div> </div> </nav> <div class="Content"> <div class="TopBar"> <div class="TopBar-content Grid"> <div class="TopBar-breadcrumbs"> <a href="/" class="TopBar-breadcrumb"> Docs </a><a href="/api/" class="TopBar-breadcrumb"> API </a><a href="/api/data-access/" class="TopBar-breadcrumb"> Data access </a> </div> <div class="TopBar-buttons"> <a class="TopBar-button" href="https://smartbear.com/insight-hub">Smartbear.com</a> <a class="TopBar-button is-primary" href="https://app.bugsnag.com/user/new/" onclick="gtag_report_conversion();">Start Free Trial</a> </div> </div> </div> <div class="Typography Grid"> <div id="BugSnag-is-now-Insight-Hub"> <img class="no-open" src="/assets/images/bugsnag-is-now-insight-hub.svg" /> <span><strong>BugSnag is now Insight Hub</strong> - we're making some changes to how the product looks, but this won't impact the way you use BugSnag or any of your integrations.</span> </div> <h1>Data access API</h1> <p>Access information about your organization, projects, errors, and more to build custom integrations.</p> <h2 id="versions">Versions</h2> <h3 id="version-2">Version 2</h3> <p>Version 2 is the current version of the API. See the <a href="examples/">API examples</a> to help you get started.</p> <p><a class="Api-button" href="https://bugsnagapiv2.docs.apiary.io">Version 2 API Reference ></a></p> <h3 id="version-1">Version 1</h3> <p>Version 1 of the API has been decommissioned.</p> <h2 id="specifying-a-version">Specifying a version</h2> <p>The API version can be selected by passing a header. We recommend always passing a header, as the default version will change as old versions are disabled.</p> <p>You can use the <code>X-Version</code> header as follows:</p> <div class="highlight"><pre class="highlight shell"><code>curl <span class="nt">-H</span> <span class="s2">"X-Version: 2"</span> https://api.bugsnag.com </code></pre></div> <p>Alternatively you can use the <code>Accept</code> header:</p> <div class="highlight"><pre class="highlight shell"><code>curl <span class="nt">-H</span> <span class="s2">"Accept: application/json; version=2"</span> https://api.bugsnag.com </code></pre></div> <h2 id="ruby-api-toolkit">Ruby API Toolkit</h2> <p>A Ruby API toolkit library is available to make it easy to access the API.</p> <ul> <li>Get started: <a href="https://github.com/bugsnag/bugsnag-api-ruby/">bugsnag-api-ruby</a></li> <li>API documentation: <a href="http://www.rubydoc.info/gems/bugsnag-api/Bugsnag/Api/Client">Bugsnag::Api::Client</a></li> </ul> <h2 id="help-and-support">Help and support</h2> <p>If you would like to do something that the API does not allow, please <a href="mailto:support@bugsnag.com">get in touch</a> with us. We’d love to help you build on top of our API!</p> </div> </div> </div> <div class="Background"> <div class="Background-left"></div> <div class="Background-right"></div> </div> <!-- Docs search --> <script src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script><script src="/assets/javascripts/all.js"></script> <script type="text/javascript"> docsearch({ apiKey: '95e256f960a70c3f7fa9c722dbe28130', appId: 'F9ABIKS431', indexName: 'bugsnag', inputSelector: '.js-searchInput', debug: true, algoliaOptions: { hitsPerPage: 20 } }); </script> <!-- Zendesk Widget --> <script> // Standard Zendesk snippet window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","bugsnag.zendesk.com"); // Don't allow the widget to set cookies: https://developer.zendesk.com/embeddables/docs/widget/settings#cookies window.zESettings = { cookies: false }; // Force the widget locale to be en-US to encourage customers to send in support queries in English zE('webWidget', 'setLocale', 'en-US'); // Some custom code to turn support@bugsnag.com links into Zendesk triggers $('[href="mailto:support@bugsnag.com"], [href="mailto:enterprise@bugsnag.com"], [href="mailto:notifiers@bugsnag.com"]').on('click', function(e) { // Only do this if Zendesk has loaded. Otherwise, fall back to mailto behavior if (window.zEmbed.activate) { window.zEmbed.activate(); e.preventDefault(); } }); </script> </body> </html>