Welcome to the API documentation for our tutorial service. Below you will find detailed information about our API endpoints, usage, and guidelines.
Endpoints
GET /api/tutorials Retrieve a list of available tutorials.
- Parameters:
language
: Filter tutorials by language (e.g., "English", "Chinese").category
: Filter tutorials by category (e.g., "Web Development", "Data Science").
- Parameters:
POST /api/tutorials Create a new tutorial.
- Body:
title
: The title of the tutorial.description
: A brief description of the tutorial.content
: The detailed content of the tutorial.language
: The language in which the tutorial is written.category
: The category to which the tutorial belongs.
- Body:
GET /api/tutorials/{id} Retrieve information about a specific tutorial by its ID.
Usage
To use our API, you will need to send HTTP requests to the appropriate endpoints. Make sure to include the necessary headers, such as Authorization
for authentication.
For more information on how to authenticate and use our API, please visit our Authentication Guide.
Examples
Here are some examples of API requests and responses:
Example 1: Retrieve a list of tutorials
GET /api/tutorials?language=English&category=Web Development
{
"tutorials": [
{
"id": 1,
"title": "Introduction to HTML",
"description": "Learn the basics of HTML in this tutorial.",
"language": "English",
"category": "Web Development"
},
{
"id": 2,
"title": "JavaScript Basics",
"description": "Get started with JavaScript in this tutorial.",
"language": "English",
"category": "Web Development"
}
]
}
Example 2: Create a new tutorial
POST /api/tutorials
Authorization: Bearer <your_token>
Content-Type: application/json
{
"title": "Introduction to CSS",
"description": "Learn the basics of CSS in this tutorial.",
"content": "This is the content of the tutorial...",
"language": "English",
"category": "Web Development"
}
{
"id": 3,
"title": "Introduction to CSS",
"description": "Learn the basics of CSS in this tutorial.",
"language": "English",
"category": "Web Development"
}
Support
If you have any questions or issues with our API, please contact our support team at support@tutorial.com.