OasisWManual 한국어
Section 12. Appendix: REST API Reference Pending 1

Endpoint reference

This page lists the REST API endpoints by resource. Append every path to https://oasisw.ai and put the token in the header (REST API overview, authentication, and limits). The value in parentheses is the rate-limit tier.

Apps (published builds)

Method and pathDescriptionTested
GET /api/rest/apps/:idOne published app (normal)200. :id is the build ID from the per-build URL /b/<build ID>/
GET /api/rest/projects/:projectId/appThe project's primary app (normal)200. Returned the primary build
GET /api/rest/projects/:projectId/appsThe project's published apps. Paginated (normal)200. Returned 2 published builds; the download build was not included. Each item has name, version, url (the per-build URL), views, size, and more

Assets

Method and pathDescriptionTested
GET /api/rest/projects/:projectId/assetsAsset list. ?skip=&limit= (default 16, max 100000); the total count is in pagination.total (normal)200. Confirmed the default limit of 16
GET /api/rest/assets/:assetIdOne asset. Doesn't include the file contents (normal)200
GET /api/rest/assets/:assetId/file/:filenameThe asset file's contents (normal)200. A Korean file name (체커.png, "checker.png") also downloaded when URL-encoded
POST /api/rest/assetsCreate an asset. multipart/form-data with name, projectId, file (required) and branchId, parent, preload. Accepts only script, html, css, text, shader, and json (determined by file extension) (assets)
PUT /api/rest/assets/:assetIdReplace an asset file. file in multipart/form-data. Text types only (assets)200. Returned the updated asset's information
DELETE /api/rest/assets/:assetIdDelete an asset. If it's a folder, its contents are deleted too. This can't be undone (normal)

Branches and checkpoints

Method and pathDescriptionTested
GET /api/rest/projects/:projectId/branchesList of open branches (by name). Continue with ?skip=<branch id>, and check pagination.hasMore to see whether more remain (normal)200. Only main. The branch ID of main was the same as the project ID, and latestCheckpointId was included
POST /api/rest/branchesJSON {projectId, name, sourceBranchId, sourceCheckpointId?}. Creates a new branch from the source checkpoint (or, if omitted, that branch's latest one) (normal)
GET /api/rest/branches/:branchId/checkpointsCheckpoint list, newest first. ?limit= (max 50)&skip=<checkpoint id> (normal)200. Items have id, user, createdAt, description
GET /api/rest/checkpoints/:idOne checkpoint (normal)200
POST /api/rest/checkpointsJSON {projectId, branchId, description}. Returns a job. According to the API docs, it finishes immediately and comes back in the complete state, with the checkpoint in data (normal)201. Returned a job with status complete and data.type checkpoint_create

Scenes and jobs

Method and pathDescriptionTested
GET /api/rest/projects/:projectId/scenesScene list. Uses the default branch if you don't pass ?branchId= (normal)200. Items have id, name, created, modified
GET /api/rest/jobs/:idJob status: running, complete, error (normal)200. The checkpoint job above was complete
GET /api/rest/ratelimitsPer-minute limit for each tier200. Responded even without a token

Example: replace a script file

curl -X PUT \
  -H "Authorization: Bearer $OASISW_TOKEN" \
  -F "file=@playHit.js" \
  "https://oasisw.ai/api/rest/assets/<asset ID>"

The asset ID is in the ID field at the top of the right panel when you select the asset in the editor. In our test, with the editor open, we used PUT to append a one-line comment to the end of a script. When we then selected that script in the editor's ASSETS, the updated contents appeared in the CODE section on the right without reloading, and Size had increased (1 run). We reverted it by uploading the original contents the same way.

Next steps

Source rest-api/rest-endpoints.html