# 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](/sdk/sdk-documentation.md#project-ids) or retrieve it using the [`list_projects`](/sdk/sdk-documentation/project-level-sdk-functions/list_projects.md) 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](/sdk/sdk-documentation/project-level-sdk-functions/get_metrics.md)
{% endhint %}


---

# 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.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/get_project_performance.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.
