Get Service Document
The Get Service Document operation retrieves the service document, which describes the resources exposed by the Windows Azure Import/Export Service. The service document is defined by the Atom Publishing Protocol; for details, refer to RFC 5023.
In general you should not need to call this operation, as you will already have specified the resources you require in each REST request. If you are building a tool that relies on automatic discovery of resource updates, this operation may be useful to you.
Request
The Get Service Document request may be constructed as follows. HTTPS is required. Replace <subscription-id> with your subscription ID:
Method |
Request URI |
---|---|
GET |
https://management.core.windows.net/<subscription-id>/services/importexport[?$format=format] |
URI Parameters
Parameter |
Description |
---|---|
Format |
Optional. Can be used to override the Accept header. See the Accept header for additional information. The following is an example 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. |
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 for successful request.
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. For an asynchronous operation, you can call get operation status with the value of the header to determine whether the operation is complete, has failed, or is still in progress. See Tracking Asynchronous Service Management Requests for more information. |
x-ms-version |
Indicates the version of the Import/Export service used to execute the request. |
Sample Request and Response
The following shows a sample request and response for the Get Service Document operation.
Request
GET https://management.core.windows.net/afb1a4eb-bc88-4ce1-b1af-dfec80067464/services/importexport HTTP/1.1
x-ms-version: 2014-05-01
DataServiceVersion: 3.0;
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: 260
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: ffdcf21e7bb49b799c782bb0f03649ce
Date: Tue, 29 Apr 2014 23:48:34 GMT
{"odata.metadata":"https:\/\/management.core.windows.net\/afb1a4eb-bc88-4ce1-b1af-dfec80067464\/services\/importexport\/$metadata","value":[{"name":"StorageAccounts","url":"storageaccounts"},{"name":"Jobs","url":"jobs"},{"name":"Locations","url":"locations"}]}