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

JSON response

Possible errors

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