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
|
|
|
|
|
2016-02-02 14:05:45 +00:00
|
|
|
|
<h1 class="heading-large">
|
2016-01-19 09:55:13 +00:00
|
|
|
|
API keys
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
2016-01-24 21:03:00 +00:00
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
2016-01-24 21:03:00 +00:00
|
|
|
|
API usage is described in
|
2016-04-04 16:53:52 +01:00
|
|
|
|
<a href="{{ url_for('.documentation', service_id=current_service.id) }}">the
|
2016-01-24 21:03:00 +00:00
|
|
|
|
developer documentation</a>.
|
2016-01-19 09:55:13 +00:00
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="api-key-name">
|
|
|
|
|
|
Service ID
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
<p class="api-key-key">
|
2016-04-04 16:53:52 +01:00
|
|
|
|
{{ current_service.id }}
|
2016-01-19 09:55:13 +00:00
|
|
|
|
</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-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-02-19 15:02:13 +00:00
|
|
|
|
<p class='table-show-more-link'>
|
2016-04-04 16:53:52 +01:00
|
|
|
|
<a href="{{ url_for('.create_api_key', service_id=current_service.id) }}">Create a new API key</a>
|
2016-01-19 09:55:13 +00:00
|
|
|
|
</p>
|
2015-11-30 16:20:45 +00:00
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|