You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,24 +15,38 @@ pip install dnac-sidekick
15
15
## Getting Started
16
16
17
17
### Authenticating to DNAC
18
-
Users can either store their DNAC info and login credentials (DNAC URL/username/password) as environment variables or use the CLI ` dnac-sidekick login` command to authenticate to their DNAC instance.
19
-
20
-
**CLI Login**
18
+
DNAC-Sidekick pulls all user-specific information from environmnet variables. Ideally, this would be a more automated process with less manual work for the user, but for now, the following environment variables must be set manually before using the tool:
Once completed, these values will be used to automatically generate a bearer token and store all these values as environment variables to use with future API requests.
25
30
26
-
**Environment Variables (recommended)**
31
+
Once set, we will need to generate a bearer token, which is used to authenticate to the DNAC REST API. You can manually generate this token using curl or Postman, but there's also a built-in command that will generate one for you. This will only work if the URL, username, and password environment variables are set.
32
+
33
+
```
34
+
dnac-sidekick login
27
35
28
-
Alternatively, you can set the environment variables yourself. If setting them manually, please use the following variable names:
36
+
Token generated successfully!
37
+
Copy token below and set as environment variable for future requests:
38
+
eyJhbGciOiJS.....
29
39
```
30
-
DNAC_URL=<https://dnac_url>
31
-
DNAC_USER=<username>
32
-
DNAC_PASS=<password>
40
+
41
+
*IMPORTANT:* Please make sure to generate the bearer token using the `dnac-sidekick login` command *AFTER* setting the necessary environment variables. Once the token is generated, don't forget to set it as an evironment variable as well.
42
+
33
43
```
44
+
Unix/MacOS
45
+
export DNAC_TOKEN=<token>
34
46
35
-
*IMPORTANT:* If setting the environment variables manually, please make sure to generate the bearer token using the `dnac-sidekick login` command *AFTER* setting the environment variables. Since the environment variables are already set, there's no need to set any additional flags.
47
+
Windows
48
+
set DNAC_TOKEN=<token>
49
+
```
36
50
37
51
## Usage
38
52
To see what commands are available, use the `--help` option. Here's a brief look at the current root commands available:
0 commit comments