Resources Project Update Setting
Update Setting
Update project setting
Http Method
POST
End Point
/api/projects/{projectId}/setting
Placeholder Description Example
{projectId} Project Id 1
Request Body
Content Type
application/json
Example
{
"serviceDeskName" : "string" ,
"branchProtections" : [ {
"enabled" : true ,
"branches" : "string" ,
"userMatch" : "string" ,
"preventForcedPush" : true ,
"preventDeletion" : true ,
"preventCreation" : true ,
"signatureRequired" : true ,
"reviewRequirement" : "string" ,
"jobNames" : [ "string" ] ,
"fileProtections" : [ {
"paths" : "string" ,
"reviewRequirement" : "string" ,
"jobNames" : [ "string" ]
}
]
}
]
,
"tagProtections" : [ {
"enabled" : true ,
"tags" : "string" ,
"userMatch" : "string" ,
"preventUpdate" : true ,
"preventDeletion" : true ,
"preventCreation" : true ,
"signatureRequired" : true
}
]
,
"issueSetting" : {
"listFields" : [ "string" ] ,
"listLinks" : [ "string" ] ,
"boardSpecs" : [ {
"name" : "string" ,
"baseQuery" : "string" ,
"backlogBaseQuery" : "string" ,
"identifyField" : "string" ,
"columns" : [ "string" ] ,
"displayFields" : [ "string" ] ,
"displayLinks" : [ "string" ] ,
"editColumns" : [ "string" ]
}
]
,
"namedQueries" : [ {
"name" : "string" ,
"query" : "string"
}
]
}
,
"buildSetting" : {
"listParams" : [ "string" ] ,
"namedQueries" : [ {
"name" : "string" ,
"query" : "string"
}
]
,
"jobSecrets" : [ {
"name" : "string" ,
"value" : "string" ,
"authorizedBranches" : "string"
}
]
,
"buildPreservations" : [ {
"condition" : "string" ,
"count" : 1
}
]
,
"actionAuthorizations" : [ {
"@type" : "CloseMilestoneAuthorization" ,
"milestoneNames" : "string" ,
"authorizedBranches" : "string"
}
]
,
"defaultFixedIssueFilters" : [ {
"jobNames" : "string" ,
"issueQuery" : "string"
}
]
}
,
"pullRequestSetting" : {
"namedQueries" : [ {
"name" : "string" ,
"query" : "string"
}
]
}
,
"namedCommitQueries" : [ {
"name" : "string" ,
"query" : "string"
}
]
,
"namedCodeCommentQueries" : [ {
"name" : "string" ,
"query" : "string"
}
]
,
"webHooks" : [ {
"postUrl" : "string" ,
"eventTypes" : [ "CODE_PUSH" ] ,
"secret" : "string"
}
]
,
"contributedSettings" : {
"string" : {
"@type" : "DiscordNotificationSetting" ,
"notifications" : [ {
"channelNotification" : {
"webhookUrl" : "string" ,
"issues" : true ,
"issueQuery" : "string" ,
"pullRequests" : true ,
"pullRequestQuery" : "string" ,
"builds" : true ,
"buildQuery" : "string" ,
"codePush" : true ,
"commitQuery" : "string" ,
"codeComments" : true ,
"codeCommentQuery" : "string"
}
}
]
}
}
}
Response
Operation Successful
Status Code
200
Response Body
No response body if successful; error
Operation Failed
Status code
Status code other than 200 indicating the error type
Response Body
Error detail of content type "text/plain"
cURL Example
$ curl -u <login name>:<password or access token> [email protected] -H "Content-Type: application/json" https://git.crazyhackgut.ru/api/projects/1/setting
Please wait...
Page is in error, reload to recover