API

AppServicePlacement

Operations

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

Method Route SDK operation Returns
GET /api/v1/hosting/apps/{app_id}/service_placements list Service placements
GET /api/v1/hosting/apps/{app_id}/service_placements/{id} load Service placement
PUT /api/v1/hosting/apps/{app_id}/service_placements/configure update Configured service placement

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_service_placements, err := client.AppServicePlacement(nil).List(map[string]any{"app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(app_service_placements)
app_service_placement, err := client.AppServicePlacement(nil).Load(map[string]any{"app_id": "example", "id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(app_service_placement)

Lua

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

local app_service_placements, err = client:AppServicePlacement():list({ app_id = "example" })
local app_service_placement, err = client:AppServicePlacement():load({ app_id = "example", id = "example_id" })

PHP

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

$app_service_placements = $client->AppServicePlacement()->list(["app_id" => "example"]);
$app_service_placement = $client->AppServicePlacement()->load(["app_id" => "example", "id" => "example_id"]);

Python

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

app_service_placements = client.AppServicePlacement().list({"app_id": "example"})
app_service_placement = client.AppServicePlacement().load({"app_id": "example", "id": "example_id"})

Ruby

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

app_service_placements = client.AppServicePlacement.list({ "app_id" => "example" })
app_service_placement = client.AppServicePlacement.load({ "app_id" => "example", "id" => "example_id" })

TypeScript

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

const app_service_placements = await client.AppServicePlacement().list({ app_id: "example" })
const app_service_placement = await client.AppServicePlacement().load({ app_id: "example", id: "example_id" })

Fields

Field Type Required Description
app_environment_id string Yes App Environment Id
app_service_id string Yes App Service Id
created_at string Yes Created At
deployment_channel one,string,null Yes Preview-only override; null inherits the captured source channel.
hosted_app_id string Yes Hosted App Id
id string Yes Id
mode string Yes Mode
organization_id string Yes Organization Id
region_count integer Yes Region Count
replicas_per_region integer Yes Replicas Per Region
rollout_strategy string Yes Rollout Strategy
targets array Yes Targets
total_replicas integer Yes Total Replicas
updated_at string Yes Updated At

list

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

Operation ID: api_v1_app_service_placements.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
service query string No Filter by a service slug belonging to this app.
existing query boolean No Return positive-replica placements with enabled targets in active, undeleted services and environments.

Responses

200: Service placements

application/json

Property Type Required Description
placements array of object Yes
placements[].app_environment_id string Yes
placements[].app_service_id string Yes
placements[].created_at string (date-time) Yes
placements[].deployment_channel enum: stable, blue_green Yes Preview-only override; null inherits the captured source channel.
placements[].hosted_app_id string Yes
placements[].id string Yes
placements[].mode enum: single_region, multi_region Yes
placements[].organization_id string Yes
placements[].region_count integer Yes
placements[].replicas_per_region integer Yes
placements[].rollout_strategy enum: health_gated, burst Yes
placements[].targets array of object Yes
placements[].targets[].enabled boolean Yes
placements[].targets[].id string Yes
placements[].targets[].location object Yes
placements[].targets[].location.code string Yes
placements[].targets[].location.created_at string (date-time) Yes
placements[].targets[].location.id string Yes
placements[].targets[].location.name string Yes
placements[].targets[].location.nomad_datacenter string Yes
placements[].targets[].location.updated_at string (date-time) Yes
placements[].targets[].location_id string Yes
placements[].targets[].position integer Yes
placements[].total_replicas integer Yes
placements[].updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

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

Operation ID: api_v1_app_service_placement.

Authentication: bearer token (bearerAuth).

Parameters

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

Responses

200: Service placement

application/json

Property Type Required Description
placement object Yes
placement.app_environment_id string Yes
placement.app_service_id string Yes
placement.created_at string (date-time) Yes
placement.deployment_channel enum: stable, blue_green Yes Preview-only override; null inherits the captured source channel.
placement.hosted_app_id string Yes
placement.id string Yes
placement.mode enum: single_region, multi_region Yes
placement.organization_id string Yes
placement.region_count integer Yes
placement.replicas_per_region integer Yes
placement.rollout_strategy enum: health_gated, burst Yes
placement.targets array of object Yes
placement.targets[].enabled boolean Yes
placement.targets[].id string Yes
placement.targets[].location object Yes
placement.targets[].location.code string Yes
placement.targets[].location.created_at string (date-time) Yes
placement.targets[].location.id string Yes
placement.targets[].location.name string Yes
placement.targets[].location.nomad_datacenter string Yes
placement.targets[].location.updated_at string (date-time) Yes
placement.targets[].location_id string Yes
placement.targets[].position integer Yes
placement.total_replicas integer Yes
placement.updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/hosting/apps/{app_id}/service_placements/configure

Operation ID: configure_api_v1_app_service_placements.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes

Request body

application/json

Property Type Required Description
app_environment_id string Yes
app_service_id string Yes
deployment_channel enum: stable, blue_green No Preview-only override; null inherits the captured source channel.
expected_generation integer No Required for preview environments. Stale generations or unfinished cleanup return 409.
mode enum: single_region, multi_region Yes
replicas_per_region integer Yes
rollout_strategy enum: health_gated, burst Yes
targets array of object Yes
targets[].enabled boolean No
targets[].location_id string Yes

Responses

200: Configured service placement

application/json

Property Type Required Description
placement object Yes
placement.app_environment_id string Yes
placement.app_service_id string Yes
placement.created_at string (date-time) Yes
placement.deployment_channel enum: stable, blue_green Yes Preview-only override; null inherits the captured source channel.
placement.hosted_app_id string Yes
placement.id string Yes
placement.mode enum: single_region, multi_region Yes
placement.organization_id string Yes
placement.region_count integer Yes
placement.replicas_per_region integer Yes
placement.rollout_strategy enum: health_gated, burst Yes
placement.targets array of object Yes
placement.targets[].enabled boolean Yes
placement.targets[].id string Yes
placement.targets[].location object Yes
placement.targets[].location.code string Yes
placement.targets[].location.created_at string (date-time) Yes
placement.targets[].location.id string Yes
placement.targets[].location.name string Yes
placement.targets[].location.nomad_datacenter string Yes
placement.targets[].location.updated_at string (date-time) Yes
placement.targets[].location_id string Yes
placement.targets[].position integer Yes
placement.total_replicas integer Yes
placement.updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
409: Preview placement requires completed pause cleanup and the current generation
422: Deployment request failed validation

application/json

Property Type Required Description
details array of string No
error string Yes
502: Bad gateway