Module bus.gitlab

Class KeysApi

All Implemented Interfaces:
Constants

public class KeysApi extends AbstractApi
  • Constructor Details

    • KeysApi

      public KeysApi(GitLabApi gitLabApi)
  • Method Details

    • getUserBySSHKeyFingerprint

      public Key getUserBySSHKeyFingerprint(String fingerprint) throws GitLabApiException
      Parameters:
      fingerprint - The md5 hash of a ssh public key with : separating the bytes Or SHA256:$base64hash
      Returns:
      The Key which includes the user who owns the key
      Throws:
      GitLabApiException - If anything goes wrong
    • getKey

      public Key getKey(String keyId) throws GitLabApiException
      Get a single key by id.
       GitLab Endpoint: GET /keys/:id
       
      Parameters:
      keyId - the IID of the key to get
      Returns:
      a Key instance
      Throws:
      GitLabApiException - if any exception occurs