Skip to content
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

API Key CRUD #34

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

SolarFactories
Copy link

Overview

Add missing RUD methods for API Key CRUD.

Detailed

Adds methods to:

  • DeleteAPIKey - To delete an API key from a Team.
  • UpdateAPIKeyComment - To set or update the comment associated with an API Key.
  • GetAPIKeys - To retrieve the API Keys for a Team, since the TeamService.Get endpoint does not include them in the API response.

Adds tests to:

  • GenerateAPIKey with TestGenerateAPIKey.
  • DeleteAPIKey with TestDeleteAPIKey.
  • UpdateAPIKeyComment with TestUpdateAPIKeyComment.

Other:

  • Adds remaining fields within APIKey struct, for the subset of occassions when they are returned.
  • Add case within withBody to allow for using a text/plain Content-Type as required by UpdateAPIKeyComment.

…d tests for GenerateAPIKey, DeleteAPIKey, UpdateAPIKeyComment. Added handling of text/plain body when making an API request.

Signed-off-by: SolarFactories <SolarFactories@users.noreply.github.com>
@nscuro nscuro added the enhancement New feature or request label Dec 4, 2024
Copy link
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nscuro nscuro merged commit b56de7d into DependencyTrack:main Dec 4, 2024
4 checks passed
@SolarFactories SolarFactories deleted the api-keys-crud branch January 24, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants