# EventsPasschangesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addEventPassChangeWebhook**](#addeventpasschangewebhook) | **POST** /events/{eventId}/passChanges/webhooks/{webhookId} | Connect a webhook to an event\&#39;s pass change log|
|[**getEventPassChangeWebhooks**](#geteventpasschangewebhooks) | **GET** /events/{eventId}/passChanges/webhooks | List an event\&#39;s pass change log webhooks|
|[**getEventPassChanges**](#geteventpasschanges) | **GET** /events/{eventId}/passChanges | Poll an event\&#39;s pass changes|
|[**removeEventPassChangeWebhook**](#removeeventpasschangewebhook) | **DELETE** /events/{eventId}/passChanges/webhooks/{webhookId} | Disconnect a webhook from an event\&#39;s pass change log|

# **addEventPassChangeWebhook**
> AddEventPassChangeWebhook200Response addEventPassChangeWebhook()

Connects the specified webhook so it receives the event\'s pass change log rows, and requires update permission on events; the webhook must be verified.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let webhookId: string; //The webhook identifier (default to undefined)

const { status, data } = await apiInstance.addEventPassChangeWebhook(
    eventId,
    webhookId
);
```

### Parameters

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


### Return type

**AddEventPassChangeWebhook200Response**

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

# **getEventPassChangeWebhooks**
> GetEventPassChangeWebhooks200Response getEventPassChangeWebhooks()

Returns a paginated list of the webhooks connected to the given event\'s pass change log; requires \"read\" permission on events.

### Example

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

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

let eventId: string; //The event identifier (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.getEventPassChangeWebhooks(
    eventId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event identifier | 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

**GetEventPassChangeWebhooks200Response**

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

# **getEventPassChanges**
> GetEventPassChanges200Response getEventPassChanges()

Returns a cursor-paginated feed of the event\'s pass change log rows in ascending order; pass the last returned cursor on the next call to tail new changes. Optionally filter by subjectId or change type. Requires read permission on events.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let subjectId: string; //Filter by subjectId (optional) (default to undefined)
let type: PassChangeLogType; //Filter by type (optional) (default to undefined)
let passId: string; //Filter by passId (optional) (default to undefined)

const { status, data } = await apiInstance.getEventPassChanges(
    eventId,
    subjectId,
    type,
    passId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event identifier | defaults to undefined|
| **subjectId** | [**string**] | Filter by subjectId | (optional) defaults to undefined|
| **type** | **PassChangeLogType** | Filter by type | (optional) defaults to undefined|
| **passId** | [**string**] | Filter by passId | (optional) defaults to undefined|


### Return type

**GetEventPassChanges200Response**

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

# **removeEventPassChangeWebhook**
> CreateAccountInvitations200Response removeEventPassChangeWebhook()

Disconnects the specified webhook from the given event\'s pass change log and requires update permission on events.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let webhookId: string; //The webhook identifier (default to undefined)

const { status, data } = await apiInstance.removeEventPassChangeWebhook(
    eventId,
    webhookId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event identifier | defaults to undefined|
| **webhookId** | [**string**] | The webhook 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)

