-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
0
-
API documentation is missing parameters, specifically talking about the PUT endpoint to Create/update a hook script:Â
https://developer.atlassian.com/server/bitbucket/rest/v805/api-group-repository/#api-api-latest-projects-projectkey-repos-repositoryslug-hook-scripts-scriptid-put
Please add the "-u user:password as an available parameter. Example:
curl -u user:password--request PUT \ --url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts/{scriptId}' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "triggerIds": [ "<string>" ] }'
The Python code is missing an important parameter :
headers=self.HEADERS,
auth=(USER, TOKEN)
example
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests import json url = "http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts/{scriptId}" headers = { "Accept": "application/json", "Content-Type": "application/json" } payload = json.dumps( { "triggerIds": [ "<string>" ] } ) response = requests.request( "PUT", url, Â Â headers=self.HEADERS, auth=(USER, TOKEN) ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Â
- is cloned from
-
BSERV-19467 Add the available parameters on REST API endpoints (Project creation)
- Gathering Interest