Download

Action Schema

An Action is a description of an available API operation.

An action schema does not contain business logic. Instead, it contains a declarative description of how the operation should be executed.

Every request to the system is executed through an action. An action defines:

  • which operation should be performed
  • which object schema should be used
  • which permissions are required for execution
  • which standard framework business logic should be invoked

Action schemas are located in:

app/schemas/actions/{object}/{action}.json

System actions are located in:

framework/actions/system/{object}/{action}.json

Property Type Description
title * string Name. Used as documentation for developers.
type * string Type. Determines which core action should be executed.
object_scheme string Object schema used by the action for data validation, constraint checking, and business logic execution.
required_permissions array Permission identifiers required to execute the action. The user must possess all listed permissions.

Action Types

Type Description
add Create a record
get Retrieve records
update Update a record
remove Delete a record
search Search records
calendar Display a calendar
day_planning Display daily plans
schedule Display a schedule
custom Custom business logic

Examples


// get.json

{
    "title": "Get accounts",
    "type": "get",
    "object_scheme": "accounts",
    "required_permissions": [ "accounts", "accounts_get" ]
}

Will execute:

  1. app/actions/accounts/get/before.php (optional)
  2. framework/actions/core/get.php
  3. app/actions/accounts/get/after.php (optional)

// add.json

{
    "title": "Add account",
    "type": "add",
    "object_scheme": "accounts",
    "required_permissions": [ "accounts", "accounts_add" ]
}

Will execute:

  1. app/actions/accounts/add/before.php (optional)
  2. framework/actions/core/add.php
  3. app/actions/accounts/add/after.php (optional)

// sendInvite.json

{
    "title": "Send invite",
    "type": "custom",
    "object_scheme": "accounts",
    "required_permissions": [ "accounts", "accounts_invite", "email" ]
}

Will execute:

  1. app/actions/accounts/sendInvite/before.php (optional)
  2. app/actions/accounts/sendInvite/custom.php
  3. app/actions/accounts/sendInvite/after.php (optional)