# Microflow Runtime API

The **Microflow Runtime API** provides RESTful endpoints that allow external systems to **execute Microflows** and **manage runtime business object cache** within the ONEWEB platform.

These APIs enable applications to trigger **micro‑services**, control execution behavior through parameters, and refresh runtime metadata used during page rendering and process execution.

All endpoints are accessed relative to the application **context root** and follow ONEWEB’s authentication and authorization model.

***

### API Capabilities

Using the Microflow Runtime API, clients can:

* Execute Microflows as micro‑services
* Pass input parameters to control execution behavior
* Refresh runtime business object cache for all flows
* Refresh or regenerate business objects for specific flows

***

### Execute Microflow

#### `POST /MicroflowRest/DoAction`

Executes a Microflow at runtime.

* **Description**\
  Triggers execution of the specified Microflow, allowing it to operate as a micro‑service.\
  Input parameters can be provided to control the logic executed within the flow.
* **HTTP Method**\
  `POST`

***

### Refresh Business Object Cache (All Flows)

#### `GET /MicroflowRest/refreshCache`

Refreshes the cached Business Objects for **all Microflows**.

* **Description**\
  Forces the runtime to reload Business Object definitions for all flows, ensuring that changes are reflected immediately.
* **HTTP Method**\
  `GET`

***

### Refresh Business Object Cache (Specific Flows)

#### `POST /MicroflowRest/classAction`

Executes runtime actions for a **specific list of Microflows**.

* **Description**\
  Allows selective refresh or regeneration of Business Objects related only to the specified flows, rather than all flows.
* **HTTP Method**\
  `POST`

***

### Authentication & Authorization

All Microflow Runtime API calls:

* Must be executed within an authenticated ONEWEB session
* Are governed by the platform’s authorization and permission model
* Execute in the context of the authenticated user

Unauthorized or invalid session requests will be rejected by the runtime.

***

### Summary

The **Microflow Runtime API** enables controlled, REST‑based interaction with Microflows and runtime Business Objects.

Key characteristics:

* RESTful interface for executing Microflows
* Supports parameter‑driven micro‑service execution
* Provides cache management for runtime metadata
* Ensures up‑to‑date Business Object definitions
* Fully integrated with ONEWEB security model

This API is essential for **service orchestration**, **runtime data refresh**, and **dynamic application behavior** in ONEWEB.


---

# Agent Instructions: 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.onewebstack.com/api-reference/microflow-runtime-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.
