<div class="container-fluid">
<div class="row-fluid">
    <div class="page-header">
        <h1>API</h1>
    </div>
</div>
<div class="row-fluid">
    <ul>
        <li>Models
            <ul>
                <li><strong>/api/models</strong> returns an array of all the models that are available to forms-angular</li>
                <li><strong>/api/schema/:model</strong> returns the schema for a model</li>
                <li><strong>/api/schema/:model/:customForm</strong> returns the schema for a model</li>
                <li><strong>/api/:model</strong> returns an array of all the documents in a model (needs pagination)</li>
                <li><strong>/api/:model/:id</strong> returns a single document from the collection</li>
                <li><strong>/api/:model/:id/list</strong> returns how a document should appear in a list</li>
            </ul>

            The calls that return data will strip out any fields that are defined as <strong>secure</strong> - for example
            <pre><code>passwordHash: {type: String, secure:true, form: {hidden: true}}</code></pre>
        </li>
        <li>Search
            <ul>
                <li><strong>/api/search?q=string</strong> returns documents where the string is found at the beginning of an
                    indexed field
                </li>
                <li><strong>/api/search/:model?q=string</strong> returns documents in the specified collection where the string
                    is found at the beginning of an indexed field. Note that the search is case insensitive, so will be
                    inefficient (and to be avoided on large datasets) until Mongo 2.5 comes out. (See issue <a
                            href="https://jira.mongodb.org/browse/SERVER-90" target="_blank">here</a>)
                </li>
                <li><strong>/api/search?q=string&f={<span><em>filterjson</em></span>}</strong> returns documents where the
                    string is found at the beginning of an indexed field which satisfy the conditions in the filter.
                </li>
            </ul>
        </li>
    </ul>
</div>
</div>