API

PreviewSharingApproval

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/hosting/apps/{app_id}/previews/{id}/sharing_approvals create Success
GET /api/v1/hosting/apps/{app_id}/previews/{id}/sharing_approvals load Sharing selections and available metadata without values

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

preview_sharing_approval, err := client.PreviewSharingApproval(nil).Load(map[string]any{"app_id": "example", "preview_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(preview_sharing_approval)
created, err := client.PreviewSharingApproval(nil).Create(map[string]any{"app_id": "example", "preview_id": "example", "snapshot_version": 1}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local preview_sharing_approval, err = client:PreviewSharingApproval():load({ app_id = "example", preview_id = "example" })
local created, err = client:PreviewSharingApproval():create({ app_id = "example", preview_id = "example", snapshot_version = 1 })

PHP

Construct client as shown in the PHP setup, then call the operations:

$preview_sharing_approval = $client->PreviewSharingApproval()->load(["app_id" => "example", "preview_id" => "example"]);
$created = $client->PreviewSharingApproval()->create(["app_id" => "example", "preview_id" => "example", "snapshot_version" => 1]);

Python

Construct client as shown in the Python setup, then call the operations:

preview_sharing_approval = client.PreviewSharingApproval().load({"app_id": "example", "preview_id": "example"})
created = client.PreviewSharingApproval().create({ "app_id": "example", "preview_id": "example", "snapshot_version": 1 })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

preview_sharing_approval = client.PreviewSharingApproval.load({ "app_id" => "example", "preview_id" => "example" })
created = client.PreviewSharingApproval.create({ "app_id" => "example", "preview_id" => "example", "snapshot_version" => 1 })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const preview_sharing_approval = await client.PreviewSharingApproval().load({ app_id: "example", preview_id: "example" })
const created = await client.PreviewSharingApproval().create({ app_id: "example", preview_id: "example", snapshot_version: 1 })

Fields

Field Type Required Description
approved_build_keys array Yes Approved Build Keys
approved_build_secrets array Yes Approved Build Secrets
approved_default_configuration array Yes Approved Default Configuration
approved_default_secrets array Yes Approved Default Secrets
approved_source_keys array Yes Approved Source Keys
build_keys array No Build Keys
build_secrets array Yes Build Secrets
default_configuration array Yes Default Configuration
default_secrets array Yes Default Secrets
services array Yes Services
snapshot_version integer Yes Snapshot Version
source_keys array Yes Source Keys

create

POST /api/v1/hosting/apps/{app_id}/previews/{id}/sharing_approvals

Operation ID: sharing_approvals_api_v1_app_preview.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

Property Type Required Description
build_keys array of string No
build_secrets array of string No
default_configuration array of string No
default_secrets array of string No
snapshot_version integer Yes
source_keys array of string No

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/hosting/apps/{app_id}/previews/{id}/sharing_approvals

Operation ID: get_api_v1_hosting_apps_app_id_previews_id_sharing_approvals.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Responses

200: Sharing selections and available metadata without values

application/json

Property Type Required Description
approved_build_keys array of string Yes
approved_build_secrets array of string Yes
approved_default_configuration array of string Yes
approved_default_secrets array of string Yes
approved_source_keys array of string Yes
build_secrets array of object Yes
build_secrets[].binding_id string Yes
build_secrets[].id string Yes
build_secrets[].key string Yes
build_secrets[].version_id string Yes
default_configuration array of object Yes
default_configuration[].id string Yes
default_configuration[].key string Yes
default_configuration[].value_kind string Yes
default_secrets array of object Yes
default_secrets[].id string Yes
default_secrets[].key string Yes
services array of object Yes
services[].build_keys array of string Yes
services[].service_id string Yes
services[].source_keys array of string Yes
snapshot_version integer Yes
source_keys array of string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway