# Read what a package can do

Source: https://docs.vlayers.ai/reference/hosting/preview-install

`POST /v1/installs/preview` · scope `workspace:read`

Shows what a published version of a package can do, worked out by VoiceLayer from its signed manifest rather than written by the publisher: the places it can send data, the credentials and connections it asks for, the messages it sends, the addresses it publishes. Nothing is installed. The `summary.hash` is what you agree to when you install.

Requires an API key with the `workspace:read` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `packageId` | body | string | yes | The package, as `<namespace>/<name>`. |
| `versionId` | body | string | yes | The id of the published version to read. |
| `sizeClass` | body | "small" \| "medium" \| "large" | no | The room size you would run it in: `small`, `medium` or `large`. |
| `warmCount` | body | integer | no | How many copies you would keep ready (1 to 20). |

## Request

cURL:

```bash
curl -X POST https://api.vlayers.ai/v1/installs/preview \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "packageId": "com.example/orders-panel",
    "versionId": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67"
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { summary } = await voicelayer.hosting.previewInstall({
  packageId: 'com.example/orders-panel',
  versionId: '0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67'
});
console.log(summary.hash);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.hosting.preview_install(
    package_id="com.example/orders-panel",
    version_id="0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
)
print(result.summary.hash)
```

## Response `200`

```json
{
  "packageId": "com.example/orders-panel",
  "versionId": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
  "label": "com.example/orders-panel@1.0.0",
  "kind": "tool-set",
  "publisherWorkspaceId": "org_publisher",
  "summary": {
    "lines": [
      {
        "section": "hosts",
        "key": "host:api.example.com",
        "text": "It can send data to api.example.com."
      }
    ],
    "hash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
  },
  "caveat": "This package can send the data it receives to these hosts. Treat it as you would any vendor with that access."
}
```
