<?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-datasets" xreflabel="Search HTTP API for metadata about datasets">
  <title>Datasets</title>
  <para>Endpoint: <code>http://api.openaire.eu/search/datasets</code></para>
  <!-- TODO: uncomment when the API version feature is implemented -->
  <!--  <para>Endpoint to a specific version of the API: <code>http://api.openaire.eu/search/{API_VERSION}/datasets</code></para> -->

  <variablelist>
    <varlistentry>
      <term>sortBy</term>
      <listitem>
        <para>Select the sorting order: <code>sortBy=field,[ascending|descending]</code></para>
        <para>where <code>field</code> is one of: <code>dateofcollection</code>, <code>resultstoragedate</code>, <code>resultembargoenddate</code>, <code>resultembargoendyear</code>, <code>resultdateofacceptance</code>, <code>resultacceptanceyear</code></para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>doi</term>
      <listitem>
        <para>Gets the datasets with the given DOIs, if any. Allowed values: comma separated list of DOIs. Alternatevely, it is possible to repeat the paramater for each requested doi.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>openaireDatasetID</term>
      <listitem>
        <para>Gets the publication with the given openaire identifier, if any. Allowed values: comma separated list of openaire identifiers. Alternatevely, it is possible to repeat the paramater for each requested identifier.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>fromDateAccepted</term>
      <listitem>
        <para>Gets the datasets whose date of acceptance is greater than or equal the given
          date. Allowed values: date formatted as <code>YYYY-MM-DD</code>.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>toDateAccepted</term>
      <listitem>
        <para>Gets the datasets whose date of acceptance is less than or equal the given date. Allowed values: date formatted as <code>YYYY-MM-DD</code>.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>title</term>
      <listitem>
        <para>Gets the datasets whose titles contain the given list of keywords. Allowed values: white-space separated list of keywords.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>author</term>
      <listitem>
        <para>Search for datasets by authors. Allowed value is a white-space separated list of names and/or surnames.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>openaireAuthorID</term>
      <listitem>
        <para>Search for datasets by openaire author identifier. Allowed values: comma separated list of identifiers. Alternatevely, it is possible to repeat the paramater for each author id. In both cases, author identifiers will form a query with OR semantics.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>openaireProviderID</term>
      <listitem>
        <para>Search for datasets by openaire data provider identifier. Allowed values: comma separated list of identifiers. Alternatevely, it is possible to repeat the paramater for each provider id. In both cases, provider identifiers will form a query with OR semantics.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>openaireProjectID</term>
      <listitem>
        <para>Search for publications by openaire project identifier. Allowed values: comma separated list of identifiers. Alternatevely, it is possible to repeat the paramater for each provider id. In both cases, provider identifiers will form a query with OR semantics.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>hasProject</term>
      <listitem>
        <para>Allowed values: <code>true|false</code>. If hasProject is true gets the datasets
          that have a link to a project. If hasProject is false gets the datasets with no links
          to projects.</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>FP7ProjectID</term>
      <listitem>
        <para>Search for datasets associated to a FP7 project with the given grant number. It is equivalent to a query by <code>funder=FP7&amp;projectID=grantID</code></para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>OA</term>
      <listitem>
        <para>Allowed values: <code>true|false</code>. If OA is true gets Open Access datasets.
          If OA is false gets the non Open Access datasets</para>
        <!--<para><code>here goes the sample query</code></para> -->
      </listitem>
    </varlistentry>
  </variablelist>

</section>
