Hi
I created a project on bitbucket and created a pull request.
https://bitbucket.org/<my_pseudo>/<my_repo>/pull-requests/1/
I create an app-password
Now I would like to retrieve pull request information with "curl" and REST API.
I try
curl -v -u <my_login>:<my_app_password> https://api.bitbucket.org/2.0/repositories/test/pull-requests
No response but verbose says that:
* Trying 18.205.93.8:443...
* Connected to api.bitbucket.org (18.205.93.8) port 443 (#0)
* schannel: disabled automatic use of client certificate
* schannel: ALPN, offering http/1.1
* schannel: ALPN, server accepted to use http/1.1
* Server auth using Basic with user '<my_login>'
> GET /2.0/repositories/test/pull-requests HTTP/1.1
> Host: api.bitbucket.org
> Authorization: Basic b2xpdmllci5hcHBlcmU6SlV5OFljQzdhUzVTRm1QcXhQN1k=
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 401 Unauthorized
< Server: nginx
< Vary: Origin
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="Bitbucket.org HTTP"
< Content-Type: text/plain
< X-B3-TraceId: a0259912425ae7e4
< X-Usage-Output-Ops: 0
< X-Dc-Location: Micros
< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< Date: Sun, 24 Apr 2022 09:41:27 GMT
< X-Usage-User-Time: 0.009101
< X-Usage-System-Time: 0.004353
< X-Served-By: 13ec9c009674
< ETag: "d41d8cd98f00b204e9800998ecf8427e"
< X-Static-Version: 9c0ba0615ff1
< X-Render-Time: 0.0149459838867
< Connection: keep-alive
< X-Usage-Input-Ops: 0
< X-Version: 9c0ba0615ff1
< X-Request-Count: 2147
< X-Frame-Options: SAMEORIGIN
< Content-Length: 0
<
* Connection #0 to host api.bitbucket.org left intact
I search here https://developer.atlassian.com/cloud/bitbucket/rest/intro/ but I miss a tutorial for absolute beginner
Thanks
Olivier