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 %}
|
2016-04-25 09:48:26 +01:00
|
|
|
|
{% 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
|
|
|
|
|
2016-04-25 09:50:17 +01:00
|
|
|
|
<div class="grid-row">
|
|
|
|
|
|
<div class="column-two-thirds">
|
|
|
|
|
|
<h1 class="heading-large">
|
2016-06-29 15:03:28 +01:00
|
|
|
|
API integration
|
2016-04-25 09:50:17 +01:00
|
|
|
|
</h1>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="column-one-third">
|
2016-04-29 14:17:34 +01:00
|
|
|
|
<a href="{{ url_for('.create_api_key', service_id=current_service.id) }}" class="button align-with-heading">Create an API key</a>
|
2016-04-25 09:50:17 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2016-01-19 09:55:13 +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 haven’t created any API keys yet",
|
|
|
|
|
|
caption="API keys",
|
2016-06-29 15:03:28 +01:00
|
|
|
|
caption_visible=false,
|
2016-06-29 16:04:00 +01:00
|
|
|
|
field_headings=[
|
|
|
|
|
|
'API keys',
|
|
|
|
|
|
hidden_field_heading('Action')
|
|
|
|
|
|
],
|
2016-01-19 09:55:13 +00:00
|
|
|
|
) %}
|
|
|
|
|
|
{% call field() %}
|
2016-07-07 09:00:12 +01:00
|
|
|
|
<div class="file-list">
|
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
|
<span class="file-list-hint">
|
|
|
|
|
|
{% if item.key_type == 'normal' %}
|
|
|
|
|
|
<span class="visually-hidden">Normal</span>
|
|
|
|
|
|
{% elif item.key_type == 'team' %}
|
|
|
|
|
|
Only sends to team members
|
|
|
|
|
|
{% elif item.key_type == 'test' %}
|
|
|
|
|
|
Simulates sending messages
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
2016-06-29 16:04:00 +01:00
|
|
|
|
{% endcall %}
|
2016-01-20 17:32:55 +00:00
|
|
|
|
{% if item.expiry_date %}
|
2016-07-07 09:00:12 +01:00
|
|
|
|
{% call field(align='right') %}
|
2016-07-07 09:06:07 +01:00
|
|
|
|
Revoked {{ item.expiry_date|format_datetime_short }}
|
2016-01-19 09:55:13 +00:00
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
{% call field(align='right', status='error') %}
|
2016-04-04 16:53:52 +01:00
|
|
|
|
<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-04-29 14:17:34 +01:00
|
|
|
|
<div class="bottom-gutter">
|
|
|
|
|
|
{{ api_key(current_service.id, "Service ID", thing="service ID") }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2016-07-01 16:46:14 +01:00
|
|
|
|
<h2 class="heading-small">Documentation</h2>
|
2016-04-29 14:17:34 +01:00
|
|
|
|
<p>
|
2016-07-01 16:46:14 +01:00
|
|
|
|
See the
|
|
|
|
|
|
<a href="{{ url_for('.documentation') }}">
|
|
|
|
|
|
API documentation</a> for clients and specfications.
|
2016-04-29 14:17:34 +01:00
|
|
|
|
</p>
|
2016-04-25 09:48:26 +01:00
|
|
|
|
|
2015-11-30 16:20:45 +00:00
|
|
|
|
{% endblock %}
|