Runtime Context Reference

Overview

All backend handlers in Rocketlane receive two arguments:

run: async (r, ctx) => { ... }
  • r – Rocketlane’s SDK object with utility methods
  • ctx – Contextual metadata about the app, user, and installation

r: Rocketlane SDK Utilities

Available in all server-side handlers:

  • r.logger – Basic logging (mimics console.log)
  • r.kv – Key-Value store interface for persisting app-specific or global data
  • r.scheduler – API for registering and deleting scheduled jobs
  • r.installationParams – Values configured during app installation

Refer to the respective pages on:

  1. Key-Value Store
  2. Scheduler API

ctx: Contextual Metadata

Provides context about who or what triggered the function:

  • ctx.account – Info about the account the app is installed in
  • ctx.user – Info about the user who initiated the request
  • ctx.app – Details of the app itself
  • ctx.installation – Full installation object with metadata and config