Microsoft Cloud Solutions Subscription (Purchase)

/cloud-solutions-subscription

GET

Returns a list of subscriptions

Request parameters

All values are optional.

tenant string The UUID of a tenant to return the subscriptions for.
client_reference string The client reference to return the subscriptions for.
offer string The UUID of an offer to return the subscriptions for.
status string The status chose to return the subscriptions with.

JSON response

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cloud-solutions-subscription" | python -m json.tool

POST

Create a new cloud solutions subscription.

JSON request

tenant string A UUID identifying the tenant to create a subscription for.
offer string A UUID identifying of the offer to be purchased. Notes: * The offer should be available in the same provisioning region as where the tenant is created for. * When the offer is an add-on for existing subscription, a parent_subscription parameter must be specified.
parent_subscription string A UUID identifying the existing parent subscription you want to attach the add-on to. This parameter is required only when the offer is an add-on for existing subscription. In other cases it is ignored.
quantity integer Quantity of licenses to be purchased. Should be a value between the minimum_quantity and maximum_quantity defined on the offer.
is_auto_renew_enabled boolean A boolean indicating if the subscription should be automatically renewed upon expiration.
client_reference string An optional value to be filled by the client. This is usable to identify the created object by an client-side defined value. A use case is the ability to recover from an network-error during creation e.g. no response returned after creation of the tenant.

JSON response

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "tenant": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "offer": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "quantity": 1,
        "is_auto_renew_enabled": True,
        "client_reference": "#123"
    }
' \
"{{api_base_url}}/cloud-solutions-subscription" | python -m json.tool

/cloud-solutions-subscription/{id}

GET

Get detailed information about a subscription.

Request parameters

N/A

JSON response

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cloud-solutions-subscription/{id}" | python -m json.tool

PUT

Update a single subscription

JSON request

quantity integer Quantity of licenses to be purchased. Quantity can only be lowered.
is_auto_renew_enabled boolean A boolean indicating if the subscription should be automatically renewed upon expiration.

JSON response

Possible errors

Sample

curl \
--request PUT \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "quantity": 1,
        "is_auto_renew_enabled": True
    }
' \
"{{api_base_url}}/cloud-solutions-subscription/{id}" | python -m json.tool

/cloud-solutions-subscription/{id}/change-quantity

POST

Change the quantity of a subscription

JSON request

quantity integer The new quantity.

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cloud-solutions-subscription/{id}/change-quantity" | python -m json.tool

/cloud-solutions-subscription/{id}/suspend

POST

Suspend a subscription.

JSON request

N/A

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cloud-solutions-subscription/{id}/suspend" | python -m json.tool

/cloud-solutions-subscription/{id}/restore

POST

Restore a suspended subscription.

JSON request

N/A

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/cloud-solutions-subscription/{id}/restore" | python -m json.tool