API
Updates
Inspect available project updates and apply them through the deployment workflow.
Updates compare a project's deployed version with its upstream source. Listing does not redeploy anything. Only projects visible to the caller are included.
Find available updates
const updates = await ship.updates.list({ behindOnly: true });
console.log(updates);curl "$OPENSHIP_URL/api/updates?behind=1" \
-H "Authorization: Bearer $OPENSHIP_TOKEN"The SDK's behindOnly boolean maps to REST's behind=1 filter. Omit it to include projects that are
already current or do not support upstream comparison.
Refresh upstream information
const scan = await ship.updates.scan();
console.log(scan.scanned, scan.supported);curl -X POST "$OPENSHIP_URL/api/updates/scan" \
-H "Authorization: Bearer $OPENSHIP_TOKEN"The scan returns scanned and supported counts. Upstream results are cached; the deployed side is read
from current project state when updates are listed.
Apply an update
const submitted = await ship.updates.apply("proj_123");
console.log(submitted.deployment_id, submitted.project_id);curl -X POST "$OPENSHIP_URL/api/updates/proj_123/apply" \
-H "Authorization: Bearer $OPENSHIP_TOKEN"Applying uses the existing deployment workflow with an update trigger. It returns deployment and project IDs, not proof that the new version is ready. Follow the deployment and handle its final outcome.
Operations
| Operation | SDK | REST API |
|---|---|---|
| List update status; behindOnly filters to available updates. | updates.list(input?) | GET /api/updatesupdates:read |
| Refresh the organization’s update scan. | updates.scan() | POST /api/updates/scanupdates:write |
| Apply an available update to the specified project ID. | updates.apply(id) | POST /api/updates/:projectId/applyproject:write |