Hoverfly Cloud
Visit Our Main SitePricingTry Hoverfly Cloud
  • Introduction
  • Use cases for API Simulation
  • Key concepts
  • What's New
  • Dashboard
  • Simulation
    • Create simulations
    • Configuring Request Matchers
      • JSON Request Matchers on the Body
        • EXACT Matcher
        • JSON Matcher
        • JSON Partial Matcher
        • JSONPath Matcher
        • Regular Expression Matcher
      • Handling the response when Hoverfly cannot match
    • Building a JSON Response
      • Using a JSON object from the Request
      • Looping over a JSON array from the Request
    • Simulating Webhooks and Callbacks
    • Using templating in simulations
      • Render back any part of the Request
      • Render synthetic data
      • Faker functions
      • Render dates and times with offsets
      • Conditional logic
      • Looping over arrays
      • Variables and Arrays
      • Arithmetic operations
      • String operations
      • Validation operations
      • Simulating a persistent backend
      • Transitioning state between requests
      • Combining and nesting templating functions
      • Useful helper functions
      • Avoiding HTML encoding in function return values
    • Using data sources in simulations
      • Querying data sources
      • Updating data in data sources
      • Deleting data from data sources
      • Inserting data into a data source
      • Guidance on using the SQL like syntax
    • Working with Simulation Files
  • Service
    • Start a new service
    • Use a service
    • Update a service
    • Configuring Journal Indexing
  • Command line interface
    • Hoverfly Cloud CLI commands
  • Tutorials
    • Quickstart
    • Creating simulations and services
      • Tutorial 1: Create a service and simulation manually
      • Tutorial 2: Create a service and simulation by importing from a Swagger specification
      • Tutorial 3: Create a service and simulation by capturing real API traffic
    • Response Templating
      • Tutorial 4: Response Templating
    • Hoverfly service modes
      • Tutorial 5: Simulate, Capture, Spy and Passthrough modes
    • Automating with the CLI and API
      • Tutorial 6: Using the CLI and the Hoverfly Cloud API
Powered by GitBook
On this page
  • Enable proxying
  • Add behaviors (for Pro/Enterprise account)
  1. Service

Start a new service

Start a new service in Hoverfly Cloud to create and manage API simulations for testing and development of reliable API interactions.

Starting a service creates a public available HTTP service that simulates an API. Click on “Add” in the Dashboard to start a new service.

You can select a simulation from the dropdown which will be imported when the service starts, and you need to add a label to identify your service from the Dashboard later on.

Click “OK”, and your service should be up and running within a few seconds.

Enable proxying

You can enable proxying when starting a new service. Proxying allows the service to forward requests to a remote destination. You specify the base URL of the remote destination in the Target URL field. You can select one of the following proxy modes:

  • Simulate: simulate API response based on simulation

  • Spy: similar to simulate, but call the real service if a request is not matched

  • Capture: requests will go to the real service and all the interactions will be captured.

  • Passthrough: bypass Hoverfly service, and get response from the real service. This lets you switch from using virtual service to real service without restarting your app with different configurations.

Add behaviors (for Pro/Enterprise account)

A Hoverfly Behavior is a function that intercepts and modifies the API response before it returns to the client. With Behaviors, it is possible to introduce bad responses, latency model and more to mimic real world behavior of an API which is otherwise hard to reproduce.

Currently Hoverfly Cloud supports these predefined Behaviors:

  • Random status code

  • Find and replace

  • Compress response

  • Set response headers

  • Simulate latencies

You can add a Behavior from the (+) sign to the right of the service in the Dashboard.

Click on the toggle next to the Behavior name, for example “Random status code”, select status code you want it to return, and use the slider to change the probability of this status code.

You can add additional entries. Probabilities that total over one will get sampled down. When the probability total is less than one, the left over probability is used for the original status code.

PreviousServiceNextUse a service

Last updated 3 months ago