UNPKG

chatkitty

Version:
235 lines (155 loc) 6.83 kB
# ImportsApi All URIs are relative to *https://api.chatkitty.com* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**importChannelMembers**](#importchannelmembers) | **POST** /imports/channels/{id}/members | Import channel members| |[**importChannels**](#importchannels) | **POST** /imports/channels | Import channels| |[**importMessages**](#importmessages) | **POST** /imports/messages | Import messages| |[**importUsers**](#importusers) | **POST** /imports/users | Import users| # **importChannelMembers** > ApplicationJobResource importChannelMembers() Batch imports channel members from a JSON array file ### Example ```typescript import { ImportsApi, Configuration } from 'chatkitty'; const configuration = new Configuration(); const apiInstance = new ImportsApi(configuration); let id: number; // (default to undefined) let file: File; //JSON array file with user references to be added as members (default to undefined) const { status, data } = await apiInstance.importChannelMembers( id, file ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **id** | [**number**] | | defaults to undefined| | **file** | [**File**] | JSON array file with user references to be added as members | defaults to undefined| ### Return type **ApplicationJobResource** ### Authorization [application_authorization](../README.md#application_authorization) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**404** | Resource not found | - | |**403** | Access is denied | - | |**400** | Client error | - | |**401** | Unauthorized: Full authentication is required to access this resource | - | |**202** | Import job accepted | - | [[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) # **importChannels** > ApplicationJobResource importChannels() Batch imports channels from a JSON array file ### Example ```typescript import { ImportsApi, Configuration } from 'chatkitty'; const configuration = new Configuration(); const apiInstance = new ImportsApi(configuration); let file: File; //JSON array file with channels (default to undefined) const { status, data } = await apiInstance.importChannels( file ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **file** | [**File**] | JSON array file with channels | defaults to undefined| ### Return type **ApplicationJobResource** ### Authorization [application_authorization](../README.md#application_authorization) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**404** | Resource not found | - | |**403** | Access is denied | - | |**400** | Client error | - | |**401** | Unauthorized: Full authentication is required to access this resource | - | |**202** | Import job accepted | - | [[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) # **importMessages** > ApplicationJobResource importMessages() Batch imports messages from a JSON array file ### Example ```typescript import { ImportsApi, Configuration } from 'chatkitty'; const configuration = new Configuration(); const apiInstance = new ImportsApi(configuration); let file: File; //JSON array file with messages (default to undefined) const { status, data } = await apiInstance.importMessages( file ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **file** | [**File**] | JSON array file with messages | defaults to undefined| ### Return type **ApplicationJobResource** ### Authorization [application_authorization](../README.md#application_authorization) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**404** | Resource not found | - | |**403** | Access is denied | - | |**400** | Client error | - | |**401** | Unauthorized: Full authentication is required to access this resource | - | |**202** | Import job accepted | - | [[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) # **importUsers** > ApplicationJobResource importUsers() Batch imports users from a JSON array file ### Example ```typescript import { ImportsApi, Configuration } from 'chatkitty'; const configuration = new Configuration(); const apiInstance = new ImportsApi(configuration); let file: File; //JSON array file with users (default to undefined) const { status, data } = await apiInstance.importUsers( file ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **file** | [**File**] | JSON array file with users | defaults to undefined| ### Return type **ApplicationJobResource** ### Authorization [application_authorization](../README.md#application_authorization) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**404** | Resource not found | - | |**403** | Access is denied | - | |**400** | Client error | - | |**401** | Unauthorized: Full authentication is required to access this resource | - | |**202** | Import job accepted | - | [[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)