> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IWorkspaceAnalyticsAsCodeService

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.68/libs/sdk-backend-spi/src/workspace/analyticsAsCode/index.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Service that provisions a workspace from analytics-as-code documents.

**Signature:**

```typescript
export interface IWorkspaceAnalyticsAsCodeService 
```

## Methods

| Method | Description |
| --- | --- |
| [deploy(documents, options)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceanalyticsascodeservice/index.md#iworkspaceanalyticsascodeservicedeploy) | **_(ALPHA)_** Replaces the logical data model and the analytical objects of the workspace with the documents. |

## Method details

### IWorkspaceAnalyticsAsCodeService.deploy()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Replaces the logical data model and the analytical objects of the workspace with the documents.

**Signature:**

```typescript
deploy(documents: AnalyticsAsCodeDocument[], options?: IAnalyticsAsCodeDeployOptions): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| documents | [AnalyticsAsCodeDocument](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.analyticsascodedocument/index.md)[] | all documents of the workspace |
| options | [IAnalyticsAsCodeDeployOptions](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ianalyticsascodedeployoptions/index.md) | _(Optional)_ the deploy options |

**Returns:**

Promise&lt;void&gt;

#### Remarks

The documents must be valid against the AaC schema. The ids must be unique in each kind of object. The objects that the documents do not contain are removed from the workspace.
