{"id":22747512,"url":"https://github.com/resurfaceio/insomnia-plugin","last_synced_at":"2025-04-14T11:40:32.459Z","repository":{"id":47665319,"uuid":"357301732","full_name":"resurfaceio/insomnia-plugin","owner":"resurfaceio","description":"Log API calls with Insomnia","archived":false,"fork":false,"pushed_at":"2024-12-02T11:29:26.000Z","size":11777,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T00:45:06.084Z","etag":null,"topics":["insomnia","insomnia-plugin","logger-nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/resurfaceio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-04-12T18:39:44.000Z","updated_at":"2024-12-02T11:29:30.000Z","dependencies_parsed_at":"2024-01-08T15:29:12.418Z","dependency_job_id":"52706d27-a50b-4c39-8e91-743213c3aa2c","html_url":"https://github.com/resurfaceio/insomnia-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Finsomnia-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Finsomnia-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Finsomnia-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resurfaceio%2Finsomnia-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resurfaceio","download_url":"https://codeload.github.com/resurfaceio/insomnia-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248606389,"owners_count":21132349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["insomnia","insomnia-plugin","logger-nodejs"],"created_at":"2024-12-11T03:16:11.294Z","updated_at":"2025-04-14T11:40:32.438Z","avatar_url":"https://github.com/resurfaceio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graylog API Security Insomnia Plugin\nEasily log API requests and responses to your own \u003ca href=\"https://resurface.io\"\u003esecurity data lake\u003c/a\u003e.\n\n[![License](https://img.shields.io/github/license/resurfaceio/insomnia-plugin)](https://github.com/resurfaceio/insomnia-plugin/blob/master/LICENSE)\n[![Contributing](https://img.shields.io/badge/contributions-welcome-green.svg)](https://github.com/resurfaceio/insomnia-plugin/blob/master/CONTRIBUTING.md)\n\n## Requirements\n\n- Kubernetes\n  - we officially support [microk8s](https://ubuntu.com/tutorials/install-a-local-kubernetes-with-microk8s), but\n  - if you have docker desktop, [you also have k8s](https://docs.docker.com/desktop/kubernetes/)!\n- [Graylog API Security](https://resurface.io/installation) -- first node is [free](https://go2.graylog.org/api-security-free)!\n\n## Set up\n\n- Go to *Insomnia \u003e Preferences \u003e Plugins*\n- Type in\n  ```\n  insomnia-plugin-usage-logger\n  ```\n- Click **Install Plugin**.\n\n  \u003cimg src=\"https://github.com/resurfaceio/insomnia-plugin/raw/master/assets/readme/insomnia_install.gif\" width=\"768\" height=\"498\" /\u003e\n\n\n  (Alternatively, check out the [manual installation](#manual-installation).)\n\n- Add the [variables](#environment-variables) used by the logger to your Base Environment (or create a separate new Private/Shared environment for it).\n\n  ```json\n  {\n      \"USAGE_LOGGERS_URL\": \"http://localhost:7701/message\",\n      \"USAGE_LOGGERS_RULES\": \"include debug\"\n  }\n  ```\n\n  \u003cimg src=\"https://github.com/resurfaceio/insomnia-plugin/raw/master/assets/readme/insomnia_environment.gif\" width=\"768\" height=\"498\" /\u003e\n\n\nThat's it!\n\n## Usage\n\n- Make sure the plugin is enabled (also, if you created a new private/shared environment make sure to select it).\n- Use Insomnia as you would normally.\n- Go to `http://localhost:7700` to explore all your logs using the included Graylog API Security web UI\n\n  \u003cimg src=\"https://github.com/resurfaceio/insomnia-plugin/raw/master/assets/readme/insomnia_usage.gif\" width=\"768\" height=\"498\" /\u003e\n\n- You can always disable the plugin if you want stop logging API calls temporarily\n\n  \u003cimg src=\"https://github.com/resurfaceio/insomnia-plugin/raw/master/assets/readme/insomnia_disable.gif\" width=\"768\" height=\"498\" /\u003e\n\nHappy loggin' 📝\n\n## Environment variables\n\nThis plugin has access to four environment variables, but only one them is required for the logger to work properly.\n\n#### ✔ All API calls are sent to the database running inside the `resurface` container\nThe environment variable `USAGE_LOGGERS_URL` stores this address, which by default should be the string `\"http://localhost:7701/message\"`\n#### ✔ All API calls are filtered using a set of rules (Optional)\nThe environment variable `USAGE_LOGGERS_RULES` stores these [logging rules](#protecting-user-privacy) as a string. Even though this variable is optional, it is recommended to set it to `\"include debug\"` or `\"allow_http_url\"` when trying the plugin for the first time.\n#### ✔ Reponse bodies are logged up to a certain size (Optional)\nIf you are working with large response payloads and don't want to log the whole thing, you can use the environment variable `USAGE_LOGGERS_LIMIT`. It stores an integer value corresponding to the number of bytes after which a response body will not be logged (by default, this upper limit is 1 MiB).\n#### ✔ The Logger can be disabled even if the plugin is enabled (Optional)\nBy setting the environment variable `USAGE_LOGGERS_DISABLE` to `true` the logger will be disabled and no API calls will be logged.\n\n## Manual installation\n\n1. Clone this repo inside:\n  - **MacOS**: `~/Library/Application\\ Support/Insomnia/plugins/`\n  - **Windows**: `%APPDATA%\\Insomnia\\plugins\\`\n  - **Linux**: `$XDG_CONFIG_HOME/Insomnia/plugins/ or ~/.config/Insomnia/plugins/`\n\n```\ngit clone git@github.com:resurfaceio/insomnia-plugin.git insomnia-plugin-usage-logger\n```\n\n2. Install dependencies using `npm i`\n\n```\ncd insomnia-plugin-usage-logger\nnpm i --omit=dev\n```\n\n## Protecting User Privacy\n\nLoggers always have an active set of \u003ca href=\"https://resurface.io/logging-rules\"\u003erules\u003c/a\u003e that control what data is logged\nand how sensitive data is masked. All of the examples above apply a predefined set of rules (`include debug`),\nbut logging rules are easily customized to meet the needs of any application.\n\n\u003ca href=\"https://resurface.io/logging-rules\"\u003eLogging rules documentation\u003c/a\u003e\n\n---\n\u003csmall\u003e\u0026copy; 2016-2024 \u003ca href=\"https://resurface.io\"\u003eGraylog, Inc.\u003c/a\u003e\u003c/small\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresurfaceio%2Finsomnia-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresurfaceio%2Finsomnia-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresurfaceio%2Finsomnia-plugin/lists"}