rocket_stack_sdk

RocketStackSdk - the Ruby gem for the Rocketstack API

API for Functions, Queues, KV, Storage, Cron, and Scheduler.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.3
  • Package version: 1.0.3
  • Generator version: 7.19.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build rocket_stack_sdk.gemspec

Then either install the gem locally:

gem install ./rocket_stack_sdk-1.0.3.gem

(for development, run gem install --dev ./rocket_stack_sdk-1.0.3.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'rocket_stack_sdk', '~> 1.0.3'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'rocket_stack_sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'rocket_stack_sdk'

# Setup authorization
RocketStackSdk.configure do |config|
  # Configure Bearer authorization (JWT): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = RocketStackSdk::CronApi.new
create_cron_job_request = RocketStackSdk::CreateCronJobRequest.new({name: 'name_example', schedule: RocketStackSdk::CreateCronJobRequestSchedule.new({expression: 'expression_example'}), delivery_target: RocketStackSdk::CreateCronJobRequestDeliveryTarget.new({type: 'function'})}) # CreateCronJobRequest | 

begin
  #Create a new cron job
  result = api_instance.create_cron_job(create_cron_job_request)
  p result
rescue RocketStackSdk::ApiError => e
  puts "Exception when calling CronApi->create_cron_job: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.rocketstack.dev

Class Method HTTP request Description
RocketStackSdk::CronApi create_cron_job POST /cron Create a new cron job
RocketStackSdk::CronApi delete_cron_job DELETE /cron/id Delete a cron job
RocketStackSdk::CronApi get_cron_job GET /cron/id Get a cron job by ID
RocketStackSdk::CronApi list_cron_jobs GET /cron List cron jobs
RocketStackSdk::CronApi update_cron_job PATCH /cron/id Update a cron job
RocketStackSdk::FunctionsApi create_function POST /functions Create a new function
RocketStackSdk::FunctionsApi get_function GET /functions/id Get a function by ID
RocketStackSdk::FunctionsApi invoke_function POST /functions/id/invoke Invoke a function
RocketStackSdk::FunctionsApi list_functions GET /functions List functions
RocketStackSdk::FunctionsApi update_function PATCH /functions/id Update function settings
RocketStackSdk::FunctionsApi update_function_code POST /functions/id/code Update function code
RocketStackSdk::KvApi delete_kv_item DELETE /kv/items/key Delete a KV item
RocketStackSdk::KvApi get_kv_item GET /kv/items/key Get a KV item by key
RocketStackSdk::KvApi list_kv_items GET /kv/items List KV items
RocketStackSdk::KvApi put_kv_item PUT /kv/items/key Create or update a KV item
RocketStackSdk::QueuesApi create_queue POST /queues Create a new queue
RocketStackSdk::QueuesApi delete_queue DELETE /queues/id Delete a queue
RocketStackSdk::QueuesApi enqueue_message POST /queues/id/messages Enqueue a message
RocketStackSdk::QueuesApi get_message_status GET /queues/id/messages/messageId Get message status
RocketStackSdk::QueuesApi get_queue GET /queues/id Get a queue by ID
RocketStackSdk::QueuesApi list_queues GET /queues List queues
RocketStackSdk::QueuesApi update_queue PATCH /queues/id Update a queue
RocketStackSdk::ResourcesApi get_template GET /resources/templates/id Get a template by id
RocketStackSdk::ResourcesApi list_capabilities GET /resources/capabilities List app-generation capabilities
RocketStackSdk::ResourcesApi list_snippets GET /resources/snippets List code snippets
RocketStackSdk::ResourcesApi list_templates GET /resources/templates List app templates
RocketStackSdk::SchedulerApi cancel_schedule POST /schedules/id/cancel Cancel a schedule
RocketStackSdk::SchedulerApi create_schedule POST /schedules Create a new one-off schedule
RocketStackSdk::SchedulerApi delete_schedule DELETE /schedules/id Delete a schedule
RocketStackSdk::SchedulerApi get_schedule GET /schedules/id Get a schedule by ID
RocketStackSdk::SchedulerApi get_schedule_status GET /schedules/id/status Get schedule execution status
RocketStackSdk::SchedulerApi list_schedules GET /schedules List schedules
RocketStackSdk::SchedulerApi update_schedule PATCH /schedules/id Update a schedule
RocketStackSdk::StorageApi create_download_url POST /storage/download-url Create a presigned download URL
RocketStackSdk::StorageApi delete_storage_object DELETE /storage/objects Delete a storage object
RocketStackSdk::StorageApi finalize_upload POST /storage/finalize Finalize an upload
RocketStackSdk::StorageApi get_public_object GET /storage/public/objects/tenantId/wildcard Get a public object
RocketStackSdk::StorageApi list_storage_objects GET /storage/objects List storage objects
RocketStackSdk::StorageApi upload_object POST /storage/objects Upload an object

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)