Add an task item
POSThttp://127.0.0.1:8080/task
Add a new task item.
Request
- application/json
Body
required
The task item to add.
body
object
required
Responses
- 201
- 400
- 500
The task item was added successfully.
- application/json
- Schema
- Example (from schema)
Schema
id uint64
Unique identifier of the task item.
{
"id": 1
}
Invalid request payload.
- application/json
- Schema
- Example (from schema)
Schema
error stringrequired
A description of the error that occurred.
details string
Additional details about the error, specifying which component failed.
code integerrequired
The error code.
{
"error": "Failed to retrieve system status.",
"details": "Failed to get hostname due to network timeout.",
"code": 500
}
Error adding task item.
- application/json
- Schema
- Example (from schema)
Schema
error stringrequired
A description of the error that occurred.
details string
Additional details about the error, specifying which component failed.
code integerrequired
The error code.
{
"error": "Failed to retrieve system status.",
"details": "Failed to get hostname due to network timeout.",
"code": 500
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'http://127.0.0.1:8080/task' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"body": {
"type": "dns",
"data": {}
}
}'
ResponseClear