Projects
Ce contenu n’est pas encore disponible dans votre langue.
Overview
Section titled “Overview”The Projects resource provides fake project data with names, descriptions, statuses, budgets, dates, and task associations.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/projects | List all projects |
| GET | /v1/projects/:id | Get a specific project |
| GET | /v1/projects/:id/tasks | Get project's tasks |
Project Object
Section titled “Project Object”{ "id": 1, "organizationId": 1, "name": "Project Alpha", "slug": "project-alpha", "description": "A critical initiative to transform the organization.", "status": "planning", "startDate": "2026-01-01", "endDate": "2026-06-30", "budget": 150000.0, "leadId": 5, "createdAt": "2026-01-15T10:30:00.000Z", "updatedAt": "2026-01-15T10:30:00.000Z"}| Field | Type | Description |
|---|---|---|
id |
number |
Unique identifier |
organizationId |
number |
ID of the parent organization |
name |
string |
Project name |
slug |
string |
URL-friendly unique slug |
description |
string |
Project description |
status |
string |
Project status |
startDate |
string |
Project start date (ISO 8601 date) |
endDate |
string |
Project end date (ISO 8601 date) |
budget |
number |
Project budget |
leadId |
number |
ID of the project lead |
createdAt |
string |
ISO 8601 timestamp |
updatedAt |
string |
ISO 8601 timestamp |
List Projects
Section titled “List Projects”curl https://api.phantomjson.app/v1/projectsQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
page |
number |
1 |
Page number |
limit |
number |
20 |
Items per page (max: 100) |
sort |
string |
— | Sort field and direction |
q |
string |
— | Search query |
fields |
string |
— | Fields to return |
organizationId |
number |
— | Filter by organization ID |
status |
string |
— | Filter by status |
Response
Section titled “Response”{ "data": [ { "id": 1, "organizationId": 1, "name": "Project Alpha", "slug": "project-alpha", "status": "planning" } ], "meta": { "total": 10, "page": 1, "limit": 20, "totalPages": 1 }}Get Project by ID
Section titled “Get Project by ID”curl https://api.phantomjson.app/v1/projects/1Response
Section titled “Response”{ "data": { "id": 1, "organizationId": 1, "name": "Project Alpha", "slug": "project-alpha", "description": "A critical initiative to transform the organization.", "status": "planning", "startDate": "2026-01-01", "endDate": "2026-06-30", "budget": 150000.0, "leadId": 5 }}Get Project’s Tasks
Section titled “Get Project’s Tasks”curl https://api.phantomjson.app/v1/projects/1/tasksResponse
Section titled “Response”{ "data": [ { "id": 1, "projectId": 1, "title": "Design system architecture", "status": "todo", "priority": "high", "assigneeId": 3 } ], "meta": { "total": 25, "page": 1, "limit": 20, "totalPages": 2 }}Examples
Section titled “Examples”Search Projects
Section titled “Search Projects”curl "https://api.phantomjson.app/v1/projects?q=alpha"Filter by Organization
Section titled “Filter by Organization”curl "https://api.phantomjson.app/v1/projects?organizationId=1"Filter by Status
Section titled “Filter by Status”curl "https://api.phantomjson.app/v1/projects?status=in-progress"Field Selection
Section titled “Field Selection”curl "https://api.phantomjson.app/v1/projects?fields=id,name,status,budget"Combined Query
Section titled “Combined Query”# Active projects in organization 1, sorted by namecurl "https://api.phantomjson.app/v1/projects?organizationId=1&status=in-progress&sort=name:asc&fields=id,name,status,startDate"Statuses
Section titled “Statuses”Available project statuses:
planningin-progresson-holdcompletedcancelled
Relations
Section titled “Relations”- Organization — Each project belongs to an organization (
organizationId) - Tasks — Each project has many tasks (access via
/v1/projects/:id/tasks) - Lead — Each project may have a lead (
leadId)
