📋 Table of Contents
- Quick Start
- Prerequisites
- API Overview
- Authentication Flow
- Step-by-Step Tutorial
- Testing Tools
- API Reference
- Connector Configurations
- Common Patterns
- Troubleshooting
🚀 Quick Start
For the impatient: Here’s the minimum you need to know:✅ Prerequisites
What You Need
- Access to a Popsink server (e.g.,
https://popsink.your-company.com) - A terminal or API client (curl, Postman, HTTPie, etc.)
- 5-15 minutes to complete this guide
Basic Concepts
🔍 API Overview
Base URL Structure
Authentication
All API endpoints (except registration and login) require a Bearer token in theAuthorization header:
Response Format
All responses are in JSON format:HTTP Status Codes
🔐 Authentication Flow
📖 Step-by-Step Tutorial
Step 1: User Registration
What: Create your user account When: First time using the API Required: Email and passwordRequest
Field Descriptions
Response (201 Created)
📝 Save This
Step 2: User Login
What: Authenticate and get your access token When: Before making any authenticated API calls Token Lifetime: Configurable (typically 24 hours)Request
Response (200 OK)
📝 Save This
Using Your Token
From now on, include this header in every request:Step 3: Environment Setup
What: Create a workspace for your teams and pipelines When: After logging in, before creating teams Permissions: Any authenticated user can create an environmentRequest
Field Descriptions
Response (201 Created)
📝 Save This
Step 4: Team Creation
What: Create a team within your environment When: After creating an environment Ownership: The creator automatically becomes a team ownerRequest
Field Descriptions
Response (201 Created)
📝 Save This
Step 5: Team Member Management
What: Add users to your team When: After creating a team Permissions: Only team owners can add members5.1: Create Additional Users (Optional)
If you need to invite teammates, first create their accounts:5.2: Add Members to Team
Response (204 No Content)
Success! The members have been added to your team.5.3: List Team Members
Step 6: Pipeline Creation
What: Create a data pipeline with source and target connectors When: After team setup Permissions: Team members with write access🎯 Understanding Pipeline Structure (V2 - Flattened)
The new API uses a flattened structure instead of nestedjson_configuration. You can:
- Use existing connectors by specifying their IDs
- Create new connectors by providing name, type, and config
- Mix both (e.g., existing source + new target)
Option A: Create Pipeline with New Connectors
Option B: Create Pipeline with Existing Connectors
Pipeline Configuration Fields
Core Fields
Source Connector (Choose ONE approach)
Approach 1: Use Existing Connector
Approach 2: Create New Connector
Target Connector (Choose ONE approach)
Approach 1: Use Existing Connector
Approach 2: Create New Connector
Data Model Configuration (Optional)
Subscription Configuration (Optional)
Mapper Configuration
Each mapper config entry:Response (201 Created)
📝 Save This
🔍 Available Connector Types
Sources:KAFKA_SOURCE- Apache Kafka
KAFKA_TARGET- Apache KafkaORACLE_TARGET- Oracle database
JOB_SMT- Single Message Transform (for data transformations)
Step 7: Pipeline Updates
What: Modify an existing pipeline When: Need to change configuration or settings Permissions: Team members with write accessUpdate Pipeline Configuration
💡 Update Patterns
Pattern 1: Update Only NameResponse (200 OK)
Returns the updated pipeline with all fields.Step 8: Pipeline Control
What: Start, pause, or check pipeline status When: After pipeline creation and configuration States:draft → building → live → paused / error
8.1: Start Pipeline
draft- Initial state, configuration in progressbuilding- Pipeline is being deployedlive- Pipeline is running and processing data
8.2: Pause Pipeline
8.3: Check Pipeline Status
8.4: Get Pipeline Logs (WebSocket)
Pipeline State Diagram
🛠️ Testing Tools
Option 1: cURL (Command Line)
Pros: Available everywhere, scriptable Cons: Verbose, requires manual token managementOption 2: HTTPie (Command Line - User Friendly)
Pros: Simpler syntax, better output Cons: Requires installationOption 3: Postman (GUI)
Pros: Visual interface, request collections Cons: Requires download- Download Postman
- Create a new request
- Set method (GET, POST, etc.)
- Enter URL:
https://your-server/api/pipelines/ - Add header:
Authorization: Bearer YOUR_TOKEN - Add JSON body for POST/PATCH
- Click “Send”
Option 4: Python Script
Pros: Full programming capabilities Cons: Requires Python knowledge📚 API Reference
Authentication Endpoints
User Endpoints
Environment Endpoints
Team Endpoints
Team Member Endpoints
Pipeline Endpoints
Connector Endpoints
Subscription Endpoints
DataModel Endpoints
SMT/Transformation Endpoints
Connector Type Specific Endpoints
Kafka Source
Oracle Target
🔧 Connector Configurations
KAFKA_SOURCE Configuration
KAFKA_TARGET Configuration
ORACLE_TARGET Configuration
Mapper Column Config :
🎯 Common Patterns
Pattern 1: List Resources with Filters
Pattern 2: Pagination
Pattern 3: Error Handling
Pattern 4: Bulk Operations
Pattern 5: Test Connector Credentials Before Creating
🐛 Troubleshooting
Issue: “401 Unauthorized”
Cause: Token is missing, expired, or invalid Solution:- Check that you included the
Authorizationheader - Verify the token format:
Bearer YOUR_TOKEN - Log in again to get a fresh token
Issue: “403 Forbidden”
Cause: You don’t have permission for this operation Solution:- Verify you’re a member of the team
- Check if you have the required role (owner vs member)
- Contact the team owner to grant permissions
Issue: “422 Validation Error”
Cause: Request data doesn’t meet validation requirements Solution:- Check the error response for specific field errors
- Verify all required fields are provided
- Ensure data types match (UUID, string, boolean, etc.)
Issue: Invalid pipeline name
Cause: Pipeline name contains invalid characters Solution: Pipeline names must:- Contain only alphanumeric characters, hyphens (
-), and underscores (_) - Be maximum 255 characters long
- Not be empty
kafka-to-oracle-pipelineuser_events_pipeline_v2Pipeline123
pipeline name(contains space)pipeline.name(contains dot)pipeline@name(contains special character)
Issue: Cannot specify both existing and new connector
Cause: You provided bothexisting_source_id AND source_name/type/config
Solution: Choose ONE approach:
Option A (Existing):
Issue: Pipeline stuck in “BUILDING” state
Cause: Deployment failed or is taking longer than expected Solution:- Check pipeline logs via WebSocket
- Verify connector configurations are correct
- Check infrastructure resources (CPU, memory)
Issue: SSL Certificate Error
Cause: Self-signed certificate or untrusted CA Solution for curl:📝 Complete Example Script
Here’s a complete Python script that performs all steps:🎓 Next Steps
Now that you understand the basics:- Explore the API: Try listing resources, filtering, pagination
- Monitor Pipelines: Use logs and status endpoints
- Handle Errors: Implement proper error handling
- Test Credentials: Use credential check endpoints before creating connectors
- Optimize: Reuse connectors, batch operations
- Automate: Create scripts or CI/CD pipelines
📞 Support
- Documentation: This guide
- API Schema:
https://your-server/api/docs(Swagger UI) - OpenAPI Spec:
https://your-server/api/openapi.json
Happy Data Processing! 🚀