Runscope API Monitoring    Learn More →

Posts filtered by category: debugging

3 Reasons Your API Might Fail

3 Reasons Your API Might Fail

By Michael Churchman on .

APIs. You depend on them, but can you always trust them to work as advertised? The truth is that APIs can fail, and even when they don't fail, they can perform in ways that are less than adequate. When that happens, your application may be left hanging, or worse yet, it may crash. What kind of failures are we talking about, and what can you do about them?

First, though, consider what an API does—It provides a way for a programmer to communicate with an external application or service, and to ask that application to do something. You may or may not know what the other program does internally with your data and your request, but as long as everything works correctly, all you need to know is how to use the API. But that is not enough to ensure that APIs perform adequately.

In this article, we'll look at three common reasons why an API might fail or underperform, and how DevOps engineers can address them. [...]

Read More →

Categories: apis, debugging


3 Easy Steps to Cloud Operational Excellence

3 Easy Steps to Cloud Operational Excellence

By Bruce Wang on .

This is a guest post by Bruce Wang and Glen Semino from SYNQ, a video API built for developers. In this post, they explain the tools and processes they use to keep the company's API operations running smoothly, and share a real-world story of how they found an API bug before launching a new feature.

There are a lot of tools out there, and sometimes its hard to sift through them all. Here’s a simple guide to combine 3 tools, Runscope, PagerDuty and StatusPage to create a powerful cloud operational workflow that will give you peace of mind and clear visibility to your application for your customers and internal teams alike!

In case you’re not familiar with the tools, here’s a quick rundown:

  • Runscope — highly flexible API testing and monitoring service
  • PagerDuty — incident management system
  • StatusPage — Customer-facing API health status page

The workflow

It’s important to implement tools for specific purposes, and we wanted to integrate these 3 tools to help manage our operational process better. In the following examples, we’re going to show you how...

    Read More →

    Categories: apis, community, customers, debugging, howto, integrations, monitoring, tutorial


    Using Google Sheets and Runscope to Run API Tests with Multiple Variable Sets

    By Sam Aybar on .

    We frequently run into users who are looking to run an API test multiple times, using a variety of initial variables. For example, the user might be looking to:

    • Test the same request against a list of user ids, where user_id is the only query string parameter that changes.
    • Test edge cases for an API call. Passing a string to an endpoint that expects an int, or passing special characters to it, and making sure that nothing breaks.
      Share tests and results for multiple variable sets with other teammates for debugging.

    We have been able to accommodate this feature for a long time using our Batch Trigger URLs. With a GET request to a Batch Trigger URL, you can pass in an array of objects to specify initial variables for the test, and kick off up to 50 test runs at one time using different sets of variables.

    But what if you want an easier way to do this than to try to format an API request with a bunch of variables and build a JSON array with the different sets? And how do you match up your responses easily to the different sets of variables? What if we could make this easier?

    Read More →

    Categories: debugging, integrations, testing


    6 Common API Errors

    6 Common API Errors

    By Heitor Tashiro Sergent on .

    Have you ever used an API that returned an HTML error page instead of the JSON you expected, causing your code to blow up? What about receiving a 200 OK status code with a cryptic error message in your response?

    Building an API can be as quick as serving fast food. Frameworks like Express, Flask, and Sinatra combined with Heroku or zeit's now help any developer have an API up and running in a few minutes.

    However, building a truly secure, sturdy, hearty API, can take a little more work, just as a chef takes more time when crafting a great meal. You need great docs, clear and concise error messages, and to meet developers' expectations of...

    Read More →

    Categories: apis, debugging, microservices, monitoring, integrations, testing


    How to Monitor Live Production API Traffic with Runscope Traffic Gateways and Alerts

    By Neil Mansilla on .

    Runscope started off several years back as an API debugging tool that allowed developers to inspect in-flight API traffic and debug integration issues. Even as our product evolved to include comprehensive API testing and performance monitoring, we’ve always stayed true to our original mission of helping our customers not just detect API problems, but also solve them. With our latest release of Live Traffic Alerts, we provide our customers with a new layer for API problem-solving—catching key API transaction errors with live production traffic monitoring. By notifying your team about failed API calls in near real-time, your team can respond and remediate issues quickly.

    Many businesses can be deeply affected by errors or anomalies that occur in production and cannot be simulated with traditional functional monitoring. Some of these scenarios include catching declined credit card payments or...

    Read More →

    Categories: webinar, product, monitoring, howto, debugging


    Introducing Runscope Live Traffic Alerts: Catch Failed & Exceptional API Transactions with Real-Time API Monitoring

    By Neil Mansilla on .

    Even the most well-written software with a comprehensive test suite is susceptible to seemingly random, intermittent failures and exceptions while running in production. If your software relies on or integrates with internal or external web service APIs, the possibility for encountering exceptions is compounded due to many factors beyond your control, such as poor network connectivity or the API itself being broken.

    Many businesses, such as retailers, mobile app developers, media providers, data brokers and infrastructure providers, rely on APIs to meet the demands of their customers across a plethora of platforms—web, mobile and IoT to name a few. Poorly performing APIs have a significant impact on revenue, engagement and other success metrics, yet many of those API transactions occur only in the wild and cannot be simulated. Detecting API call failures and anomalies—like a credit card payment failing—is a vital component to a layered monitoring approach.

    Runscope already offers a suite of tools that allow thousands of DevOps, QA and development teams to proactively monitor the APIs they rely on most. Today, we're excited to announce the addition of real-time API monitoring with Live Traffic Alerts. This unique combination of uptime monitoring and functional testing with real-traffic monitoring gives development teams a complete performance picture into mission-critical APIs throughout the entire API lifecycle. 

    Now Available: Runscope Live Traffic Alerts

    Runscope Live Traffic Alerts logs live API traffic and notifies developers when key API transaction failures and exceptions are detected in near real-time. With Live Traffic Alerts, developers can detect specific API call failures that can only be observed in production, reducing time to resolution and minimizing lost revenue from breakages—all without ever having to write a single line of code.

    These exceptional API calls include:

    • Creating leads in a CRM platform
    • Charging customer credit cards via payment APIs
    • Facilitating marketplace transactions using a supplier's API
    • Registering a new user to a database

    Leveraging Live Traffic Alerts can help you not only discover hard API failures, but also more nuanced issues like intermittent or gradual increases in network performance degradation. Alerts can be configured to inspect and compare values within the response payload. For example, you can set an alert to monitor inventory or sales falling below a certain level.

    Live Traffic Alerts allows you to: 

    • Generate notifications when important API calls fail (e.g. payment APIs)
    • Keep tabs on slow endpoints
    • Verify SLAs
    • Catch erroneous API calls so that you can retry them
    • Create custom performance dashboards
       

    Get Started with Live Traffic Alerts

    Setting up Live Traffic Alerts is simple. Sign in to your Runscope account (sign up here if you do not have an account), and navigate to Alerts at the top of the dashboard. In the animated screenshot below, we're creating an alert that detects failed API calls to our credit card payment provider.

    You can add multiple rules per alert (up to 10). In the example above, we only examined the status code of the API response; however, rules can be based on the following sources of data with various comparison operators:

    • Request (form and URL parameters, headers, body, URL)
    • Response (headers, body, status code, response time, response size)
    • Connection (source IP, destination IP, connection error, service region)
       

    Collecting API Traffic

    Live Traffic Alerts evaluate against all API calls stored in each respective Runscope bucket. API call traffic can be collected in your bucket via the following channels:

    In the next example, we use the Global Traffic Gateway (i.e. Gateway URL) method. For instance, if we wanted to collect and monitor API call traffic between our mobile app and a third-party API, we would just modify the original API's base URL to the transformed Runscope Gateway URL. The network overhead for passing through the Runscope Gateway URL is very low. Runscope leverages intelligent geo-based routing, sending the API call to the Runscope Service Region closest to your client application.

    To generate a Runscope Gateway URL, click on the Create Gateway URL button from the Alerts menu. On the pop-up form, we'll type in the URL of the API we're calling from our app. Below that text field, a Gateway URL will appear, and that is the URL we'll use in our apps to make API calls.

    When we enter a URL, it is transformed into a Runscope Gateway URL. Dots are transformed to dashes. The bucket key (unique identifier for our bucket) is appended along with the Runscope.net domain and path for the request. Using the Gateway URL Helper is not mandatory (you can construct Gateway URLs yourself by following the transformation rules).

    Additionally, there are several language-specific libraries that automatically create or magically route traffic to Runscope Gateway URLs, including Java/Android, C#/.NET, Go, JavaScript, Objective-C/iOS, PHP, Python and Ruby.

    As traffic is flowing into the bucket, when a failed payment API transaction is detected an alert is raised. Each subsequent 504 match will increase the match counter. When we Acknowledge the alert, the name of the acknowledger is logged, and the counter is reset. If we had any notifications configured (e.g. Slack, HipChat, Flowdock), alert notifications are sent on the 1st, 10th, 100th and 1,000th alert.

    Start Monitoring Key API Transactions Today

    We recommend that you begin by monitoring your key transactional APIs—those mission-critical calls that when they fail, can result in lost revenues or require extensive time to remediate (i.e. payments API, new user registrations, important transactional emails, etc.) For clarification, you can use the Global URL Gateway on any cloud accessible API, including third-party platforms—not just the services you own and operate. 

    Runscope Live Traffic Alerts is now available for all Medium and larger accounts, as well as those on the free trial. Sign up for Runscope today to get started using Live Traffic Alerts. If you're currently on a Free or Small plan, contact our Support team for a trial of Alerts. For more information, read the documentation or email help@runscope.com.

    Free Webinar and Live Demo to Learn More

    There is so much you can do with Live Traffic Alerts, and using Alerts in concert with the rest of the Runscope suite of API monitoring and testing tools provides a complete performance picture into your mission-critical APIs throughout the entire lifecycle. Learn more about how you can benefit from a layered monitoring approach that includes both proactive and real-time monitoring in our free live webinar on Thursday, October 29 at 10 a.m. PT. Reserve your spot, and if you can't make it, we'll send you the recording. For an in-depth look at Live Traffic Alerts, join us for a live demo of Live Traffic Alerts on Tuesday, November 3 at 10 a.m. PT.

    Categories: announcements, debugging, monitoring, product


    Everything is going to be 200 OK®