Repository navigation
Add read-only API endpoints for public projects and expeditions - #568
Merged
Merged
Conversation
Merge development into production
Merge development into production [minor]
Merge development into production [minor]
GET /v1/projects and /v1/expeditions (list and show) return the projects and expeditions shown on the public site, for tokens with the new public:read ability. Lists are paginated (per_page up to 100); expeditions filter by project_uuid and status. The WeDigBio dashboard keeps its own ability list, so a public:read token cannot read it. The API page now documents the new endpoints. Closes #82
21 tasks done
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds read-only API endpoints for the public projects and expeditions, and documents them on the API page. Closes #82.
Endpoints
GET /v1/projectsGET /v1/projects/{uuid}GET /v1/expeditionsGET /v1/expeditions/{uuid}publicProjectIndexQuery()/publicIndexQuery()in the services, without the page cache). Anything else returns 404.per_page(1–100, default 25) andpageon lists;project_uuidandstatus(active/completed) on expeditions. Responses are standard Laravel resource pagination (data,links,meta).links.participateis its Zooniverse classify URL only while it's processing there, as on the public card.ExpeditionResource/ExpeditionCollection, plus newProjectResource/ProjectCollection.PanoptesProjectPresentergets aparticipateUrl()that returns the plain URL.Token ability
public:readability, required by the new routes and added to the v1 group's list.public:read-only token gets 403 there.$user->createToken('name', ['public:read']).API page
front/api-indexnow covers authentication, the rate limit, the endpoints, query parameters and an example response. The Apiary and GitHub buttons are unchanged.Tested locally
tests/Feature/Api: 17 passed (newProjectControllerTest,ExpeditionControllerTest, and a dashboard 403 case inApiAccessTest).tests/Feature/Api,tests/Feature/Front, presenter tests: 297 passed.To verify on development
See #567.