Share via


List Locations

 

The List Locations operation returns a list of locations to which you can ship the disks associated with an import or export job. A location is a Microsoft data center region.

Request

The List Locations request may be constructed as follows. HTTPS is required. Replace <subscription-id> with your subscription ID:

Method

Request URI

GET|HEAD

https://management.core.windows.net/subscription-id/services/importexport/locations?originlocation=originlocation&$format=format

URI Parameters

Parameter

Description

originlocation

Optional. The location for which alternate locations are being queried. If this parameter is not specified, all locations will be returned.

The following example shows how to specify the location West US; note that the spaces must be properly URL-encoded:

originlocation=West%20US

format

Optional. Can be used to override the Accept header. See the Accept request header for additional information.

The following example demonstrates the use of the $format query parameter:

$format=application/json;odata=minimalmetadata

Request Headers

The following table describes required and optional request headers.

Request Header

Description

Accept

Optional. If specified, it must be application/json (which specifies the JSON Light format). Other values will result in response code 406 (Not Acceptable).

One of the following parameters can also be included:

odata=minimalmetadata

odata=nometatadata

odata=fullmetadata

The default parameter is odata=minimalmetadata.

The following is an example header:

Accept: application/json;odata=minimalmetadata

Accept-Language

Optional. Currently only the values en and en-us are supported.

Content-Length

Optional. If specified, the value must be 0.

x-ms-date

Optional. If specified, the value should specify the date and time when the request is sent, in the RFC 1123 format.

x-ms-version

Required. Specifies the service management version to use for this request. The value of this header must be set to 2014-05-01 or 2014-11-01.

Request Body

None.

Response

The response includes an HTTP status code, a set of response headers, and a response body in XML format.

Status Code

A successful operation returns status code 200 (OK).

Response Headers

The response for this operation includes the following headers.

Response Header

Description

Content-Encoding

The value of this header will always be identity.

Content-Length

The length of the content returned in the response.

Content-Type

Specifies the format in which the results are returned. The value of this header will always be application/json.

Date

The UTC date and time generated by the service that indicates the time at which the response was initiated, in RFC 1123 formet.

x-ms-request-id

A value that uniquely identifies a request made against the Import/Export service.

x-ms-version

Indicates the version of the Import/Export service used to execute the request.

Response Body

The following response values and table illustrate the format of the response body.

{
"odata.metadata":"https://management.core.windows.net/subid/services/importexport/$metadata#Microsoft.Cis.Services.ImportExport.Public.ImportExportData.Locations","odata.count":"result-count","value":[
    {
      "odata.type":"Microsoft.Cis.Services.ImportExport.Public.Location",
      "odata.id":"location-name",
      "odata.editLink":"edit-link",
      "Name":"location-name",
      "RecipientName":"recipient-name",
      "StreetAddress1":"street-address1",
      "StreetAddress2":"street-address2",
      "City": "city",
      "StateOrProvince": "state-or-province",
      "PostalCode": "postal-code",
      "CountryOrRegion": "country-or-region",
      "SupportedCarriers": [
           "supported-carrier1",
           "supported-carrier2",
           . . .
           ]
    },
    . . .  
  ]
}

Element

Type

Description

result-count

Integer

The number of locations in the response. This value can be zero. The result will be empty if the location is not currently supported by the Windows Azure Import/Export service.

edit-link

String

The URI that addresses the location element.

location-name

String

The name of the location, as displayed in the Windows Azure management portal.

recipient-name

String

The recipient name to use when shipping the drives to the Windows Azure data center.

full-address

CDATA

The full address to use when shipping the drives to the Windows Azure data center.

street-address1

String

The first line of the street address to use when shipping the drives to the Windows Azure data center.

street-address2

String

The second line of the street address to use when shipping the drives to the Windows Azure data center.

city

String

The city name to use when shipping the drives to the Windows Azure data center.

state-or-province

String

The state or province to use when shipping the drives to the Windows Azure data center.

postal-code

String

The postal code to use when shipping the drives to the Windows Azure data center.

country-or-region

String

The country or region to use when shipping the drives to the Windows Azure data center.

supported-carriers

String

A list of carriers that are supported at this location.

If the request fails, the response body will contain the following error message:

{
  "odata.error": {
    "code": "http-code",
    "message": {
        "lang": "en-US",
        "value": "detailed-error-message"
    },
    "azure.values": [
      { "ExtendedCode": "extended-error-code" },
      { "ExtendedInformation": "extended-information" }
    ]
  }
}

Element

Type

Description

http-code

String

The standard HTTP status code returned when the request fails.

detailed-error-message

String

A human-readable description of the error.

Extended-code

String

A predefined error code, if applicable.

Extended-information

String

Additional information provided to diagnose the error.

Sample Request and Response

The following shows a sample request and response for the List Locations operation. The request returns the location West US.

Request

GET https://management.core.windows.net/afb1a4eb-bc88-4ce1-b1af-dfec80067464/services/importexport/Locations?originlocation=West%20US HTTP/1.1
x-ms-version: 2014-05-01
Content-Type: application/json
Accept: application/json
Host: management.core.windows.net
Expect: 100-continue
Connection: Keep-Alive

Response

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 624
Content-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
Content-Encoding: identity
Content-Language: en-us
Server: 1.0.6198.70 (rd_rdfe_stable.140426-2318) Microsoft-HTTPAPI/2.0
x-ms-servedbyregion: ussouth2
DataServiceVersion: 3.0;
x-ms-version: 2014-05-01
x-ms-request-id: 6c6e0d46c1e09ecc8e404841b4de016f
Date: Tue, 29 Apr 2014 23:59:01 GMT

{"odata.metadata":"https:\/\/management.core.windows.net\/afb1a4eb-bc88-4ce1-b1af-dfec80067464\/services\/importexport\/$metadata#Microsoft.Cis.Services.ImportExport.Public.ImportExportData.Locations","odata.count":"1","value":[{"odata.id":"West US","odata.editLink":"https:\/\/management.core.windows.net\/afb1a4eb-bc88-4ce1-b1af-dfec80067464\/services\/importexport\/locations\/West%20US","Name":"West US","RecipientName":"Windows Azure Import Export Service","StreetAddress1":"2045 Lafayette Street","City":"Santa Clara","StateOrProvince":"CA","PostalCode":"95050","CountryOrRegion":"USA","SupportedCarriers":["FedEx"]}]}

Remarks

The List Locations operation returns a list of addresses that you can ship your disks to for an import or export job. In many cases, the list will only contain a single address, and you will need to ship your disks to that location.

See Also

Azure Import/Export Service Operations