Publisher and Web Interface > Web Interface > Web Interface REST service > Requesting resources through the REST service > Requesting the items that are scoped to a model (Web Interface REST service)
  
Requesting the items that are scoped to a model (Web Interface REST service)
The ChildItems requests return resource URIs for the model items that are directly scoped to a model. This is the equivalent of expanding the Model icon in the Modeler Packages pane.
Note that the ModelRootitems request can also be used to return resource URIs for the child items of a model.
Request
The syntax of the URI for a ChildItems requests is as follows.
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version>/ChildItems
Where:
<Web Interface website> - is the URI for the Web Interface website.
<server name>- is the name of the server.
If the server name contains reserved characters, those characters must be percent encoded in the URI. Use the Servers operation request to return the URI safe version of the server name.
<repository name> is the name of the database.
If the database name contains reserved characters, those characters must be percent encoded in the URI. Use the Repositories operation request to return the URI safe version of the database name.
<model name>- is the name of the model.
If the model name contains reserved characters, those characters must be percent encoded in the URI. Use the Models operation request to return the URI safe version of the model name.
Note that the REST service cannot work with Models that have the percentage character (%) in their names.
<version> - is the version number of the model, against which the ChildItems operation is being run.
Returned XML
A ChildItems request that is run against a model version returns a resource URI for each item that is scoped directly to the model.
The syntax of a returned URI is as follows.
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version>/Item/<item id>
When you use the preceding URI for an item, the REST service returns operation URIs for operation requests that can be used against the item.
Example
In this example, the following ChildItems request returns a resource URI for each item that is scoped directly to version 0 of the Model1 model.
https://localhost:57850/ModelerService/Servers/Server101/Repository/Example1/Models/Model1/ModelVersions/0/ChildItems
The returned XML is as follows. You can see that there is only one item that is scoped to the model, that is, Package1. You can also see that there is a URI for Package1 (c61e8c1b-6c26-44a7-b2e3-c880906400e8).
<?xml version="1.0"?
ArrayOfModelItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://schemas.datacontract.org/2004/07/StudioRESTService.ModelerRESTService">
<ModelItem>
<RequestResult>Complete</RequestResult>
<RequestResultType>Resource</RequestResultType>
<ID>c61e8c1b-6c26-44a7-b2e3-c880906400e8</ID>
<Name>Package1</Name>
<ResourceType>Package</ResourceType>
<URIs>
<URI>
<href>https://localhost:57850/ModelerService/Servers/Server101/Repositories/Examples/Models/Model1/ModelVersions/0/Item/c61e8c1b-6c26-44a7-b2e3-c880906400e8</href>
</URI>
</URIs>
<Ip/>
<StyleIcon>false</StyleIcon>
<Tg DIC</Tg>
<Ty Package</Ty
<WebInterfaceLink>https://localhost:57850/showitem?srvNm=Server101+repNm=Models+modNm=Model1+modVe=0+itemID=c61e8c1b-6c26-44a7-b2e3-c880906400e8</WebInterfaceLink>
</ModelItem>
</ArrayOfModelItem