File tree 1 file changed +15
-1
lines changed
src/main/java/org/gitlab4j/api
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
/**
12
12
* See:
13
- * https://docs.gitlab.com/ee/api/keys.html#get-user-by-fingerprint-of-ssh-key
13
+ * <a href=" https://docs.gitlab.com/ee/api/keys.html">GitLab Key API Documentaion<</a>
14
14
*/
15
15
public class KeysApi extends AbstractApi {
16
16
public KeysApi (GitLabApi gitLabApi ) {
@@ -28,4 +28,18 @@ public Key getUserBySSHKeyFingerprint(String fingerprint) throws GitLabApiExcept
28
28
Response response = get (Response .Status .OK , queryParams , "keys" );
29
29
return response .readEntity (Key .class );
30
30
}
31
+
32
+ /**
33
+ * Get a single key by id.
34
+ *
35
+ * <pre><code>GitLab Endpoint: GET /keys/:id</code></pre>
36
+ *
37
+ * @param keyId the IID of the key to get
38
+ * @return a Key instance
39
+ * @throws GitLabApiException if any exception occurs
40
+ */
41
+ public Key getKey (String keyId ) throws GitLabApiException {
42
+ Response response = get (Response .Status .OK , null , "keys" , keyId );
43
+ return response .readEntity (Key .class );
44
+ }
31
45
}
You can’t perform that action at this time.
0 commit comments