{% extends "passerelle/manage/service_view.html" %}
{% load i18n passerelle %}

{% block description %}
{% endblock %}

{% block endpoints %}
<ul>
  {% url 'generic-endpoint' connector='iparapheur' slug=object.slug endpoint='ping' as ping_url %}
  <li>{% trans 'Check WS availability:' %}
    <a href="{{ ping_url }}">{{ site_base_uri }}{{ ping_url }}</a>[?debug]
  </li>
{% url 'generic-endpoint' connector='iparapheur' slug=object.slug endpoint='types' as types_url %}
  <li>{% trans 'Get technical types:' %}
    <a href="{{ types_url }}">{{ site_base_uri }}{{ types_url }}</a>
  </li>
{% url 'generic-endpoint' connector='iparapheur' slug=object.slug endpoint='subtypes' as subtypes_url %}
  <li>{% trans 'Get sub types of a given technical type:' %}
    <a href="{{ subtypes_url }}">{{ site_base_uri }}{{ subtypes_url }}</a>[?type=type]</li>
<li>
  {% url 'generic-endpoint' connector='iparapheur' slug=object.slug endpoint='files' as files_url %}
  {% trans 'List files by status:' %}
  <a href="{{ files_url }}">{{ site_base_uri }}{{ files_url }}</a>[?status=status]
</li>
<li>
  {% url 'generic-endpoint' connector='iparapheur' slug=object.slug endpoint='create-file' as create_file_url %}
  {% trans 'Create file:' %}
  <a href="{{ create_file_url }}">{{ site_base_uri }}{{ create_file_url }}</a> [POST]
  <p>{% trans "In the payload" %}
  <ul>
    <li><em>type</em> - {% trans "file type" %}</li>
    <li><em>subtype</em> - {% trans "file subtype" %}</li>
    <li><em>title</em> - {% trans "file title" %}</li>
    <li><em>visibility</em> - {% trans "file visibility" %}</li>
    <li><em>data</em> - {% trans "base64 encoded data" %}</li>
    <li><em>content_type</em> - {% trans "file mime type (optional)" %}</li>
    <li><em>email</em> - {% trans "optional issuer's email" %}</li>
  </ul>
  </p>
</li>
<li>
  {% url 'generic-endpoint' connector='iparapheur' slug=object.slug endpoint='get-file' rest="5e6fc120-f2f7-4dfa-91d0-44414205a2b9" as get_file_url %}
  {% trans 'Get file:' %}
  <a href="{{ get_file_url }}">{{ site_base_uri }}{{ get_file_url }}</a><br />
  <em>5e6fc120-f2f7-4dfa-91d0-44414205a2b9</em> - file id
</li>
<li>
  {% url 'generic-endpoint' connector='iparapheur' slug=object.slug endpoint='get-file-status' rest="5e6fc120-f2f7-4dfa-91d0-44414205a2b9" as get_file_status_url %}
  {% trans 'Get file status:' %}
  <a href="{{ get_file_status_url }}">{{ site_base_uri }}{{ get_file_status_url }}</a><br />
  <em>5e6fc120-f2f7-4dfa-91d0-44414205a2b9</em> - file id
</li>
</ul>
{% endblock %}

{% block security %}
<p>
{% trans 'Access is limited to the following API users:' %}
</p>
{% access_rights_table resource=object permission='can_access' %}
{% endblock %}
