Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
langXML
<status>
    <http_code></http_code>
    <app_status href=" ">
	<app_status_entry code=" " params=" "/>
    </app_status>
</status>


XML Tag

Description

Child Elements

<status>

Present is all responses.

<http_code>
<app_status>

<http_code>

Standard HTTP code.
Application error codes will be mapped to HTTP status code. If the request is successful http_code will be 200.

Attributes:

  • None

None

<app_status>

Present only if there are application errors.

Attributes:

  • href - This contains the URI of the resource that the request was made on.

<app_status_entry>

<app_status_entry>

There will be one of these tags for every application error for this request.

Attributes:

  • code - This is a non-zero number that represents the application error code. 
  • params - This is a string that contains the error tokens in a '|' separated format.
    Refer to 2.1.1 to see how to use the code and params to obtain the error message.

None

Many of the application errors will have to be mapped to an appropriate HTTP status code. For e.g, if the resource does not exist in case of a modify, the response would contain HTTP status code 404. Application processing error codes that do not match logically to any particular HTTP status code can be mapped to HTTP error 500.

...

The <app_status_entry> tag will contain the application error code and params as attributes. The code is a non-zero number and the params is a string that contains the tokens in a '|' separated format. These tokens need to be substituted into a detailed error message for the corresponding error code. The error messages for each error code is published in XML format - access the the full application error code listing from the API reference doc. Users can substitute the tokens in sequential order in the error message to get the actual error description. The following status block provides an example of an error code with the params.

...

The resource block in the response XML contains the following structure:

XML Tag

Description

Child Elements

<resource_list>

Present only if a bulk lookup is performed, where multiple instances are listed.

Attributes:

  • count - This contains the number of resources in the list

<resource_pk>
<resource>

 

 

 




<resource_pk>

Present only if a bulk lookup is performed without details=true query parameter.

Attributes:

  • id - This represents the resource identifier.
  • href - This represents the resource URI for the resource.

None

<resource>

Present if a bulk lookup with details=true query parameter is performed or if a single
GET, PUT or POST without action query parameter is performed.

Attributes:

  • id - This represents the resource identifier. 
  • href - This represents the resource URI for the resource.
  • app_code_config - This is an error code into the error messages file. This is present only in case of GET and if there were errors in looking up the config attributes of the resource, if applicable. 
  • app_params_config - This is a '|' separated string of the error tokens to be substituted into the error message. This is present only in case of GET and if there were errors in looking up the config attributes of the resource, if applicable.
  • app_code_runtime - This is an error code into the error messages file. This is present only in case of GET and if there were errors in looking up the runtime attributes of the resource, if applicable.
  • app_params_runtime - This is a '|' separated string of the error tokens to be substituted into the error message. This is present only in case of GET and if there were errors in looking up the runtime attributes of the resource, if applicable.
  • app_code_statistics - This is an error code into the error messages file. This is present only in case of GET and if there were errors in looking up the statistics attributes of the resource, if applicable.
  • app_params_statistics - This is a '|' separated string of the error tokens to be substituted into the error message. This is present only in case of GET and if there were errors in looking up the statistics attributes of the resource, if applicable.
  • app_code_inventory - This is an error code into the error messages file. This is present only in case of GET and if there were errors in looking up the inventory attributes of the resource, if applicable.
  • app_params_inventory - This is a '|' separated string of the error tokens to be substituted into the error message. This is present only in case of GET and if there were errors in looking up the inventory attributes of the resource, if applicable.

<resource_attr>
<resource_attr_list>

<resource_attr>

Every resource attribute in the resource schema is shown as a separate tag. 

Attributes:

  • href - This is present when the attribute is a link to another resource and contains the URI for that resource.

None

<resource_attr_list>

This is present only when the resource attribute contains multiple instances of another resource. 

Attributes:

  • count - This represents the number of <entry> tags within this list.

<entry>

<entry>

This is present within a <resource_attr_list> tag and represents an individual resource. 

Attributes:

  • href - This represents a link to another resource and contains the URI for that resource.

None

3. Resource Methods

Lookup, create, modify, delete, action methods can be performed on resources. Some resources do not have all methods applicable. 

...