# GroupsEventsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addGroupEvent**](#addgroupevent) | **POST** /groups/{groupId}/events/{eventId} | Add an event to a group|
|[**getGroupEvents**](#getgroupevents) | **GET** /groups/{groupId}/events | List a group\&#39;s events|
|[**removeGroupEvent**](#removegroupevent) | **DELETE** /groups/{groupId}/events/{eventId} | Remove an event from a group|

# **addGroupEvent**
> CreateGroup200Response addGroupEvent()

Associates an existing event with a group, requiring update permission on both groups and events; the group\'s cached data is refreshed and its events list is invalidated.

### Example

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

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

let groupId: string; //The group identifier (default to undefined)
let eventId: string; //The event identifier (default to undefined)

const { status, data } = await apiInstance.addGroupEvent(
    groupId,
    eventId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|
| **eventId** | [**string**] | The event identifier | defaults to undefined|


### Return type

**CreateGroup200Response**

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

# **getGroupEvents**
> GetAccountEvents200Response getGroupEvents()

Returns a paginated list of events associated with the given group, optionally filtered to past or upcoming events and by a search term, with sorting via orderBy; requires \"read\" permission on groups and events.

### Example

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

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

let groupId: string; //The group identifier (default to undefined)
let past: boolean; //Filter by past (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.getGroupEvents(
    groupId,
    past,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|
| **past** | [**boolean**] | Filter by past | (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

**GetAccountEvents200Response**

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

# **removeGroupEvent**
> CreateGroup200Response removeGroupEvent()

Disassociates an event from a group, requiring update permission on both groups and events; the group\'s cached data is refreshed and its events list is invalidated.

### Example

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

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

let groupId: string; //The group identifier (default to undefined)
let eventId: string; //The event identifier (default to undefined)

const { status, data } = await apiInstance.removeGroupEvent(
    groupId,
    eventId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|
| **eventId** | [**string**] | The event identifier | defaults to undefined|


### Return type

**CreateGroup200Response**

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

