# Class SAS9ApiClient

A client for interfacing with the SAS9 REST API.

### Hierarchy

- SAS9ApiClient

### Constructors

- constructor

### Methods

- executeScript
- getConfig
- setConfig

## Constructors

### constructor

- new SAS9ApiClient(serverUrl: string, jobsPath: string, httpsAgentOptions?: https.AgentOptions): SAS9ApiClient

- - Defined in src/SAS9ApiClient.ts:12

  #### Parameters

  - ##### serverUrl: string

  - ##### jobsPath: string

  - ##### Optional httpsAgentOptions: https.AgentOptions

  #### Returns SAS9ApiClient

## Methods

### executeScript

- executeScript(linesOfCode: string[], userName: string, password: string): Promise<string>

- - Defined in src/SAS9ApiClient.ts:46

  Executes code on a SAS9 server.

  #### Parameters

  - ##### linesOfCode: string[]

    an array of code lines to execute.

  - ##### userName: string

    the user name to log into the current SAS server.

  - ##### password: string

    the password to log into the current SAS server.

  #### Returns Promise<string>

### getConfig

- getConfig(): object

- - Defined in src/SAS9ApiClient.ts:26

  Returns an object containing server URL.

  #### Returns object

  - ##### serverUrl: string

### setConfig

- setConfig(serverUrl: string): void

- - Defined in src/SAS9ApiClient.ts:36

  Updates server URL which is not null.

  #### Parameters

  - ##### serverUrl: string

    URL of the server to be set.

  #### Returns void

Generated using TypeDoc