inspector.restDocs

Quickstart

Sign up, create an organization, a project and an environment, copy the ingest key, install an SDK and see your first recorded request in the app.

This takes a few minutes. You need a service that makes outgoing HTTP calls with axios (Node.js) or Guzzle (PHP). Other clients can report through lifecycle events.

  1. Create your account.

    Go to console.inspector.rest and sign up with your name, email address and a password of at least 10 characters. We send a 6-digit code and a link to verify your address. Verification is required before you can create an organization.

  2. Create your organization.

    An organization holds your projects, members and plan. Pick a name and an address. The address becomes part of your URLs and cannot be changed later:

    Apphttps://<org-slug>.inspector.rest
    API (used by the SDKs)https://<org-slug>.api.inspector.rest
  3. Create a project and its environments.

    A project is one service or app. Its environments (for example production, staging and local) keep requests apart, and each environment gets its own ingest key. Requests are kept for 7 days by default; you can change that per environment.

  4. Copy the ingest key.

    The console shows the key of an environment once. It looks like irk_<org-slug>_<secret>. Copy it now. You can create more keys later and revoke old ones. Keep it in the environment of the service, for example as INSPECTOR_REST_KEY.

  5. Install the SDK and instrument your client.

    Terminal
    npm install @inspector-rest/sdk
    JavaScript
    import axios from 'axios';
    import { create_inspector } from '@inspector-rest/sdk';
    import instrument_axios from '@inspector-rest/sdk/axios';
    
    const inspector = create_inspector({
      server_key: process.env.INSPECTOR_REST_KEY, // irk_<org-slug>_<secret>
      service: 'billing',
    });
    
    instrument_axios(axios, inspector); // every axios call is recorded
  6. Make a request and open the app.

    Start your service with the key set and make any outgoing HTTP call. The console waits for the first request and shows it a few seconds later. Choose Open in app to see attempts, headers and bodies.

Next steps