summaryrefslogtreecommitdiff
path: root/docs/gl_objects
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2021-05-25 14:14:18 +0100
committerBen Brown <ben.brown@codethink.co.uk>2021-06-03 09:22:10 +0100
commita81525a2377aaed797af0706b00be7f5d8616d22 (patch)
treedf32c795081135a1f7abde8500b72c382f68c9b9 /docs/gl_objects
parent74f5e62ef5bfffc7ba21494d05dbead60b59ecf0 (diff)
downloadgitlab-a81525a2377aaed797af0706b00be7f5d8616d22.tar.gz
feat: add keys endpoint
Diffstat (limited to 'docs/gl_objects')
-rw-r--r--docs/gl_objects/keys.rst28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/gl_objects/keys.rst b/docs/gl_objects/keys.rst
new file mode 100644
index 0000000..6d35218
--- /dev/null
+++ b/docs/gl_objects/keys.rst
@@ -0,0 +1,28 @@
+####
+Keys
+####
+
+Keys
+====
+
+Reference
+---------
+
+* v4 API
+
+ + :class:`gitlab.v4.objects.Key`
+ + :class:`gitlab.v4.objects.KeyManager`
+ + :attr:`gitlab.Gitlab.keys`
+
+* GitLab API: https://docs.gitlab.com/ce/api/keys.html
+
+Examples
+--------
+
+Get an ssh key by its id (requires admin access)::
+
+ key = gl.keys.get(key_id)
+
+Get an ssh key (requires admin access) or a deploy key by its fingerprint::
+
+ key = gl.keys.get(fingerprint="SHA256:ERJJ/OweAM6jA8OjJ/gXs4N5fqUaREEJnz/EyfywfXY")