Skip to main content

Skillprint API Documentation

This documentation covers the available endpoints in the Skillprint API, providing examples and usage guidelines for each endpoint.

Authentication

All endpoints require authentication using either a User Token or Partner API Key. See the Authentication Guide for more details.

Base URL

https://api.staging.skillprint.co/api/

Endpoints

Game Chunk Analysis

Endpoints for retrieving and analyzing gameplay chunks.

GET /api/chunks/

Retrieves gameplay analysis chunks for the authenticated user.

Parameters:

  • None

Response:

{
"count": 10,
"next": "http://api.staging.skillprint.co/api/chunks/?page=2",
"previous": null,
"results": [
{
"id": "123",
"session": "abc-123",
"timestamp": "2024-01-07T12:00:00Z",
"images": ["image1.jpg", "image2.jpg"],
"video": null,
"skill_llm_output": {
"pattern-matching": 0.85,
"attention": 0.76,
"memory": 0.92,
"planning": 0.81,
"task-switching": 0.79,
"math": 0.88,
"deduction": 0.82,
"visualization": 0.90,
"verbal": 0.77,
"timing": 0.85,
"perceptual-speed": 0.89,
"knowledge": 0.78,
"action": 0.86,
"spatial": 0.91
},
"flow_llm_output": {
"flow_score": 0.88,
"confidence": 0.95,
"target_mood": "focus",
"stability": 0.87,
"progression": [
{
"timestamp": "2024-01-07T12:00:00Z",
"score": 0.88,
"confidence": 0.95
}
]
}
}
]
}

Skill Profile Management

Endpoints for managing user skill profiles and progression.

GET /api/profiles/

Retrieves the SkillPrint profile for the authenticated user.

Parameters:

  • None

Response:

{
"id": "456",
"total_sessions": 25,
"total_time_played": "PT15H30M",
"avg_flow_score": 0.82,
"flow_score_history": [
{
"timestamp": "2024-01-07T10:00:00Z",
"score": 0.85,
"confidence": 0.9,
"target_mood": "focus"
},
{
"timestamp": "2024-01-07T11:00:00Z",
"score": 0.87,
"confidence": 0.92,
"target_mood": "creativity"
}
],
"flow_confidence": 0.88,
"state_distributions": {
"focus": {
"frequency": 0.45,
"avg_score": 0.86,
"peak_score": 0.92
},
"creativity": {
"frequency": 0.35,
"avg_score": 0.83,
"peak_score": 0.89
},
"relax": {
"frequency": 0.20,
"avg_score": 0.81,
"peak_score": 0.85
}
},
"skill_histories": [
{
"skill": "pattern-matching",
"current_level": 0.78,
"percentile_rank": 85,
"confidence_score": 0.92,
"level_history": [
{
"timestamp": "2024-01-07T10:00:00Z",
"level": 0.75,
"confidence": 0.89
},
{
"timestamp": "2024-01-07T11:00:00Z",
"level": 0.78,
"confidence": 0.92
}
],
"improvement_rate": 0.015,
"peak_performance": 0.82,
"consistency_score": 0.88
}
]
}

GET /api/profiles/{profile_id}/skill-progression/{skill_type}/

Retrieves detailed progression data for a specific skill.

Parameters:

  • profile_id (path): ID of the user's profile
  • skill_type (path): Type of skill (e.g., "pattern-matching", "attention")

Response:

{
"current_level": 0.85,
"percentile": 92,
"confidence": 0.88,
"improvement_rate": 0.023,
"peak_performance": 0.91,
"consistency": 0.87,
"progression": [
{
"timestamp": "2024-01-07T10:00:00Z",
"level": 0.82,
"confidence": 0.85,
"session_metrics": {
"accuracy": 0.88,
"speed": 0.84,
"complexity_handled": 0.81
}
},
{
"timestamp": "2024-01-07T11:00:00Z",
"level": 0.85,
"confidence": 0.88,
"session_metrics": {
"accuracy": 0.90,
"speed": 0.86,
"complexity_handled": 0.83
}
}
],
"detailed_metrics": {
"last_session": {
"duration": "PT45M",
"challenges_completed": 12,
"accuracy_trend": 0.03,
"speed_improvement": 0.02
},
"historical_analysis": {
"common_patterns": ["quick_learning", "consistent_improvement"],
"areas_of_strength": ["pattern_recognition", "quick_decisions"],
"areas_for_improvement": ["complex_scenarios"]
}
}
}

GET /api/profiles/{profile_id}/flow-analysis/

Retrieves flow state analysis for a user's profile.

Parameters:

  • profile_id (path): ID of the user's profile

Response:

{
"average_score": 0.82,
"confidence": 0.88,
"history": [
{
"timestamp": "2024-01-07T10:00:00Z",
"score": 0.85,
"confidence": 0.9,
"target_mood": "focus",
"session_metrics": {
"attention_focus": 0.87,
"cognitive_load": 0.82,
"emotional_valence": 0.78,
"arousal_level": 0.85
}
}
],
"distributions": {
"focus": {
"frequency": 0.45,
"avg_score": 0.86,
"peak_score": 0.92,
"typical_duration": "PT45M",
"optimal_conditions": {
"time_of_day": "morning",
"session_length": "PT30M",
"difficulty_level": "challenging"
}
},
"creativity": {
"frequency": 0.35,
"avg_score": 0.83,
"peak_score": 0.89,
"typical_duration": "PT60M",
"optimal_conditions": {
"time_of_day": "evening",
"session_length": "PT45M",
"difficulty_level": "moderate"
}
}
}
}

Skill Analysis

GET /api/skills/

Retrieves skill aggregates for the authenticated user.

Parameters:

  • None

Response:

{
"count": 5,
"results": [
{
"skill": "pattern-matching",
"current_level": 0.85,
"percentile_rank": 92,
"confidence_score": 0.88,
"historical_data": {
"scores": [0.82, 0.84, 0.85],
"timestamps": [
"2024-01-05T10:00:00Z",
"2024-01-06T11:00:00Z",
"2024-01-07T09:00:00Z"
],
"confidence_levels": [0.85, 0.87, 0.88],
"session_details": [
{
"id": "session-123",
"duration": "PT30M",
"difficulty_level": "intermediate",
"completion_rate": 0.95
}
]
}
}
]
}

GET /api/skills/leaderboard/{skill_type}/

Retrieves leaderboard data for a specific skill type.

Parameters:

  • skill_type (path): Type of skill
  • limit (query, optional): Number of results to return (default: 10)

Response:

{
"skill_type": "pattern-matching",
"total_ranked_users": 1000,
"leaderboard": [
{
"rank": 1,
"username": "player1",
"current_level": 0.95,
"percentile_rank": 99,
"confidence_score": 0.92,
"achievements": [
"pattern_master",
"quick_solver"
],
"stats": {
"total_sessions": 150,
"total_time": "PT100H",
"highest_streak": 15
}
}
],
"user_ranking": {
"rank": 45,
"percentile": 95,
"next_milestone": "top_50"
}
}

GET /api/skills/distribution/{skill_type}/

Retrieves the distribution of skill levels across all users.

Parameters:

  • skill_type (path): Type of skill

Response:

{
"skill_type": "pattern-matching",
"distribution_stats": {
"mean": 0.75,
"std": 0.15,
"quartiles": [0.65, 0.75, 0.85],
"percentiles": {
"90": 0.88,
"95": 0.92,
"99": 0.96
}
},
"level_brackets": [
{
"range": [0.0, 0.2],
"user_count": 50,
"percentage": 5
},
{
"range": [0.2, 0.4],
"user_count": 150,
"percentage": 15
},
{
"range": [0.4, 0.6],
"user_count": 400,
"percentage": 40
},
{
"range": [0.6, 0.8],
"user_count": 300,
"percentage": 30
},
{
"range": [0.8, 1.0],
"user_count": 100,
"percentage": 10
}
],
"total_users": 1000,
"active_users_last_30_days": 850
}

Code Examples

Python Example using requests

import requests

def get_skill_progression(token, profile_id, skill_type):
headers = {
'X-Auth-Token': f'Token {token}',
'Content-Type': 'application/json'
}

url = f'https://api.staging.skillprint.co/api/profiles/{profile_id}/skill-progression/{skill_type}/'

response = requests.get(url, headers=headers)
return response.json()

# Usage
token = 'your-auth-token'
profile_id = '123'
skill_type = 'pattern-matching'
progression = get_skill_progression(token, profile_id, skill_type)

JavaScript Example using fetch

async function getFlowAnalysis(token, profileId) {
const headers = {
'X-Auth-Token': `Token ${token}`,
'Content-Type': 'application/json'
};

const url = `https://api.staging.skillprint.co/api/profiles/${profileId}/flow-analysis/`;

const response = await fetch(url, {
method: 'GET',
headers: headers
});

return await response.json();
}

// Usage
const token = 'your-auth-token';
const profileId = '123';
getFlowAnalysis(token, profileId)
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Authentication Guide

All endpoints require authentication using one of the following methods:

  1. User Token Authentication:

    • Include token in X-Auth-Token header
    • Format: Token <your_token> or <your_token>
  2. Partner API Key Authentication:

    • Include API key in Authorization header
    • Format: Api-Key <your_key>