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

65 lines
1.7 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 %}
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
<h1 class="heading-large">
2016-01-19 09:55:13 +00:00
API keys
</h1>
2015-11-30 16:20:45 +00:00
2016-01-19 09:55:13 +00:00
<p>
To connect to the API you will need to create an API Key. Each service can have multiple API Keys to allow
for test and live 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=service_id) }}">the
developer documentation</a>.
2016-01-19 09:55:13 +00:00
</p>
2016-01-15 11:41:31 +00:00
2016-02-02 13:38:39 +00:00
{{ banner(
2016-02-05 10:33:14 +00:00
'You can only send messages to yourself until you <a href="{}">request to go live</a>'.format(
url_for('.service_request_to_go_live', service_id=service_id)
)|safe,
type='important'
2016-02-02 13:38:39 +00:00
) }}
2016-01-19 09:55:13 +00:00
<h2 class="api-key-name">
Service ID
</h2>
<p class="api-key-key">
{{ service_id }}
</p>
2016-01-15 11:41:31 +00:00
2016-01-19 09:55:13 +00:00
{% call(item) list_table(
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') %}
2016-01-20 17:32:55 +00:00
<a href='{{ url_for('.revoke_api_key', service_id=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
2016-02-19 15:02:13 +00:00
<p class='table-show-more-link'>
2016-01-19 09:55:13 +00:00
<a href="{{ url_for('.create_api_key', service_id=service_id) }}">Create a new API key</a>
</p>
2015-11-30 16:20:45 +00:00
{% endblock %}