# EventsAttributesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createEventAttribute**](#createeventattribute) | **POST** /events/{eventId}/attributes | Create an event attribute|
|[**deleteEventAttribute**](#deleteeventattribute) | **DELETE** /events/{eventId}/attributes/{attributeId} | Delete an event attribute|
|[**getEventAttribute**](#geteventattribute) | **GET** /events/{eventId}/attributes/{attributeId} | Get an event attribute|
|[**getEventAttributes**](#geteventattributes) | **GET** /events/{eventId}/attributes | List an event\&#39;s attributes|
|[**updateEventAttribute**](#updateeventattribute) | **PUT** /events/{eventId}/attributes/{attributeId} | Update an event attribute|

# **createEventAttribute**
> CreateEventAttribute200Response createEventAttribute(eventAttributeCreateInputs)

Creates a new named attribute on the given event, which can then be assigned to pass types to tag or categorize them; requires the \"update\" permission on events.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let eventAttributeCreateInputs: EventAttributeCreateInputs; //

const { status, data } = await apiInstance.createEventAttribute(
    eventId,
    eventAttributeCreateInputs
);
```

### Parameters

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


### Return type

**CreateEventAttribute200Response**

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

# **deleteEventAttribute**
> CreateAccountInvitations200Response deleteEventAttribute()

Permanently deletes the specified attribute from the given event; requires the \"update\" permission on events.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let attributeId: string; //The attribute identifier (default to undefined)

const { status, data } = await apiInstance.deleteEventAttribute(
    eventId,
    attributeId
);
```

### Parameters

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

# **getEventAttribute**
> CreateEventAttribute200Response getEventAttribute()

Returns a single custom attribute definition belonging to the given event; requires \"read\" permission on events.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let attributeId: string; //The attribute identifier (default to undefined)

const { status, data } = await apiInstance.getEventAttribute(
    eventId,
    attributeId
);
```

### Parameters

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


### Return type

**CreateEventAttribute200Response**

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

# **getEventAttributes**
> GetEventAttributes200Response getEventAttributes()

Returns a paginated list of custom attribute definitions configured for the given event, with optional search and sort order; requires \"read\" permission on events.

### Example

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

const configuration = new Configuration();
const apiInstance = new EventsAttributesApi(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.getEventAttributes(
    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

**GetEventAttributes200Response**

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

# **updateEventAttribute**
> CreateEventAttribute200Response updateEventAttribute(eventAttributeUpdateInputs)

Updates the name or other fields of the specified attribute on the given event; requires the \"update\" permission on events.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let attributeId: string; //The attribute identifier (default to undefined)
let eventAttributeUpdateInputs: EventAttributeUpdateInputs; //

const { status, data } = await apiInstance.updateEventAttribute(
    eventId,
    attributeId,
    eventAttributeUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventAttributeUpdateInputs** | **EventAttributeUpdateInputs**|  | |
| **eventId** | [**string**] | The event identifier | defaults to undefined|
| **attributeId** | [**string**] | The attribute identifier | defaults to undefined|


### Return type

**CreateEventAttribute200Response**

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

