Harthelm Docs
REST APILandscape

Add or duplicate a profile

Creates `harthelm.<name>.yml` (*Add profile* with `content`, *Duplicate* with `from`, exactly one of the two; 422 otherwise). The write is the agent's create (`If-None-Match: *`), so an existing file is 409 `name-taken`. It does not select the profile. Needs `workspace.code`; audited as `landscape.config_write`.

Generated from openapi/harthelm.yaml at v1.5.0
POST
/workspaces/{ws}/landscape/profiles

Authorization

cookie__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.

Path Parameters

ws*integer

Numeric resource id.

Formatint64
Range1 <= value

Header Parameters

Idempotency-Key?string

Client-chosen key (at most 255 characters); a repeated key returns the first result for 24 h.

Length1 <= length <= 255

Request Body

application/json
  1. body
name*string

The new profile; the file is harthelm.<name>.yml.

Match^[a-z0-9]([-a-z0-9]{0,30}[a-z0-9])?$
from?ProfileName

Duplicate this profile's file ("" for harthelm.yml).

Match^([a-z0-9]([-a-z0-9]{0,30}[a-z0-9])?)?$
content?string

The new file's content (UTF-8, at most 1 MiB), for Add profile.

Lengthlength <= 1048576

Response Body

The new profile's file.

application/json
  1. response

A profile's harthelm.yml as the IDE agent read or wrote it.

path*string

Relative to /data/app: harthelm.yml or harthelm.<profile>.yml.

content*string

The file as UTF-8.

sha256*string

Lower-case hex SHA-256 of the bytes on disk; the editor's version (send it quoted as If-Match).

commit?string

HEAD of /data/app; absent outside a repository or before the first commit.

profiles*array<string>

The profiles whose files exist, "" for harthelm.yml, sorted.

curl -X POST 'https://console.example.com/api/v1/workspaces/1/landscape/profiles' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "path": "string",  "content": "string",  "sha256": "string",  "commit": "string",  "profiles": [    "string"  ]}