RosettaHub Web Services

RosettaHUB provides a rich API to interact with the RosettaHUB platform: Platform Web Services and the RosettaHUB engines: Engine Web Services.

Platform web services allow you to perform all cloud governance tasks: manage users, cloud accounts, organizations, groups, budgets, access rights, etc. as well as manage RosettaHUB cloud artefacts (virtual labs, workspaces, formations, engines, machines, clusters, storages, file systems, disks, ssl certificates, domains). IT administrators can create their own applications by using the RosettaHUB web services.

Pyhton Examples

Below are some examples of how you can interact with the platform using Python

List users

List cloud accounts

Get detailed billing

Transfer budget in batch mode

Reverse transfer budget in batch mode

Assign cloud regions to user

Add a new organization manager

List all EC2 instances for an organization

Send R commands to a RosettaHub engine

Install the Python module zeep

pip install zeep

List all members of a sub-organization

import zeep apiKey ="Your-API-Key"; platform = zeep.Client('https://api.rosettahub.com/public/PlatformServices?wsdl').service users = platform.cpocGetFederatedUsers(apiKey, False, False, {'organizationName':'WASHINGTON'} ); for user in users: print(user.login)

List all cloud accounts

import zeep apiKey ="Your-API-Key"; platform = zeep.Client('https://api.rosettahub.com/public/PlatformServices?wsdl').service accounts = platform.cpocGetFederatedCloudAccounts(apiKey, False, {'organizationName':'WASHINGTON-Researchers', 'cloudId':'aws','includeCustomization':False} ); for account in accounts: print(account.login) print(account.aggregatedCost) print(account.budget)

Get detailed billing

You need to be superuser on the root organization.

Transfer budget

Transfer $20 to all cloud accounts of users that belong to an organization

Reverse transfer budget

reverse transfer from users cloud accounts to a manager's cloud account.

The manager needs to have a SUPERUSER role on the organization and to have the right roles to be able to do the reverse transfer. 

Set a user's allowed cloud regions

Add a new organization manager

List all sub-organization managers, then add a new manager

List EC2 instances

List all users, masquerade as individual users, retrieve an STS session to access the user AWS account and list all EC2 instances

 

Send R commands to a RosettaHub engine

 

Â