{% extends "layout.html" %} {% block title %}API for Coprs{% endblock %} {% block header %}API for the Coprs Build System{% endblock %} {% block body %} {% if error %}

Error: {{ error }}

{% endif %}

Coprs API

API Token

In order to access 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 you generated it.

{% if g.user %}

Your information:

    API login       :   {{ g.user.api_login }}
    API token       :   {{ g.user.api_token }}
    Expiration date :   {{ g.user.api_token_expiration }}
    
{% else %}

You need to be logged in to see you API token.

{% endif %}

The API

List someone's copr

To list the coprs owned by someone one argument is required:

name The name of the user you would to list the copr of.

URL is:

    /api/owned/<username>/
    

Add a new copr

Login required

To add a new copr some informations are required:

name The name of the copr to create.
chroots A comma separated list of chroots to use in the copr.
repos A comma separated list of repositories that this new copr should have access to.
initial_pkgs A comma separated list of initial packages to build in this new copr.

URL is:

    /api/copr/new/
    

To come here, more information about the API itself.

{% endblock %}