# API Post Request with File or Python Script Node

**URL:** <https://forum.knime.com/t/api-post-request-with-file-or-python-script-node/75649>\
**Category:** KNIME Analytics Platform\
**Created:** [November 29, 2023, 8:11am UTC](https://forum.knime.com/t/api-post-request-with-file-or-python-script-node/75649 "2023-11-29T08:11:55Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [November 30, 2023, 11:32pm UTC](https://forum.knime.com/t/api-post-request-with-file-or-python-script-node/75649/13 "2023-11-30T23:32:52Z")

</div>

@sven-abx I assume you would need just a string with a path and not a tupel. Maybe you ask ChatGPT what the right syntax for your case is.

You might have to loop thru your dataframe using index and row and then within the loop the syntax would be like

```auto
row["path"]

```

like in this example

> [@Python scripts in Loops](https://forum.knime.com/t/python-scripts-in-loops/62798/3):
>
> @ActionAndi a solution could look something like this: [kn\_example\_python\_loop\_graphic\_restart.knwf](https://forum.knime.com/uploads/short-url/vXNJsHxRLJOImecmskqvFYjVCA.knwf) (164.6 KB) The script would look like this: import knime.scripting.io as knio # This example script creates an output table containing randomly drawn integers using numpy and pandas. import numpy as np import pandas as pd import matplotlib.pyplot as plt var\_data\_path = knio.flow\_variables['context.workflow.data-path'] # Load your data into a Pandas DataFrame # df = pd.read\_csv(v…

> **[Python - loop thru data rows and create PNG files within a loop - store which...](https://hub.knime.com/mlauber71/spaces/Public/kn_example_python_loop_graphic_restart~2bCmw6mkvVrBlTa0/current-state)**
>
> Python - loop thru data rows and create PNG files within a loop - store which items have already been processed

---

_[View the full topic](https://forum.knime.com/t/api-post-request-with-file-or-python-script-node/75649)._
