<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xmlns="http://docbook.org/ns/docbook"
  xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec_http-common">
  <title>Common API parameters</title>
  <para> Parameters included in this section can always be specified, regardless the type of
    entities (metadata about publications, datasets, or projects) you want to retrieve. </para>
  <para>To query for publications metadata:
    <code>http://api.openaire.eu/search/publications</code></para>
  <para>To query for datasets metadata: <code>http://api.openaire.eu/search/datasets</code></para>
  <para>To query for projects metadata: <code>http://api.openaire.eu/search/projects</code></para>

  <variablelist>
    <varlistentry>
      <term>page</term>
      <listitem>
        <para>Page number of the search results.</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>size</term>
      <listitem>
        <para>Number of results per page.</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>format</term>
      <listitem>
        <para>Options:<command>json | xml | csv | tsv</command></para>
        <para>Select the format of the response. Default is <command>xml</command>.</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>model</term>
      <listitem>
        <para>Options:<command>openaire | sygma</command></para>
        <para>Select the data model of the response. Default is <command>openaire</command>. Model
            <command>sygma</command> is a simplified version of the <command>openaire</command>
          model. For <command>sygma</command>, only the <command>xml</command> format is available.
          The relative XML schema is available <link
            xlink:href="https://www.openaire.eu/schema/sygma/oaf_sygma_v2.1.xsd">here</link></para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>sortBy</term>
      <listitem>
        <para>Select the sorting order: <code>sortBy=field[,ascending|,descending]</code></para>
        <para>For the list of sortable fields, please refer to the documentation relative to the specific type of entity you are querying for.</para>
      </listitem>
    </varlistentry>
    
    <!-- TODO: Uncomment when implemented/available -->
    <!--
      <varlistentry>
        <term>version</term>
        <listitem><para>Select the version of the data model implementation. For example, if <command>format=xml</command>, version is the version of the XML schema.Default is the last available version.</para></listitem>
      </varlistentry>
      -->
    <varlistentry>
      <term>hasECFunding</term>
      <listitem>
        <para>Allowed values: <code>true|false</code>. If hasECFunding is true gets the
          publications/datasets/projects funded by the EC. If hasECFunding is false gets the
          publications/datasets/projects related to projects not funded by the EC. </para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>hasWTFunding</term>
      <listitem>
        <para>Allowed values: <code>true|false</code>.If hasWTFunding is true gets the
          publications/datasets/projects funded by Wellcome Trust. The results are the same as those obtained with <code>funder=wt</code>.
          If hasWTFunding is false gets the publications/datasets/projects related to projects not funded by Wellcome Trust.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>funder</term>
      <listitem>
        <para>Allowed values: <code>WT|EC|ARC|ANDS|NSF|FCT|NHMRC</code>. Search for publications/datasets/projects
          by funder.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>fundingStream</term>
      <listitem>
        <para>Search for publications/datasets/projects by funding stream.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>FP7scientificArea</term>
      <listitem>
        <para>Search for FP7 publications/datasets/projects by scientific area. </para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
   <varlistentry>
        <term>keywords</term>
        <listitem>
          <para>Allowed values: white-space separated list of keywords.</para>
        </listitem>
      </varlistentry>
  </variablelist>
</section>
