# 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>
