Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/sdk_protos_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ app,GetRobotPartByNameAndLocation,,,GetRobotPartByNameAndLocation,,getRobotPartB
app,TailRobotPartLogs,,tail_robot_part_logs,TailRobotPartLogs,,tailRobotPartLogs
app,GetRobotPartHistory,,get_robot_part_history,GetRobotPartHistory,,getRobotPartHistory
app,UpdateRobotPart,,update_robot_part,UpdateRobotPart,,updateRobotPart
app,SetConfigProperty,,set_config_property,,,
app,NewRobotPart,,new_robot_part,NewRobotPart,,newRobotPart
app,DeleteRobotPart,,delete_robot_part,DeleteRobotPart,,deleteRobotPart
app,MarkPartAsMain,,mark_part_as_main,MarkPartAsMain,,markPartAsMain
Expand Down
1 change: 1 addition & 0 deletions static/include/app/apis/generated/app-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
| [`TailRobotPartLogs`](/reference/apis/fleet/#tailrobotpartlogs) | Get an asynchronous iterator that receives live machine part logs. |
| [`GetRobotPartHistory`](/reference/apis/fleet/#getrobotparthistory) | Get a list containing the history of a machine {{< glossary_tooltip term_id="part" text="part" >}}. |
| [`UpdateRobotPart`](/reference/apis/fleet/#updaterobotpart) | Change the name of and assign an optional new configuration to a machine {{< glossary_tooltip term_id="part" text="part" >}}. |
| [`SetConfigProperty`](/reference/apis/fleet/#setconfigproperty) | Set individual properties in a machine {{< glossary_tooltip term_id="part" text="part" >}}'s configuration by path, without replacing the whole configuration as `UpdateRobotPart` does. |
| [`NewRobotPart`](/reference/apis/fleet/#newrobotpart) | Create a new machine {{< glossary_tooltip term_id="part" text="part" >}}. |
| [`DeleteRobotPart`](/reference/apis/fleet/#deleterobotpart) | Delete the specified machine {{< glossary_tooltip term_id="part" text="part" >}}. |
| [`MarkPartAsMain`](/reference/apis/fleet/#markpartasmain) | Mark a machine part as the _main_ part of a machine. |
Expand Down
27 changes: 27 additions & 0 deletions static/include/app/apis/generated/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2888,6 +2888,33 @@ For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfac
{{% /tab %}}
{{< /tabs >}}

### SetConfigProperty

Set individual properties in a machine {{< glossary_tooltip term_id="part" text="part" >}}'s configuration by path, without replacing the whole configuration as [`UpdateRobotPart`](#updaterobotpart) does.
Paths are dot-separated, such as `network.bind_address`.
In `components`, `services`, `jobs`, `remotes`, `triggers`, `modules`, `processes`, and `packages`, the second segment names the resource by name or ID, such as `components.my-camera.attributes.width_px`.
Changes apply in order, and each change succeeds or fails on its own; the result for each change reports whether it succeeded and, if not, the error.
You can send at most 100 changes per request.
If the part imports a fragment, you can only set properties that the part's own configuration already sets; setting a property that may come from the fragment returns an error.

{{< tabs >}}
{{% tab name="Python" %}}

**Parameters:**

- `robot_part_id` ([str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): ID of the robot part to update.
- `property_changes` ([collections.abc.Mapping[str, viam.utils.ValueTypes]](https://python.viam.dev/autoapi/viam/components/component_base/index.html#viam.components.component_base.ValueTypes)) (required): A mapping of JSON paths within the config to the new value at that path.
- `timeout` ([float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.

**Returns:**

- ([list[viam.proto.app.ConfigPropertyChangeResult]](https://python.viam.dev/autoapi/viam/proto/app/index.html#viam.proto.app.ConfigPropertyChangeResult)): : The result of each requested property change.

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/app_client/index.html#viam.app.app_client.AppClient.set_config_property).

{{% /tab %}}
{{< /tabs >}}

### NewRobotPart

Create a new machine {{< glossary_tooltip term_id="part" text="part" >}}.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Set individual properties in a machine {{< glossary_tooltip term_id="part" text="part" >}}'s configuration by path, without replacing the whole configuration as [`UpdateRobotPart`](#updaterobotpart) does.
Paths are dot-separated, such as `network.bind_address`.
In `components`, `services`, `jobs`, `remotes`, `triggers`, `modules`, `processes`, and `packages`, the second segment names the resource by name or ID, such as `components.my-camera.attributes.width_px`.
Changes apply in order, and each change succeeds or fails on its own; the result for each change reports whether it succeeded and, if not, the error.
You can send at most 100 changes per request.
If the part imports a fragment, you can only set properties that the part's own configuration already sets; setting a property that may come from the fragment returns an error.
Loading