Skip to content

New REST endpoint PATCH CI_JOB_TOKEN access settings

What does this MR do and why?

  • This MR works towards the another task of the issue (feature) #351740 (closed)

🛠 with at Siemens

Screenshots or screen recordings

Based on the the #351740 (closed) , this merge request introduces a new REST api endpoint for patching the settings for the job token scope of a project.

How to set up and validate locally

curl --request PATCH \
  --url "http://127.0.0.1:3000/api/v4/projects/7/job_token_scope?private_token=<personal_access_token_of_project_maintainer>" \
  --header 'Content-Type: application/json' \
  --data '{
	"enabled": false
}'

TODO

  • Finalize the open api definition
  • Add comment for gitlab team regarding different names for parameters and attributes in this endpoint
  • Add comment for gitlab team regarding truthy and falesy values for inbound_job_token / outbound_job_token; E.g. should { inbound_job_token: nil } set the value of ci_inbound_job_tokebn_scope_enabled to false?
  • Add comment for gitlab team regarding PATCH vs PUT method~~ <= this is not relevant anymore becuase the PATCH is a better fit for granular updates then PUT
  • Add comment for gitlab team regarding success response code?
  • Waiting for the final decision on this thread, see !118357 (comment 1374822281) .
  • Approval from technical writing team

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #351740 (closed)

Edited by Gerardo Navarro

Merge request reports