POST /api/v3/sponsoredlinks

This request will generate a link which, when followed, will generate and connect to a new environment which will be based on the parameters provided with the request. The link will be valid for a short time (default 5 minutes).

If the userEmail value corresponds to an existing user’s email, and an environment and blueprint exist for this user that correspond to the environment and blueprint parameters provided in the request, then the link will redirect to this environment. If no such environment exists for the user, a new environment is created and the returned link will redirect to it.

If the user does not exist, a new user is created. The user will be part of the specified environment policy. An environment will be created for this new user, based on the parameters provided in the request, and a link to it will be returned.

POST /api/v3/sponsoredlinks

Request Payload

{
    "email": "CosmoSpears@cloudshare.com",
    "FirstName": "Cosmo",
    "LastName": "Spears",
    "JobTitle": "manager",
    "PhoneNumber": "032-3232454",
    "Company": "cloudshare",
    "PolicyId": "POLs3J1NEAESn7ipYMwYq20Q2",
    "BlueprintId": "BPitsTtiUS27hEsHcVZcZsxw2",
    "UseLatestSnapshot": false,
    "ExpirationMinutes": 15,
    "InviterId": "VPBMIHcniyUwPCFmxXZIfqng2",
    "ShouldAskForPassword": true,
    "regionId": "REKolD1-ab84YIxODeMGob9A2",
    "allowMultipleUsages": false
}

Parameters

Email The email address of the new user. This will be the environment’s owner email
FirstName The first name of the new user
LastName The last name of the new user
JobTitle
optional
The new user’s job title.
PhoneNumber
optional
The new user’s phone number
Company The new user’s company
PolicyId An environment policy id to which the new user and environment will be associated.
BlueprintId Blueprint id for the new environment
UseLatestSnapshot
optional
Flag indicating whether to use the latest or the default snapshot for the environment (if they exist). Default is false
ExpirationMinutes
optional
The period of time, in minutes, that the created link will be valid. If not provided, the default value will be used.
InviterId
optional
The user creating this invitation. If not provided, the id of the request caller will be used.
ShouldAskForPassword
optional
Flag indicating whether the new user should create a password (on the first access to the environment) or have a random password generated.Default is True (user should create a new password)
RegionId The Region the Sponsored Link is to be created in. A list of available Regions can be obtained from here. Optional – default region is US East (Miami)
AllowMultipleUsages Log in with the returned ‘loginToken’ more than once for the duration specified by ‘ExpirationMinutes’. Optional – default is False

Response examples

{
    "loginToken": "x7467hqyWI",
    "envId": null,
    "isLoginRequired": false
}

When you want to invite your users using the sponsored link you created, just append the login token to this URL:
https://use.cloudshare.com/Ent/Login.mvc/SponsoredLogin?token=[loginToken]