## Read Effective Date Metrics

Fetch the complete documentation index at: [/llms.txt](https://developer.mindbridge.ai/llms.txt)

Use this file to discover all available pages before exploring further.

### Request

GET

/v1/analysis-sources/{analysisSourceId}/effective-date-metrics

### Example cURL Request

```bash
curl --request GET \
  --url https://{tenant}.mindbridge.ai/api/v1/analysis-sources/{analysisSourceId}/effective-date-metrics \
  --header 'Authorization: Bearer <token>'
```

### Example Python Request

```python
import requests

url = "https://{tenant}.mindbridge.ai/api/v1/analysis-sources/{analysisSourceId}/effective-date-metrics"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

### Example JavaScript Fetch Request

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{tenant}.mindbridge.ai/api/v1/analysis-sources/{analysisSourceId}/effective-date-metrics', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Example PHP Request

```php
$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://{tenant}.mindbridge.ai/api/v1/analysis-sources/{analysisSourceId}/effective-date-metrics",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "GET",\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

### Example Go Request

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

url := "https://{tenant}.mindbridge.ai/api/v1/analysis-sources/{analysisSourceId}/effective-date-metrics"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}
```

### Response Structure

200 - application/json

```json
{
  "entriesInPeriod": 123,
  "entriesOutOfPeriod": 123,
  "debitsInPeriod": 123,
  "creditsInPeriod": 123,
  "inPeriodCountHistogram": {},
  "outOfPeriodCountHistogram": {}
}
```

### Authorizations

Authorization: string, required  
Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.

### Path Parameters

- **analysisSourceId**: string, required

### Query Parameters

- **period**: enum<string>, required  
Available options: `DAY`, `WEEK`, `MONTH`

### Response

- **entriesInPeriod**: integer<int64>, number of entries that occurred within the source period's date range.
- **entriesOutOfPeriod**: integer<int64>, number of entries that occurred outside of the source period's date range.
- **debitsInPeriod**: number, total debit amount occurred within the source period's date range.
- **creditsInPeriod**: number, total credit amount occurred within the source period's date range.
- **inPeriodCountHistogram**: object, total number of entries occurred within each indicated date period.
- **outOfPeriodCountHistogram**: object, total number of entries occurred outside of each indicated date period.
