> For the complete documentation index, see [llms.txt](https://docs.eximee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow.md).

# Scripts API

Scripts allow advanced business logic, integration with external services, advanced validation, and manipulation of the request state.

## Available global objects

When writing business logic (whether these are scripts, script validators, or script tasks), you have two main global objects at your disposal, which form the foundation for working with the API:

* **`context`** — represents the local context of the script invocation. It allows retrieving input parameters, reading values directly from form components, using the temporary registry, and controlling the structure of data returned by the script.
* **`api`** — represents the global services of the Eximee platform. It provides methods for interacting with the system, including retrieving the user context, performing BPM process operations, and reading application configuration and translations.

## Basics of working with scripts

* [**Input and output data**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/podstawy-pracy-ze-skryptami/dane-wejsciowe-i-wyjsciowe.md) — object methods `context`, retrieving parameters from the form and properly formatting returned results.
* [**Logging information and errors**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/podstawy-pracy-ze-skryptami/logowanie-informacji-i-bledow.md) — rules for using the logger, masking sensitive data.
* [**Mathematical operations on numbers**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/podstawy-pracy-ze-skryptami/operacje-matematyczne-w-scriptcode.md) — how to safely convert values using the object `BigDecimal`.
* [**Processing spreadsheet files**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/podstawy-pracy-ze-skryptami/przetwarzanie-plikow-arkuszy.md) — reading and parsing attachments with the XLSX extension.
* [**Throwing business exceptions**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/podstawy-pracy-ze-skryptami/rzucanie-wyjatkow-biznesowych.md) - controlled interruption of script execution, configuration of messages for the user, and use of `getErrorPageDefinitionBuilder`.
* [**Saving temporary data**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/podstawy-pracy-ze-skryptami/zapis-danych-tymczasowych.md) — using the cache (Registry / Eximee Registry).

## Platform services (APIs)

* [**Logged-in user context**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/platform-services/pobranie-kontekstu-uzytkownika.md) (`api.user`)
* [**Operations and access to process data**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/platform-services/operacje-na-procesach.md) (`api.process`)
* [**Retrieving application configuration**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/platform-services/pobieranie-konfiguracji-aplikacji.md) (`api.config`)
* [**Retrieving content and translations**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow/platform-services/pobieranie-tresci-i-tlumaczen.md) (`api.repository`)

## Related platform areas

Some topics closely related to writing business logic in scripts have been described in detail in other parts of the Eximee documentation. Before you start, make sure you are familiar with the following mechanisms:

* [**Data Model API**](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/model-danych/wykorzystanie-modelu-danych/api-modelu-danych.md) — interfaces for modifying and reading the request data model.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/skrypty-scriptservice/api-skryptow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
