Overview
This tutorial will walk you through making your first API call to the Symtrain Public APIs. By the end, you'll understand how to authenticate, make requests, and handle responses.
Duration: 10 minutes
Level: Beginner
Prerequisites
Before you begin, ensure you have:
- ✅ An API key (contact [email protected] if you don't have one)
- ✅ A tool for making HTTP requests (cURL, Postman, or your programming language of choice)
- ✅ Your organization ID
Step 1: Test Authentication
Let's verify your API key works by making a simple request.
cURL Example:
Code
Expected Response (200 OK):
Code
Common Errors:
401 Unauthorized: Check your API key400 Bad Request: Verify your organizationId and JSON format
Step 2: Understanding Rate Limits
The Symtrain API allows 100 requests per 5-minute window per IP address.
Handling Rate Limits:
Code
Step 3: Making Your First Meaningful Request
Let's get a user results report for the last 30 days.
Request:
Code
Response Structure:
Code
Step 4: Error Handling
Always implement proper error handling:
JavaScript Example:
Code
Testing Your Implementation
Use this checklist to verify your setup:
- Authentication works (receive 200 response)
- Can retrieve simulation library
- Can generate a report
- Error handling catches 400/401/429 errors
- Rate limits are respected
Next Steps
Now that you've made your first API call, explore:
- Generate Your First Report - Learn about different report types
- Bulk User Import - Import multiple users at once
- Best Practices - Optimize your API usage
Common Questions
Q: How do I get an API key?
A: Contact [email protected] with your organization details.
Q: What's the API response time?
A: Typical response times are 200-500ms for most endpoints.
← Back to Tutorials | Next: First Report →