Commit b39eec48 authored by Dmytro Zaporozhets's avatar Dmytro Zaporozhets

Merge branch '214320-deprecate-returning-token-from-runners-api' into 'master'

Deprecate "token" attribute from Runners API

See merge request gitlab-org/gitlab!29481
parents bff085a5 80eb91d3
---
title: Deprecate 'token' attribute from Runners API
merge_request: 29481
author:
type: deprecated
......@@ -162,6 +162,10 @@ GET /runners/:id
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6"
```
CAUTION: **Deprecation**
The `token` attribute in the response is deprecated [since GitLab 12.10](https://gitlab.com/gitlab-org/gitlab/-/issues/214320).
It will be removed in [GitLab 13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/214322).
Example response:
```json
......@@ -221,6 +225,10 @@ PUT /runners/:id
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2"
```
CAUTION: **Deprecation**
The `token` attribute in the response is deprecated [since GitLab 12.10](https://gitlab.com/gitlab-org/gitlab/-/issues/214320).
It will be removed in [GitLab 13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/214322).
Example response:
```json
......
......@@ -10,7 +10,11 @@ module API
expose :access_level
expose :version, :revision, :platform, :architecture
expose :contacted_at
# @deprecated in 12.10 https://gitlab.com/gitlab-org/gitlab/-/issues/214320
# will be removed by 13.0 https://gitlab.com/gitlab-org/gitlab/-/issues/214322
expose :token, if: lambda { |runner, options| options[:current_user].admin? || !runner.instance_type? }
# rubocop: disable CodeReuse/ActiveRecord
expose :projects, with: Entities::BasicProjectDetails do |runner, options|
if options[:current_user].admin?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment