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
  • Use an authenticated service
  • View service details and journal
  1. Service

Use a service

Use an authenticated service in Hoverfly Cloud. Requests require an API token (create one on the Account page).

Use an authenticated service

Sending a request to an authenticated service requires an API token. Please create one from the Account page. We would recommend you to export it as an environment variable.

To authenticate your access to the service, an request must contains an authentication header:

curl -H "X-Hoverfly-Authorization: Bearer $HFC_TOKEN" SERVICE_URL

In your project, you may not want to change your code to use Hoverfly Cloud. You can use the Hoverfly Cloud command line tool hcc to handle the authentication, and you can call your Hoverfly Cloud service like a localhost service.

hcc reverse-proxy start --name SERVICE_NAME --api-token $HFC_TOKEN

Once you run the above command, the service would be available on http://localhost:8500

View service details and journal

The journal logs every request and response that Hoverfly Cloud sees so it is useful for troubleshooting, analysis and monitoring. The journal page provides a number of filters to allow you to home in on errors and particular entries.

You can click on the service name to open up the service details page. It gives you information about the service, such as launch time, mode, URL, and target URL etcs.

You can also view the journal which is a request log of the service. A green entry indicates a successful match and a red entry indicates a failed match.

PreviousStart a new serviceNextUpdate a service

Last updated 4 months ago