You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
On deploy, update an OpenProcessing curation #1445
Currently, the examples on the p5.js web editor must be manually updated, and this makes new examples not accessible/maintainable.
Most appropriate sub-area of p5.js?
Examples
Feature request details
On deployment of the main branch, using env vars to specify curation and auth, update an OpenProcesing curation via the API to include all the examples
Note that the website should still be the source of truth for examples, because the p5js website has multiple languages and OP currently does not.
Hi! I'm working on this issue for CodeDay. I inspected the OpenProcessing Public API documentation and found the read endpoints for curations (GET /api/curation/{id} and GET /api/curation/{id}/sketches), but I couldn't find any documented write endpoint for updating a curation or adding sketches. Is there a private/internal endpoint or another API that this issue is intended to use?
Hi @Yisakor-Mirany ! Sorry for the delay in answering and the missing info. Although there is no public documentation, the endpoint does exist (and will be publicly documented soon). With thanks to OP developer Sinan who shared the info about it:
/**
* Add a sketch to a curation.
* Endpoint: POST /api/curation/{id}/sketches/{visualID}
* (Routed via routes.php to api/curation_sketch/$1/$2.)
* Mirrors Curation_controller::submit_ajax authorization, dedup, status and
* notification behavior.
*
* @apiPublic
*/
Here is an example test curation I made on my own account and added a sketch to programmatically: https://openprocessing.org/curation/91135 I used POST https://openprocessing.org/api/curation/91135/sketches/2934070 with no payload and with Authentication: Bearer [token] header using my account token. Same URL with DELETE deletes the sketch.
For working on this, please create a text curation where only owner can submit, and put your token into a secret on your fork (never share your tokens!). Curation id should also be a repo-level variable that is different for your fork, rather than hardcoded.
Thats just for adding new sketches (unique by name) or deleting (same structure), you can use GET on curation to determine if anything needs to be added or removed; and you can update sketches with the data.
Importantly here, the logic of the "remix" attribution should be abstracted out, so it is only defined once, but exists in both the example layout and as a comment at the top of the sketch:
It is very important that if these sketches are uploaded to any additional account, that they are always fully correctly attributed (also during testing)! Totally fine to keep markdown to maintain links.
Thanks for working on this, please don't hesitate to @ me here or (for a much faster response) post in the discord.p5js.org #codeday channel!
Hi! I’ve submitted the PR for the OpenProcessing synchronization work. I added the initial sync tooling, API/configuration support, attribution handling, and automated tests. I also tested the synchronization using a dry run to make sure no OpenProcessing sketches were modified unexpectedly.
The PR includes screenshots and test results for reference. I’d appreciate any feedback or suggestions on the implementation, especially regarding the remaining create/update synchronization flow. Thank you!
Activity
ksen0 commentedon Jun 16, 2026
This issue is currently reserved for CodeDay, please do not make PRs. Thanks for your understanding!
Yisakor-Mirany commentedon Jul 11, 2026
I am working on this issue, and I am from CodeDay Labs.
Yisakor-Mirany commentedon Jul 24, 2026
Hi! I'm working on this issue for CodeDay. I inspected the OpenProcessing Public API documentation and found the read endpoints for curations (GET /api/curation/{id} and GET /api/curation/{id}/sketches), but I couldn't find any documented write endpoint for updating a curation or adding sketches. Is there a private/internal endpoint or another API that this issue is intended to use?
ksen0 commentedon Jul 31, 2026
Hi @Yisakor-Mirany ! Sorry for the delay in answering and the missing info. Although there is no public documentation, the endpoint does exist (and will be publicly documented soon). With thanks to OP developer Sinan who shared the info about it:
Here is an example test curation I made on my own account and added a sketch to programmatically: https://openprocessing.org/curation/91135 I used
POST https://openprocessing.org/api/curation/91135/sketches/2934070with no payload and with Authentication: Bearer [token] header using my account token. Same URL withDELETEdeletes the sketch.For working on this, please create a text curation where only owner can submit, and put your token into a secret on your fork (never share your tokens!). Curation id should also be a repo-level variable that is different for your fork, rather than hardcoded.
Thats just for adding new sketches (unique by name) or deleting (same structure), you can use GET on curation to determine if anything needs to be added or removed; and you can update sketches with the data.
Importantly here, the logic of the "remix" attribution should be abstracted out, so it is only defined once, but exists in both the example layout and as a comment at the top of the sketch:
It is very important that if these sketches are uploaded to any additional account, that they are always fully correctly attributed (also during testing)! Totally fine to keep markdown to maintain links.
Thanks for working on this, please don't hesitate to @ me here or (for a much faster response) post in the discord.p5js.org #codeday channel!
Yisakor-Mirany commentedon Aug 16, 2026
Hi! I’ve submitted the PR for the OpenProcessing synchronization work. I added the initial sync tooling, API/configuration support, attribution handling, and automated tests. I also tested the synchronization using a dry run to make sure no OpenProcessing sketches were modified unexpectedly.
The PR includes screenshots and test results for reference. I’d appreciate any feedback or suggestions on the implementation, especially regarding the remaining create/update synchronization flow. Thank you!