Skip to main content

Collections

Collections in Sparrow serve a pivotal role in organizing and managing API and WebSocket requests by logically grouping them. This structuring is particularly beneficial for maintaining related requests within a single, accessible location, simplifying the process of navigating and handling various segments of an API or WebSocket.

Often, collections are tailored to specific workflows or scenarios, such as user authentication processes or data retrieval operations. This categorization aids in segmenting work on diverse aspects of an API, enhancing focus and efficiency in development environments.

Sparrow’s collections are designed to support extensive customization and functionality through the use of variables and environments. Variables are instrumental in storing and reusing values across multiple requests within a collection, reducing redundancy and promoting consistency. Environments further extend this capability by allowing the definition of variable sets that are applicable to different stages of deployment—development, testing, and production.

Additionally, collections act as a form of documentation for APIs and WebSockets. They allow developers to annotate requests with descriptions and detailed explanations, thus providing clarity and insight into the purpose and utilization of each endpoint within the collection. This feature is invaluable for teams, ensuring that all members, regardless of when they join a project, can quickly understand and contribute to ongoing development efforts.

collections

Add Collection

Adding a collection in Sparrow is the first step towards organizing your API requests. A collection can include various API requests like GET, PUT, POST, PATCH, DELETE, grouped according to specific workflows or scenarios.

collections

Import Collection

Importing a collection allows you to quickly set up your API testing environment by using existing specifications. Sparrow supports importing collections through the following methods:

  • Text Input: Paste your OpenAPI Specification (OAS) directly into the text area.
  • File Upload: Upload a YAML or JSON file containing the API specifications.
  • Import from Postman: Sparrow also supports importing collections from Postman (version 2.1), ensuring that teams migrating from other platforms can seamlessly transition their existing work.

collections

collections

collections

Create Collection

To initiate a new collection without pre-existing API requests, simply click on “Create Empty Collection” from the Import Collection popup. This action will automatically generate a new, blank collection in your workspace, allowing you to start adding and organizing API requests from scratch.

collections

Add Folder

For better organization, Sparrow allows adding folders within collections. This can be useful for separating different types of API calls or different stages of a workflow:

  • Folders can be named and renamed, deleted to reflect their contents.

collections

collections

Add New Request under Collection

Adding new requests is straightforward:

  • Directly from the collection overview, choose to add new requests which can be customized with headers, parameters, and body data.
  • Set authentication and environment variables directly within the request setup.

collections

Collection Right Click/More Operations

Right-clicking on a collection or using the more options menu provides additional functionalities:

  • Open Collection: Opens the collection details for further editing.
  • Rename Collection: Change the name of the collection to better reflect its purpose.
  • Add Request: Quickly add new API requests to the collection.
  • Add Folder: Create new folders for organizing requests within the collection.
  • Delete: Remove the collection and all its contents when no longer needed.
  • Add New WebSocket: Quickly add a new WebSocket to the collection.

collections

collections