# Class JDatasourceApi

#### Hierarchy (View Summary)

- JBaseApi
  - JDatasourceApi

- Defined in jamespot-user-api/src/apis/datasource/datasource.ts:56

##### Index

### Constructors

constructor

### Properties

jApi
network

### Methods

cancel
create
get
getExcelDatasource
getExcelDatasourceHeaders
getModel
getObject
setExcelDatasource
updateModel

## Constructors

### constructor

- new JDatasourceApi(jApi: JamespotUserApi): JDatasourceApi

  #### Parameters

  - jApi: JamespotUserApi

  #### Returns JDatasourceApi

  Inherited from JBaseApi.constructor

  - Defined in jamespot-user-api/src/apis/base.ts:8

## Properties

### jApi

jApi: JamespotUserApi

Inherited from JBaseApi.jApi

- Defined in jamespot-user-api/src/apis/base.ts:5

### network

network: Network

Inherited from JBaseApi.network

- Defined in jamespot-user-api/src/apis/base.ts:6

## Methods

### cancel

- cancel(uri: string): Promise<ApiWrapper<boolean, BaseMessages>>

  #### Parameters

  - uri: string

  #### Returns Promise<ApiWrapper<boolean, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:65

### create

- create(
  __namedParameters: {
  datasourceIdentifier: string;
  datasourceType: DatasourceType;
  title: string;
  token?: string;
  },
  ): Promise<
  ApiWrapper<{ model: DatasourceModel; uri: string }, BaseMessages>,
  >

  #### Parameters

  - __namedParameters: {
    datasourceIdentifier: string;
    datasourceType: DatasourceType;
    title: string;
    token?: string;
    }

  #### Returns Promise<ApiWrapper<{ model: DatasourceModel; uri: string }, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:89

### get

- get<T extends {}>(
  uri: string,
  format: Format,
  ): Promise<ApiWrapper<DatasourceResult<T>, BaseMessages>>

  #### Type Parameters

  - T extends {}

  #### Parameters

  - uri: string
  - format: Format

  #### Returns Promise<ApiWrapper<DatasourceResult<T>, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:57

### getExcelDatasource

- getExcelDatasource(
  uri: string,
  ): Promise<ApiWrapper<jDatasourceExcel, BaseMessages>>

  #### Parameters

  - uri: string

  #### Returns Promise<ApiWrapper<jDatasourceExcel, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:77

### getExcelDatasourceHeaders

- getExcelDatasourceHeaders(
  uri: string,
  spreadsheet?: string,
  ): Promise<ApiWrapper<string[], BaseMessages>>

  #### Parameters

  - uri: string
  - `Optional` spreadsheet: string

  #### Returns Promise<ApiWrapper<string[], BaseMessages>>

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:81

### getModel

- getModel(
  uri: string,
  ): Promise<
  ApiWrapper<
  { model: DatasourceModel; type: DatasourceType },
  BaseMessages,
  >,
  >

  #### Parameters

  - uri: string

  #### Returns Promise<
  ApiWrapper<
  { model: DatasourceModel; type: DatasourceType },
  BaseMessages,
  >,
  >

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:61

### getObject

- getObject(
  uri: string,
  ): Promise<
  ApiWrapper<
  DatasourceStudioLittle
  | DatasourceArticleLittle,
  BaseMessages,
  >,
  >

  #### Parameters

  - uri: string

  #### Returns Promise<
  ApiWrapper<
  DatasourceStudioLittle
  | DatasourceArticleLittle,
  BaseMessages,
  >,
  >

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:69

### setExcelDatasource

- setExcelDatasource(
  uri: string,
  spreadsheet: string,
  ): Promise<ApiWrapper<DatasourceModel, BaseMessages>>

  #### Parameters

  - uri: string
  - spreadsheet: string

  #### Returns Promise<ApiWrapper<DatasourceModel, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:85

### updateModel

- updateModel(
  uri: string,
  model: DatasourceModel,
  ): Promise<ApiWrapper<boolean, BaseMessages>>

  #### Parameters

  - uri: string
  - model: DatasourceModel

  #### Returns Promise<ApiWrapper<boolean, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/datasource/datasource.ts:73