> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-admin/9.3-administer/embed-and-extend-pentaho-functionality-cp/embed-and-extend-pdi-functionality/embed-pentaho-data-integration/expose-a-transformation-or-job-as-a-web-service.md).

# Expose a transformation or job as a web service

You can run a PDI transformation or job as part of a web-service by developing one of the following implementations:

* Write a servlet that maps incoming parameters for a [transformation step](https://github.com/pentaho/documentation/blob/main/PDIA/9.3/Administer/Embed%20and%20extend%20Pentaho%20functionality/Embed%20and%20extend%20Pentaho%20functionality%20\(cp\)/Embed%20and%20extend%20PDI%20functionality/Embed%20Pentaho%20Data%20Integration/Sample%20Class%20Scenarios%20-%20Embed%20PDI/Run%20transformations=GUID-0D76C880-CB9F-4955-83E1-49C37BDF20E7=1=en=.md) or [job entry](broken://pages/Fl2dUQqnGCFNTP4e1eKO) and executes them as part of the request cycle.
* Use the Carte server or the Pentaho Server directly by building a transformation that writes its output to the HTTP response of the Carte server. Then, specify the **Pass Output to Servlet** option in the Text Output, XML Output, JSON Output, or scripting steps to write output to the HTTP response. For an example, run the `pentaho/design-tools/data-integration/samples/transformations/Servlet Data Example.ktr` sample transformation on Carte.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pdia-admin/9.3-administer/embed-and-extend-pentaho-functionality-cp/embed-and-extend-pdi-functionality/embed-pentaho-data-integration/expose-a-transformation-or-job-as-a-web-service.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
