Item Request Example

Item Request

It is a request identifier as a path parameter.

<?xml version="1.0" encoding="UTF-8" ?>
<Resource xmlns="" xmlns:xsi=""
    <Desc>Contains information about movies.</Desc>

    <!-- Collection GET Request /movie -->
    <Request method="GET">
        <Desc>Get info of all movies with ratings greater than 3.</Desc>
        <Sql id="wellRatedMovies">
            SELECT name,rating FROM movie
            where rating gt 3.0

    <!-- Item GET Request /movie/{id} -->
    <Request method="GET" item="true">
        <Desc>Get info of movie with given id.</Desc>
        <Sql id="allMovies">
            SELECT * FROM movie where id=$id


The above request executes the second request part when it receives a path with resource/id in it.

Icon For Arrow-up