summaryrefslogtreecommitdiff
path: root/doc/api/deploy_key_multiple_projects.md
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-03-01 18:39:40 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2017-03-01 18:39:40 +0100
commit1ead6a9793f790b4111180781234cc6a43590cc1 (patch)
tree331a9d8e74c7929ab83484768211799ca9dc4a17 /doc/api/deploy_key_multiple_projects.md
parent981c730fdb3da1ada8d1b44d21e75a11175b3026 (diff)
downloadgitlab-ce-1ead6a9793f790b4111180781234cc6a43590cc1.tar.gz
Use v4 endpoint in API docsapi-v4-doc
Diffstat (limited to 'doc/api/deploy_key_multiple_projects.md')
-rw-r--r--doc/api/deploy_key_multiple_projects.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/deploy_key_multiple_projects.md b/doc/api/deploy_key_multiple_projects.md
index 73cb4b7ea8c..f94dbfa4059 100644
--- a/doc/api/deploy_key_multiple_projects.md
+++ b/doc/api/deploy_key_multiple_projects.md
@@ -7,16 +7,16 @@ First, find the ID of the projects you're interested in, by either listing all
projects:
```
-curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/projects
+curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v4/projects
```
Or finding the ID of a group and then listing all projects in that group:
```
-curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups
+curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v4/groups
# For group 1234:
-curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups/1234
+curl --header 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v4/groups/1234
```
With those IDs, add the same deploy key to all:
@@ -24,6 +24,6 @@ With those IDs, add the same deploy key to all:
```
for project_id in 321 456 987; do
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "Content-Type: application/json" \
- --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v3/projects/${project_id}/deploy_keys
+ --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v4/projects/${project_id}/deploy_keys
done
```