Getting Subscriptions

You can get Microsoft Azure subscriptions associated with Microsoft Azure service account with the specified ID.

Request

GET https://<hostname>:4443/v6/AzureServiceAccounts/{serviceAccountId}/Subscriptions

Request Headers

The request header must contain an authorization token of the current session.

Request Parameters

The following parameter must be specified in the URL of the request:

Parameter

Type

Description

serviceAccountId

string

Specifies the identification number of Microsoft Azure service account. For more information on how to get this parameter, see Getting Azure Service Accounts.

The following optional parameter can be specified in the URL of the request:

Parameter

Type

Description

subscriptionName

string

Specifies a name of Microsoft Azure subscription.

Request Body

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 200 OK.

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the response body message: application/json; charset=utf-8

Response Body

In the response body, the server returns a resource representation of the /AzureServiceAccounts/{serviceAccountId}/Subscriptions resource. The response body contains the following properties:

Property

Type

Description

subscriptionId

string

Specifies the Microsoft Azure subscription ID.

displayName

string

Specifies a name of Microsoft Azure subscription.

Example

The example returns a resource representation of Microsoft Azure subscriptions associated with Microsoft Azure service account with the ID 576705c3-a1af-49bd-878f-9067865bfcf9.

Request:

GET https://abc.tech.local:4443/v6/AzureServiceAccounts/576705c3-a1af-49bd-878f-9067865bfcf9/Subscriptions

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

[

{

"subscriptionId": "be7051ea-8fa4-4605-c607-89f3dd09fffd",

"displayName": "Enterprise Subscription"

},

...

]