steedos-object-functions

Define Steedos object functions in .function.yml and expose them as REST endpoints.

1.6k|413|Updated Mar 4, 2019
One-click install
npx skills add https://github.com/steedos/steedos-platform --skill steedos-object-functions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: steedos-object-functions
Source: https://github.com/steedos/steedos-platform/tree/main/skills/steedos-object-functions
Command: npx skills add https://github.com/steedos/steedos-platform --skill steedos-object-functions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Define server-side Steedos object functions and expose them as REST endpoints.

Core Features & Use Cases

  • REST-exposed server-side functions: Define .function.yml files and expose them at POST /api/v6/functions/{objectApiName}/{functionApiName} for integration with UI buttons, triggers, or external systems.
  • Context-aware scripting: Access ctx.input, ctx.params, and objects.* APIs to validate and modify data with robust error handling.
  • Button/Trigger integrations: Call functions from amis buttons or automation triggers, enabling seamless business logic execution across the platform.
  • Real-world example: A sales function validates a quote, updates the status, and triggers downstream workflows when called from a button.

Quick Start

Create a new .function.yml for an object and expose it via the REST API, then call it from a button or trigger.

Frequently Asked Questions about steedos-object-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose Steedos server-side object functions as REST API endpoints?

To expose Steedos server-side object functions as REST API endpoints, define your logic in a .function.yml file, which automatically creates a POST endpoint at /api/v6/functions/{objectApiName}/{functionApiName} for external integrations.

How do I access input data and perform object operations inside Steedos object functions?

Inside Steedos object functions, you access input data and perform object operations using the ctx-based scripting context, specifically utilizing ctx.input, ctx.params, and the objects.* APIs for structured data validation and modification.

Can I trigger Steedos object functions from UI buttons and automation triggers?

Yes, you can trigger Steedos object functions from amis UI buttons and automation triggers, enabling seamless execution of business logic like validating quotes or updating statuses directly across the platform.

What is the best way to execute business logic across UI buttons and external systems in Steedos?

The best way to execute shared business logic in Steedos is defining server-side object functions in .function.yml files, which centralizes logic for invocation from UI buttons, triggers, and external REST API integrations.

Does Steedos support context-aware scripting for server-side object data validation?

Yes, Steedos supports context-aware scripting for server-side object data validation by providing the ObjectQL context, allowing you to robustly handle errors and modify data through ctx.input, ctx.params, and objects.* APIs.

Why use .function.yml files for defining REST endpoints in Steedos projects?

You use .function.yml files to define REST endpoints in Steedos projects because they enforce structured function definitions, automatically exposing your server-side logic via REST API for seamless button, trigger, and external system integration.