Publisher and Web Interface > Web Interface > Web Interface REST service > Overview of the Web Interface REST service (Web Interface REST Service) > Analyzing returned XML from the REST service (Web Interface REST service)
  
Analyzing returned XML from the REST service (Web Interface REST service)
The REST service returns data wrapped in XML. Your applications can use the tags in the XML to analyze that data.
For example, the following XML is returned from a Repositories operation request. The XML contains URI requests for the Examples repository and the Models repository.
A good way of learning how the returned XML is structured is to use a web browser to make requests and view the returned XML:
From a web browser, log in to the Web Interface website that provides the REST service you want to use.
In the address bar, suffix the Web Interface website address with /ModelerService, and the press the Enter key. For example, https://localhost:57850/ModelerService.
The returned XML is shown in web browser.
From the returned XML, copy the URI you want to explore, paste the URI in the address bar, and press the Enter key. And so on.
To see a worked example that demonstrates navigating from the REST Service to items in a model, see Worked example: Using returned URIs to navigate to resources.
To see examples of the XML that is returned for different REST service requests, see the topics in the 'Requesting resources through the REST service' section of the Web Interface Help.
First two tags
The first two tags in the returned XML show what request was made to the REST service.
In the preceding example the <RepositoriesResponse> and <RepositoriesResult> tags tell you that a Repositories operation request was made against a server.
If we used the Examples database URI from the preceding example, the request would return URIs for operation requests that can be made against the Examples database. The first two tags of the returned XML would be <RepositoryOperationsResponse> and <RepositoryOperationsResult>.
Common tags
These tags appear in all returned XML.
<RequestResult> tag
Shows whether a request was successful. There can be many <RequestResult> tags in the returned XML. When a request is successful, the following text appears in the returned XML.
<RequestResult>Complete</RequestResult>
When a request is unsuccessful, the error message is shown between the <RequestResult> and </RequestResult> tags.
<RequestResultType> tag
Shows whether the associated URIs are Operations or Resource URIs. There can be many <RequestResultType> tags in the returned XML.
When the URIs associated with the <RequestResultType> tag are Operation URIs, the following text appears in the returned XML.
<RequestResult>TypeOperations</RequestResultType>
When the URIs associated with the <RequestResultType> tag are Resource URIs, the following text appears in the returned XML.
<RequestResult>TypeResource</RequestResultType>
A Resource can be a server, repository, model, model version, item or property.
<ResourceType> tag
Shows what types of URIs are associated with the <ResourceType> tag.
Through the values of the <ResourceType> and <RequestResultType> tags you can determine what the associated URIs do.
The <ResourceType> tag can have the following values:
REST service - the associated URIs can be used against the REST service.
Server - the associated URI is a server (RequestResultType is Resource), or the associated URIs can be used against the related server (RequestResultType is Operations).
Repository - the associated URI is a database (RequestResultType is Resource), or the associated URIs can be used against the related repository (RequestResultType is Operations).
Model - the associated URI is a model (RequestResultType is Resource), or the associated URIs can be used against the related model (RequestResultType is Operations).
Model Version - the associated URI is a version of a model (RequestResultType is Resource), or the associated URIs can be used against the related version of the model (RequestResultType is Operations).
<item type> - the associated URI is a model item (RequestResultType is Resource), or the associated URIs can be used against the related item (RequestResultType is Operations).
Role Descriptor - the associated URI is a named role of the related model item.
Property Descriptor - the associated URI is a property of the related model item.
Property - the value of the associated <ResourceType> tag is the value of the related property.
<ID> tag
Specifies the ID of a resource. A Resource can be a server, repository, model, model version, item or property.
This tag is self closing when associated with Operation URIs.
<Name> tag
Specifies the Name of a resource. A Resource can be a server, repository, model, model version, item or property.
This tag is self closing when associated with Operation URIs.
<URIs> tag
Contains the <URI> tags.
<URI> tag
Contains the <href> tag.
<href> tag
Specifies a URI for an Operation or Resource request.
Tags that are used for specific requests only
These tags appear in XML only when required.
<DataType> tag
Specifies the data type of a property.
<IsFavourite> tag
This tag is not used at present.
<Model> tag
The associated URI is a model.
<Model Item> tag
The associated URI is a model item.
<ModelVersion> tag
The associated URI is a version of a model.
<PropertyDescriptor> tag
The associated URI is a public property of a model item.
<PropertyItem> tag
Contains tags for the property of a model item.
<database> tag
The associated URI is a database.
<RequestCost> tag
Specifies the performance cost of reading the associated property, either High or Low. When set to High, reading the associated property takes a significant amount of time.
<rel> tag
Used by ModelVersion element to describe the model version and facilitate navigation between model versions. Values are: predecessor-version, latest-version or canonical.
predecessor-version denotes that the resource is a previous version of the model.
latest-version denotes that the resource is the latest version of the model at that point in time.
canonical denotes that the resource is the latest version of the model at that point in time and into the future.
<RoleDescriptor> tag
The associated URI is a public association type (named role) of a model item.
<RoleItem> tag
The associated URI is a model item that is linked through the requested association type (named role).
<Server> tag
The associated URI is a server.
<StyleIcon> tag
Specifies whether the icon of the associated item is a standard icon (value of false) or a customized item (value of true).
Note that when you request the icon or image for an item, the correct icon or image is always returned. The Web Interface makes use of this tag to improve performance by storing the standard icon and image, and then requesting an icon or image only when it is customized.
<Value> tag
Specifies the value of a property.
<WebInterfaceLink> tag
Specifies the URI link to open the associated resource in the Web Interface website.