Skip to main content

📋 Table of Contents

  1. Quick Start
  2. Prerequisites
  3. API Overview
  4. Authentication Flow
  5. Step-by-Step Tutorial
  6. Testing Tools
  7. API Reference
  8. Connector Configurations
  9. Common Patterns
  10. 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 the Authorization 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 password

Request

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 environment

Request

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 owner

Request

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 members

5.1: Create Additional Users (Optional)

If you need to invite teammates, first create their accounts:
Response:

5.2: Add Members to Team

Response (204 No Content)

Success! The members have been added to your team.

5.3: List Team Members

Response:

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 nested json_configuration. You can:
  1. Use existing connectors by specifying their IDs
  2. Create new connectors by providing name, type, and config
  3. 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
Targets:
  • KAFKA_TARGET - Apache Kafka
  • ORACLE_TARGET - Oracle database
Jobs:
  • 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 access

Update Pipeline Configuration

💡 Update Patterns

Pattern 1: Update Only Name
Pattern 2: Switch to Existing Connector
Pattern 3: Update Subscription Config

Response (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: draftbuildinglivepaused / error

8.1: Start Pipeline

Response (202 Accepted):
The pipeline transitions through these states:
  1. draft - Initial state, configuration in progress
  2. building - Pipeline is being deployed
  3. live - Pipeline is running and processing data

8.2: Pause Pipeline

Response (202 Accepted):

8.3: Check Pipeline Status

Response (200 OK):

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 management

Option 2: HTTPie (Command Line - User Friendly)

Pros: Simpler syntax, better output Cons: Requires installation

Option 3: Postman (GUI)

Pros: Visual interface, request collections Cons: Requires download
  1. Download Postman
  2. Create a new request
  3. Set method (GET, POST, etc.)
  4. Enter URL: https://your-server/api/pipelines/
  5. Add header: Authorization: Bearer YOUR_TOKEN
  6. Add JSON body for POST/PATCH
  7. 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

Field Descriptions:

KAFKA_TARGET Configuration

Field Descriptions:

ORACLE_TARGET Configuration

Field Descriptions:
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:
  1. Check that you included the Authorization header
  2. Verify the token format: Bearer YOUR_TOKEN
  3. Log in again to get a fresh token

Issue: “403 Forbidden”

Cause: You don’t have permission for this operation Solution:
  1. Verify you’re a member of the team
  2. Check if you have the required role (owner vs member)
  3. Contact the team owner to grant permissions

Issue: “422 Validation Error”

Cause: Request data doesn’t meet validation requirements Solution:
  1. Check the error response for specific field errors
  2. Verify all required fields are provided
  3. Ensure data types match (UUID, string, boolean, etc.)
Example Error Response:
Fix:

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
Valid names:
  • kafka-to-oracle-pipeline
  • user_events_pipeline_v2
  • Pipeline123
Invalid names:
  • pipeline name (contains space)
  • pipeline.name (contains dot)
  • pipeline@name (contains special character)

Issue: Cannot specify both existing and new connector

Cause: You provided both existing_source_id AND source_name/type/config Solution: Choose ONE approach: Option A (Existing):
Option B (New):

Issue: Pipeline stuck in “BUILDING” state

Cause: Deployment failed or is taking longer than expected Solution:
  1. Check pipeline logs via WebSocket
  2. Verify connector configurations are correct
  3. Check infrastructure resources (CPU, memory)

Issue: SSL Certificate Error

Cause: Self-signed certificate or untrusted CA Solution for curl:
Solution for Python:
Solution for HTTPie:

📝 Complete Example Script

Here’s a complete Python script that performs all steps:

🎓 Next Steps

Now that you understand the basics:
  1. Explore the API: Try listing resources, filtering, pagination
  2. Monitor Pipelines: Use logs and status endpoints
  3. Handle Errors: Implement proper error handling
  4. Test Credentials: Use credential check endpoints before creating connectors
  5. Optimize: Reuse connectors, batch operations
  6. 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! 🚀