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-01-15 20:14:05 +00:00
|
|
|
|
GOV.UK Notify | API keys and documentation
|
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-01-19 09:55:13 +00:00
|
|
|
|
<h1 class="heading-xlarge">
|
|
|
|
|
|
API keys
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
To connect to the API you will need to send your service ID, encrypted with
|
|
|
|
|
|
an API key. The API key stays secret.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
2016-01-21 15:43:31 +00:00
|
|
|
|
There are client libraries available which can do this for you. See
|
2016-01-19 09:55:13 +00:00
|
|
|
|
<a href="{{ url_for(".documentation", service_id=service_id) }}">the
|
|
|
|
|
|
developer documentation</a> for more information.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="api-key-name">
|
|
|
|
|
|
Service ID
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
<p class="api-key-key">
|
|
|
|
|
|
{{ service_id }}
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
{% call(item) list_table(
|
|
|
|
|
|
keys,
|
|
|
|
|
|
empty_message="You haven’t 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 %}
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
<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 %}
|