Developer

Stages API

List and get project stages via ctx.sdk.stages.

ctx.sdk.stages lists the stages in the workspace and gets a single stage by id. It is a read-only discovery surface.

Scope required: stages:read

Usage

import { defineMethod } from "@rightplace/applet-sdk/v2";

export default defineMethod("loadStages", async (ctx) => {
  const stages = await ctx.sdk.stages.list();
  const stage = await ctx.sdk.stages.get(stages[0].id);
  return { stages, stage };
});

Manifest

Declare the scope in applet.json:

{
  "scopes": ["stages:read"]
}

Notes

  • ctx.sdk.stages.list() returns the stages in the workspace.
  • ctx.sdk.stages.get(stageId) returns a single stage by its id.
  • This surface is read-only. It cannot create, update, or delete stages or their tasks.