正在加载图片...
vRealize Operations Manager API Programming Guide Accept-Language To specify the language desired in responses, use the Accept-Language request header Message strings in Error Type responses are localized To request a response with message strings localized to French, use the following header: ccept-Language: fr-FR Authorization All requests to create an API session must include an Authorization header of the fom prescribed by the identity provider that your organization uses Content-type Requests that include a body must include an appropriate Http Content-type header For a request body in XML, the header must include Content-Type: application/xmL s For a request body in JSON, the header must include Content-Type: application/json Accept To specify the desired response format, include the Accept request header For a response in XML, the header must include Accept: application/xml s For a response in JSON the header must include Accept: application/json Request Bodies in XML For a request body written in XML, vRealize Operations Manager uses a validating XML parser that requires elements in a request body to agree with the schema in order and number Request bodies are rejected as invalid unless they meet the following criteria XML namespace attributes must be supplied for all namespaces represented by elements in the request If multiple namespaces are represented in the request, XML namespace attributes must include an dentifying prefix, and that prefix must be used with all elements from that namespace All required elements must appear in request bodies. All elements that appear in request bodies must appear in the order that the schema establishes, and with content that conforms to the type constraint that the schema specifies vRealize operations Manager API REST Responses All responses include an Http status code and unless the status code is 204(no cOntent), an Accept header Response content depends on the request. Some responses include a document body, some include only a URL, and some are empty Http Response Codes An Apl client can expect a subset of Http status codes in a response Table2-1.httpStatusCodesthattheaplreturns Status Code Status Descriptic 260K The request is valid and was completed. The response includes a document body 201 Created The request is valid. The requested object was created and can be found at the URL specified in the Location header. 02 Accepted The request is valid and a task was created to handle it. This response is usually accompanied by a TaskStatus elementAccept-Language To specify the language desired in responses, use the Accept-Language request header. Message strings in ErrorType responses are localized. To request a response with message strings localized to French, use the following header: Accept-Language: fr-FR Authorization All requests to create an API session must include an Authorization header of the form prescribed by the identity provider that your organization uses Content-Type Requests that include a body must include an appropriate HTTP Content-Type header. n For a request body in XML, the header must include Content-Type: application/xml n For a request body in JSON, the header must include Content-Type: application/json Accept To specify the desired response format , include the Accept request header. n For a response in XML, the header must include Accept: application/xml n For a response in JSON, the header must include Accept: application/json Request Bodies in XML For a request body written in XML, vRealize Operations Manager uses a validating XML parser that requires elements in a request body to agree with the schema in order and number . Request bodies are rejected as invalid unless they meet the following criteria: n XML namespace attributes must be supplied for all namespaces represented by elements in the request. n If multiple namespaces are represented in the request, XML namespace attributes must include an identifying prefix, and that prefix must be used with all elements from that namespace. n All required elements must appear in request bodies. All elements that appear in request bodies must appear in the order that the schema establishes, and with content that conforms to the type constraint that the schema specifies. vRealize Operations Manager API REST Responses All responses include an HTTP status code and, unless the status code is 204 (No Content), an Accept header. Response content depends on the request. Some responses include a document body, some include only a URL, and some are empty. HTTP Response Codes An API client can expect a subset of HTTP status codes in a response. Table 2‑1. HTTP Status Codes that the API Returns Status Code Status Description 200 OK The request is valid and was completed. The response includes a document body. 201 Created The request is valid. The requested object was created and can be found at the URL specified in the Location header. 202 Accepted The request is valid and a task was created to handle it. This response is usually accompanied by a TaskStatus element . vRealize Operations Manager API Programming Guide VMware, Inc. 9
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有