API Documentation
RESTful API for the PLE platform. Base URL: /api
Authentication
Authenticate users. Action determined by action field in body.
| Param | Type | Description |
|---|---|---|
| action | string | required register or login |
| string | required User email | |
| password | string | required User password |
| display_name | string | Required for registration |
Returns: { token, user: { id, email, displayName, role } }
Returns the authenticated user's profile. Requires Authorization: Bearer <token> header.
Returns all platform members with contribution stats.
Returns top 20 contributors scored by activity (articles: 10pts, proposals: 5pts, discussions: 3pts, comments: 1pt).
Content
| Param | Type | Description |
|---|---|---|
| status | string | Filter: draft, in_review, approved, published |
| type | string | Filter: article, report, guide, policy_brief |
| projectId | uuid | Filter by project |
| limit | int | Max results (default: 20, max: 100) |
| offset | int | Pagination offset |
Returns full content with tags, comments, version count. Accepts slug or UUID. Increments view count for published items.
| Param | Type | Description |
|---|---|---|
| title | string | required Content title |
| body | string | Markdown body |
| content_type | string | article, report, guide, policy_brief |
| tags | string[] | Array of tag names |
| project_id | uuid | Link to project |
Update title, body, status, tags, visibility, excerpt. Requires id in body. Authors can edit own content; editors/admins can edit any.
Returns version history for a content item: version number, title, change summary, editor, timestamp.
Proposals
| Param | Type | Description |
|---|---|---|
| status | string | draft, open, accepted, rejected, implemented, withdrawn |
| authorId | uuid | Filter by author |
| limit | int | Max results (default: 20) |
| Param | Type | Description |
|---|---|---|
| title | string | required |
| content | string | required Markdown description |
| proposalType | string | required governance, content, project, architecture, community |
| elementId | uuid | Link to architecture element |
| votingEnds | date | Voting deadline |
Discussions
| Param | Type | Description |
|---|---|---|
| type | string | question, idea, feedback, general |
| authorId | uuid | Filter by author |
Body: { title, body, discussion_type }
Projects
Returns all projects with task stats, member counts, and milestone info. Supports limit and offset.
Body: { title, description, status }
Tasks
| Param | Type | Description |
|---|---|---|
| projectId | uuid | Filter by project |
| parent_id | uuid | Get subtasks of a parent task |
| status | string | backlog, todo, in_progress, review, done, blocked |
| assignedTo | uuid|me|unassigned | Filter by assignee |
| milestoneId | uuid | Filter by milestone |
Body: { project_id, title, description, status, priority, assigned_to, parent_task_id, due_date, estimated_hours }
Comments
Query: entity_type (content, task, proposal, discussion, project) + entity_id
Body: { entity_type, entity_id, body, parent_id }. Supports threaded replies via parent_id.
Votes
Body: { proposal_id, vote_type } where vote_type is approve, reject, or abstain. One vote per user per proposal.
RSS Feed
Returns RSS 2.0 XML of the 20 most recent published content items. Content-Type: application/rss+xml. Cached for 1 hour.
Authentication
Endpoints marked with Auth require a Bearer token. Obtain one via POST /api/auth with action: "login", then include Authorization: Bearer <token> in subsequent requests.