bruno-endpoint-creation

Create Bruno REST API endpoints with .bru files, authentication, and scripts.

35|1|Updated Nov 6, 2011
One-click install
npx skills add https://github.com/steveclarke/dotfiles --skill bruno-endpoint-creation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bruno-endpoint-creation
Source: https://github.com/steveclarke/dotfiles/tree/main/ai/skills/bruno-endpoint-creation
Command: npx skills add https://github.com/steveclarke/dotfiles --skill bruno-endpoint-creation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides API endpoint creation for Bruno, covering authentication, request/response patterns, and testing.

Core Features & Use Cases

  • Environment & Auth Configuration: Show how to set up development and prod environments and auth.
  • RESTful Endpoint Structure: Standard CRUD routes.
  • Request Configuration: Standard request templates, payloads, and parameters.
  • Response Handling & Scripts: Extract data with post-response scripts and manage variables.
  • Error Handling & Validation: Expected statuses and validation.

Quick Start

Create a basic Bruno GET endpoint for listing resources and test it.

Frequently Asked Questions about bruno-endpoint-creation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create REST API endpoints in Bruno?

Create REST API endpoints in Bruno by defining HTTP methods, URLs, and request bodies in .bru files organized within collections. Bruno provides a structured format for configuring each endpoint with authentication, headers, and scripts to handle requests and responses efficiently.

How do I set up authentication for Bruno API endpoints?

Set up authentication for Bruno endpoints by configuring collection-level or endpoint-level auth settings. Bruno supports multiple auth schemes; configure credentials once at the collection level to apply across endpoints, reducing duplication and inconsistencies across your REST API tests.

Can I automate testing and validation for my Bruno REST endpoints?

Automate testing by writing pre-request and post-request scripts in Bruno endpoints to validate responses, extract data, and manage variables. Bruno executes scripts automatically, enabling dynamic testing workflows and comprehensive error handling across your endpoint collection.

How do I organize Bruno collections for development and production environments?

Organize Bruno collections by separating development and production environments at the collection level, then configure environment-specific variables and endpoints. Bruno applies the active environment to all requests, ensuring consistent endpoint behavior across deployment stages without manual reconfiguration.

What's the best way to structure CRUD endpoints in Bruno?

Structure CRUD endpoints in Bruno by creating separate requests for Create, Read, Update, and Delete operations with appropriate HTTP methods (POST, GET, PATCH, DELETE) and request templates. Organize these logically within collection folders to maintain consistency and simplify bulk testing of your REST API.

How do I handle errors and validate responses in Bruno endpoint testing?

Handle errors in Bruno by configuring expected HTTP status codes for each endpoint and writing post-request validation scripts. Bruno lets you assert response structure, extract error details, and conditionally fail tests, enabling comprehensive error handling and validation across your API endpoints.