# get\_project\_performance

`imerit_ango.sdk.SDK.`

## get\_project\_performance(project\_id, interval, batches)

Retrieve the performance metrics for 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.
* **interval:** list\[datetime], *default None*
  * Format: \[start\_datetime, end\_datetime]
  * Example: `[datetime.now() - timedelta(days=7), datetime.now()]`
* **batches:** list\[str], *default None*
  * Filter performance metrics by batch (e.g., only get tasks belonging to the batch specified)
  * Example `['batch_1', 'batch_2']`

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

Get all performance metrics:

{% 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.get_project_performance(project_id=project_id)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/performance/$PROJECT_ID" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{}'
```

{% endtab %}
{% endtabs %}

Filter metrics by time and batches:

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

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from datetime import datetime, timedelta

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.get_project_performance(
    project_id=project_id,
    interval=[datetime.now() - timedelta(days=7), datetime.now()],
    batches=["Batch-1", "Batch-2"]
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/performance/$PROJECT_ID" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "batches": ["68b3fb784e2a51908a5cd634", "68ad65487d1dcb702fa629eb"],
    "interval": ["2020-01-01T00:00:00Z", "2020-01-08T00:00:00Z"]
  }'
```

{% endtab %}
{% endtabs %}

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

[get\_metrics](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/get_metrics)
{% endhint %}
