0

Gets a provisioning status

by
Published Oct 17, 2025

This endpoint returns the status of the services that the tunnel is currently configured for. Provisioning the services is an asynchronous process so this endpoint allows you to poll the status.

Script zuplo Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Zuplo = {
3
	apiKey: string
4
}
5
/**
6
 * Gets a provisioning status
7
 * This endpoint returns the status of the services that the tunnel is currently configured for. Provisioning the services is an asynchronous process so this endpoint allows you to poll the status.
8
 */
9
export async function main(
10
	auth: Zuplo,
11
	accountName: string,
12
	tunnelId: string,
13
	operationId: string
14
) {
15
	const url = new URL(
16
		`https://dev.zuplo.com/v1/accounts/${accountName}/tunnels/${tunnelId}/provisioning-operations/${operationId}`
17
	)
18

19
	const response = await fetch(url, {
20
		method: 'GET',
21
		headers: {
22
			Authorization: 'Bearer ' + auth.apiKey
23
		},
24
		body: undefined
25
	})
26
	if (!response.ok) {
27
		const text = await response.text()
28
		throw new Error(`${response.status} ${text}`)
29
	}
30
	return await response.json()
31
}
32