> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DummyBean

> Calling public service methods through the REST API: dummyBean

<ResponseField name="beanId" type="string">
  The Spring bean identifier containing the service being called.

  dummyBean
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Bean scope. Use PROTOTYPE for service calls.
</ResponseField>

<ResponseField name="functionName" type="string">
  The public service method name shown in the signature below.
</ResponseField>

<ResponseField name="args" type="object[]">
  The method argument array. Each argument is passed as an object with index 0, 1, and so on; the value must match the Java parameter type.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: en
Site-Context: my-site
Authorization: Bearer <token>
```

Send `Lang-Context` and `Site-Context` with every request. For protected methods, send the JWT in the `Authorization` header as `Bearer <token>`.

**Access:** ADMIN. **Bearer Token:** required.

* GUEST — unauthenticated users; only whitelist services are available.
* USER — authentication is required; methods with USER checks are available.
* ADMIN — full access to public methods of all services.
* If a method checks a role internally, GUEST may receive null.

## Methods

<ResponseField name="getUsers" type="List<Object>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getUsers

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "getUsers",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getDummyUser" type="DummyUser">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getDummyUser

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "getDummyUser",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getAddress" type="Map<String, Object>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getAddress

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "getAddress",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getDescription" type="String">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getDescription

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "getDescription",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="setDescription" type="void">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `description` | `String` | Passed through `args[0].0`. |

  ### setDescription

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "setDescription",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getToDos" type="List<Map<String, Object>>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getToDos

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "getToDos",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="clear" type="void">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### clear

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "clear",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="addToDo" type="void">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `name`   | `String` | Passed through `args[0].0`. |

  ### addToDo

  ```json theme={null}
  {
    "beanId": "dummyBean",
    "scope": "PROTOTYPE",
    "functionName": "addToDo",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>
