Skip to main content

Console APIs

Console APIs are designed for organization management and internal operations. These APIs provide comprehensive functionality for managing teams, platforms, users, and organizational resources within the Weir AI platform.
Use Case: Console APIs are perfect for building internal management tools, organization administration interfaces, and team collaboration platforms.

Authentication

Console APIs use bearer token authentication with the x-source: console header.

User Login

Authenticate with username and password to get access and refresh tokens.

Use Access Token

Include the access token in the Authorization header with x-source: console.

Refresh Token

Use the refresh token to get new access tokens when they expire.

Available Endpoints

Authentication

  • Login: User authentication with username/password
  • Refresh Token: Refresh expired access tokens
  • Logout: Invalidate user session

Team Management

  • Create Team: Create new teams within organization
  • Get Teams: Retrieve organization teams
  • Team Members: Manage team membership

Platform Management

  • Create Platform: Create new platforms
  • Get Platforms: Retrieve organization platforms
  • Platform Settings: Manage platform configurations

User Management

  • User Profile: Manage user profiles and settings
  • Password Management: Update passwords and security
  • User Settings: Configure user preferences

Rate Limits

Console APIs have the following rate limits:

Authentication

  • Login Requests: 5 requests per minute per IP
  • Token Refresh: 20 requests per minute per user
  • Logout Requests: 10 requests per minute per user

API Requests

  • General Endpoints: 200 requests per minute per user
  • Burst Limit: 500 requests per 5-minute window

Common Headers

All Console API requests require these headers:
Authorization
string
required
Bearer token for authentication. Format: Bearer YOUR_ACCESS_TOKEN
x-source
string
required
Source identifier. Must be set to console for all Console API requests.
Content-Type
string
default:"application/json"
Content type for request body. Use application/json for JSON payloads.

Error Handling

Console APIs return standard HTTP status codes and error responses:
Invalid request parameters, missing required fields, or validation errors.
Invalid, expired, or missing access token.
Valid authentication but insufficient permissions for the requested resource.
Requested resource not found or user doesn’t have access to it.
Resource conflict, such as trying to create a duplicate resource.
Rate limit exceeded. Check rate limit headers for retry information.

Best Practices

  • Implement automatic token refresh before expiration
  • Store tokens securely and never expose them in client-side code
  • Handle authentication errors gracefully with proper user feedback
  • Use different tokens for different environments
  • Cache responses when possible to reduce API calls
  • Use pagination for large datasets
  • Implement retry logic with exponential backoff
  • Monitor rate limit headers to avoid hitting limits
  • Implement comprehensive error handling for all API operations
  • Provide clear error messages to users
  • Log errors for debugging without exposing sensitive information
  • Handle network failures and timeouts gracefully
  • Always use HTTPS for all API requests
  • Validate and sanitize all input parameters
  • Implement proper CORS policies for web applications
  • Use secure storage for authentication tokens

Getting Started

User Authentication

Use the login endpoint to authenticate and get access tokens.

Explore Endpoints

Browse the available endpoints based on your use case.

Test Integration

Use the provided examples to test your integration.

Handle Errors

Implement proper error handling and user feedback.

Integration Examples

Pro Tip: Start with the authentication flow to understand token management, then explore the specific endpoints you need for your use case. Use the integration guides for complete implementation examples.