> For the complete documentation index, see [llms.txt](https://docs.flexikanban.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexikanban.ai/components/actions-action-groups/using-actions/how-to-execute-action-group-through-the-rest-api.md).

# How to execute Action/Group through the REST api

This article demonstrate how to work with the Flexi Kanban application thought the REST api.&#x20;

The application supports only POST REST api calls of internal APEX classes. The one of those classes is the class "KanBanActionService".  This class is responsible for working with Actions or Action Groups.&#x20;

### Basic REST api information <a href="#basic-rest-api-information" id="basic-rest-api-information"></a>

The endpoint must look like:&#x20;

```
https://{ORG_DOMAIN}/services/apexrest/FLX_KB/kanban_api
```

The headers must look like:

```
Authorization: Bearer {APEX_SESSION_ID}
Content-Type: application/json; charset=UTF-8
Accept: application/json
```

The body must look like:

```
{
"className": "KanBanActionService", 
"methodName": "executeActionOrGroup",  
"parameters": "{\"actionOrGroupId\":\"{ACTION_OR_GROUP_ID}\",\"source\":\"{SOURCE_OBJECT}\",\"variables\":{VARIABLES_IN_JSON_FORMAT}}",
"parametersType": "json" 
}
```

Where:

* className - the class name that contains the method you are going to execute.&#x20;
* methodName - the method name that you are going to execute.
* parameters - the parameters in string format.
* parametersType - the type of parameters. Supports: json, string, integer, decimal, date, datetime, boolean.

The above example demonstrates how the body should look like, in case of executing Action or Action Group.

The "parameters" contains the JSON object, where:

* actionOrGroupId - the ID of the Action or Action Group. Required.
* source - the source of the Action or Action Group. Optional.
* variables - the variables in JSON key/value format. Optional.

### Executing "Validation Rule" action <a href="#executing-quot-validation-rule-quot-action" id="executing-quot-validation-rule-quot-action"></a>

The Action with "Validation Rule" type.

![](https://media.screensteps.com/image_assets/assets/006/511/393/medium/Validation_Rule.png)

The REST api request in this case.

![](https://media.screensteps.com/image_assets/assets/006/511/432/medium/Validation_Rule_REST.png)

### Executing "Define Variable" action <a href="#executing-quot-define-variable-quot-action" id="executing-quot-define-variable-quot-action"></a>

The Action with "Define Variable" type.

![](https://media.screensteps.com/image_assets/assets/006/511/466/medium/Variable.png)

The REST api request in this case.

![](https://media.screensteps.com/image_assets/assets/006/511/487/medium/Variable_Rest.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flexikanban.ai/components/actions-action-groups/using-actions/how-to-execute-action-group-through-the-rest-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
