# update\_tasks\_priority

`imerit_ango.sdk.SDK.`

## update\_tasks\_priority(project\_id, priority, filters)

Update the priority of specified tasks in your project.

### Parameters

* **project\_id:** string
  * The unique identifier for the project. You can find the project ID in [the user interface](https://docs.imerit.net/sdk/sdk-documentation/..#project-ids) or retrieve it using the [`list_projects`](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/list_projects) function.
* **priority:** int
  * The new priority value to assign to the selected tasks.
  * **Note:** The priority value must be between -1000 and 1000. Higher values indicate higher priority.
* **filters:** dict, *default None*
  * A dictionary of filters to specify the tasks to requeue.
    * **taskIds:** List\[str]
    * **externalIds:** List\[str]
    * **assetIds:** List\[str]
    * **batches:** List\[str]
    * **fromStageIds:** List\[str]

Returns:

* **output:** dict
  * A dictionary containing the result of the operation.
  * Including a `status` field indicating whether the request was successful and a `data` field containing the response payload with updated resources produced by the operation.

### Example

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

sdk_response = ango_sdk.update_tasks_priority(
    project_id=project_id,
    priority=15,
    filters={"externalIds": ["image-1.jpg", "image-2.jpg"]}
)
```

{% endtab %}

{% tab title="curl" %}

```python
curl -X POST "https://imeritapi.ango.ai/v2/project/$PROJECT_ID/updatePriority" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "filters": {
      "externalIds": ["image-1.jpg", "image-2.jpg"]
    },
    "priority": 15
  }'
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**See also**

[get\_tasks](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/get_tasks), [get\_assets](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/get_assets)
{% endhint %}
