This documentation describes the Pagure API v0 revision .
To access some endpoints, you need to log in to Pagure using an API token. You can generate one in the project setting page.
When sending HTTP request, include an Authorization
field in the header
with value token $your-api-token
, where $your-api-token
is the
API token generated in the project setting page.
So the result should look like:
Authorization: token abcdefghijklmnop
Where abcdefghijklmnop
is the API token provided by pagure.
Anyone with the token can access the APIs on your behalf, so please be sure to keep it private and safe.
The payload of POST and GET requests is encoded as
application/x-www-form-urlencoded
.
This is an example URL of a GET request:
https://pagure.io/api/0/test/issues?status=Open&tags=Pagure&tags=Enhancement
The return value of API calls is application/json
. This is an
example of return value:
{ "args": { "assignee": null, "author": null, "status": null, "tags": [] }, "issues": [ { "assignee": null, "blocks": [], "comments": [], "content": "Sample ticket", "date_created": "1434266418", "depends": [], "id": 4, "private": false, "status": "Open", "tags": [], "title": "This is a sample", "user": { "fullname": "Pagure", "name": "API" } } ] }
Create a new project on this pagure instance.
This is an asynchronous call.
POST /api/0/new
Key | Type | Optionality | Description |
---|---|---|---|
name |
string | Mandatory | The name of the new
project.
|
description |
string | Mandatory | A short description of
the new project.
|
namespace |
string | Optional | The namespace of the
project to fork.
|
url |
string | Optional | An url providing more
information about the
project.
|
avatar_email |
string | Optional | An email address for the
avatar of the project.
|
create_readme |
boolean | Optional | A boolean to specify if
there should be a readme
added to the project on
creation.
|
default_branch |
stringn | Optional | Name of the default
branch of the git
repository.
|
private |
boolean | Optional | A boolean to specify if
the project to create
is private.
Note: not all pagure
instance support private
projects, confirm this
with your administrators
|
mirrored_from |
stringn | Optional | The public URL of a git
repository that this
project is mirroring on
this pagure instance.
|
ignore_existing_repos |
boolean | Optional | Only available to admins
this option allows them
to make project creation
pass even if there is
already a coresopnding
git repository on disk
|
repospanner_region |
boolean | Optional | Only available to admins
this option allows them
to override the default
respoSpanner region
configured
|
wait |
boolean | Optional | A boolean to specify if
this API call should
return a taskid or if it
should wait for the task
to finish.
|
wait=False: { 'message': 'Project creation queued', 'taskid': '123-abcd' } wait=True: { 'message': 'Project creation queued' }
Modify an existing project on this Pagure instance.
PATCH /api/0/<repo>
Key | Type | Optionality | Description |
---|---|---|---|
main_admin |
string | Mandatory | The new main admin of
the project.
|
retain_access |
string | Optional | The old main admin
retains access on the
project when giving the
project. Defaults to
False . |
{ "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "testuser1" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1496326387", "description": "Test", "fullname": "test-project2", "id": 2, "milestones": {}, "name": "test-project2", "namespace": null, "parent": null, "priorities": {}, "tags": [], "user": { "default_email": "testuser1@domain.local", "emails": [], "fullname": "Test User1", "name": "testuser1" } }
Return information about a specific project
GET /api/0/<repo> GET /api/0/<namespace>/<repo>
GET /api/0/fork/<username>/<repo> GET /api/0/fork/<username>/<namespace>/<repo>
{ "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [ "ryanlerch" ], "commit": [ "puiterwijk" ], "owner": [ "pingou" ], "ticket": [ "vivekanand1101", "mprahl", "jcline", "lslebodn", "cverna", "farhaan" ] }, "close_status": [ "Invalid", "Insufficient data", "Fixed", "Duplicate" ], "custom_keys": [], "date_created": "1431549490", "date_modified": "1431549490", "description": "A git centered forge", "fullname": "pagure", "id": 10, "milestones": {}, "name": "pagure", "namespace": null, "parent": null, "priorities": {}, "tags": [ "pagure", "fedmsg" ], "user": { "fullname": "Pierre-YvesChibon", "name": "pingou" } }
Search projects given the specified criterias.
GET /api/0/projects
GET /api/0/projects?tags=fedora-infra
GET /api/0/projects?page=1&per_page=50
Key | Type | Optionality | Description |
---|---|---|---|
tags |
string | Optional | Filters the projects
returned by their tags
|
pattern |
string | Optional | Filters the projects
by the pattern string
|
username |
string | Optional | Filters the projects
returned by the users
having commit rights
to it
|
owner |
string | Optional | Filters the projects
by ownership.
If the argument is of
the form <!owner> then
the project returned
are the ones not
owned by this user.
|
namespace |
string | Optional | Filters the projects
by namespace
|
fork |
boolean | Optional | Filters the projects
returned depending if
they are forks or not
|
short |
boolean | Optional | Whether to return the
entrie project JSON
or just a sub-set
|
page |
int | Optional | Specifies which
page to return
(defaults to: 1)
|
per_page |
int | Optional | The number of projects
to return per page.
The maximum is 100.
|
{ "args": { "fork": null, "namespace": null, "owner": null, "page": 1, "pattern": null, "per_page": 2, "short": false, "tags": [], "username": null }, "pagination": { "first": "http://127.0.0.1:5000/api/0/projects?per_page=2&page=1", "last": "http://127.0.0.1:5000/api/0/projects?per_page=2&page=500", "next": "http://127.0.0.1:5000/api/0/projects?per_page=2&page=2", "page": 1, "pages": 500, "per_page": 2, "prev": null }, "projects": [ { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "mprahl" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1498841289", "description": "test1", "fullname": "test1", "id": 1, "milestones": {}, "name": "test1", "namespace": null, "parent": null, "priorities": {}, "tags": [], "url_path": "test1", "user": { "fullname": "Matt Prahl", "name": "mprahl" } }, { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "mprahl" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1499795310", "description": "test2", "fullname": "test2", "id": 2, "milestones": {}, "name": "test2", "namespace": null, "parent": null, "priorities": {}, "tags": [], "url_path": "test2", "user": { "fullname": "Matt Prahl", "name": "mprahl" } } ], "total_projects": 1000 }
List the tags made on the project's issues.
GET /api/0/<repo>/tags GET /api/0/<namespace>/<repo>/git/tags
GET /api/0/fork/<username>/<repo>/tags GET /api/0/fork/<username>/<namespace>/<repo>/tags
Key | Type | Optionality | Description |
---|---|---|---|
pattern |
string | Optional | Filters the starting
letters of the tags
|
{ "total_tags": 2, "tags": ["tag1", "tag2"] }
View a tag on project's issues or pull requests.
GET /api/0/<repo>/tag/<tag> GET /api/0/<repo>/tag/<tag>
{ "tag": "tag1", "tag_color": "DeepBlueSky" "tag_description": "Our blue tag" }
Create a new tag on the project's issues and pull requests.
POST /api/0/<repo>/tags/new POST /api/0/<namespace>/<repo>/tags/new
POST /api/0/fork/<username>/<repo>/tags/new POST /api/0/fork/<username>/<namespace>/<repo>/tags/new
Key | Type | Optionality | Description |
---|---|---|---|
'tag' | string | Mandatory | The name of the tag |
'tag_color' | string | Mandatory | The color of the tag |
'tag_description' | string | Optional | The description of the
tag
|
{ "tag": { "tag": "tag1", "tag_color": "DeepBlueSky", "tag_description": "Our blue tag" }, "message": "Tag created" }
Delete a tag on project's issues and pull requests.
DELETE /api/0/<repo>/tag/<tag> DELETE /api/0/<namespace>/<repo>/tag/<tag>
DELETE /api/0/fork/<username>/<repo>/tag/<tag> DELETE /api/0/fork/<username>/<namespace>/<repo>/tag/<tag>
{ "message": "Tag blue has been deleted" }
List the tags made on the project Git repository.
GET /api/0/<repo>/git/tags GET /api/0/<namespace>/<repo>/git/tags
GET /api/0/fork/<username>/<repo>/git/tags GET /api/0/fork/<username>/<namespace>/<repo>/git/tags
Key | Type | Optionality | Description |
---|---|---|---|
with_commits |
string | Optional | Include the commit hash
corresponding to the
tags found in the repo
|
{ "total_tags": 2, "tags": ["0.0.1", "0.0.2"] } { "total_tags": 2, "tags": { "0.0.1": "bb8fa2aa199da08d6085e1c9badc3d83d188d38c", "0.0.2": "d16fe107eca31a1bdd66fb32c6a5c568e45b627e" } }
Create a new tag on the project Git repository.
If the request tried to create a git tag that already existed, the JSON
returned will include "tag_created": false
, otherwise, this field will
be true
.
POST /api/0/<repo>/git/tags POST /api/0/<namespace>/<repo>/git/tags
POST /api/0/fork/<username>/<repo>/git/tags POST /api/0/fork/<username>/<namespace>/<repo>/git/tags
Key | Type | Optionality | Description |
---|---|---|---|
tagname |
string | Mandatory | Name of the tag to
create in the git repo
|
commit_hash |
string | Mandatory | Hash of the commit/
reference to tag
|
message |
string | Optional | Message to include in
the annotation of the
git tag
|
with_commits |
string | Optional | Include the commit hash
corresponding to the
tags found in the repo
in the data returned
|
force |
boolean | Optional | If a similar git tag
already exists, remove
it from the repo and
create the specified
one, thus forcing it
|
{ "total_tags": 2, "tags": ["0.0.1", "0.0.2"], "tag_created": true, } { "total_tags": 2, "tags": { "0.0.1": "bb8fa2aa199da08d6085e1c9badc3d83d188d38c", "0.0.2": "d16fe107eca31a1bdd66fb32c6a5c568e45b627e" }, "tag_created": false, }
List the branches associated with a Pagure git repository
GET /api/0/<repo>/git/branches GET /api/0/<namespace>/<repo>/git/branches
GET /api/0/fork/<username>/<repo>/git/branches GET /api/0/fork/<username>/<namespace>/<repo>/git/branches
Key | Type | Optionality | Description |
---|---|---|---|
with_commits |
boolean | Optional | Include the commit hash
corresponding to the
HEAD of each branch
|
{ "total_branches": 2, "branches": ["main", "dev"] "default": "main" } { "total_branches": 2, "default": { "main": "16ae2a4df107658b52750063ae203f978cf02ff7", } "branches": { "main": "16ae2a4df107658b52750063ae203f978cf02ff7", "dev": "8351c460167a41defc393f5b6c1d51fe1b3b82b8" } }
List the existing git branch alias in a project.
GET /api/0/rpms/python-requests/git/alias
{ "refs/heads/rawhide": "refs/heads/main" }
Create a new git branch alias in a project.
POST /api/0/rpms/python-requests/git/alias/new
Key | Type | Optionality | Description |
---|---|---|---|
alias_from |
string | Mandatory | The origin reference the
alias is for.
|
alias_to |
string | Mandatory | The destination reference
of the alias (must be an
existing branch in the
git repository).
|
refs/heads/...
the alias_fromrefs/heads/main
needs to be specified as main
).{ 'alias_from': 'main', 'alias_to': 'rawhide' }
{ "refs/heads/rawhide": "refs/heads/main" }
Delete an existing git branch alias from a project.
POST /api/0/rpms/python-requests/git/alias/drop
Key | Type | Optionality | Description |
---|---|---|---|
alias_from |
string | Mandatory | The origin reference the
alias is for.
|
alias_to |
string | Mandatory | The destination reference
of the alias (must be an
existing branch in the
git repository).
|
refs/heads/...
the alias_fromrefs/heads/main
needs to be specified as main
).{ 'alias_from': 'main', 'alias_to': 'rawhide' }
{ "refs/heads/rawhide": "refs/heads/main" }
List the Git URLS on the project.
GET /api/0/<repo>/git/urls GET /api/0/<namespace>/<repo>/git/urls
GET /api/0/fork/<username>/<repo>/git/urls GET /api/0/fork/<username>/<namespace>/<repo>/git/urls
{ "total_urls": 2, "urls": { "ssh": "ssh://git@pagure.io/mprahl-test123.git", "git": "https://pagure.io/mprahl-test123.git" } }
List the watchers on the project.
GET /api/0/<repo>/watchers GET /api/0/<namespace>/<repo>/watchers
GET /api/0/fork/<username>/<repo>/watchers GET /api/0/fork/<username>/<namespace>/<repo>/watchers
{ "total_watchers": 1, "watchers": { "mprahl": [ "issues", "commits" ] } }
List all the contributors of a project, by their access level.
GET /api/0/<repo>/contributors GET /api/0/<namespace>/<repo>/contributors
GET /api/0/fork/<username>/<repo>/contributors GET /api/0/fork/<username>/<namespace>/<repo>/contributors
{ "groups": { "admin": [], "collaborators": [ { "branches": "f*", "user": "packager" } ], "commit": [ "infra" ], "ticket": [] }, "users": { "admin": [ "pingou" ], "collaborators": [ { "branches": "epel*", "user": "ngompa" } ], "commit": [ "kevin" ], "ticket": [ "ralph" ] } }
Checks whether a specified user has commit access on a specified branch of the git repo.
GET /api/0/<repo>/hascommit?user=<username>&branch=<branchname> GET /api/0/<namespace>/<repo>/hascommit?user=<username>&branch=<branchname>
GET /api/0/fork/<username>/<repo>/hascommit?user=<username>&branch=<branchname> GET /api/0/fork/<username>/<namespace>/<repo>/hascommit?user=<username>&branch=<branchname>
Key | Type | Optionality | Description |
---|---|---|---|
user |
String | optional | The username of the user to check access for |
branch |
String | optional | The branch of the git repo
to check access for.
Note that there is no need
to specify it using
refs/heads/ the name
is enough. |
{ "args": { "username": "pingou", "branch": "main", "project": { } }, "hascommit": true }
Create a new git branch on a project
POST /api/0/rpms/python-requests/git/branch
Key | Type | Optionality | Description |
---|---|---|---|
branch |
string | Mandatory | A string of the branch
to create.
|
from_branch |
string | Optional | A string of the branch
to branch off of. This
defaults to "master".
if
from_commit
isn't set. |
from_commit |
string | Optional | A string of the commit
to branch off of.
|
{ 'message': 'Project branch was created' }
Fork a project on this pagure instance.
This is an asynchronous call.
POST /api/0/fork
Key | Type | Optionality | Description |
---|---|---|---|
repo |
string | Mandatory | The name of the project
to fork.
|
namespace |
string | Optional | The namespace of the
project to fork.
|
username |
string | Optional | The username of the user
of the fork.
|
wait |
boolean | Optional | A boolean to specify if
this API call should
return a taskid or if it
should wait for the task
to finish.
|
wait=False: { "message": "Project forking queued", "taskid": "123-abcd" } wait=True: { "message": 'Repo "test" cloned to "pingou/test" }
Add, remove or update ACLs on a project for a particular user or group.
This is restricted to project admins.
POST /api/0/<repo>/git/modifyacls POST /api/0/<namespace>/<repo>/git/modifyacls
POST /api/0/fork/<username>/<repo>/git/modifyacls POST /api/0/fork/<username>/<namespace>/<repo>/git/modifyacls
Key | Type | Optionality | Description |
---|---|---|---|
user_type |
String | Mandatory | A string to specify if the ACL should be changed for a user or a group. Specifying one of either 'user' or 'group' is mandatory |
name |
String | Mandatory | The name of the user or group whose ACL should be changed. |
acl |
String | Optional | Can be either unspecified, 'ticket', 'commit', 'admin'. If unspecified, the access will be removed |
{ "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [ "ta2" ], "owner": [ "karsten" ], "ticket": [ "ta1" ] }, "close_status": [], "custom_keys": [], "date_created": "1531131619", "date_modified": "1531302337", "description": "pagure local instance", "fullname": "pagure", "id": 1, "milestones": {}, "name": "pagure", "namespace": null, "parent": null, "priorities": {}, "tags": [], "url_path": "pagure", "user": { "fullname": "KH", "name": "karsten" } }
Generate Gitolite ACLs on a project. This is restricted to Pagure admins.
This is an asynchronous call.
POST /api/0/rpms/python-requests/git/generateacls
Key | Type | Optionality | Description |
---|---|---|---|
wait |
boolean | Optional | A boolean to specify if
this API call should
return a taskid or if it
should wait for the task
to finish.
|
wait=False: { 'message': 'Project ACL generation queued', 'taskid': '123-abcd' } wait=True: { 'message': 'Project ACLs generated' }
Return all flags for given commit of given project
GET /api/0/<repo>/c/<commit_hash>/flag GET /api/0/<namespace>/<repo>/c/<commit_hash>/flag
GET /api/0/fork/<username>/<repo>/c/<commit_hash>/flag GET /api/0/fork/<username>/<namespace>/<repo>/c/<commit_hash>/flag
{ "flags": [ { "comment": "flag-comment", "commit_hash": "28f1f7fe844301f0e5f7aecacae0a1e5ec50a090", "date_created": "1520341983", "percent": null, "status": "success", "url": "https://some.url.com", "user": { "fullname": "Full name", "name": "fname" }, "username": "somename" }, { "comment": "different-comment", "commit_hash": "28f1f7fe844301f0e5f7aecacae0a1e5ec50a090", "date_created": "1520512543", "percent": null, "status": "pending", "url": "https://other.url.com", "user": { "fullname": "Other Name", "name": "oname" }, "username": "differentname" } ], "total_flags": 2 }
Add or edit flags on a commit.
POST /api/0/<repo>/c/<commit_hash>/flag POST /api/0/<namespace>/<repo>/c/<commit_hash>/flag
POST /api/0/fork/<username>/<repo>/c/<commit_hash>/flag POST /api/0/fork/<username>/<namespace>/<repo>/c/<commit_hash>/flag
Key | Type | Optionality | Description |
---|---|---|---|
username |
string | Mandatory | The name of the
application to be
presented to users
on the commit pages
|
comment |
string | Mandatory | A short message
summarizing the
presented results
|
url |
string | Mandatory | A URL to the result
of this flag
|
status |
string | Mandatory | The status of the task,
can be any of:
canceled, error, failure, pending, success
|
percent |
int | Optional | A percentage of
completion compared to
the goal. The percentage
also determine the
background color of the
flag on the pages
|
uid |
string | Optional | A unique identifier used
to identify a flag across
all projects. If the
provided UID matches an
existing one, then the
API call will update the
existing one rather than
create a new one.
Maximum Length: 32
characters. Default: an
auto generated UID
|
{ "flag": { "comment": "Tests passed", "commit_hash": "62b49f00d489452994de5010565fab81", "date_created": "1510742565", "percent": 100, "status": "success", "url": "http://jenkins.cloud.fedoraproject.org/", "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], "fullname": "PY C", "name": "pingou"}, "username": "Jenkins" }, "message": "Flag added", "uid": "b1de8f80defd4a81afe2e09f39678087" }
{ "flag": { "comment": "Tests passed", "commit_hash": "62b49f00d489452994de5010565fab81", "date_created": "1510742565", "percent": 100, "status": "success", "url": "http://jenkins.cloud.fedoraproject.org/", "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], "fullname": "PY C", "name": "pingou"}, "username": "Jenkins" }, "message": "Flag updated", "uid": "b1de8f80defd4a81afe2e09f39678087" }
Allows anyone to update their own watch status on the project.
POST /api/0/<repo>/watchers/update POST /api/0/<namespace>/<repo>/watchers/update
POST /api/0/fork/<username>/<repo>/watchers/update POST /api/0/fork/<username>/<namespace>/<repo>/watchers/update
Key | Type | Optionality | Description |
---|---|---|---|
status |
string | Mandatory | The new watch status to
set on that project.
(See options below)
|
watcher |
string | Mandatory | The name of the user
changing their watch
status.
|
Key | Description |
---|---|
-1 | Reset the watch status to default |
0 | Unwatch, don't notify the user of anything |
1 | Watch issues and pull-requests |
2 | Watch commits |
3 | Watch commits, issues and pull-requests |
{ "message": "You are now watching issues and PRs on this project", "status": "ok" }
Allow project admins to retrieve the current options of a project.
GET /api/0/<repo>/options GET /api/0/<namespace>/<repo>/options
GET /api/0/fork/<username>/<repo>/options GET /api/0/fork/<username>/<namespace>/<repo>/options
{ "settings": { "Enforce_signed-off_commits_in_pull-request": false, "Minimum_score_to_merge_pull-request": -1, "Only_assignee_can_merge_pull-request": false, "Web-hooks": null, "always_merge": false, "disable_non_fast-forward_merges": false, "fedmsg_notifications": true, "issue_tracker": true, "issue_tracker_read_only": false, "issues_default_to_private": false, "notify_on_commit_flag": false, "notify_on_pull-request_flag": false, "open_metadata_access_to_all": false, "project_documentation": false, "pull_request_access_only": false, "pull_requests": true, "stomp_notifications": true }, "status": "ok" }
Allow project owners and admins to retrieve their own connector tokens. Connector tokens are the API tokens and the Web Hook token of the project. Connector tokens make possible for an external application to listen and verify project notifications and act on project via the REST API.
GET /api/0/<repo>/connector GET /api/0/<namespace>/<repo>/connector
GET /api/0/fork/<username>/<repo>/connector GET /api/0/fork/<username>/<namespace>/<repo>/connector
{ "connector": { "hook_token": "aaabbbccc", "api_token": [ {'name': 'foo token', 'id': "abcdefoo", 'expired': True} {'name': 'bar token', 'id': "abcdebar", 'expired': False} ] }, "status": "ok" }
Allow project admins to modify the options of a project.
POST /api/0/<repo>/options/update POST /api/0/<namespace>/<repo>/options/update
POST /api/0/fork/<username>/<repo>/options/update POST /api/0/fork/<username>/<namespace>/<repo>/options/update
Simply specify the key/values you would like to set. Beware that if you do not specify in the request values that have been changed before they will go back to their default value.
The fields and values can be specified either as a regular HTTP form or as a JSON blob.
{ 'issue_tracker': false, 'disable_non_fast-forward_merges': true }
{ 'message': 'Edited successfully settings of repo: test', 'status': 'ok' }
Block an user from interacting with the project
This is restricted to project admins.
POST /api/0/<repo>/blockuser POST /api/0/<namespace>/<repo>/blockuser
POST /api/0/fork/<username>/<repo>/blockuser POST /api/0/fork/<username>/<namespace>/<repo>/blockuser
Key | Type | Optionality | Description |
---|---|---|---|
username |
String | optional | The username of the user to block on this project |
Beware that this API endpoint updates all the users blocked in the project, so if you are updating this list, do not submit just one username, submit the updated list.
{"message": "User(s) blocked"}
Allow project collaborators to retrieve the project webhook token.
GET /api/0/<repo>/webhook/token GET /api/0/<namespace>/<repo>/webhook/token
GET /api/0/fork/<username>/<repo>/webhook/token GET /api/0/fork/<username>/<namespace>/<repo>/webhook/token
{ "webhook": { "token": "aaabbbccc", }, "status": "ok" }
Create a project token API for the caller user
This is restricted to project admins.
POST /api/0/<repo>/token/new POST /api/0/<namespace>/<repo>/token/new
POST /api/0/fork/<username>/<repo>/token/new POST /api/0/fork/<username>/<namespace>/<repo>/token/new
Key | Type | Optionality | Description |
---|---|---|---|
description |
String | optional | A string to specify the description of the token |
acls |
List | Mandatory | The ACLs |
{ "token": { "description": "My foo token", "id": "aaabbbcccfootoken", }, }
Return the metadata we could retrieve about the specified commit
GET /api/0/<repo>/c/<commit_hash>/info GET /api/0/<namespace>/<repo>/c/<commit_hash>/info
GET /api/0/fork/<username>/<repo>/c/<commit_hash>/info GET /api/0/fork/<username>/<namespace>/<repo>/c/<commit_hash>/info
{ "commit": { } }
Lists the files present in a project or one of its subfolder.
GET /api/0/<repo>tree GET /api/0/<repo>tree/master GET /api/0/<repo>tree/master/f/<filename> GET /api/0/<repo>tree/master/f/<folder>/ GET /api/0/<repo>tree/master/f/<folder1>/<folder2>/<filename>
GET /api/0/fork/<username>/<repo>tree GET /api/0/fork/<username>/<repo>tree/master GET /api/0/fork/<username>/<repo>tree/master/f/<filename> GET /api/0/fork/<username>/<repo>tree/master/f/<folder>/ GET /api/0/fork/<username>/<repo>tree/master/f/<folder1>/<folder2>/<filename>
{ "content": [ { "content_url": "https://pagure.io/api/0/pagure/tree/master/f/alembic", "name": "alembic", "path": "alembic", "type": "folder" }, { "content_url": "https://pagure.io/api/0/pagure/tree/master/f/fedmsg.d", "name": "fedmsg.d", "path": "fedmsg.d", "type": "folder" }, { "content_url": "https://pagure.io/pagure/raw/master/f/tox.ini", "name": "tox.ini", "path": "tox.ini", "type": "file" } ], "name": null, "type": "folder" } { "content": [ { "content_url": "https://pagure.io/pagure/raw/master/f/fedmsg.d/pagure.py", "name": "pagure.py", "path": "fedmsg.d/pagure.py", "type": "file" }, { "content_url": "https://pagure.io/pagure/raw/master/f/fedmsg.d/pagure_ci.py", "name": "pagure_ci.py", "path": "fedmsg.d/pagure_ci.py", "type": "file" } ], "name": "fedmsg.d", "type": "folder" }
Delete a project and its git repositories.
This is restricted to project admins.
This action is final and cannot be undone!
POST /api/0/<repo>/delete POST /api/0/<namespace>/<repo>/delete
POST /api/0/fork/<username>/<repo>/delete POST /api/0/fork/<username>/<namespace>/<repo>/delete
{ "message": "Project deleted", "project": { "access_groups": {"admin": [], "commit": [], "ticket": []}, "access_users": { "admin": [], "commit": [], "owner": ["pingou"], "ticket": [], }, "close_status": [ "Invalid", "Insufficient data", "Fixed", "Duplicate", ], "custom_keys": [], "date_created": "1595341690", "date_modified": "1595341690", "description": "test project #1", "fullname": "test", "id": 1, "milestones": {}, "name": "test", "namespace": None, "parent": None, "priorities": {}, "tags": [], "url_path": "test", "user": { "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", }, }, }
Open a new issue on a project.
POST /api/0/<repo>/new_issue POST /api/0/<namespace>/<repo>/new_issue
POST /api/0/fork/<username>/<repo>/new_issue POST /api/0/fork/<username>/<namespace>/<repo>/new_issue
Key | Type | Optionality | Description |
---|---|---|---|
title |
string | Mandatory | The title of the issue |
issue_content |
string | Mandatory | The description of the
issue
|
private |
boolean | Optional | Include this key if
you want a private issue
to be created
|
priority |
string | Optional | The priority to set to
this ticket from the
list of priorities set
in the project
|
milestone |
string | Optional | The milestone to assign
to this ticket from the
list of milestones set
in the project
|
tag |
string | Optional | Comma separated list of
tags to link to this
ticket from the list of
tags in the project
|
assignee |
string | Optional | The username of the user
to assign this ticket to
|
{ "issue": { "assignee": null, "blocks": [], "close_status": null, "closed_at": null, "closed_by": null, "comments": [], "content": "This issue needs attention", "custom_fields": [], "date_created": "1479458613", "depends": [], "id": 1, "milestone": null, "priority": null, "private": false, "status": "Open", "tags": [], "title": "test issue", "user": { "fullname": "PY C", "name": "pingou" } }, "message": "Issue created" }
Update the title and issue content of an existing issue.
POST /api/0/<repo>/issue/<issue_id> POST /api/0/<namespace>/<repo>/issue/<issue_id>
POST /api/0/fork/<username>/<repo>/issue/<issue_id> POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue_id>
Key | Type | Optionality | Description |
---|---|---|---|
title |
string | Mandatory | The title of the issue |
issue_content |
string | Mandatory | The description of the
issue
|
{ "issue": { "assignee": null, "blocks": [], "close_status": null, "closed_at": null, "closed_by": null, "comments": [], "content": "This issue needs attention", "custom_fields": [], "date_created": "1479458613", "depends": [], "id": 1, "milestone": null, "priority": null, "private": false, "status": "Open", "tags": [], "title": "test issue", "user": { "fullname": "PY C", "name": "pingou" } }, "message": "Issue edited" }
List issues of a project.
GET /api/0/<repo>/issues GET /api/0/<namespace>/<repo>/issues
GET /api/0/fork/<username>/<repo>/issues GET /api/0/fork/<username>/<namespace>/<repo>/issues
Key | Type | Optionality | Description | |
---|---|---|---|---|
status |
string | Optional | Filters the status of
issues. Fetches all the
issues if status is
all . Default:
Open |
|
tags |
string | Optional | A list of tags you
wish to filter. If
you want to filter
for issues not having
a tag, add an
exclamation mark in
front of it
|
|
assignee |
string | Optional | Filter the issues
by assignee
|
|
author |
string | Optional | Filter the issues
by creator
|
|
milestones |
list of strings | Optional | Filter the issues
by milestone
|
|
priority |
string | Optional | Filter the issues
by priority
|
|
no_stones |
boolean | Optional | If true returns only the
issues having no
milestone, if false
returns only the issues
having a milestone
|
|
since |
string | Optional | Filter the issues
updated after this date.
The date can either be
provided as an unix date
or in the format Y-M-D
|
|
order |
string | Optional | Set the ordering of the
issues. This can be
asc or desc .
Default: desc |
|
page |
|
Specifies which
page to return
(defaults to: 1)
|
||
per_page |
int | Optional | The number of projects
to return per page.
The maximum is 100.
|
{ "args": { "assignee": null, "author": null, 'milestones': [], 'no_stones': null, 'order': null, 'priority': null, "since": null, "status": "Closed", "tags": [ "0.1" ] }, "total_issues": 1, "issues": [ { "assignee": null, "blocks": ["1"], "close_status": null, "closed_at": null, "closed_by": null, "comments": [], "content": "asd", "custom_fields": [], "date_created": "1427442217", "depends": [], "id": 4, "last_updated": "1533815358", "milestone": null, "priority": null, "private": false, "status": "Fixed", "tags": [ "0.1" ], "title": "bug", "user": { "fullname": "PY.C", "name": "pingou" } } ], 'pagination': { 'first': 'http://localhost/api/0/test/issues?per_page=20&page=1', 'last': 'http://localhost/api/0/test/issues?per_page=20&page=1', 'next': null, 'page': 1, 'pages': 1, 'per_page': 20, 'prev': null }, }
Retrieve information of a specific issue.
GET /api/0/<repo>/issue/<issue id> GET /api/0/<namespace>/<repo>/issue/<issue id>
GET /api/0/fork/<username>/<repo>/issue/<issue id> GET /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>
The identifier provided can be either the unique identifier or the
regular identifier used in the UI (for example 24
in
/forks/user/test/issue/24
)
{ "assignee": null, "blocks": [], "comments": [], "content": "This issue needs attention", "date_created": "1431414800", "depends": ["4"], "id": 1, "private": false, "status": "Open", "tags": [], "title": "test issue", "user": { "fullname": "PY C", "name": "pingou" } }
Retrieve a specific comment of an issue.
GET /api/0/<repo>/issue/<issue id>/comment/<comment id> GET /api/0/<namespace>/<repo>/issue/<issue id>/comment/<comment id>
GET /api/0/fork/<username>/<repo>/issue/<issue id>/comment/<comment id> GET /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/comment/<comment id>
The identifier provided can be either the unique identifier or the
regular identifier used in the UI (for example 24
in
/forks/user/test/issue/24
)
{ "avatar_url": "https://seccdn.libravatar.org/avatar/...", "comment": "9", "comment_date": "2015-07-01 15:08", "date_created": "1435756127", "id": 464, "parent": null, "user": { "fullname": "P.-Y.C.", "name": "pingou" } }
Add a comment to an issue.
POST /api/0/<repo>/issue/<issue id>/comment POST /api/0/<namespace>/<repo>/issue/<issue id>/comment
POST /api/0/fork/<username>/<repo>/issue/<issue id>/comment POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/comment
Key | Type | Optionality | Description |
---|---|---|---|
comment |
string | Mandatory | The comment to add to
the issue
|
{ "message": "Comment added" }
Update or reset the content of a custom field associated to an issue.
POST /api/0/<repo>/issue/<issue id>/custom/<field> POST /api/0/<namespace>/<repo>/issue/<issue id>/custom/<field>
POST /api/0/fork/<username>/<repo>/issue/<issue id>/custom/<field> POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/custom/<field>
Key | Type | Optionality | Description |
---|---|---|---|
value |
string | Optional | The new value of the custom field of interest |
{ "message": "Custom field adjusted" }
Update or reset the content of a collection of custom fields associated to an issue.
POST /api/0/<repo>/issue/<issue id>/custom POST /api/0/<namespace>/<repo>/issue/<issue id>/custom
POST /api/0/fork/<username>/<repo>/issue/<issue id>/custom POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/custom
Key | Type | Optionality | Description |
---|---|---|---|
myfields |
dict | Mandatory | A dictionary with the fields name as key and the value |
{ "myField": "to do", "myField_1": "test", "myField_2": "done", }
{ "messages": [ { "myField" : "Custom field myField adjusted to to do" }, { "myField_1": "Custom field myField_1 adjusted test (was: to do)" }, { "myField_2": "Custom field myField_1 adjusted to done (was: test)" } ] }
Provides the number of opened issues over the last 6 months of the project.
GET /api/0/<repo>/issues/history/stats GET /api/0/<namespace>/<repo>/issues/history/stats
GET /api/0/fork/<username>/<repo>/issues/history/stats GET /api/0/fork/<username>/<namespace>/<repo>/issues/history/stats
{ "stats": { ... "2017-09-19T13:10:51.041345": 6, "2017-09-26T13:10:51.041345": 6, "2017-10-03T13:10:51.041345": 6, "2017-10-10T13:10:51.041345": 6, "2017-10-17T13:10:51.041345": 6 } }
Provides the number of opened issues over the last year of the project.
GET /api/0/<repo>/issues/history/detailed_stats GET /api/0/<namespace>/<repo>/issues/history/detailed_stats
GET /api/0/fork/<username>/<repo>/issues/history/detailed_stats GET /api/0/fork/<username>/<namespace>/<repo>/issues/history/detailed_stats
{ "stats": { "2020-03-26T19:21:51.348451": { "closed_ticket": 0, "count": 0, "open_ticket": 0 }, "2020-04-02T19:21:51.348451": { "closed_ticket": 0, "count": 0, "open_ticket": 0 }, "2020-04-09T19:21:51.348451": { "closed_ticket": 1, "count": 0, "open_ticket": 2 } } }
Change the status of an issue.
POST /api/0/<repo>/issue/<issue id>/status POST /api/0/<namespace>/<repo>/issue/<issue id>/status
POST /api/0/fork/<username>/<repo>/issue/<issue id>/status POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/status
Key | Type | Optionality | Description |
---|---|---|---|
close_status |
string | Optional | The close status of the issue |
status |
string | Mandatory | The new status of the issue, can be 'Open' or 'Closed' |
{ "message": "Successfully edited issue #1" }
Change the milestone of an issue.
POST /api/0/<repo>/issue/<issue id>/milestone POST /api/0/<namespace>/<repo>/issue/<issue id>/milestone
POST /api/0/fork/<username>/<repo>/issue/<issue id>/milestone POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/milestone
Key | Type | Optionality | Description |
---|---|---|---|
milestone |
string | Optional | The new milestone of the issue, can be any of defined milestones or empty to unset the milestone |
{ "message": "Successfully edited issue #1" }
Assign an issue to someone.
POST /api/0/<repo>/issue/<issue id>/assign POST /api/0/<namespace>/<repo>/issue/<issue id>/assign
POST /api/0/fork/<username>/<repo>/issue/<issue id>/assign POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/assign
Key | Type | Optionality | Description |
---|---|---|---|
assignee |
string | Mandatory | The username of the user
to assign the issue to.
|
{ "message": "Issue assigned" }
Allows someone to subscribe to or unsubscribe from the notifications related to an issue.
POST /api/0/<repo>/issue/<issue id>/subscribe POST /api/0/<namespace>/<repo>/issue/<issue id>/subscribe
POST /api/0/fork/<username>/<repo>/issue/<issue id>/subscribe POST /api/0/fork/<username>/<namespace>/<repo>/issue/<issue id>/subscribe
Key | Type | Optionality | Description |
---|---|---|---|
status |
boolean | Mandatory | The intended subscription
status. true for
subscribing, false
for unsubscribing. |
{ "message": "User subscribed", "avatar_url": "https://image.png", "user": "pingou" }
List issues opened by or assigned to a specific user across all projects.
GET /api/0/user/<username>/issues
Key | Type | Optionality | Description |
---|---|---|---|
page |
integer | Mandatory | The page requested.
Defaults to 1.
|
per_page |
int | Optional | The number of items
to return per page.
The maximum is 100.
|
status |
string | Optional | Filters the status of
issues. Fetches all the
issues if status is
all . Default:
Open |
tags |
string | Optional | A list of tags you wish to
filter. If you want to
filter for issues not
having a tag, add an
exclamation mark in front
of it
|
milestones |
list of strings | Optional | Filter the issues by
milestone
|
no_stones |
boolean | Optional | If true returns only the
issues having no
milestone, if false
returns only the issues
having a milestone
|
since |
string | Optional | Filter the issues
updated after this date.
The date can either be
provided as an unix date
or in the format Y-M-D
|
order |
string | Optional | Set the ordering of the
issues. This can be
asc or desc .
Default: desc |
order_key |
string | Optional | Set the ordering key.
This can be
assignee
, last_updated or
name of other column.
Default: date_created |
assignee |
boolean | Optional | A boolean of whether to
return the issues
assigned to this user
or not. Defaults to True
|
author |
boolean | Optional | A boolean of whether to
return the issues
created by this user or
not. Defaults to True
|
created |
string | Optional | Filter the issues returned
by their creation date
The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
updated |
string | Optional | Filter the pull-requests
returned by their update
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
closed |
string | Optional | Filter the pull-requests
returned by their closing
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
{ "args": { "assignee": true, "author": true, "milestones": [], "no_stones": null, "order": null, "order_key": null, "page": 1, "since": null, "status": null, "tags": [], "created": null, "updated": null, "closed": null, }, "issues_assigned": [ { "assignee": { "fullname": "Anar Adilova", "name": "anar" }, "blocks": [], "close_status": null, "closed_at": null, "closed_by": null, "comments": [], "content": "Test Issue", "custom_fields": [], "date_created": "1510124763", "depends": [], "id": 2, "last_updated": "1510124763", "milestone": null, "priority": null, "private": false, "status": "Open", "tags": [], "title": "issue4", "user": { "fullname": "Anar Adilova", "name": "anar" } } ], "issues_created": [ { "assignee": { "fullname": "Anar Adilova", "name": "anar" }, "blocks": [], "close_status": null, "closed_at": null, "closed_by": null, "comments": [], "content": "Test Issue", "custom_fields": [], "date_created": "1510124763", "depends": [], "id": 2, "last_updated": "1510124763", "milestone": null, "priority": null, "private": false, "status": "Open", "tags": [], "title": "issue4", "user": { "fullname": "Anar Adilova", "name": "anar" } } ], "pagination_issues_assigned": { "first": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=1", "last": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=0", "next": null, "page": 1, "pages": 0, "per_page": 1, "prev": null }, "pagination_issues_created": { "first": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=1", "last": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=200", "next": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=2", "page": 1, "pages": 200, "per_page": 1, "prev": null }, "total_issues_assigned": 1, "total_issues_created": 1 }
Open a new pull-request from this project to itself or its parent (if this project is a fork).
POST /api/0/<repo>/pull-request/new POST /api/0/<namespace>/<repo>/pull-request/new
POST /api/0/fork/<username>/<repo>/pull-request/new POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/new
Key | Type | Optionality | Description |
---|---|---|---|
title |
string | Mandatory | The title to give to this pull-request |
branch_to |
string | Mandatory | The name of the branch the submitted changes should be merged into. |
branch_from |
string | Mandatory | The name of the branch containing the changes to merge |
repo_from |
string | Optional | The name of the project the changes originate from. If not specified the repo_from is assumed to be the repo_to. |
repo_from_username |
string | Optional | The username of the project the changes originate from. If not specified the repo_from is assumed to be the repo_to. |
repo_from_namespace |
string | Optional | The namespace of the project the changes originate from. If not specified the repo_from is assumed to be the repo_to. |
initial_comment |
string | Optional | The intial comment describing what these changes are about. |
Note: If f the repo you're opening the PR against is not the same as the
repo from which the changes originates, you must provide the repo_from
and repo_from_username
(and potentially repo_from_namespace
)
corresponding to the fork.
{ "assignee": null, "branch": "master", "branch_from": "master", "closed_at": null, "closed_by": null, "comments": [], "commit_start": null, "commit_stop": null, "date_created": "1431414800", "id": 1, "project": { "close_status": [], "custom_keys": [], "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "repo_from": { "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "status": "Open", "title": "test pull-request", "uid": "1431414800", "updated_on": "1431414800", "user": { "fullname": "PY C", "name": "pingou" } }
Retrieve pull requests of a project.
GET /api/0/<repo>/pull-requests GET /api/0/<namespace>/<repo>/pull-requests
GET /api/0/fork/<username>/<repo>/pull-requests GET /api/0/fork/<username>/<namespace>/<repo>/pull-requests
Key | Type | Optionality | Description |
---|---|---|---|
status |
string | Optional | Filter the status of
pull requests. Default:
True (opened pull
requests), can be 0
or closed for closed
requests or Merged
for merged requests.
All returns closed,
merged and open requests. |
assignee |
string | Optional | Filter the assignee of
pull requests
|
author |
string | Optional | Filter the author of
pull requests
|
tags |
string | Optional | A list of tags you
wish to filter. If you
want to filter for pull
requests not having a
tag, add an exclamation
mark in front of it
|
{ "args": { "assignee": null, "author": null, "status": true, "tags": null }, "total_requests": 1, "requests": [ { "assignee": null, "branch": "master", "branch_from": "master", "closed_at": null, "closed_by": null, "comments": [], "commit_start": null, "commit_stop": null, "date_created": "1431414800", "id": 1, "project": { "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "repo_from": { "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "status": "Open", "title": "test pull-request", "uid": "1431414800", "updated_on": "1431414800", "user": { "fullname": "PY C", "name": "pingou" } } ] }
Retrieve information of a specific pull request.
GET /api/0/<repo>/pull-request/<request id> GET /api/0/<namespace>/<repo>/pull-request/<request id>
GET /api/0/fork/<username>/<repo>/pull-request/<request id> GET /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>
{ "assignee": null, "branch": "master", "branch_from": "master", "closed_at": null, "closed_by": null, "comments": [], "commit_start": null, "commit_stop": null, "date_created": "1431414800", "id": 1, "project": { "close_status": [], "custom_keys": [], "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "repo_from": { "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "status": "Open", "title": "test pull-request", "uid": "1431414800", "updated_on": "1431414800", "user": { "fullname": "PY C", "name": "pingou" } }
Retrieve the statistics about the diff of a specific pull request.
GET /api/0/<repo>/pull-request/<request id>/diffstats GET /api/0/<namespace>/<repo>/pull-request/<request id>/diffstats
GET /api/0/fork/<username>/<repo>/pull-request/<request id>/diffstats GET /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/diffstats
{ "README.rst": { "lines_added": 1, "lines_removed": 1, "old_path": "README.rst", "status": "M" }, "blame_file.txt": { "lines_added": 0, "lines_removed": 0, "old_path": "blame_file", "status": "R" }, "test": { "lines_added": 0, "lines_removed": 8, "old_path": "test", "status": "D" }, "test3": { "lines_added": 3, "lines_removed": 0, "old_path": "test3", "status": "A" } }
Retrieve information of a pull request specified by uid.
GET /api/0/pull-requests/<uid>
{ "assignee": null, "branch": "master", "branch_from": "master", "closed_at": null, "closed_by": null, "comments": [], "commit_start": null, "commit_stop": null, "date_created": "1431414800", "id": 1, "project": { "close_status": [], "custom_keys": [], "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "repo_from": { "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "status": "Open", "title": "test pull-request", "uid": "1431414800", "updated_on": "1431414800", "user": { "fullname": "PY C", "name": "pingou" } }
Instruct Pagure to merge a pull request.
This is an asynchronous call.
POST /api/0/<repo>/pull-request/<request id>/merge POST /api/0/<namespace>/<repo>/pull-request/<request id>/merge
POST /api/0/fork/<username>/<repo>/pull-request/<request id>/merge POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/merge
wait=False: { "message": "Merging queued", "taskid": "123-abcd" } wait=True: { "message": "Changes merged!" }
Instruct Pagure to rebase a pull request.
This is an asynchronous call.
POST /api/0/<repo>/pull-request/<request id>/rebase POST /api/0/<namespace>/<repo>/pull-request/<request id>/rebase
POST /api/0/fork/<username>/<repo>/pull-request/<request id>/rebase POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/rebase
wait=False: { "message": "Rebasing queued", "taskid": "123-abcd" } wait=True: { "message": "Pull-request rebased" }
Instruct Pagure to close a pull request.
POST /api/0/<repo>/pull-request/<request id>/close POST /api/0/<namespace>/<repo>/pull-request/<request id>/close
POST /api/0/fork/<username>/<repo>/pull-request/<request id>/close POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/close
{ "message": "Pull-request closed!" }
System Message: WARNING/2 (<string>, line 3)
Title underline too short.
Reopen a pull-request --------------------
Instruct Pagure to reopen a pull request.
POST /api/0/<repo>/pull-request/<request id>/reopen POST /api/0/<namespace>/<repo>/pull-request/<request id>/reopen
POST /api/0/fork/<username>/<repo>/pull-request/<request id>/reopen POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/reopen
{ "message": "Pull-request reopened!" }
Add comment to a pull request.
POST /api/0/<repo>/pull-request/<request id>/comment POST /api/0/<namespace>/<repo>/pull-request/<request id>/comment
POST /api/0/fork/<username>/<repo>/pull-request/<request id>/comment POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/comment
Key | Type | Optionality | Description |
---|---|---|---|
comment |
string | Mandatory | The comment to add
to the pull request
|
commit |
string | Optional | The hash of the specific
commit you wish to
comment on
|
filename |
string | Optional | The filename of the
specific file you wish
to comment on
|
row |
int | Optional | Used in combination
with filename to comment
on a specific row
of a file
|
tree_id |
string | Optional | The identifier of the
git tree as it was when
the comment was added
|
{ "message": "Comment added" }
Add or edit flags on a pull-request.
This is an utility method which add a flag to the latest commit of the specified pull-request.
Note that using it has a risk of race-condition if the pull-request changes at the time the flag is being added. Using the commit flag endpoint prevents this risk of race-condition.
POST /api/0/<repo>/pull-request/<request id>/flag POST /api/0/<namespace>/<repo>/pull-request/<request id>/flag
POST /api/0/fork/<username>/<repo>/pull-request/<request id>/flag POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/flag
Key | Type | Optionality | Description |
---|---|---|---|
username |
string | Mandatory | The name of the
application to be
presented to users
on the pull request page
|
comment |
string | Mandatory | A short message
summarizing the
presented results
|
url |
string | Mandatory | A URL to the result
of this flag
|
status |
string | Optional | The status of the task,
can be any of:
canceled, error, failure, pending, success
If not provided it will
be set to
success if
percent is higher than 0
failure if
it is 0 and
pending
if percent is not
specified |
percent |
int | Optional | A percentage of
completion compared to
the goal. The percentage
also determine the
background color of the
flag on the pull-request
page
|
uid |
string | Optional | A unique identifier used
to identify a flag on a
pull-request. If the
provided UID matches an
existing one, then the
API call will update the
existing one rather than
create a new one.
Maximum Length: 32
characters. Default: an
auto generated UID
|
{ "flag": { "comment": "Tests failed", "date_created": "1510742565", "percent": 0, "pull_request_uid": "62b49f00d489452994de5010565fab81", "status": "error", "url": "http://jenkins.cloud.fedoraproject.org/", "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], "fullname": "PY C", "name": "pingou"}, "username": "Jenkins"}, "message": u"Flag added", "uid": u"jenkins_build_pagure_100+seed" }
{ "flag": { "comment": "Tests failed", "date_created": "1510742565", "percent": 0, "pull_request_uid": "62b49f00d489452994de5010565fab81", "status": "error", "url": "http://jenkins.cloud.fedoraproject.org/", "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], "fullname": "PY C", "name": "pingou"}, "username": "Jenkins"}, "message": u"Flag updated", "uid": u"jenkins_build_pagure_100+seed" }
Retrieve the flags on a pull-request.
GET /api/0/<repo>/pull-request/<request id>/flag GET /api/0/<namespace>/<repo>/pull-request/<request id>/flag
GET /api/0/fork/<username>/<repo>/pull-request/<request id>/flag GET /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/flag
{ "flags": [ { "comment": "Tests are running in the AtomicCI pipeline", "date_created": "1537560168", "percent": null, "pull_request_uid": "4fb1f8db8f114baeb943b6f10c5de015", "status": "failure", "url": "https://jenkins-continuous-infra.apps.ci.centos.org/job/continuous-infra-ci-pipeline-f26/...", "user": { "fullname": "Pierre-YvesChibon", "name": "pingou" }, "username": "AtomicCI" }, { "comment": "Built successfully", "date_created": "1517565878", "percent": 100, "pull_request_uid": "4fb1f8db8f114baeb943b6f10c5de015", "status": "success", "url": "https://koji.fedoraproject.org/koji/...", "user": { "fullname": "Pierre-YvesChibon", "name": "pingou" }, "username": "simple-koji-ci" } ] }
Assign a pull-request to someone.
POST /api/0/<repo>/pull-request/<issue id>/assign POST /api/0/<namespace>/<repo>/pull-request/<issue id>/assign
POST /api/0/fork/<username>/<repo>/pull-request/<issue id>/assign POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<issue id>/assign
Key | Type | Optionality | Description |
---|---|---|---|
assignee |
string | Mandatory | The username of the user
to assign the PR to.
|
{ "message": "pull-request assigned" }
Update the title and initial comment of an existing pull-request.
POST /api/0/<repo>/pull-request/<request id> POST /api/0/<namespace>/<repo>/pull-request/<request id>
POST /api/0/fork/<username>/<repo>/pull-request/<request id> POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>
Key | Type | Optionality | Description |
---|---|---|---|
title |
string | Mandatory | The title to give to the
pull-request
|
initial_comment |
string | Optional | The initial comment or
description of the
pull-request
|
{ "assignee": null, "branch": "master", "branch_from": "master", "closed_at": null, "closed_by": null, "comments": [], "commit_start": null, "commit_stop": null, "date_created": "1431414800", "id": 1, "project": { "close_status": [], "custom_keys": [], "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "repo_from": { "date_created": "1431414800", "description": "test project #1", "id": 1, "name": "test", "parent": null, "user": { "fullname": "PY C", "name": "pingou" } }, "status": "Open", "title": "test pull-request", "uid": "1431414800", "updated_on": "1431414800", "user": { "fullname": "PY C", "name": "pingou" } }
Allows someone to subscribe to or unsubscribe from the notifications related to a pull-request.
POST /api/0/<repo>/pull-request/<request id>/subscribe POST /api/0/<namespace>/<repo>/pull-request/<request id>/subscribe
POST /api/0/fork/<username>/<repo>/pull-request/<request id>/subscribe POST /api/0/fork/<username>/<namespace>/<repo>/pull-request/<request id>/subscribe
Key | Type | Optionality | Description |
---|---|---|---|
status |
boolean | Mandatory | The intended subscription
status. true for
subscribing, false
for unsubscribing. |
{ "message": "User subscribed", "avatar_url": "https://image.png", "user": "pingou" }
Retrieve users that have logged into the Pagure instance. This can then be used as input for autocompletion in some forms/fields.
GET /api/0/users
Key | Type | Optionality | Description |
---|---|---|---|
pattern |
string | Optional | Filters the starting
letters of the usernames
|
{ "total_users": 2, "users": ["user1", "user2"] }
Use this endpoint to retrieve information about a specific user.
GET /api/0/user/<username>
GET /api/0/user/ralph
Key | Type | Optionality | Description |
---|---|---|---|
repopage |
int | Optional | Specifies which
page of the projects
to return
(defaults to: 1)
|
forkpage |
int | Optional | Specifies which
page of the forks
to return
(defaults to: 1)
|
per_page |
int | Optional | The number of items
to return per page.
The maximum is 100.
|
{ "forks": [], "repos": [ { "custom_keys": [], "description": "", "parent": null, "tags": [], "namespace": None, "priorities": {}, "close_status": [ "Invalid", "Insufficient data", "Fixed", "Duplicated" ], "milestones": {}, "user": { "fullname": "ralph", "name": "ralph" }, "date_created": "1426595173", "id": 5, "name": "pagure" } ], "repos_pagination": { "first": "http://localhost:5000/api/0/user/ralph?per_page=1&repopage=1", "last": "http://localhost:5000/api/0/user/ralph?per_page=1&repopage=123", "next": "http://localhost:5000/api/0/user/ralph?per_page=1&repopage=2", "pages": 123, "per_page": 1, "prev": null, "repopage": 1 }, "user": { "fullname": "ralph", "name": "ralph", "avatar_url": "https://seccdn.libravatar.org/avatar/5dac3?s=16&d=retro" } }
Use this endpoint to retrieve activity stats about a specific user over the last year.
GET /api/0/user/<username>/activity/stats
GET /api/0/user/ralph/activity/stats GET /api/0/user/ralph/activity/stats?format=timestamp
Key | Type | Optionality | Description |
---|---|---|---|
username |
string | Mandatory | The username of the user
whose activity you are
interested in.
|
format |
string | Optional | Allows changing the
of the date/time returned
from iso format to unix
timestamp
Can be: timestamp
or isoformat
|
{ "2015-11-04": 9, "2015-11-06": 3, "2015-11-09": 6, "2015-11-13": 4, "2015-11-15": 3, "2015-11-18": 15, "2015-11-19": 3, "2015-11-20": 15, "2015-11-26": 18, "2015-11-30": 116, "2015-12-02": 12, "2015-12-03": 2 }
or:
{ "1446591600": 9, "1446764400": 3, "1447023600": 6, "1447369200": 4, "1447542000": 3, "1447801200": 15, "1447887600": 3, "1447974000": 15, "1448492400": 18, "1448838000": 116, "1449010800": 12, "1449097200": 2 }
Use this endpoint to retrieve activity information about a specific user on the specified date.
GET /api/0/user/<username>/activity/<date>
GET /api/0/user/ralph/activity/2016-01-02 GET /api/0/user/ralph/activity/2016-01-02?grouped=true
Key | Type | Optionality | Description |
---|---|---|---|
username |
string | Mandatory | The username of the user
whose activity you are
interested in.
|
date |
string | Mandatory | The date of interest,
best provided in ISO
format: YYYY-MM-DD
|
grouped |
boolean | Optional | Whether or not to group
the commits
|
{ "activities": [ { "date": "2016-02-24", "date_created": "1456305852", "description": "pingou created PR test#44", "description_mk": "<p>pingou created PR <a href="/test/pull-request/44" title="Update test_foo">test#44</a></p>", "id": 4067, "user": { "fullname": "Pierre-YvesC", "name": "pingou" } }, { "date": "2016-02-24", "date_created": "1456305887", "description": "pingou commented on PR test#44", "description_mk": "<p>pingou commented on PR <a href="/test/pull-request/44" title="Update test_foo">test#44</a></p>", "id": 4112, "user": { "fullname": "Pierre-YvesC", "name": "pingou" } } ] }
List issues opened by or assigned to a specific user across all projects.
GET /api/0/user/<username>/issues
Key | Type | Optionality | Description |
---|---|---|---|
page |
integer | Mandatory | The page requested.
Defaults to 1.
|
per_page |
int | Optional | The number of items
to return per page.
The maximum is 100.
|
status |
string | Optional | Filters the status of
issues. Fetches all the
issues if status is
all . Default:
Open |
tags |
string | Optional | A list of tags you wish to
filter. If you want to
filter for issues not
having a tag, add an
exclamation mark in front
of it
|
milestones |
list of strings | Optional | Filter the issues by
milestone
|
no_stones |
boolean | Optional | If true returns only the
issues having no
milestone, if false
returns only the issues
having a milestone
|
since |
string | Optional | Filter the issues
updated after this date.
The date can either be
provided as an unix date
or in the format Y-M-D
|
order |
string | Optional | Set the ordering of the
issues. This can be
asc or desc .
Default: desc |
order_key |
string | Optional | Set the ordering key.
This can be
assignee
, last_updated or
name of other column.
Default: date_created |
assignee |
boolean | Optional | A boolean of whether to
return the issues
assigned to this user
or not. Defaults to True
|
author |
boolean | Optional | A boolean of whether to
return the issues
created by this user or
not. Defaults to True
|
created |
string | Optional | Filter the issues returned
by their creation date
The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
updated |
string | Optional | Filter the pull-requests
returned by their update
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
closed |
string | Optional | Filter the pull-requests
returned by their closing
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
{ "args": { "assignee": true, "author": true, "milestones": [], "no_stones": null, "order": null, "order_key": null, "page": 1, "since": null, "status": null, "tags": [], "created": null, "updated": null, "closed": null, }, "issues_assigned": [ { "assignee": { "fullname": "Anar Adilova", "name": "anar" }, "blocks": [], "close_status": null, "closed_at": null, "closed_by": null, "comments": [], "content": "Test Issue", "custom_fields": [], "date_created": "1510124763", "depends": [], "id": 2, "last_updated": "1510124763", "milestone": null, "priority": null, "private": false, "status": "Open", "tags": [], "title": "issue4", "user": { "fullname": "Anar Adilova", "name": "anar" } } ], "issues_created": [ { "assignee": { "fullname": "Anar Adilova", "name": "anar" }, "blocks": [], "close_status": null, "closed_at": null, "closed_by": null, "comments": [], "content": "Test Issue", "custom_fields": [], "date_created": "1510124763", "depends": [], "id": 2, "last_updated": "1510124763", "milestone": null, "priority": null, "private": false, "status": "Open", "tags": [], "title": "issue4", "user": { "fullname": "Anar Adilova", "name": "anar" } } ], "pagination_issues_assigned": { "first": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=1", "last": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=0", "next": null, "page": 1, "pages": 0, "per_page": 1, "prev": null }, "pagination_issues_created": { "first": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=1", "last": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=200", "next": "http://localhost:5000/api/0/user/anar/issues?per_page=1&page=2", "page": 1, "pages": 200, "per_page": 1, "prev": null }, "total_issues_assigned": 1, "total_issues_created": 1 }
Use this endpoint to retrieve a list of open pull requests a user has filed over the entire pagure instance.
GET /api/0/user/<username>/requests/filed
GET /api/0/user/dudemcpants/requests/filed
Key | Type | Optionality | Description |
---|---|---|---|
username |
string | Mandatory | The username of the user
whose activity you are
interested in.
|
status |
string | Optional | Filter the status of
pull requests. Default:
Open (open pull
requests), can be
Closed for closed
requests, Merged
for merged requests, or
Open for open
requests.
All returns closed,
merged and open requests. |
created |
string | Optional | Filter the pull-requests
returned by their creation
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
updated |
string | Optional | Filter the pull-requests
returned by their update
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
closed |
string | Optional | Filter the pull-requests
returned by their closing
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
page |
integer | Mandatory | The page requested.
Defaults to 1.
|
per_page |
int | Optional | The number of items to
return per page.
The maximum is 100.
|
{ "args": { "status": "open", "username": "dudemcpants", "page": 1, "created": null, "updated": null, "closed": null, }, "pagination": { "first": "http://localhost:5000/api/0/user/dudemcpants/requests/filed?per_page=1&page=1", "last": "http://localhost:5000/api/0/user/dudemcpants/requests/filed?per_page=1&page=61", "next": "http://localhost:5000/api/0/user/dudemcpants/requests/filed?per_page=1&page=2", "page": 1, "pages": 61, "per_page": 1, "prev": null }, "requests": [ { "assignee": null, "branch": "master", "branch_from": "master", "closed_at": null, "closed_by": null, "comments": [], "commit_start": "3973fae98fc485783ca14f5c3612d85832185065", "commit_stop": "3973fae98fc485783ca14f5c3612d85832185065", "date_created": "1510227832", "id": 2, "initial_comment": null, "last_updated": "1510227833", "project": { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "ryanlerch" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1510227638", "date_modified": "1510227638", "description": "this is a quick project", "fullname": "aquickproject", "id": 1, "milestones": {}, "name": "aquickproject", "namespace": null, "parent": null, "priorities": {}, "tags": [], "url_path": "aquickproject", "user": { "fullname": "ryanlerch", "name": "ryanlerch" } }, "remote_git": null, "repo_from": { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "dudemcpants" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1510227729", "date_modified": "1510227729", "description": "this is a quick project", "fullname": "forks/dudemcpants/aquickproject", "id": 2, "milestones": {}, "name": "aquickproject", "namespace": null, "parent": { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "ryanlerch" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1510227638", "date_modified": "1510227638", "description": "this is a quick project", "fullname": "aquickproject", "id": 1, "milestones": {}, "name": "aquickproject", "namespace": null, "parent": null, "priorities": {}, "tags": [], "url_path": "aquickproject", "user": { "fullname": "ryanlerch", "name": "ryanlerch" } }, "priorities": {}, "tags": [], "url_path": "fork/dudemcpants/aquickproject", "user": { "fullname": "Dude McPants", "name": "dudemcpants" } }, "status": "Open", "title": "Update README.md", "uid": "819e0b1c449e414fa291c914f28d73ec", "updated_on": "1510227832", "user": { "fullname": "Dude McPants", "name": "dudemcpants" } } ], "total_requests": 1 }
Use this endpoint to retrieve a list of open pull requests a user is able to action (e.g. merge) over the entire pagure instance.
GET /api/0/user/<username>/requests/actionable
GET /api/0/user/dudemcpants/requests/actionable
Key | Type | Optionality | Description |
---|---|---|---|
username |
string | Mandatory | The username of the user
whose activity you are
interested in.
|
created |
string | Optional | Filter the pull-requests
returned by their creation
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
updated |
string | Optional | Filter the pull-requests
returned by their update
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
closed |
string | Optional | Filter the pull-requests
returned by their closing
date. The date can be of
specified either using
a timestamp format or
using the iso format for
dates: yyyy-mm-dd.
You can specify a start
and a end date to this
filter using start..end.
|
page |
integer | Mandatory | The page requested.
Defaults to 1.
|
status |
string | Optional | Filter the status of
pull requests. Default:
Open (open pull
requests), can be
Closed for closed
requests, Merged
for merged requests, or
Open for open
requests.
All returns closed,
merged and open requests. |
{ "args": { "status": "open", "username": "ryanlerch", "page": 1, "created": null, "updated": null, "closed": null, }, "pagination": { "first": "http://localhost:5000/api/0/user/ryanlerch/requests/actionable?per_page=1&page=1", "last": "http://localhost:5000/api/0/user/ryanlerch/requests/actionable?per_page=1&page=61", "next": "http://localhost:5000/api/0/user/ryanlerch/requests/actionable?per_page=1&page=2", "page": 1, "pages": 61, "per_page": 1, "prev": null }, "requests": [ { "assignee": null, "branch": "master", "branch_from": "master", "closed_at": null, "closed_by": null, "comments": [], "commit_start": "3973fae98fc485783ca14f5c3612d85832185065", "commit_stop": "3973fae98fc485783ca14f5c3612d85832185065", "date_created": "1510227832", "id": 2, "initial_comment": null, "last_updated": "1510227833", "project": { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "ryanlerch" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1510227638", "date_modified": "1510227638", "description": "this is a quick project", "fullname": "aquickproject", "id": 1, "milestones": {}, "name": "aquickproject", "namespace": null, "parent": null, "priorities": {}, "tags": [], "url_path": "aquickproject", "user": { "fullname": "ryanlerch", "name": "ryanlerch" } }, "remote_git": null, "repo_from": { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "dudemcpants" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1510227729", "date_modified": "1510227729", "description": "this is a quick project", "fullname": "forks/dudemcpants/aquickproject", "id": 2, "milestones": {}, "name": "aquickproject", "namespace": null, "parent": { "access_groups": { "admin": [], "commit": [], "ticket": [] }, "access_users": { "admin": [], "commit": [], "owner": [ "ryanlerch" ], "ticket": [] }, "close_status": [], "custom_keys": [], "date_created": "1510227638", "date_modified": "1510227638", "description": "this is a quick project", "fullname": "aquickproject", "id": 1, "milestones": {}, "name": "aquickproject", "namespace": null, "parent": null, "priorities": {}, "tags": [], "url_path": "aquickproject", "user": { "fullname": "ryanlerch", "name": "ryanlerch" } }, "priorities": {}, "tags": [], "url_path": "fork/dudemcpants/aquickproject", "user": { "fullname": "Dude McPants", "name": "dudemcpants" } }, "status": "Open", "title": "Update README.md", "uid": "819e0b1c449e414fa291c914f28d73ec", "updated_on": "1510227832", "user": { "fullname": "Dude McPants", "name": "dudemcpants" } } ], "total_requests": 1 }
Retrieve groups on this Pagure instance. This can then be used as input for autocompletion in some forms/fields.
GET /api/0/groups
Key | Type | Optionality | Description |
---|---|---|---|
pattern |
string | Optional | Filters the starting
letters of the group
names
|
page |
int | Optional | Specifies which
page to return
(defaults to: 1)
|
per_page |
int | Optional | The number of projects
to return per page.
The maximum is 100.
|
{ "total_groups": 2, u'pagination': { 'first': 'http://localhost/api/0/groups?per_page=20&extended=1&page=1', 'last': 'http://localhost/api/0/groups?per_page=20&extended=1&page=1', 'next': null, 'page': 1, 'pages': 1, 'per_page': 20, 'prev': None }, "groups": ["group1", "group2"] }
Use this endpoint to retrieve information about a specific group.
GET /api/0/group/<group>
GET /api/0/group/some_group_name
GET /api/0/group/some_group_name?projects=1&acl=commit
GET /api/0/group/some_group_name?page=1&per_page=50
Key | Type | Optionality | Description |
---|---|---|---|
group name |
str | Mandatory | The name of the group to retrieve information about. |
projects |
bool | Optional | Specifies whether to include projects in the data returned. |
acl |
str | Optional | Filter the project returned
(if any) to those where the
has the specified ACL level.
Can be any of: admin ,
commit or ticket . |
page |
int | Optional | Specifies which page to return (defaults to: 1) |
per_page |
int | Optional | The number of projects to return per page. The maximum is 100. |
{ "creator": { "default_email": "user1@example.com", "emails": [ "user1@example.com" ], "fullname": "User1", "name": "user1" }, "date_created": "1492011511", "description": "Some Group", "display_name": "Some Group", "group_type": "user", "pagination": { "first": "http://127.0.0.1:5000/api/0/group/some_group_name?per_page=2&page=1", "last": "http://127.0.0.1:5000/api/0/group/some_group_name?per_page=2&page=2", "next": "http://127.0.0.1:5000/api/0/group/some_group_name?per_page=2&page=2", "page": 1, "pages": 2, "per_page": 2, "prev": null }, "members": [ "user1", "user2" ], "name": "some_group_name" }
{ "creator": { "default_email": "user1@example.com", "emails": [ "user1@example.com" ], "fullname": "User1", "name": "user1" }, "date_created": "1492011511", "description": "Some Group", "display_name": "Some Group", "group_type": "user", "members": [ "user1", "user2" ], "name": "some_group_name", "total_projects": 1000, "pagination": { "first": "http://127.0.0.1:5000/api/0/group/some_group_name?per_page=2&projects=1&page=1", "last": "http://127.0.0.1:5000/api/0/group/some_group_name?per_page=2&projects=1&page=500", "next": "http://127.0.0.1:5000/api/0/group/some_group_name?per_page=2&projects=1&page=2", "page": 1, "pages": 500, "per_page": 2, "prev": null }, "projects": [], }
Add new member to group. To be able to add users to group the requester needs to have permissions to do that.
POST /api/0/group/<group>/add
Key | Type | Optionality | Description |
---|---|---|---|
user |
string | Mandatory | User to add as member
of group
|
{ "creator": { "default_email": "user1@example.com", "emails": [ "user1@example.com" ], "fullname": "User1", "name": "user1" }, "date_created": "1492011511", "description": "Some Group", "display_name": "Some Group", "group_type": "user", "members": [ "user1", "user2" ], "name": "some_group_name" }
Remove member from group. To be able to remove users from group the requester needs to have permissions to do that.
POST /api/0/group/<group>/remove
Key | Type | Optionality | Description |
---|---|---|---|
user |
string | Mandatory | User to add as member
of group
|
{ "creator": { "default_email": "user1@example.com", "emails": [ "user1@example.com" ], "fullname": "User1", "name": "user1" }, "date_created": "1492011511", "description": "Some Group", "display_name": "Some Group", "group_type": "user", "members": [ "user1", "user2" ], "name": "some_group_name" }
Install a plugin to a repository.
POST /api/0/<repo>/settings/<plugin>/install POST /api/0/<namespace>/<repo>/settings/<plugin>/install
POST /api/0/fork/<username>/<repo>/settings/<plugin>/install POST /api/0/fork/<username>/<namespace>/<repo>/settings/<plugin> /install
{ "plugin": { "mail_to": "serg@wh40k.com" }, "message": "Hook 'Mail' activated" }
Remove a plugin from repository.
POST /api/0/<repo>/settings/<plugin>/remove POST /api/0/<namespace>/<repo>/settings/<plugin>/remove
POST /api/0/fork/<username>/<repo>/settings/<plugin>/remove POST /api/0/fork/<username>/<namespace>/<repo>/settings/<plugin> /remove
{ "plugin": { "mail_to": "serg@wh40k.com" }, "message": "Hook 'Mail' deactivated" }
List installed plugins on a project.
GET /api/0/<repo>/settings/plugins GET /api/0/<namespace>/<repo>/settings/plugins
GET /api/0/fork/<username>/<repo>/settings/plugins GET /api/0/fork/<username>/<namespace>/<repo>/settings/plugins
{ 'plugins': [ { 'Mail': { 'mail_to': 'serg@wh40k.com' } } ], 'total_plugins': 1 }
List every plugin available in this pagure instance. For each plugin their name is provided as well as the name of the argument to provide to enable/disable them.
GET /api/0/plugins
{ 'plugins': [ { 'Block Un-Signed commits': [ ] }, { 'Block non fast-forward pushes': [ 'branches', ] }, { 'Fedmsg': [ ] }, ], 'total_issues': 3 }
This API endpoint will return the username associated with the provided API token.
POST /api/0/-/whoami
{ "username": "user1" }
Get the current API version.
GET /api/0/-/version
{ "version": "1" }
Get a dictionary (hash) of all error codes.
GET /api/0/-/error_codes
{ ENOCODE: 'Variable message describing the issue', ENOPROJECT: 'Project not found', }
Powered by Pagure 5.14.1