summaryrefslogtreecommitdiff
path: root/docs
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
parent74f5e62ef5bfffc7ba21494d05dbead60b59ecf0 (diff)
downloadgitlab-a81525a2377aaed797af0706b00be7f5d8616d22.tar.gz
feat: add keys endpoint
Diffstat (limited to 'docs')
-rw-r--r--docs/api-objects.rst1
-rw-r--r--docs/gl_objects/keys.rst28
2 files changed, 29 insertions, 0 deletions
diff --git a/docs/api-objects.rst b/docs/api-objects.rst
index 2f1be1a..567344f 100644
--- a/docs/api-objects.rst
+++ b/docs/api-objects.rst
@@ -25,6 +25,7 @@ API examples
gl_objects/geo_nodes
gl_objects/groups
gl_objects/issues
+ gl_objects/keys
gl_objects/boards
gl_objects/labels
gl_objects/notifications
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")