Switch the landscape's profile
Selects the profile Plan and Sync use from now on when a request names none. Nothing is redeployed: while the landscape is synced from another profile, `Landscape.selected_profile` differs from `profile` and the console asks for a Sync ("requires a Sync"). The file need not exist yet (the Plan says so). Needs `landscape.manage`; audited as `landscape.profile_select`.
openapi/harthelm.yaml at v1.5.0__Host-harthelm_session<token>Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header
Harthelm-CSRF: 1 and a matching Origin.
ws*integerNumeric resource id.
int641 <= valueapplication/json- body
profile*ProfileNameA profile (harthelm.<profile>.yml); absent or empty for harthelm.yml.
^([a-z0-9]([-a-z0-9]{0,30}[a-z0-9])?)?$The landscape.
application/json- response
workspace_id*IDNumeric resource id.
int641 <= valuestate*LandscapeState"empty""synced""torn-down"profile?ProfileNameThe profile of the last Sync.
^([a-z0-9]([-a-z0-9]{0,30}[a-z0-9])?)?$selected_profile?ProfileNameThe profile of the last Sync.
^([a-z0-9]([-a-z0-9]{0,30}[a-z0-9])?)?$spec_hash?stringHash of the synced, resolved spec; absent while empty.
source_hash?stringSHA-256 of the file the last Sync read; compare with a plan's file.sha256 for the out-of-sync banner.
source_commit?stringHEAD of /data/app at the last Sync.
generation*integerBumped by every Sync and Teardown.
int64synced_at?stringdate-timesynced_by?IDNumeric resource id.
int641 <= valuerun_state*RunStatestarted: the steps run, also after a pod restart or a wake; stopped: the pods stay, the steps do not run.
"stopped""started"run_generation*integerBumped by every Run.
int64operation_id?stringThe landscape.sync or landscape.teardown operation in progress.
uuidservices*array<>curl -X PUT 'https://console.example.com/api/v1/workspaces/1/landscape/profile' \ -H 'Content-Type: application/json' \ -d '{ "profile": "string"}'{ "workspace_id": 1, "state": "empty", "profile": "string", "selected_profile": "string", "spec_hash": "string", "source_hash": "string", "source_commit": "string", "generation": 0, "synced_at": "2019-08-24T14:15:22Z", "synced_by": 1, "run_state": "stopped", "run_generation": 0, "operation_id": "cb4ede3c-a5d1-45e3-a9d2-fe83accbce52", "services": [ { "name": "string", "type": "steps", "plan": "string", "replicas": 1, "desired_replicas": 0, "ready_replicas": 0, "availability": "always", "run_state": "stopped", "status": "pending", "status_detail": "string", "ports": [ { "port": 1, "public": true, "url": "string", "routes": [ { "path": "string", "strip": true } ] } ], "health": { "port": 0, "path": "string", "mode": "any-http" }, "max_replicas": 1, "image": "string", "image_ref": "string", "run_as_user": 0, "autonomous": true, "target": "string", "routes": [ { "path": "string", "strip": true } ], "run_result": { "result": "success", "generation": 0, "message": "string", "at": "2019-08-24T14:15:22Z" }, "upgrade_pending": true, "managed_service_id": "77427583-c503-4b42-8d68-8e0a3b2c8384", "managed_status": "creating", "needs": [ "string" ], "failing": true } ]}Scale a service
Sets the replicas of a `steps` or `container` service without a Sync: at least 1, at most the service's `max_replicas` (its `maxReplicas`, else the plan's), else 422 with pointer `/replicas`; a `forward` or `managed` service is 422 too. A sleeping service keeps sleeping and wakes with the new count; a stopped or torn-down landscape is 409 `landscape-not-synced`. The next Sync keeps the scaled count unless the file's `replicas` changed since the last Sync (then the file wins). The team quota applies as for a Sync (409 `quota-exceeded`). Needs `landscape.manage`; audited as `landscape.scale`; publishes `landscape.updated`.
Start one service's steps
Sets the service's run switch to started and tells its ready replicas to run the current run generation's steps. Pods are not restarted. Needs `landscape.manage`; 409 when the landscape is not synced, and 409 `managed-service-bound` for a `managed` service (the marketplace runs it; a teardown pauses it and a Sync resumes it).