Files
notifications-admin/app/templates/views/api-keys.html
T

61 lines
1.8 KiB
HTML
Raw Normal View History

2015-12-14 16:53:07 +00:00
{% extends "withnav_template.html" %}
2016-01-19 09:55:13 +00:00
{% from "components/table.html" import list_table, field, hidden_field_heading %}
{% from "components/api-key.html" import api_key %}
2015-11-30 16:20:45 +00:00
{% block page_title %}
2016-02-08 09:23:51 +00:00
API keys GOV.UK Notify
2015-11-30 16:20:45 +00:00
{% endblock %}
2015-12-14 16:53:07 +00:00
{% block maincolumn_content %}
2015-11-30 16:20:45 +00:00
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">
API keys
</h1>
</div>
<div class="column-one-third">
<a href="{{ url_for('.create_api_key', service_id=current_service.id) }}" class="button align-with-heading">Create new API key</a>
</div>
</div>
2015-11-30 16:20:45 +00:00
2016-01-19 09:55:13 +00:00
<p>
To connect to the API you need to create an API Key.
</p>
<p>
Each service can have multiple API Keys. This allows you to integrate a
number of systems, each with its own key. You can also have separate
keys for your development and test environments.
2016-01-19 09:55:13 +00:00
</p>
2016-01-15 11:41:31 +00:00
2016-01-19 09:55:13 +00:00
<p>
API usage is described in
<a href="{{ url_for('.documentation', service_id=current_service.id) }}">the
developer documentation</a>.
2016-01-19 09:55:13 +00:00
</p>
2016-01-15 11:41:31 +00:00
2016-04-05 11:16:29 +01:00
{% call(item, row_number) list_table(
2016-01-19 09:55:13 +00:00
keys,
empty_message="You havent created any API keys yet",
caption="API keys",
caption_visible=False,
2016-01-20 17:32:55 +00:00
field_headings=['Key name', hidden_field_heading('Action')]
2016-01-19 09:55:13 +00:00
) %}
{% call field() %}
{{ item.name }}
{% endcall %}
2016-01-20 17:32:55 +00:00
{% if item.expiry_date %}
2016-01-19 09:55:13 +00:00
{% call field(align='right', status='default') %}
2016-01-21 12:28:05 +00:00
Revoked {{ item.expiry_date|format_datetime }}
2016-01-19 09:55:13 +00:00
{% endcall %}
{% else %}
{% call field(align='right', status='error') %}
<a href='{{ url_for('.revoke_api_key', service_id=current_service.id, key_id=item.id) }}'>Revoke</a>
2016-01-19 09:55:13 +00:00
{% endcall %}
{% endif %}
{% endcall %}
2016-01-15 11:41:31 +00:00
{{ api_key(current_service.id, "Service ID", thing="service ID") }}
2015-11-30 16:20:45 +00:00
{% endblock %}