Skip to content

Commit

Permalink
DOCS-1422: Change robot to machine pt 3 (#2374)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT authored Jan 9, 2024
1 parent 161fb58 commit 15ed286
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions docs/fleet/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ to later update the Viam CLI tool on macOS, run `brew upgrade viam`.

Once you have [installed the Viam CLI](#install), you must authenticate your CLI session with Viam in order to run CLI commands.

You can authenticate your CLI session using either a personal access token, or an organization, location, or robot API key.
You can authenticate your CLI session using either a personal access token, or an organization, location, or machine part API key.
To use an organization API key to authenticate, you must first [create an organization API key](#create-an-organization-api-key).
Similarly, to authenticate using a location or robot API key, you must first create a [location](#create-a-location-api-key) or [robot API key](#create-a-robot-api-key).
Similarly, to authenticate using a location or machine part API key, you must first create a [location](#create-a-location-api-key) or [machine part API key](#create-a-machine-part-api-key).

- To authenticate your CLI session using a personal access token:

Expand Down Expand Up @@ -127,13 +127,13 @@ Similarly, to authenticate using a location or robot API key, you must first cre

If you haven't already, [create a location API key](#create-a-location-api-key) to use this authentication method.

- To authenticate your CLI session using a robot API key:
- To authenticate your CLI session using a machine part API key:

```sh {class="command-line" data-prompt="$"}
viam login api-key --key-id <robot-api-key-uuid> --key <robot-api-key-secret-value>
viam login api-key --key-id <machine-part-api-key-uuid> --key <machine-part-api-key-secret-value>
```

If you haven't already, [create a robot API key](#create-a-robot-api-key) to use this authentication method.
If you haven't already, [create a machine part API key](#create-a-machine-part-api-key) to use this authentication method.

An authenticated session is valid for 24 hours, unless you explicitly [log out](#logout).

Expand All @@ -144,7 +144,7 @@ After the session expires or you log out, you must re-authenticate to use the CL
To use an organization API key to authenticate your CLI session, you must first create one:

1. First, [authenticate](#authenticate) your CLI session.
If your organization does not already have an organization API key created, authenticate using a personal access token or either a [location API key](#create-a-location-api-key) or [robot API key](#create-a-robot-api-key).
If your organization does not already have an organization API key created, authenticate using a personal access token or either a [location API key](#create-a-location-api-key) or [machine part API key](#create-a-machine-part-api-key).

1. Then, run the following command to create a new organization API key:

Expand Down Expand Up @@ -177,7 +177,7 @@ An organization can have multiple API keys.
To use an location API key to authenticate your CLI session, you must first create one:

1. First, [authenticate](#authenticate) your CLI session.
If you don't already have a location API key created, authenticate using a personal access token, an [organization API key](#create-an-organization-api-key), or a [robot API key](#create-a-robot-api-key).
If you don't already have a location API key created, authenticate using a personal access token, an [organization API key](#create-an-organization-api-key), or a [machine part API key](#create-a-machine-part-api-key).

1. Then, run the following command to create a new location API key:

Expand Down Expand Up @@ -211,14 +211,14 @@ To switch to using a location API key for authentication right away, [logout](#l

A location can have multiple API keys.

### Create a robot API key
### Create a machine part API key

To use a robot API key to authenticate your CLI session, you must first create one:
To use a machine part API key to authenticate your CLI session, you must first create one:

1. First, [authenticate](#authenticate) your CLI session.
If you don't already have a robot API key created, authenticate using a personal access token, an [organization API key](#create-an-organization-api-key), or a [location API key](#create-a-location-api-key).
If you don't already have a machine part API key created, authenticate using a personal access token, an [organization API key](#create-an-organization-api-key), or a [location API key](#create-a-location-api-key).

1. Then, run the following command to create a new robot API key:
1. Then, run the following command to create a new machine part API key:

```sh {class="command-line" data-prompt="$"}
viam robots api-key create --robot-id <robot-id> --org-id <org-id> --name <key-name>
Expand All @@ -240,11 +240,11 @@ You will need both to authenticate.

{{% alert title="Important" color="note" %}}
Keep these key values safe.
Authenticating using a robot API key gives the authenticated CLI session full read and write access to your machine.
Authenticating using a machine part API key gives the authenticated CLI session full read and write access to your machine.
{{% /alert %}}

Once created, you can use the robot API key to authenticate future CLI sessions or to [connect to your machine with the SDK](/build/program/#authenticate).
To switch to using a robot API key for authentication right away, [logout](#logout) then log back in using `viam login api-key`.
Once created, you can use the machine part API key to authenticate future CLI sessions or to [connect to your machine with the SDK](/build/program/#authenticate).
To switch to using a machine part API key for authentication right away, [logout](#logout) then log back in using `viam login api-key`.

A location can have multiple API keys.

Expand Down Expand Up @@ -509,7 +509,7 @@ If you haven't already, you must [create an organization API key](#create-an-org
<!-- prettier-ignore -->
| command option | description | positional arguments
| ----------- | ----------- | ----------- |
| `api-key` | authenticate to Viam using an organization, location, or robot API key | create |
| `api-key` | authenticate to Viam using an organization, location, or machine part API key | create |
| `print-access-token` | prints the access token used to authenticate the current CLI session | - |
| `--help` | return help | - |
| `--disable-browser-open` | authenticate in a headless environment by preventing the opening of the default browser during login (default: false) | - |
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/configure/scuttlebot.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cost: 540
## Start configuring your robot

1. Go to [the Viam app](https://app.viam.com).
1. Create a _robot_ and follow the setup instructions until the robot successfully connects to the Viam app.
1. Create a _{{< glossary_tooltip term_id="machine" text="machine" >}}_ and follow the setup instructions until the robot successfully connects to the Viam app.
1. Navigate to the machine's **Config** tab.

![A SCUTTLE robot on a carpeted floor.](/tutorials/scuttlebot/scuttle-on-floor.png)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/projects/modernize-retro-robot.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ Now MAIV is ready to interact with the world!

Start by driving MAIV through the **Control** panel, then try writing some code.
A simple first exercise would be to have MAIV [drive in a square](/tutorials/get-started/try-viam-sdk/).
The same code that works with any configured base will work with MAIV, you'll just need to update the robot location, robot API key and key ID and any component names that differ in the code.
The same code that works with any configured base will work with MAIV, you'll just need to update the robot location, machine part API key and key ID and any component names that differ in the code.

Since MAIV has a camera, you could also [set up a color detector](/tutorials/services/webcam-line-follower-robot/) or detect objects using a [machine learning model](/tutorials/projects/send-security-photo/).

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/projects/tipsy.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ from viam.services.vision import VisionClient
from viam.services.sensors import SensorsClient
```

Then it connects to our robot using a robot API key and address.
Replace these values with your robot’s own location secret and address, which you can obtain from the **Code sample** tab:
Then it connects to our robot using a machine part API key and address.
Replace these values with your machine’s own location secret and address, which you can obtain from the **Code sample** tab:

```python {class="line-numbers linkable-line-numbers"}
robot_api_key = os.getenv('ROBOT_API_KEY') or ''
Expand Down

0 comments on commit 15ed286

Please sign in to comment.