# Connect demo apps service

Service for downloading demo Connect apps

OpenAPI file: [`nominal.connect.demo_apps.v1.json`](https://dev.nominal.io/api/_downloads/226efcfd8043af3b2ec7dd31ad22fc9a/nominal.connect.demo_apps.v1.json)

## Endpoints

### Get demo app download URL

POST `/connect/v1/demo-apps/download`

Get a pre-signed URL for downloading a demo Connect app Not workspace-scoped: any session may call it.

Body

`sha256Checksum` string
:   Matches `^[a-f0-9]{64}$`.

Response

`url` string
:   ​

Request

**curl**

```shell
curl -X POST "https://api.gov.nominal.io/api/connect/v1/demo-apps/download" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '{
  "sha256Checksum": "<sha256 checksum>"
}'
```

**requests**

```python
import requests

response = requests.post(
    "https://api.gov.nominal.io/api/connect/v1/demo-apps/download",
    headers={"Authorization": "Bearer <api key>"},
    json={"sha256Checksum": "<sha256 checksum>"},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.post(
    "https://api.gov.nominal.io/api/connect/v1/demo-apps/download",
    headers={"Authorization": "Bearer <api key>"},
    json={"sha256Checksum": "<sha256 checksum>"},
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/connect/v1/demo-apps/download",
            headers={"Authorization": "Bearer <api key>"},
            json={"sha256Checksum": "<sha256 checksum>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
{
  "url": "<url>"
}
```

## Errors

[Errors](https://dev.nominal.io/api.md#errors) shows how these errors are sent.

Each error’s `errorName` is `NominalConnectDemoAppsV1:` followed by its name below.

| Status | Name | Notes |
| --- | --- | --- |
| 400 | `ConnectDemoAppsServiceErrorInvalidChecksum` | Provided checksum is not valid. |
| 404 | `ConnectDemoAppsServiceErrorUnavailableForEnvironment` | Demo apps not available for specified environment. |

Page design based on [Scalar](https://scalar.com), MIT License.
