LightningWeb.API.ProjectController (Lightning v2.15.0-pre5)
View SourceAPI controller for project management.
Provides read access to projects for authenticated users and API tokens. Users can list projects they have access to and retrieve individual project details.
Query Parameters (index)
page- Page number (default: 1)page_size- Number of items per page (default: 10)
Examples
GET /api/projects?page=1&page_size=20
GET /api/projects/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
Summary
Functions
Lists all projects accessible to the authenticated user.
Retrieves a specific project by ID.
Functions
@spec index(Plug.Conn.t(), map()) :: Plug.Conn.t()
Lists all projects accessible to the authenticated user.
Returns a paginated list of projects that the current user or API token has access to.
Parameters
conn- The Plug connection struct with the current resource assignedparams- Map of query parameters for pagination
Returns
- Renders JSON with paginated list of projects
Examples
GET /api/projects
GET /api/projects?page=2&page_size=50
@spec show(Plug.Conn.t(), map()) :: Plug.Conn.t()
Retrieves a specific project by ID.
Returns detailed information about a single project if the authenticated user has access to it.
Parameters
conn- The Plug connection struct with the current resource assignedparams- Map containing:id- Project UUID (required)
Returns
200 OKwith project JSON on success404 Not Foundif project doesn't exist403 Forbiddenif user lacks access to the project
Examples
GET /api/projects/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d