API Reference

Complete API documentation with authentication methods, endpoints, examples, and error handling for 2GC CloudBridge.

Quick Start

API Overview

Base URL

https://api.2gc.ru/v1

All API requests should be made to this base URL

Content Type

application/json

All requests and responses use JSON format

API Categories

Authentication

  • • Login & Logout
  • • API Key Management
  • • Session Management
  • • OAuth Integration
View Authentication API →

Users

  • • User Management
  • • Profile Operations
  • • User Search
  • • Bulk Operations
View Users API →

Organizations

  • • Organization CRUD
  • • Member Management
  • • Settings Configuration
  • • Analytics & Reports
View Organizations API →

Groups

  • • Group Management
  • • Permission Control
  • • Member Assignment
  • • Group Hierarchy
View Groups API →

Relay Servers

  • • Server Management
  • • Connection Testing
  • • Status Monitoring
  • • Configuration
View Relay Servers API →

Analytics

  • • Usage Statistics
  • • Performance Metrics
  • • Custom Reports
  • • Data Export
View Analytics API →

Quick Examples

Authentication

POST /api/auth/login
{
  "email": "user@example.com",
  "password": "your_password"
}

Authenticate with email and password to get an access token.

Get Users

GET /api/users
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

Retrieve a list of users in your organization.

Error Handling

Common Error Codes

400 Bad Request - Invalid parameters
401 Unauthorized - Authentication required
403 Forbidden - Insufficient permissions
404 Not Found - Resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server issue

Error Response Format

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid email format",
    "details": {
      "field": "email",
      "value": "invalid-email"
    }
  }
}

Rate Limiting

1000
Requests per hour
100
Requests per minute
10
Requests per second

Rate Limit Headers

Check the X-RateLimit-* headers in API responses to monitor your rate limit usage.

SDKs & Libraries

🔧

JavaScript

Official Node.js SDK

View Examples →
🐍

Python

Python client library

View Examples →

Java

Java SDK

View Examples →
📱

Mobile

iOS & Android SDKs

View Examples →

Ready to Get Started?