open-data.html 4.67 KB
{% extends "base.html" %}
{% load i18n %}

{% block main-content %}
    <div>
        <h2>{% trans "OpenData - Communities Interlegis" %}</h2>
        <p>{% blocktrans %}At this point the system Colab provides much of its data 
        through its search engine.{% endblocktrans %}</p> 
        <p>{% blocktrans %}If you are interested in integrating your system with the environment Colab 
        and requires no other data provided by this API, please contact us via the ticketing 
        system (you must be registered in order to create a ticket).{% endblocktrans %}</p>

        <h3>{% trans "Performing searches via the API" %}</h3>
        <p>{% trans "The Colab API searches works through an HTTP/REST always returning JSON objects with result." %} </p>
        <p>{% trans "The base URL used for the search is:" %} 
        <a href="/api/search/">http://colab.interlegis.leg.br/api/search/</a></p>
        
        <h3>{% trans "Parameters:" %}</h3>
        <ul class="none indent-dois">
            <li>
                <h4><i>{% trans "Query" %}</i> - q</h4>
                {% blocktrans %}The <i>query</i> is the "question" sent 
                to the search server. A <i>query</i> consists of 
                <b>field:value</b>, where the field represents a kind of system data,
                for example <b>collaborator</b> and represents the data stored 
                by the system, for example <b>jeanferri</b>.{% endblocktrans %}
                {% trans "The following is a list of available fields to search:" %}<br/>
                <ul class="none indent-dois">
                    <li><b>Type</b>: {% trans "wiki, thread, ticket, changeset." %}</li>
                    <li><b>Title</b>: {% trans "page name, title of the discussion or ticket, changeset description." %}</li>
                    <li><b>Description</b>: {% trans "excerpt from the page or the discussion, description of the ticket or changeset." %}</li>
                    <li><b>Creator</b>: {% trans "name of user who created the document." %}</li>
                    <li><b>creator_real_name</b>: {% trans "real name who created the document." %}</li>
                    <li><b>create</b>: {% trans "creation date." %}</li>
                    <li><b>modified</b>: {% trans "modification date." %}</li>
                    <li><b>mailinglist</b>: {% trans "mailing list (only for type thread)." %}</li>
                    <li><b>name</b>: {% trans "name of the wiki page." %}</li>
                    <li><b>comment</b>: {% trans "comments of tickets (all concatenated)." %}</li>
                    <li><b>content</b>: {% trans "contents of wiki page or messages of the discussions (all concatenated)." %} </li>
                    <li><b>keyword</b>: {% trans "keywords (ticket only)." %}</li>
                    <li><b>milestone</b>: {% trans "milestone (ticket only)." %}</li>
                    <li><b>priority</b>: {% trans "priority (ticket only)." %}</li>
                    <li><b>component</b>: {% trans "component (ticket only)." %}</li>
                    <li><b>version</b>: {% trans "version (ticket only)." %}</li>
                    <li><b>severity</b>: {% trans "severity (ticket only)." %}</li>
                    <li><b>owner</b>: {% trans "responsible (ticket only)." %}</li>
                    <li><b>status</b>: {% trans "status (ticket only)." %}</li>
                    <li><b>revision</b>: {% trans "review (ticket only)." %}</li>
                    <li><b>subject</b>: {% trans "synonym for the title (for discussion)." %}</li>
                </ul>
            </li>
            <br/><hr/>
            
            <li>
                <h4>{% trans "Results per page - n" %} </h4>
                {% blocktrans %}Number of results to be displayed per page. 
                Its value must be an integer between 1 and 500.{% endblocktrans %} 
                <i>{% trans "Default: 50" %}</i>. 
            </li>
            <br/><hr/>
            
            <li>
                <h4>{% trans "Page - p" %}</h4>
                {% blocktrans %}Page number that appears. Its value must be an 
                integer equal to or greater than 1.{% endblocktrans %} <i>{% trans "Default: 1" %}</i>.
            </li>
            <br/><hr/>

            <li>
                <h4>{% trans "Order - o" %}</h4>
                {% blocktrans %}Order in which the results will be displayed. Its value must be 
                a string in the <b>field direction</b> where the same field are 
                presented in the <i>query</i> parameter and direction can be 
                <b>asc</b> for ascending or <b>desc</b> for descending.{% endblocktrans %} <i>Default: score desc</i>.
            </li>
            <br/>
        </ul>
{% endblock %}