# ReportsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createCustomReport**](#createcustomreport) | **POST** /reports/{standard} | Create a custom report from a standard report|
|[**deleteCustomReport**](#deletecustomreport) | **DELETE** /reports/custom/{reportId} | Delete a custom report|
|[**deleteCustomReportSchedule**](#deletecustomreportschedule) | **DELETE** /reports/custom/{reportId}/schedule | Delete a custom report\&#39;s schedule|
|[**exportCustomReport**](#exportcustomreport) | **POST** /reports/custom/{reportId}/export | Export a custom report|
|[**getCustomReport**](#getcustomreport) | **GET** /reports/custom/{reportId} | Get a custom report\&#39;s configuration|
|[**getCustomReportSchedule**](#getcustomreportschedule) | **GET** /reports/custom/{reportId}/schedule | Get a custom report\&#39;s send schedule|
|[**getCustomReports**](#getcustomreports) | **GET** /reports/custom | List an organization\&#39;s custom reports|
|[**getReport**](#getreport) | **GET** /reports/{standard} | Run a standard report and fetch all its rows|
|[**getReports**](#getreports) | **GET** /reports | List available standard reports|
|[**updateCustomReport**](#updatecustomreport) | **PUT** /reports/custom/{reportId} | Update a custom report|
|[**upsertCustomReportSchedule**](#upsertcustomreportschedule) | **POST** /reports/custom/{reportId}/schedule | Create or update a custom report\&#39;s schedule|

# **createCustomReport**
> GetCustomReport200Response createCustomReport(customReportCreateInputs)

Creates a new saved custom report based on the given standard report definition, with the caller\'s chosen name, filters, and columns, requires read and create permissions on reports.

### Example

```typescript
import {
    ReportsApi,
    Configuration,
    CustomReportCreateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let standard: string; //The standard identifier (default to undefined)
let customReportCreateInputs: CustomReportCreateInputs; //

const { status, data } = await apiInstance.createCustomReport(
    standard,
    customReportCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **customReportCreateInputs** | **CustomReportCreateInputs**|  | |
| **standard** | [**string**] | The standard identifier | defaults to undefined|


### Return type

**GetCustomReport200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteCustomReport**
> CreateAccountInvitations200Response deleteCustomReport()

Permanently deletes a custom report by ID, along with its AWS EventBridge schedule if one exists; only the report\'s owning user may delete it, and this requires the delete permission on the reports domain.

### Example

```typescript
import {
    ReportsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let reportId: string; //The report identifier (default to undefined)

const { status, data } = await apiInstance.deleteCustomReport(
    reportId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reportId** | [**string**] | The report identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteCustomReportSchedule**
> GetCustomReportSchedule200Response deleteCustomReportSchedule()

Removes the recurring email schedule for a custom report, deleting the underlying AWS EventBridge schedule and clearing it from the report record; only the report owner or an authorized shared user may remove it, and this requires the update permission on the reports domain.

### Example

```typescript
import {
    ReportsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let reportId: string; //The report identifier (default to undefined)

const { status, data } = await apiInstance.deleteCustomReportSchedule(
    reportId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reportId** | [**string**] | The report identifier | defaults to undefined|


### Return type

**GetCustomReportSchedule200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **exportCustomReport**
> CreateAccountInvitations200Response exportCustomReport(customReportExportInputs)

Kicks off an asynchronous export of a custom report\'s data, optionally emailing the resulting file to a specified address in addition to the requesting user, and requires read permission on the reports domain plus any domains associated with the report\'s standard type.

### Example

```typescript
import {
    ReportsApi,
    Configuration,
    CustomReportExportInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let reportId: string; //The report identifier (default to undefined)
let customReportExportInputs: CustomReportExportInputs; //

const { status, data } = await apiInstance.exportCustomReport(
    reportId,
    customReportExportInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **customReportExportInputs** | **CustomReportExportInputs**|  | |
| **reportId** | [**string**] | The report identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getCustomReport**
> GetCustomReport200Response getCustomReport()

Retrieves the saved configuration for a single custom report by ID, including the underlying standard report it is built from and its settings; requires read permission on the reports resource.

### Example

```typescript
import {
    ReportsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let reportId: string; //The report identifier (default to undefined)

const { status, data } = await apiInstance.getCustomReport(
    reportId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reportId** | [**string**] | The report identifier | defaults to undefined|


### Return type

**GetCustomReport200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getCustomReportSchedule**
> GetCustomReportSchedule200Response getCustomReportSchedule()

Retrieves the recurring email delivery schedule configured for a custom report, including its cron expression, timezone, and recipient emails, or null if no schedule is set; requires read permission on the reports resource.

### Example

```typescript
import {
    ReportsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let reportId: string; //The report identifier (default to undefined)

const { status, data } = await apiInstance.getCustomReportSchedule(
    reportId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reportId** | [**string**] | The report identifier | defaults to undefined|


### Return type

**GetCustomReportSchedule200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getCustomReports**
> GetCustomReports200Response getCustomReports()

Returns a paginated, searchable list of custom report configurations saved for the current organization, matching on report name and supporting additional filters and sorting via orderBy; requires read permission on the reports resource.

### Example

```typescript
import {
    ReportsApi,
    Configuration,
    ReportFilters
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let filters: ReportFilters; //Filter by filters (optional) (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getCustomReports(
    filters,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **filters** | **ReportFilters** | Filter by filters | (optional) defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetCustomReports200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getReport**
> GetReport200Response getReport()

Executes the named standard report definition with the given filters and automatically pages through cursor-based results to return the complete row set; access is restricted to the domain permissions declared by that specific standard report, in addition to read permission on the reports resource.

### Example

```typescript
import {
    ReportsApi,
    Configuration,
    ReportFilters
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let standard: string; //The standard identifier (default to undefined)
let filters: ReportFilters; //Filter by filters (optional) (default to undefined)

const { status, data } = await apiInstance.getReport(
    standard,
    filters
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **standard** | [**string**] | The standard identifier | defaults to undefined|
| **filters** | **ReportFilters** | Filter by filters | (optional) defaults to undefined|


### Return type

**GetReport200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getReports**
> GetReports200Response getReports()

Returns the list of standard reports available to the organization, filtered by report type and further filtered to only those reports whose required permission domains the caller can read; requires the `read:reports` permission.

### Example

```typescript
import {
    ReportsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let type: ReportType; //Filter by type (default to undefined)

const { status, data } = await apiInstance.getReports(
    type
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **type** | **ReportType** | Filter by type | defaults to undefined|


### Return type

**GetReports200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateCustomReport**
> GetCustomReport200Response updateCustomReport(customReportUpdateInputs)

Updates the configuration (filters, name, sharing settings, etc.) of an existing custom report; only the report owner, or a shared user when the report isn\'t restricted to specific users, may update it, and changing the shared setting itself is restricted to the owner, requiring the update permission on the reports domain.

### Example

```typescript
import {
    ReportsApi,
    Configuration,
    CustomReportUpdateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let reportId: string; //The report identifier (default to undefined)
let customReportUpdateInputs: CustomReportUpdateInputs; //

const { status, data } = await apiInstance.updateCustomReport(
    reportId,
    customReportUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **customReportUpdateInputs** | **CustomReportUpdateInputs**|  | |
| **reportId** | [**string**] | The report identifier | defaults to undefined|


### Return type

**GetCustomReport200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **upsertCustomReportSchedule**
> UpsertCustomReportSchedule200Response upsertCustomReportSchedule(customReportScheduleInputs)

Creates or updates a recurring email schedule for a custom report by provisioning an AWS EventBridge schedule with the given cron/rate expression, timezone, and recipient emails; only the report owner or an authorized shared user may set the schedule, and this requires read permission on the reports domain plus any domains tied to the report\'s standard type.

### Example

```typescript
import {
    ReportsApi,
    Configuration,
    CustomReportScheduleInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ReportsApi(configuration);

let reportId: string; //The report identifier (default to undefined)
let customReportScheduleInputs: CustomReportScheduleInputs; //

const { status, data } = await apiInstance.upsertCustomReportSchedule(
    reportId,
    customReportScheduleInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **customReportScheduleInputs** | **CustomReportScheduleInputs**|  | |
| **reportId** | [**string**] | The report identifier | defaults to undefined|


### Return type

**UpsertCustomReportSchedule200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

