# Run transformer through the Alumio API

**URL:** <https://forum.alumio.com/t/run-transformer-through-the-alumio-api/915>\
**Category:** Data Transformers\
**Tags:** data-transformer, alumio-api\
**Created:** [December 21, 2023, 3:25pm UTC](https://forum.alumio.com/t/run-transformer-through-the-alumio-api/915 "2023-12-21T15:25:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christiaan](https://forum.alumio.com/letter_avatar_proxy/v4/letter/c/f0a364/32.png) [@Christiaan](https://forum.alumio.com/u/Christiaan)\
**Post date:** [December 21, 2023, 3:25pm UTC](https://forum.alumio.com/t/run-transformer-through-the-alumio-api/915/1 "2023-12-21T15:25:48Z")

</div>

Hi,

I’m trying to run a transformer with the Alumio API  
I found this in the docs:

> **[Alumio API](https://apidocs.alumio.com/#tag/Transformer/operation/executeTransformer)**

 ![Screenshot 2023-12-21 at 16.22.39](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/2X/3/322cb2e6e659595eabb00f1f72da4d1f797a6742.png)

What I can not figure out is how to call a specific transformer.  
I know I’m connecte properly, because the call to get environment variables returns a proper response

---

<div class="post-metadata">

**Author:** ![robin.speekenbrink](https://forum.alumio.com/user_avatar/forum.alumio.com/robin.speekenbrink/32/1091_2.png) [@robin.speekenbrink](https://forum.alumio.com/u/robin.speekenbrink)\
**Post date:** [December 21, 2023, 4:04pm UTC](https://forum.alumio.com/t/run-transformer-through-the-alumio-api/915/2 "2023-12-21T16:04:03Z")

</div>

I’ve never done this via the docs but can see from the GUI that its something like:

```auto
{
    "entities": [
        {
            "array": [
                {
                    "factor": 1
                },
                {
                    "factor": 2
                },
                {
                    "factor": 2
                },
                {
                    "factor": 4
                }
            ]
        }
    ],
    "specification": {
        "prototype": "breakpoint-logger",
        "parameters": {
            "instanceId": "root.object",
            "enabled": false,
            "transformer": {
                "prototype": "data",
                "parameters": {
                    "transformers": [
                        {
                            "prototype": "breakpoint-logger",
                            "parameters": {
                                "instanceId": "root.object.parameters.transformers.0",
                                "enabled": false,
                                "transformer": {
                                    "prototype": "accessor-move",
                                    "parameters": {
                                        "stripEnclosures": true,
                                        "filters": [
                                            null
                                        ],
                                        "transformers": [
                                            null
                                        ],
                                        "source": {
                                            "prototype": "key",
                                            "parameters": {
                                                "root": "array"
                                            }
                                        },
                                        "destination": {
                                            "prototype": "structure",
                                            "parameters": {
                                                "key": "index",
                                                "value": "original",
                                                "root": "array"
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "prototype": "breakpoint-logger",
                            "parameters": {
                                "instanceId": "root.object.parameters.transformers.1",
                                "enabled": false,
                                "transformer": {
                                    "prototype": "value-setter",
                                    "parameters": {
                                        "configurations": [
                                            {
                                                "value": "&{array}",
                                                "mappers": [
                                                    {
                                                        "prototype": "list-values",
                                                        "parameters": {}
                                                    }
                                                ],
                                                "key": "array"
                                            }
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "prototype": "breakpoint-logger",
                            "parameters": {
                                "instanceId": "root.object.parameters.transformers.2",
                                "enabled": false,
                                "transformer": {
                                    "prototype": "list-transformer-wrapper",
                                    "parameters": {
                                        "transformers": [
                                            {
                                                "prototype": "breakpoint-logger",
                                                "parameters": {
                                                    "instanceId": "root.object.parameters.transformers.2.parameters.transformers.0",
                                                    "enabled": false,
                                                    "transformer": {
                                                        "prototype": "node",
                                                        "parameters": {
                                                            "nodeTransformers": [
                                                                {
                                                                    "prototype": "breakpoint-logger",
                                                                    "parameters": {
                                                                        "instanceId": "root.object.parameters.transformers.2.parameters.transformers.0.parameters.nodeTransformers.0",
                                                                        "enabled": false,
                                                                        "transformer": {
                                                                            "prototype": "value-setter",
                                                                            "parameters": {
                                                                                "configurations": [
                                                                                    {
                                                                                        "value": "",
                                                                                        "key": "test"
                                                                                    }
                                                                                ]
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            ],
                                                            "accessor": {
                                                                "prototype": "pattern",
                                                                "parameters": {
                                                                    "pattern": "array.*"
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
}

```

(which is a run test payload for executing a specific (testing)-tranformer)

Hope this helps

---

<div class="post-metadata">

**Author:** ![Christiaan](https://forum.alumio.com/letter_avatar_proxy/v4/letter/c/f0a364/32.png) [@Christiaan](https://forum.alumio.com/u/Christiaan)\
**Post date:** [December 22, 2023, 7:45am UTC](https://forum.alumio.com/t/run-transformer-through-the-alumio-api/915/3 "2023-12-22T07:45:11Z")

</div>

Thanks!

Thanks to your comment I was able to figure it out.  
I needed this to be able to run a specified entity transformer through the Alumio Api

```auto
{
  "entities": [
    {
      "Some_key": "Your Data",
      "Another_Key": "More Data"
    }
  ],
  "specification": {
    "prototype": "chain",
    "parameters": {
      "transformers": [
        "transformer-identifier"
      ]
    }
  }
}

```

By doing this with a HTTP proxie, you essentially get a webhook which can return the output of a transformer

---

<div class="post-metadata">

**Author:** ![Christiaan](https://forum.alumio.com/letter_avatar_proxy/v4/letter/c/f0a364/32.png) [@Christiaan](https://forum.alumio.com/u/Christiaan)\
**Post date:** [December 22, 2023, 8:05am UTC](https://forum.alumio.com/t/run-transformer-through-the-alumio-api/915/4 "2023-12-22T08:05:11Z")

</div>

Example:

[Run transformer through proxie.ndjson](https://forum.alumio.com/uploads/short-url/iK7wQy3Re52XjpR3KxPtF7a2Ljq.ndjson) (2.4 KB)

Make sure to replace {YOUR\_ALUMIO\_ENV} en {ALUMIO\_API\_KEY} with your own values
