# ReportsUsersApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addCustomReportUser**](#addcustomreportuser) | **POST** /reports/custom/{reportId}/users | Share a custom report with a user|
|[**getCustomReportUsers**](#getcustomreportusers) | **GET** /reports/custom/{reportId}/users | List users shared on a custom report|
|[**removeCustomReportUser**](#removecustomreportuser) | **DELETE** /reports/custom/{reportId}/users/{userId} | Unshare a custom report from a user|

# **addCustomReportUser**
> CreateAccountInvitations200Response addCustomReportUser(addCustomReportUserRequest)

Grants another user access to a custom report by adding them to its shared users list; only the report\'s owner may add users, and this requires the update permission on the reports domain.

### Example

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

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **addCustomReportUserRequest** | **AddCustomReportUserRequest**|  | |
| **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)

# **getCustomReportUsers**
> GetCustomReportUsers200Response getCustomReportUsers()

Returns the users a custom report has been shared with, identified by the custom report\'s ID; requires the `read:reports` permission.

### Example

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

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

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

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

### Parameters

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


### Return type

**GetCustomReportUsers200Response**

### 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)

# **removeCustomReportUser**
> CreateAccountInvitations200Response removeCustomReportUser()

Revokes a user\'s shared access to a custom report by removing them from its shared users list; only the report\'s owner may remove users, and this requires the delete permission on the reports domain.

### Example

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

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reportId** | [**string**] | The report identifier | defaults to undefined|
| **userId** | [**string**] | The user 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)

