Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to create bitbucket cloud user account over API

Lucas Heringer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2018

I need to automate the user account create process in my company and while searching on Google the only way I found was using curl the API 1.0. sadly this doesn't work on the Bitbucket cloud. Can anyone help me to understand if this works on bitbucket cloud, if not what's the best way to create a user via API?

curl -v -u login.name:Password -X POST -H "Content-Type: application/json" "https://api.bitbucket.org/1.0/admin/users?name=John&password=Password&displayName=johngreen_companyname&emailAddress=john.green@companyname.com&addToDefualtGroup=true&notify=false"

 

*   Trying 104.192.143.5...

* TCP_NODELAY set

* Connected to api.bitbucket.org (104.192.143.5) port 443 (#0)

* ALPN, offering h2

* ALPN, offering http/1.1

* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH

* successfully set certificate verify locations:

*   CAfile: /etc/ssl/cert.pem

  CApath: none

* TLSv1.2 (OUT), TLS handshake, Client hello (1):

* TLSv1.2 (IN), TLS handshake, Server hello (2):

* TLSv1.2 (IN), TLS handshake, Certificate (11):

* TLSv1.2 (IN), TLS handshake, Server key exchange (12):

* TLSv1.2 (IN), TLS handshake, Server finished (14):

* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):

* TLSv1.2 (OUT), TLS change cipher, Client hello (1):

* TLSv1.2 (OUT), TLS handshake, Finished (20):

* TLSv1.2 (IN), TLS change cipher, Client hello (1):

* TLSv1.2 (IN), TLS handshake, Finished (20):

* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES128-GCM-SHA256

* ALPN, server accepted to use h2

* Server certificate:

*  subject: C=US; ST=California; L=San Francisco; O=Atlassian, Inc.; OU=Bitbucket; CN=*.bitbucket.org

*  start date: Jun 12 00:00:00 2017 GMT

*  expire date: Jun 16 12:00:00 2020 GMT

*  subjectAltName: host "api.bitbucket.org" matched cert's "*.bitbucket.org"

*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA

*  SSL certificate verify ok.

* Using HTTP2, server supports multi-use

* Connection state changed (HTTP/2 confirmed)

* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0

* Server auth using Basic with user 'login.name'

* Using Stream ID: 1 (easy handle 0x7f9c37807400)

> POST /1.0/admin/users?name=John&password=Password&displayName=johngreen_companyname&emailAddress=john.green@company.com&addToDefualtGroup=true&notify=false HTTP/2

> Host: api.bitbucket.org

> Authorization: Basic bHVjYXNoZXJpbmdlcl9nZW9zcG9jazpIenJKbWtGclpKM3h1YXpH

> User-Agent: curl/7.54.0

> Accept: */*

> Content-Type: application/json

>

* Connection state changed (MAX_CONCURRENT_STREAMS updated)!

< HTTP/2 400

< server: nginx

< vary: Authorization

< content-type: text/plain

< strict-transport-security: max-age=31536000; includeSubDomains; preload

< date: Tue, 24 Apr 2018 09:58:35 GMT

< x-served-by: app-162

< x-static-version: ce3d455e4212

< etag: "825644f747baab2c00e420dbbc39e4b3"

< x-render-time: 0.0294549465179

< x-credential-type: password

< x-version: ce3d455e4212

< x-request-count: 439

< x-frame-options: SAMEORIGIN

< content-length: 11

<

* Connection #0 to host api.bitbucket.org left intact

Bad Request

1 answer

0 votes
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2018

This is not currently possible in Bitbucket Cloud. (It looks like you were trying the BB Server API, which is different.)

Lucas Heringer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2018

Well that's some bad news because I know that API 2.0 doesn't support user creation meaning there is no way to create a user in Bitbucket cloud using any API correct?

Kind regards.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events