Profiles
Set SERVER and BASE as shown in Connection and first request before running these commands.
All paths below start with /api/profile. A profile owns its hardware, bridge settings and simulation history. Create and rename with a user-facing name of at most 100 characters. Import always creates a new profile with a new internal UUID; it does not replace an existing one. Do not delete the last profile or a profile with an active simulation.
Profile names must be unique, ignoring case.
| Method | Path | Request / result |
|---|---|---|
| GET | /api/profile/get-profiles | List → {profiles,total}. |
| GET | /api/profile/get-profile/{id} | Read → {profile}. |
| POST | /api/profile/create-profile | {"name":"External test"} → 201 {profile}. |
| PUT | /api/profile/update-profile/{id} | {"name":"New name"} → {profile}. |
| DELETE | /api/profile/delete-profile/{id} | Delete the profile and its data → 204, no JSON body. |
| GET | /api/profile/export-profile/{id} | Download the complete profile archive as JSON; ?download=1 adds download headers. |
| POST | /api/profile/import-profile | {"archive": ...} → 201 {profile}. Use the complete exported archive, including its metadata and logs. |
curl -fsS "$SERVER/api/profile/create-profile" \
-H 'Content-Type: application/json' -d '{"name":"External test"}'
curl -fsS -X PUT "$SERVER/api/profile/update-profile/$PROFILE_ID" \
-H 'Content-Type: application/json' -d '{"name":"Sensor experiment"}'Export and import
Export and import example. The import body wraps the exported document in archive; it is JSON, not a multipart file upload.
curl -fsS "$SERVER/api/profile/export-profile/$PROFILE_ID?download=1" -o profile.json
jq '{archive: .}' profile.json > import.json
curl -fsS "$SERVER/api/profile/import-profile" \
-H 'Content-Type: application/json' --data-binary @import.jsonLast updated on