Skip to content

Common Cloud APIs

This section provides details of the common Cloud APIs that are available:

Note

Before you add or delete users from your tenant, you must first sign in as admin to your tenant space in the Cloud.

Login

Description Log in to WSO2 Cloud's tenant space as admin.
URI

https://cloudmgt.cloud.wso2.com/cloudmgt /site/blocks/user/authenticate/ajax/login.jag

URI Parameters
  • action: login
  • userName: Admin's username

  • password: Password of the admin

HTTP Methods POST
Example

curl -c cookies -k -v -X POST https://cloudmgt.cloud.wso2.com/cloudmgt/site/blocks/user/authenticate/ajax/login.jag -d 'action=login&userName=<user name> &password=adminpassword'

The <user name> should be email@organization_key . For example, if the e-mail is jhon@gmail.com, the <user name> should be jhon@gmail.com@organization_key . You can find the organization_key on the Manage page of the cloud.

addUserToTenant

Description Create a new user in the Cloud
URI https://cloudmgt.cloud.wso2.com/cloudmgt/site/blocks/tenant/users/add/ajax/add.jag
URI Parameters
  • action: addUserToTenant
  • userEmail: Email address of the user
  • password: User's password should meet at least three of the below criteria:
    • Uppercase letters
    • Lowercase letters
    • Numbers
    • Special characters
  • firstName: User's first name (alphanumeric characters only)
  • lastName: User's last name (alphanumeric characters only)
  • roles: User's roles. Can take one or more of the following roles in a comma-separated list: integrationclouduser, subscriber, publisher, admin, devicemgtuser, devicemgtadmin
HTTP Methods POST
Example

curl -k -v -X POST https://cloudmgt.cloud.wso2.com/cloudmgt/site/blocks/tenant/users/add/ajax/add.jag -b cookies -H 'Content­Type:application/x­www­form­urlencoded' -H 'Accept­Language:en­US,en;q=0.5' -­d 'action=addUserToTenant&userEmail=myemail@wso2.com&password=testPassword&firstName=testFirstName&lastName=testLastName&roles=subscriber'

deleteUserFromTenant

Description Delete an existing user from your tenant
URI

https://cloudmgt.cloud.wso2.com/cloudmgt/site/blocks/tenant/users/add/ajax/add.jag

URI Parameters
  • action: deleteUserFromTenant
  • userName: Email address of the user
HTTP Methods POST
Example

curl -­b cookies -­k -v -X POST https://cloudmgt.cloud.wso2.com/cloudmgt/site/blocks/tenant/users/add/ajax/add.jag -­H 'Content­Type:application/x­www­form­urlencoded' -H 'Accept­Language:en­US,en;q=0.5'  -d 'action=deleteUserFromTenant&userName=myemail@wso2.com'

getUsersOfTenant

Description Get all existing users of your tenant
URI

https://cloudmgt.cloud.wso2.com/cloudmgt/site/blocks/tenant/users/get/ajax/get.jag

URI Parameters
  • action: getUsersofTenant
HTTP Methods POST
Example

curl -­b cookies -­k -v -X POST https://cloudmgt.cloud.wso2.com/cloudmgt/site/blocks/tenant/users/get/ajax/get.jag -­H 'Content­Type:application/x­www­form­urlencoded' -H 'Accept­Language:en­US,en;q=0.5' -d 'action=getUsersofTenant'

Top