Volcano API
πŸš€ API Endpoints

⏰ Task Management

Scheduled task and cron job management endpoints. 6 endpoints available.

🎯 Quick Stats

πŸ“Š Methods

  • πŸ” GET: 3 endpoints
  • πŸ“ POST: 1 endpoints
  • ✏️ PUT: 2 endpoints

πŸ” Authentication

All endpoints in this section use the same authentication methods. Choose one:

πŸ”‘ Bearer Token (Recommended)

For user session authentication

Add to request headers:

Authorization: Bearer YOUR_TOKEN

πŸ”§ API Key

For server-side authentication

Add to request headers:

X-API-KEY: YOUR_API_KEY

⚠️ Important: Do not use both authentication methods simultaneously in the same request.

πŸ”— Endpoints Overview

MethodEndpointDescription
πŸ” GET/task/cronNo description
πŸ“ POST/taskCreate a new task
πŸ” GET/taskGet all tasks
πŸ” GET/task/{taskId}No description
✏️ PUT/task/{taskId}/suspendNo description
✏️ PUT/task/{taskId}/resumeNo description

πŸ“– Detailed Documentation

GET /task/cron

GET/task/cron
Full URL
https://api.market.decenctype.com/task/cron

πŸ” Authentication: Required (see authentication section above)

Operation ID: listCronJobs

Response Status:

  • βœ… 200: Success

πŸ“ Example Request

curl -X GET "https://api.market.decenctype.com/task/cron" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

Create a new task

POST/task
Full URL
https://api.market.decenctype.com/task

Description: Create a new task

Operation ID: createTask

Response Status:

  • βœ… 201: Task created successfully

πŸ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "name": "daily-task",
4 "description": "This is a daily task",
5 "cron": "0 0 * * *",
6 "active": true,
7 "payload": {
8 "key": "value"
9 },
10 "maxRetries": 3,
11 "retryDelay": 30000
12}

πŸ“ Example Request

curl -X POST "https://api.market.decenctype.com/task" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{}'

Get all tasks

GET/task
Full URL
https://api.market.decenctype.com/task

πŸ“‹ Query Parameters

ParameterTypeRequiredDescription
currentnumberβœ…No description
pageSizenumberβœ…No description

Description: Get all tasks

Operation ID: getAllTasks

Response Status:

  • βœ… 200: List of tasks

πŸ“‹ Response Examples

response.json
1{
2 "items": [
3 {
4 "id": 1,
5 "name": "η€ΊδΎ‹δ»»εŠ‘",
6 "description": "θΏ™ζ˜―δΈ€δΈͺη€ΊδΎ‹δ»»εŠ‘ζθΏ°",
7 "cron": "0 0 0 * * *",
8 "active": true,
9 "createdAt": "2023-06-29T00:00:00.000Z"
10 }
11 ],
12 "total": 100,
13 "current": 1,
14 "pageSize": 10
15}

πŸ“ Example Request

curl -X GET "https://api.market.decenctype.com/task" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

GET /task/{taskId}

GET/task/{taskId}
Full URL
https://api.market.decenctype.com/task/{taskId}

🎯 Path Parameters

  • taskId (number) - βœ… Required: No description

Operation ID: findOne

Response Status:

  • βœ… 200: Success

πŸ“‹ Response Examples

response.json
1{
2 "id": 1,
3 "name": "daily-task",
4 "description": "This is a daily task",
5 "cron": "0 0 * * *",
6 "active": true,
7 "payload": {
8 "key": "value"
9 },
10 "maxRetries": 3,
11 "retryDelay": 30000
12}

πŸ“ Example Request

curl -X GET "https://api.market.decenctype.com/task/example-id" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

PUT /task/{taskId}/suspend

PUT/task/{taskId}/suspend
Full URL
https://api.market.decenctype.com/task/{taskId}/suspend

🎯 Path Parameters

  • taskId (number) - βœ… Required: No description

Operation ID: suspend

Response Status:

  • βœ… 200: Success

πŸ“ Example Request

curl -X PUT "https://api.market.decenctype.com/task/example-id/suspend" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"

PUT /task/{taskId}/resume

PUT/task/{taskId}/resume
Full URL
https://api.market.decenctype.com/task/{taskId}/resume

🎯 Path Parameters

  • taskId (number) - βœ… Required: No description

Operation ID: resume

Response Status:

  • βœ… 200: Success

πŸ“ Example Request

curl -X PUT "https://api.market.decenctype.com/task/example-id/resume" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json"