{% extends "layout.html" %} {% block title %}API for Copr{% endblock %} {% block header %}API for the Copr Build System{% endblock %} {%block main_menu_api %}active{% endblock %} {% block breadcrumbs %}
{% endblock %} {% block body %} {% if error %}Error: {{ error }}
{% endif %}In order to access the restricted parts of the API, you will need to provide an API token. This token is unique, specific to you and should not be shared!.
The API token is valid for {{ config['API_TOKEN_EXPIRATION'] }} days after it has been generated.
{% include 'additional_token_info.html' %} {% if g.user %}[copr-cli] login = {{ g.user.api_login }} username = {{ g.user.name }} token = {{ g.user.api_token }} copr_url = {{ ('https://' + config['PUBLIC_COPR_HOSTNAME'])| fix_url_https_frontend}} {% if config['ENFORCE_PROTOCOL_FOR_FRONTEND_URL'] == 'http' %} encrypted = False {% endif %} # expiration date: {{ g.user.api_token_expiration }}{% else %}
[copr-cli] login = LOGIN_TO_REVEAL username = LOGIN_TO_REVEAL token = LOGIN_TO_REVEAL copr_url = {{ ('https://' + config['PUBLIC_COPR_HOSTNAME'])| fix_url_https_frontend}} {% if config['ENFORCE_PROTOCOL_FOR_FRONTEND_URL'] == 'http' %} encrypted = False {% endif %} # expiration date: LOGIN_TO_REVEAL
You need to be logged in to see your API token.
{% endif %}