Skip to main content
Documentation

API V1 Reference β€” No Authentication

The simplest API version. No login or tokens required β€” perfect for learning the basics of REST API testing.

Base URL

bash
https://api.testauto.app/api/v1

All endpoints listed below are relative to this base URL.

Task Endpoints

GET /tasks

Retrieve a paginated list of tasks with optional filtering and sorting.

Query Parameters

  • page (integer, optional) β€” Page number, 0-indexed. Default: 0
  • size (integer, optional) β€” Items per page. Default: 20, Max: 100
  • status (string, optional) β€” Filter: TODO | IN_PROGRESS | DONE
  • priority (string, optional) β€” Filter: LOW | MEDIUM | HIGH | URGENT
  • search (string, optional) β€” Search in title, description, and labels
  • sort (string, optional) β€” e.g. priority,desc | createdAt,asc | updatedAt,desc

createdAt and updatedAt are generated by the API. Every successful PUT update refreshes updatedAt.

Example

bash
curl "https://api.testauto.app/api/v1/tasks?page=0&size=10&status=TODO&sort=priority,desc"

Response 200 OK

json
{
  "content": [
    {
      "id": 1,
      "title": "Fix login bug",
      "description": "Users unable to login with special characters",
      "status": "TODO",
      "priority": "HIGH",
      "labels": ["backend", "login"],
      "comments": [],
      "createdAt": "2026-02-01T10:30:00Z",
      "updatedAt": "2026-02-01T10:30:00Z"
    }
  ],
  "totalElements": 42,
  "totalPages": 5,
  "currentPage": 0,
  "pageSize": 10
}

GET /tasks/{id}

Retrieve a single task by its ID.

Example

bash
curl "https://api.testauto.app/api/v1/tasks/1"

Response 200 OK

json
{
  "id": 1,
  "title": "Fix login bug",
  "description": "Users unable to login with special characters",
  "status": "TODO",
  "priority": "HIGH",
  "labels": ["backend", "login"],
  "comments": [
    {
      "id": 7,
      "text": "Reproduced in production.",
      "createdAt": "2026-02-01T10:45:00Z",
      "updatedAt": "2026-02-01T10:45:00Z"
    }
  ],
  "createdAt": "2026-02-01T10:30:00Z",
  "updatedAt": "2026-02-01T10:30:00Z"
}

Response 404 Not Found

json
{
  "timestamp": "2026-02-02T14:30:00Z",
  "status": 404,
  "error": "Not Found",
  "message": "Task not found with id: 999",
  "path": "/api/v1/tasks/999"
}

POST /tasks

Create a new task.

Request Body

json
{
  "title": "string (required, 1–200 chars)",
  "description": "string (optional, max 1000 chars)",
  "status": "TODO | IN_PROGRESS | DONE  (optional, default: TODO)",
  "priority": "LOW | MEDIUM | HIGH | URGENT  (optional, default: MEDIUM)",
  "labels": ["optional", "string", "array"]
}

Example

bash
curl -X POST "https://api.testauto.app/api/v1/tasks" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Write API tests",
    "description": "Create comprehensive test suite",
    "status": "TODO",
    "priority": "URGENT",
    "labels": ["api", "reference"]
  }'

Response 201 Created

json
{
  "id": 43,
  "title": "Write API tests",
  "description": "Create comprehensive test suite",
  "status": "TODO",
  "priority": "URGENT",
  "labels": ["api", "reference"],
  "comments": [],
  "createdAt": "2026-02-02T15:00:00Z",
  "updatedAt": "2026-02-02T15:00:00Z"
}

Response 400 Bad Request (validation error)

json
{
  "timestamp": "2026-02-02T15:00:00Z",
  "status": 400,
  "error": "Bad Request",
  "message": "Validation failed",
  "errors": {
    "title": "Title is required and must be between 1 and 200 characters"
  }
}

PUT /tasks/{id}

Replace a task completely. All fields are required. The API preserves createdAt and refreshes updatedAt.

Example

bash
curl -X PUT "https://api.testauto.app/api/v1/tasks/43" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Write API tests",
    "description": "Complete test suite with edge cases",
    "status": "IN_PROGRESS",
    "priority": "HIGH"
  }'

Response 200 OK

json
{
  "id": 43,
  "title": "Write API tests",
  "description": "Complete test suite with edge cases",
  "status": "IN_PROGRESS",
  "priority": "HIGH",
  "labels": ["api", "reference", "updated"],
  "comments": [],
  "createdAt": "2026-02-02T15:00:00Z",
  "updatedAt": "2026-02-02T15:30:00Z"
}

Comment Sub-Resources

Comments are nested under tasks and use a text request field.

POST /tasks/{id}/comments

bash
curl -X POST "https://api.testauto.app/api/v1/tasks/43/comments" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Verified against V1 controller tests"
  }'

PUT /tasks/{id}/comments/{commentId}

bash
curl -X PUT "https://api.testauto.app/api/v1/tasks/43/comments/7" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Verified against V1 and V2 controller tests"
  }'

DELETE /tasks/{id}/comments/{commentId}

bash
curl -X DELETE "https://api.testauto.app/api/v1/tasks/43/comments/7"

DELETE /tasks/{id}

Permanently delete a task.

Example

bash
curl -X DELETE "https://api.testauto.app/api/v1/tasks/43"

Response 204 No Content

Empty body on success.

Response 404 Not Found

json
{
  "status": 404,
  "error": "Not Found",
  "message": "Task not found with id: 43"
}

GET /tasks/summary

Aggregate statistics about all tasks.

Example

bash
curl "https://api.testauto.app/api/v1/tasks/summary"

Response 200 OK

json
{
  "total": 42,
  "byStatus": {
    "TODO": 15,
    "IN_PROGRESS": 12,
    "DONE": 15
  },
  "byPriority": {
    "LOW": 10,
    "MEDIUM": 20,
    "HIGH": 12
  }
}

Data Types & Enums

Status

  • TODO β€” Task not started
  • IN_PROGRESS β€” Currently being worked on
  • DONE β€” Completed

Priority

  • LOW
  • MEDIUM
  • HIGH
  • URGENT

Dates

All timestamps are ISO 8601: YYYY-MM-DDTHH:mm:ssZ. Clients should treat createdAt and updatedAt as read-only fields.

HTTP Status Codes

  • 200 OK β€” Request succeeded
  • 201 Created β€” Resource created
  • 204 No Content β€” Succeeded, no body
  • 400 Bad Request β€” Validation error
  • 404 Not Found β€” Resource does not exist
  • 500 Internal Server Error β€” Server error