API

AppPreviewProfile

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}/preview_profiles create Created preview defaults
GET /api/v1/hosting/apps/{app_id}/preview_profiles/{id} load Success
GET /api/v1/hosting/apps/{app_id}/preview_profiles load Success
PATCH /api/v1/hosting/apps/{app_id}/preview_profiles/{id} patch Updated preview defaults
DELETE /api/v1/hosting/apps/{app_id}/preview_profiles/{id} remove Success
PUT /api/v1/hosting/apps/{app_id}/preview_profiles/{id} update Success

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:

app_preview_profile, err := client.AppPreviewProfile(nil).Load(map[string]any{"app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(app_preview_profile)
created, err := client.AppPreviewProfile(nil).Create(map[string]any{"app_id": "example", "name": "example", "slug": "example", "source_environment_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.AppPreviewProfile(nil).Update(map[string]any{"id": "example_id", "app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.AppPreviewProfile(nil).Patch(map[string]any{"id": "example_id", "app_id": "example", "automatic": true}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)
removed, err := client.AppPreviewProfile(nil).Remove(map[string]any{"app_id": "example", "id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

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

local app_preview_profile, err = client:AppPreviewProfile():load({ app_id = "example" })
local created, err = client:AppPreviewProfile():create({ app_id = "example", name = "example", slug = "example", source_environment_id = "example" })
local updated, err = client:AppPreviewProfile():update({ id = "example_id", app_id = "example" })
local patched, err = client:AppPreviewProfile():patch({ id = "example_id", app_id = "example", automatic = true })
local removed, err = client:AppPreviewProfile():remove({ app_id = "example", id = "example_id" })

PHP

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

$app_preview_profile = $client->AppPreviewProfile()->load(["app_id" => "example"]);
$created = $client->AppPreviewProfile()->create(["app_id" => "example", "name" => "example", "slug" => "example", "source_environment_id" => "example"]);
$updated = $client->AppPreviewProfile()->update(["id" => "example_id", "app_id" => "example"]);
$patched = $client->AppPreviewProfile()->patch(["id" => "example_id", "app_id" => "example", "automatic" => true]);
$client->AppPreviewProfile()->remove(["app_id" => "example", "id" => "example_id"]);

Python

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

app_preview_profile = client.AppPreviewProfile().load({"app_id": "example"})
created = client.AppPreviewProfile().create({ "app_id": "example", "name": "example", "slug": "example", "source_environment_id": "example" })
updated = client.AppPreviewProfile().update({"id": "example_id", "app_id": "example"})
patched = client.AppPreviewProfile().patch({"id": "example_id", "app_id": "example", "automatic": True})
client.AppPreviewProfile().remove({"app_id": "example", "id": "example_id"})

Ruby

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

app_preview_profile = client.AppPreviewProfile.load({ "app_id" => "example" })
created = client.AppPreviewProfile.create({ "app_id" => "example", "name" => "example", "slug" => "example", "source_environment_id" => "example" })
updated = client.AppPreviewProfile.update({ "id" => "example_id", "app_id" => "example" })
patched = client.AppPreviewProfile.patch({ "id" => "example_id", "app_id" => "example", "automatic" => true })
client.AppPreviewProfile.remove({ "app_id" => "example", "id" => "example_id" })

TypeScript

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

const app_preview_profile = await client.AppPreviewProfile().load({ app_id: "example" })
const created = await client.AppPreviewProfile().create({ app_id: "example", name: "example", slug: "example", source_environment_id: "example" })
const updated = await client.AppPreviewProfile().update({ id: "example_id", app_id: "example" })
const patched = await client.AppPreviewProfile().patch({ id: "example_id", app_id: "example", automatic: true })
await client.AppPreviewProfile().remove({ app_id: "example", id: "example_id" })

Fields

Field Type Required Description
automatic boolean No Automatic
configuration object No Configuration
created_at string No Created At
hosted_app_id string Yes Hosted App Id
id string Yes Id
name string Yes Name
slug string Yes Slug
source_environment_id string Yes Source Environment Id
ttl_days integer No Ttl Days
updated_at string No Updated At

create

POST /api/v1/hosting/apps/{app_id}/preview_profiles

Operation ID: post_api_v1_hosting_apps_app_id_preview_profiles.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Request body

application/json

Property Type Required Description
automatic boolean No
configuration object No
configuration.build_variables object No
configuration.required_keys array of string No
configuration.service_resources object No Service public IDs mapped to resource overrides. Omitted fields inherit; an empty map removes all local overrides. Null reservations select platform defaults.
configuration.variables object No
name string Yes
slug string Yes
source_environment_id string Yes
ttl_days integer No

Responses

201: Created preview defaults

application/json

Property Type Required Description
profile object Yes
profile.automatic boolean Yes
profile.configuration object Yes
profile.configuration.build_variables object No
profile.configuration.required_keys array of string No
profile.configuration.service_resources object No Service public IDs mapped to resource overrides. Omitted fields inherit; an empty map removes all local overrides. Null reservations select platform defaults.
profile.configuration.variables object No
profile.created_at string No
profile.hosted_app_id string Yes
profile.id string Yes
profile.name string Yes
profile.slug string Yes
profile.source_environment_id string Yes
profile.ttl_days integer Yes
profile.updated_at string No
401: Authentication required
403: Organization administrator required
404: App or source not found
409: Source cannot be captured
422: Invalid preview configuration
502: Hosting dependency unavailable

load

GET /api/v1/hosting/apps/{app_id}/preview_profiles/{id}

Operation ID: api_v1_app_preview_profile.

Authentication: bearer token (bearerAuth).

Parameters

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

Responses

200: Success

application/json

The response is object.

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

GET /api/v1/hosting/apps/{app_id}/preview_profiles

Operation ID: api_v1_app_preview_profiles.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Responses

200: Success

application/json

The response is object.

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

patch

PATCH /api/v1/hosting/apps/{app_id}/preview_profiles/{id}

Operation ID: patch_api_v1_hosting_apps_app_id_preview_profiles_id_.

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
automatic boolean No
configuration object No
configuration.build_variables object No
configuration.required_keys array of string No
configuration.service_resources object No Service public IDs mapped to resource overrides. Omitted fields inherit; an empty map removes all local overrides. Null reservations select platform defaults.
configuration.variables object No
name string No
slug string No
source_environment_id string No
ttl_days integer No

Responses

200: Updated preview defaults

application/json

Property Type Required Description
profile object Yes
profile.automatic boolean Yes
profile.configuration object Yes
profile.configuration.build_variables object No
profile.configuration.required_keys array of string No
profile.configuration.service_resources object No Service public IDs mapped to resource overrides. Omitted fields inherit; an empty map removes all local overrides. Null reservations select platform defaults.
profile.configuration.variables object No
profile.created_at string No
profile.hosted_app_id string Yes
profile.id string Yes
profile.name string Yes
profile.slug string Yes
profile.source_environment_id string Yes
profile.ttl_days integer Yes
profile.updated_at string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/hosting/apps/{app_id}/preview_profiles/{id}

Operation ID: delete_api_v1_hosting_apps_app_id_preview_profiles_id_.

Authentication: bearer token (bearerAuth).

Parameters

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

Responses

200: Success

application/json

The response is object.

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

update

PUT /api/v1/hosting/apps/{app_id}/preview_profiles/{id}

Operation ID: put_api_v1_hosting_apps_app_id_preview_profiles_id_.

Authentication: bearer token (bearerAuth).

Parameters

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

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

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