forked from ifgi/optimetaPortal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.html
More file actions
77 lines (67 loc) · 2.32 KB
/
data.html
File metadata and controls
77 lines (67 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{% extends "main.html" %}
{% load optimap_extras humanize %}
{% block title %}Data & API | {% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-md-6 py-5">
<h1 class="mb-4">OPTIMAP Data & API Access</h1>
<p class="lead">
All publication metadata published in OPTIMAP is licensed under a Creative Commons Zero
(<a href="https://creativecommons.org/publicdomain/zero/1.0/" target="_blank">CC-0</a>) license.
</p>
<h2 class="py-2">API Endpoint</h2>
<p>
The API endpoint is <b>{{ site|addstr:"/api"|urlize }}</b>. Visit in your browser for
an interactive interface.
</p>
<p>
Query all publications via:
<pre class="bg-light p-2">
curl -X GET {{ site|addstr:"/api" }}/api/optimap/ | jq
</pre>
</p>
<h2 class="py-2">OpenAPI Schema</h2>
<p>
Download the OpenAPI spec at <b>{{ site|addstr:"/api/schema"|urlize }}</b>.
</p>
<h2 class="py-2">OpenAPI UI</h2>
<p>
Explore interactively at <b>{{ site|addstr:"/api/schema/ui"|urlize }}</b>.
</p>
<hr>
<h2 class="py-2">Download Publication Data</h2>
<ul class="list-unstyled mb-4">
{% if geojson_size %}
<li class="mb-3">
<div class="d-flex align-items-center">
<a class="btn btn-primary btn-sm" href="{% url 'optimap:download_geojson' %}">
Download GeoJSON
</a>
(<a href="https://geojson.org/" target="_blank" class="ms-2 small">GeoJSON spec</a>)
</div>
<div class="small text-muted mt-1">
File size: {{ geojson_size }}
</div>
</li>
{% endif %}
{% if geopackage_size %}
<li>
<div class="d-flex align-items-center">
<a class="btn btn-primary btn-sm" href="{% url 'optimap:download_geopackage' %}">
Download GeoPackage
</a>
(<a href="https://www.geopackage.org/" target="_blank" class="ms-2 small">GeoPackage spec</a>)
</div>
<div class="small text-muted mt-1">
File size: {{ geopackage_size }}
</div>
</li>
{% endif %}
</ul>
<p class="small text-muted text-center mb-0">
Data dumps run every {{ interval }} hour{{ interval|pluralize }}.<br>
Last updated: {{ last_updated|naturaltime }}
</p>
</div>
</div>
{% endblock %}