-
Notifications
You must be signed in to change notification settings - Fork 13
Feature/api clients #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/api clients #389
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b44ac17
api client support
tora-kozic e32ac56
Merge branch 'main' into feature/api-clients
tora-kozic 7c712c8
add api client auth section to profile user guide
tora-kozic bd06572
fix unit tests
tora-kozic 8494c06
suggest wrapping secrets in single quotes
tora-kozic 5c12fcc
reword to username/password authentication
tora-kozic 11a6be7
init sdk in bulk remove command
tora-kozic 0fb79b7
minor change tp update cmd param check
tora-kozic c5095c0
update unit tests
tora-kozic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
Use the [code42 profile](../commands/profile.md) set of commands to establish the Code42 environment you're working | ||
within and your user information. | ||
|
||
First, create your profile: | ||
## User token authentication | ||
|
||
Use the following command to create your profile with user token authentication: | ||
```bash | ||
code42 profile create --name MY_FIRST_PROFILE --server example.authority.com --username [email protected] | ||
``` | ||
|
@@ -15,6 +17,19 @@ Your password is not shown when you do `code42 profile show`. However, `code42 p | |
password exists for your profile. If you do not set a password, you will be securely prompted to enter a password each | ||
time you run a command. | ||
|
||
## API client authentication | ||
|
||
Once you've generated an API Client in your Code42 console, use the following command to create your profile with API client authentication: | ||
```bash | ||
code42 profile create-api-client --name MY_API_CLIENT_PROFILE --server example.authority.com --api-client-id "key-42" --secret "code42%api%client%secret" | ||
``` | ||
|
||
```{eval-rst} | ||
.. note:: Remember to wrap your API client secret with single quotes to avoid issues with bash expansion and special characters. | ||
``` | ||
|
||
## View profiles | ||
|
||
You can add multiple profiles with different names and the change the default profile with the `use` command: | ||
|
||
```bash | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail if the matter was created via an API client, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the conditions for the field being populated are (but that would make sense). This
creator user email
field isn't even included on the response documentation and isn't on every matter, but it does exist and is populated on some of them.