API Reference
omegaUp provides a comprehensive REST API that can be accessed directly. All endpoints use standard HTTP methods (GET or POST) and return JSON responses.
Base URL
All API endpoints are prefixed with:
https://omegaup.com/api/
In this documentation, only the part of the URL after this prefix is shown.
Authentication
HTTPS Required
Only HTTPS connections are allowed. HTTP requests will return HTTP 301 Permanent Redirect.
Some endpoints are public and require no authentication. Protected endpoints require authentication via an auth_token obtained from the user/login endpoint.
The token must be included in a cookie named ouat (omegaUp Auth Token) for authenticated requests.
Single Session
omegaUp supports only one active session at a time. Logging in programmatically will invalidate your browser session, and vice versa.
API Categories
-
Create, manage, and participate in programming contests.
-
Create, update, and manage programming problems.
-
User management, authentication, and profile operations.
-
Submit code, check status, and retrieve submission results.
-
Ask and answer questions during contests.
Quick Example
Get the current server time (public endpoint):
curl https://omegaup.com/api/time/get/
Response:
{
"time": 1436577101,
"status": "ok"
}
Response Format
All API responses follow a consistent format:
{
"status": "ok",
"data": { ... }
}
Error responses:
{
"status": "error",
"error": "Error message",
"errorcode": 400
}
Rate Limiting
Some endpoints have rate limits to prevent abuse:
- Submissions: One submission per problem every 60 seconds
- API Calls: Varies by endpoint
Rate limit exceeded responses include:
{
"status": "error",
"error": "Rate limit exceeded",
"errorcode": 429
}
Related Documentation
- Authentication Guide - Detailed authentication flow
- Architecture Overview - System architecture
- Development Guides - Using the API in development
Ready to use the API? Start with Authentication or browse the API categories above.