How can I add a new user to Bitbucket via api.bitbucket.org/2.0/ - bitbucket-api

My company has a new developer user and I need to add them to Bitbucket and the group using the Bitbucket API
Is there an endpoint for this?

Related

Adding new service type in Cloudera Manager

I'm following official docs to add service to a cluster in Cloudera Manager.
However it's custom service developed in-house and there's no service type shown.
How to add new service type in Cloudera Manager?
The solution was to deploy CSD of new service.
Then, it's possible to select new service type and add new service of this type.

Get Firebase Admin SDK private key programmatically

I need to create Firebase projects, get the Admin SDK private keys, and add resources programmatically.
I can create projects with CLI - firebase projects:create. But after that to use Admin SDK or REST API to add resources to the project, I need to get Admin SDK private key.
My plan is web scraping with direct HTTP requests. I know Fastlane use same logic to control Apple Developer Portal UI and fetch data from it programmatically.
First, I need to go: https://console.firebase.google.com/project/<project_id>/settings/serviceaccounts/adminsdk with required cookies, headers etc.
Then, I should mimic the Generate new Private Key button below and get the private key.
But I have never used this method, especially with a web page that contaions sessions, cookies etc. And, I want to build it as a microservice and deploy to a server. So, I believe 2FA might be a problem.
My questions:
Is there any more cost-effective way to get Admin SDK? Maybe, I am missing some feature in Firebase resources.
Can I mimic this button's behaviour without using any front-end scraping? Is there any precautions in Firebase servers to prevent this kind of solution.
If I do it in this way and deploy to a server, would 2FA be a problem? Can microservice work with 1-month valid sessions? Or, would it asks 2FA all the time that it works? (I have never used headless browsers etc. I just some basic web-scraping experience with Selenium.)
It looks like scraping is not necessary, gcloud CLI do the job. If you want to create Firebase projects and get service accounts programmatically do the steps below:
Create with firebase CLI: firebase projects:create --display-name "<project-name>" <project-id> (Or, probably you can create with gcloud CLI as well)
Change active project in gcloud CLI with gcloud config set project <project-id>
gcloud iam service-accounts list and store the EMAIL here. (There is just automatically created service account here, no private key created.)
Create and store the private key: gcloud iam service-accounts keys create key.json --iam-account= <EMAIL-you-stored>

Firebase Service Account for Firestore and Remote Config

I have created/forked a lil Google Apps Script Library to manage Firebase Firestore and Firebase Remote Config called FirebaseGoogleAppsScript. The goal is to simply manage the contents of your collections in an apps script as well as update your remote config.
My issue is I can't get the a service account to do both.
Firebase creates two service accounts upon creating a project:
The first is listed in the Firebase Console -> Project Settings -> Service Accounts. This one I use within my cloud functions to retrieve the Remote Config just fine. However in the Apps Script Project it is unable to retrieve any data from firestore. I tried adding all kinds of roles including Owner and Editor yet no firestore data, but I still can get the RemoteConfig.
The second is only visible in the GCP service accounts and has the title: Firebase Admin SDK Service Agent with the roles Firebase Admin SDK Administrator Service Agent and Service Account Token Creator. This one is able to retrieve all the data from firestore within an Apps Script Project. However in the apps script project I can't get it to retrieve the RemoteConfig even if I add the role Firebase Remote Config Admin.
I have also made my own service account which was able to get the Remote config and just about everything else from Firebase except the Firestore data. Seems only the one service account created by Firebase is able to get any data.
To recreate the issue simply deploy my lil FirebaseGoogleAppsScript project and associate it to the same GCP project Firebase is connected to. There is a test file in it which can recreate the issue assuming you have some data in RemoteConfig and a collection called posts with some docs.
What the heck is going on here? Why can't I make a service account who can access Firestore and RemoteConfig? Any ideas on what to do to create a proper role to do both? Do I really have to use two separate service accounts?

Firebase service accounts in menu

I have created a new project on Firebase and i have role owner
and i can't found service accounts on 'settings project'
how to create it or enable it to get adminsdk private key (file.json)
in other accounts showing service accounts normally
but here not showing
so how to enable it?
Don't know exactly why this happened, but you can always manage firebase service accounts on the Google Cloud Platform console
My theory is : perhaps you first created this project on the Google Cloud Platform, and then you activated Firebase service.

How to automate the tenant creation in openstack using python

I want to first source the admin rc file and then need to automate the tenant create using python(openstack) amd new to this..please help me out
Using REST APIs:
Step-1: Generate the token for authentication using the admin rc file details.
Use the keystone API for generating the auth token - https://developer.openstack.org/api-ref/identity/v3/?expanded=create-project-detail#authentication-and-token-management
Step-2: Access the "create project" (keystone v3) API to create the project (before we call it as tenant which uses keystone v2 version).
https://developer.openstack.org/api-ref/identity/v3/?expanded=create-project-detail#create-project

Resources