# execute function

| **Description** | Fetches a compute task         |
| --------------- | ------------------------------ |
| **Endpoint**    | `/compute/{computeId}/execute` |
| **Method**      | POST                           |

### Access Level Rules

| **Access Level** | Account holder only. |
| ---------------- | -------------------- |

### Processing Units

| **Processing units** | 1 |
| -------------------- | - |

### Parameters

<table><thead><tr><th>Name</th><th width="221">Description</th><th>Required</th><th>Default</th><th data-hidden>Required</th><th data-hidden>Default</th></tr></thead><tbody><tr><td><code>computeId</code></td><td>The id of the compute environment to execute the function on</td><td>true</td><td></td><td></td><td></td></tr><tr><td><code>f</code></td><td>A Python function to be executed as string</td><td>true</td><td></td><td></td><td></td></tr><tr><td><code>writeToLayer</code></td><td>An object describing the layer you wish to write the result to. Must be an object with pathId and timestampId. <br><br>Must be defined when compute environment has been created with lareResult=True</td><td>false</td><td></td><td></td><td></td></tr></tbody></table>


---

# Agent Instructions: 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:

```
GET https://docs.ellipsis-drive.com/developers/api-v3/compute-map-engine/execute-function.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
