API Academy
🌐 English
  • 🌐 English
  • 🌐 繁體中文
HomePetstore APIExplore more APIs
HomePetstore APIExplore more APIs
🌐 English
  • 🌐 English
  • 🌐 繁體中文
🌐 English
  • 🌐 English
  • 🌐 繁體中文
  1. Designing APIs
  • Introduction
  • Table of Contents
  • API Academy
    • Get Started
      • What is an API?
      • How Does an API Work?
      • How to Call an API?
      • How to Read an API Documentation?
      • Chapter Summary
      • Get realtime weather
    • API Fundamentals
      • API Funtamentals: Overview
      • Method & Path
      • Parameters
      • Request Body
      • Responses
      • API Specification & OAS
      • Chapter Summary
    • Working with APIs
      • Working with APIs: Overview
      • Making Requests from Spec
      • Environments and Variables
      • Chaining Multiple Endpoints
      • Handling Authentication
      • Handling API Signatures
      • Introduction to Scripts
      • Chapter Summary
    • Mocking APIs
      • Mocking APIs: Overview
      • Smart Mock
      • Mock Expectations
      • Cloud Mock
      • Mock Scripts
      • Chapter Summary
    • Designing APIs
      • Designing APIs: Overview
      • Introduction to API Design
      • Creating Your First API Project
      • Analyzing Requirements and Planning Your API
      • Designing Data Models
      • Designing Endpoints
      • Using Components and Reusability
      • Setting Up Authentication
      • API Design Guidelines
      • Chapter Summary
    • Developing APIs
      • Developing APIs: Overview
      • Setup: Install Your AI Coding Assistant
      • Quick Start: From Spec to Running API in 30 Minutes
      • Understanding the Generated Code
      • Testing Your API with Apidog
      • Deployment: Put Your API Online
      • Chapter Summary
    • Testing APIs
      • Testing APIs: Overview
      • Getting Started: Your First Test Scenario
      • Integration Testing and Data Passing
      • Dynamic Values
      • Assertions and Validations
      • Flow Control: If, For, ForEach
      • Data-Driven Testing
      • Performance Testing
      • Test Reports and Analysis
      • CI/CD Integration
      • Scheduled Tasks and Automation
      • Advanced Testing Strategies
      • Chapter Summary
    • API Documentations
      • API Documentations: Overview
      • Publishing Your First API Doc
      • Customizing Documentation Appearance
      • Interactive Features for Consumers
      • Advanced Publishing Settings
      • Managing API Versions
      • Chapter Summary
    • Advanced API Technologies
      • API Technologies: Overview
      • GraphQL
      • gRPC
      • WebSocket
      • Socket.IO
      • Server-Sent Events (SSE)
      • SOAP
      • Chapter Summary
    • API Lifecycle
      • API Lifecycle: Overview
      • Stages of the API Lifecycle
      • API Governance
      • API Security Best Practices
      • Monitoring and Analytics
      • API Versioning Strategies
      • The Future of APIs
      • Chapter Summary
    • API Security
      • API Security: Overview
      • API Security Fundamentals
      • Authentication vs Authorization
      • Understanding OAuth 2.0 and OpenID Connect
      • JSON Web Tokens (JWT)
      • OWASP API Security Top 10
      • Encryption and HTTPS
      • Chapter Summary
    • API Tools
      • API Tools: Overview
      • The Evolution of API Tools
      • API Clients
      • Command Line Tools (cURL, HTTPie)
      • API Design and Documentation Tools
      • API Mocking Tools
      • API Testing Tools
      • All-in-One API Platforms
      • Chapter Summary
    • API Gateway
      • API Gateway: Overview
      • What is an API Gateway?
      • Key Features of API Gateways
      • API Gateway vs Load Balancer vs Service Mesh
      • Popular API Gateway Solutions
      • The BFF (Backend for Frontend) Pattern
      • Chapter Summary
  • Modern Pet Store
    • Pet
      • Get Pet
      • Update Pet
      • Delete Pet
      • Create Pet
      • List Pets
      • Upload Pet Image
    • User
      • Update User
      • Get User
      • Delete User
      • Login
      • Logout
      • Create User
    • Store
      • List Inventory
      • Create Order
      • Get Order
      • Delete Order
      • Callback Example
      • Pay for an Order
    • Payments
      • Pay Order
    • Chat
      • Create Chat Completion
    • Webhooks
      • Pet Adopted Event
      • New Pet Available Event
  • Schemas
    • Pet
    • Category
    • User
    • ApiResponse
    • OrderPayment
    • Tag
    • Order
    • Links-Order
    • PetCollection
    • Bank Card
    • Bank Account
    • Links
    • Error
HomePetstore APIExplore more APIs
HomePetstore APIExplore more APIs
🌐 English
  • 🌐 English
  • 🌐 繁體中文
🌐 English
  • 🌐 English
  • 🌐 繁體中文
  1. Designing APIs

Creating Your First API Project

Now that you understand the fundamentals of API design, it's time to set up your workspace. An API project in Apidog is a container that organizes all your API design work, including multiple API modules, tests, and documentation.
Before you start designing endpoints or creating schemas, you need a project to work in. In this chapter, we'll learn how to create a new API project, understand its structure, and organize your API modules. We'll use the Pet Store User module as our example.

1. What Is an API Project?#

An API project in Apidog is a workspace that contains three main sections:

APIs#

Contains one or more modules
Each module corresponds to one OpenAPI Specification (OAS) file
Each module contains:
Endpoints β€” Your API endpoints (GET, POST, PUT, DELETE, etc.)
Schemas β€” Data models for your API
Components β€” Reusable components (parameters, request bodies, responses)

Tests#

Test scenarios and test cases
Automated testing configurations

Documentation#

API documentation pages
Published documentation
Key concept: A project can contain multiple modules. Each module is a separate OAS file, allowing you to organize different APIs or API versions within the same project.

2. Creating a New API Project#

Let's create a new API project for the Pet Store User module.

Step 1: Start Creating#

1.
In the Apidog main window, click the "+ New Project" button at the top right
2.
Select the project type: HTTP (for REST APIs like our User API)
Note: Apidog also supports gRPC projects, but for REST APIs, choose HTTP.

Step 2: Configure Basic Information#

1.
Enter project name: "Pet Store API" (or "Pet Store User API" if you prefer)
2.
Add description (optional): "API for managing user accounts in the Pet Store system"
3.
Including Examples (optional): You can check this to start with sample data, but for our tutorial, we'll start from scratch

Step 3: Complete Creation#

Click "Create" to create your project. Apidog will open the new project, and you'll see an empty project structure.

3. Understanding Modules#

When you create a project, Apidog automatically creates a default module in the APIs section. A module is a container that corresponds to one OpenAPI Specification (OAS) file. Each module contains endpoints, schemas, and components.

Organizing Within a Module#

Within a module, you can organize endpoints and schemas using folders:
1.
In the APIs section, navigate to your module
2.
Right-click (or click the βž• icon) to create folders
3.
Organize your structure like this:
APIs/
  └── Pet Store API Module/
      β”œβ”€β”€ Endpoints/
      β”‚   └── User/
      β”‚       β”œβ”€β”€ User Management/
      β”‚       └── Authentication/
      └── Schemas/
          β”œβ”€β”€ User
          └── UserPreferences
Folder organization:
Endpoints/User/ β€” Contains all User-related endpoints
User Management/ β€” CRUD operations (create, get, update, delete)
Authentication/ β€” Login and logout endpoints
Schemas/ β€” All your schemas (User, UserPreferences, etc.)

Multiple Modules#

You can create multiple modules in one project:
Different API versions (v1, v2)
Different services (User API, Order API, Payment API)
Different environments (Development, Production)
Each module is a separate OAS file, but they're all managed within the same project.

4. Importing Existing APIs (Optional)#

If you already have an OpenAPI/Swagger specification file, you can import it:
1.
Click "Import Project" (or the βž• icon β†’ Import)
2.
Choose the import type: OpenAPI/Swagger
3.
Upload your file or paste the specification URL
4.
Apidog will automatically parse and import:
Endpoints
Schemas
Components
Documentation
Use cases for import:
Migrating existing API documentation to Apidog
Starting from an existing OpenAPI file
Collaborating with teams that already have specifications

5. Key Takeaways#

Creating and configuring an API project is straightforward:
1.
API projects contain three main sections: APIs, Tests, and Documentation
2.
APIs section contains modules, and each module corresponds to one OAS file
3.
Each module contains endpoints, schemas, and components
4.
Create projects from the main window using "+ New Project"
5.
Organize with folders within modules to keep your API structure clear
6.
Multiple modules allow you to manage different APIs or versions in one project

Now that your project is set up, you're ready to start the design process. In the next chapter, we'll learn how to analyze requirements and plan your APIβ€”the crucial step that ensures your API meets real needs.
Let's continue with Analyzing Requirements and Planning Your API.
Modified atΒ 2025-12-25 09:46:45
Previous
Introduction to API Design
Next
Analyzing Requirements and Planning Your API
Built with