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 thex-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:Bearer token for authentication. Format:
Bearer YOUR_ACCESS_TOKENSource identifier. Must be set to
console for all Console API requests.Content type for request body. Use
application/json for JSON payloads.Error Handling
Console APIs return standard HTTP status codes and error responses:400 Bad Request
400 Bad Request
Invalid request parameters, missing required fields, or validation errors.
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Valid authentication but insufficient permissions for the requested resource.
404 Not Found
404 Not Found
Requested resource not found or user doesn’t have access to it.
409 Conflict
409 Conflict
Resource conflict, such as trying to create a duplicate resource.
429 Too Many Requests
429 Too Many Requests
Rate limit exceeded. Check rate limit headers for retry information.
Best Practices
Token Management
Token Management
- 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
Request Optimization
Request Optimization
- 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
Error Handling
Error Handling
- 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
Security
Security
- 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
Team Management
Build team collaboration tools with role-based access control.
Platform Administration
Create platform management interfaces for organization administration.
User Management
Build user administration systems with profile management.
Console Integration
Complete guide to integrating with Console APIs.