# Connect download service

Service for downloading Connect binaries

OpenAPI file: [`nominal.connect.download.v1.json`](https://dev.nominal.io/api/_downloads/c07e558a21b91d01c0140765b448a79f/nominal.connect.download.v1.json)

## Endpoints

### Get latest connect uri

GET `/connect/v1/download/{platform}/uri`

Get a pre-signed URL for downloading the latest version of Connect for a given platform Scoped to the caller’s org, which picks the release channel. Any session may call it.

Path parameters

`platform` string, one of `macos`, `macos-pkg`, `windows`, `ubuntu` required
:   One of `macos`, `macos-pkg`, `windows`, `ubuntu`.

Response

`uri` string
:   ​

Request

**curl**

```shell
curl "https://api.gov.nominal.io/api/connect/v1/download/<platform>/uri" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/connect/v1/download/<platform>/uri",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/connect/v1/download/<platform>/uri",
    headers={"Authorization": "Bearer <api key>"},
)
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.get(
            "https://api.gov.nominal.io/api/connect/v1/download/<platform>/uri",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

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

### Get latest version

GET `/connect/v1/download/{platform}/version`

Get the latest version string of Connect for a given platform Scoped to the caller’s org, which picks the release channel. Any session may call it.

Path parameters

`platform` string, one of `macos`, `macos-pkg`, `windows`, `ubuntu` required
:   One of `macos`, `macos-pkg`, `windows`, `ubuntu`.

Response

`version` string
:   ​

Request

**curl**

```shell
curl "https://api.gov.nominal.io/api/connect/v1/download/<platform>/version" \
  -H "Authorization: Bearer <api key>"
```

**requests**

```python
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/connect/v1/download/<platform>/version",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/connect/v1/download/<platform>/version",
    headers={"Authorization": "Bearer <api key>"},
)
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.get(
            "https://api.gov.nominal.io/api/connect/v1/download/<platform>/version",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

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

## Errors

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

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

| Status | Name | Notes |
| --- | --- | --- |
| 404 | `ConnectDownloadServiceErrorConnectNotAvailable` | Connect not available for download on this stack. Please contact support. |

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