Apache Allura REST API

Download OpenAPI specification:Download

Basic API architecture

All url endpoints are prefixed with /rest/ and the path to the project and tool.

For example, in order to access a wiki installed in the 'test' project with the mount point 'docs' the API endpoint would be /rest/p/test/docs.

The following tools have API support:

  • Project

  • Wiki

  • Tracker

  • Discussion

  • Blog

  • External Link

  • Admin

    • Project Export
    • Installing a new Tool
    • Webhooks
  • User Profiles

Authenticating requests

In order to use the API for authenticated actions, you should use the OAuth account page to create a consumer key for your application. Once you have a consumer key, you must have a site user (e.g. your own account, if you're writing a single script) authorize your application to act on his or her behalf.

You can also use your normal browser session as authentication for the API. This is useful for manually testing API calls or for in-browser applications (such as extensions or user-scripts). It is not recommended for programmatic access, however, as it would require you to store your account username and password, and thus cannot be easily managed or revoked.

Without authentication, all API requests have the permissions of an anonymous visitor. To view or change anything that requires a login, you must authenticate to the API using OAuth. You must first register for an OAuth consumer token at https://forge-allura.apache.org/auth/oauth/. Once you have registered, you will be be able to see your consumer key and consumer secret, or generate a bearer token, at https://forge-allura.apache.org/auth/oauth/.

OAuth With Bearer Tokens

The easiest way to use the API with your own account is to use a bearer token. Once you have generated a bearer token at https://forge-allura.apache.org.net/auth/oauth/, you just include it in the request to the API via a http header like Authorization: Bearer MY_BEARER_TOKEN.

Simple URL example to access a private ticket:

curl -H 'Authorization: Bearer MY_BEARER_TOKEN' https://forge-allura.apache.org/rest/p/allura/tickets/35/

Python code example to create a new ticket:

import requests
from pprint import pprint

BEARER_TOKEN = '<bearer token from oauth page>'

r = requests.post('https://forge-allura.apache.org/rest/p/test-project/tickets/new',
      headers={'Authorization': f'Bearer {BEARER_TOKEN}'}
      params={
        'ticket_form.summary': 'Test ticket',
        'ticket_form.description': 'This is a test ticket',
        'ticket_form.labels': 'test',
        'ticket_form.custom_fields._my_num': '7',  # custom field with label "My Num"
                                                   # must be created first
    })
if r.status_code == 200:
    print('Ticket created at: %s' % r.url)
    pprint(r.json())
else:
    print('Error [%s]:\n%s' % (r.status_code, r.text))

OAuth 1.0 Application Authorization (Third-Party Apps)

If you want your application to be able to use the API on behalf of another user, that user must authorize your application to act on their behalf. This is usually accomplished by obtaining a request token and directing the user authorize the request. The following is an example of how one would authorize an application in Python using the requests_oauthlib library. First, run pip install requests_oauthlib

from requests_oauthlib import OAuth1Session
import webbrowser

CONSUMER_KEY = '<consumer key from registration>'
CONSUMER_SECRET = '<consumer secret from registration>'
REQUEST_TOKEN_URL = 'https://forge-allura.apache.org/rest/oauth/request_token'
AUTHORIZE_URL = 'https://forge-allura.apache.org/rest/oauth/authorize'
ACCESS_TOKEN_URL = 'https://forge-allura.apache.org/rest/oauth/access_token'

oauth = OAuth1Session(CONSUMER_KEY, client_secret=CONSUMER_SECRET, callback_uri='oob')

# Step 1: Get a request token. This is a temporary token that is used for
# having the user authorize an access token and to sign the request to obtain
# said access token.

request_token = oauth.fetch_request_token(REQUEST_TOKEN_URL)

# these are intermediate tokens and not needed later
# print("Request Token:")
# print("    - oauth_token        = %s" % request_token['oauth_token'])
# print("    - oauth_token_secret = %s" % request_token['oauth_token_secret'])
# print()

# Step 2: Redirect to the provider. Since this is a CLI script we do not
# redirect. In a web application you would redirect the user to the URL
# below, specifying the additional parameter oauth_callback=<your callback URL>.

webbrowser.open(oauth.authorization_url(AUTHORIZE_URL, request_token['oauth_token']))

# Since we didn't specify a callback, the user must now enter the PIN displayed in
# their browser.  If you had specified a callback URL, it would have been called with
# oauth_token and oauth_verifier parameters, used below in obtaining an access token.
oauth_verifier = input('What is the PIN? ')

# Step 3: Once the consumer has redirected the user back to the oauth_callback
# URL you can request the access token the user has approved. You use the
# request token to sign this request. After this is done you throw away the
# request token and use the access token returned. You should store this
# access token somewhere safe, like a database, for future use.
access_token = oauth.fetch_access_token(ACCESS_TOKEN_URL, oauth_verifier)

print("Access Token:")
print("    - oauth_token        = %s" % access_token['oauth_token'])
print("    - oauth_token_secret = %s" % access_token['oauth_token_secret'])
print()
print("You may now access protected resources using the access tokens above.")
print()

You can then use your access token with the REST API. For instance script to create a wiki page might look like this:

from requests_oauthlib import OAuth1Session

PROJECT='test'

CONSUMER_KEY='<consumer key from app registration>'
CONSUMER_SECRET='<consumer secret from app registration>'

ACCESS_KEY='<access key from previous script>'
ACCESS_SECRET='<access secret from previous script>'

URL_BASE='https://forge-allura.apache.org/rest/'

oauth = OAuth1Session(CONSUMER_KEY, client_secret=CONSUMER_SECRET,
                      resource_owner_key=ACCESS_KEY, resource_owner_secret=ACCESS_SECRET)

response = oauth.post(URL_BASE + 'p/' + PROJECT + '/wiki/TestPage',
                      data=dict(text='This is a test page'))
response.raise_for_status()
print("Done.  Response was:")
print(response)

OAuth2 Authorization (Third-Party Apps)

Another option for authorizing your apps is to use the OAuth2 workflow. This is accomplished by authorizing the application which generates an authorization_code that can be later exchanged for an access_token

The following example demonstrates the authorization workflow and how to generate an access token to authenticate your apps

from requests_oauthlib import OAuth2Session

# Set up your client credentials
client_id = 'YOUR_CLIENT_ID'
client_secret = 'YOUR_CLIENT_SECRET'
authorization_base_url = 'https://forge-allura.apache.org/auth/oauth2/authorize'
access_token_url = 'https://forge-allura.apache.org/rest/oauth2/token'
redirect_uri = 'https://forge-allura.apache.org/page'  # Your registered redirect URI

# Create an OAuth2 session
oauth2 = OAuth2Session(client_id, redirect_uri=redirect_uri)

# Step 1: Prompt the user to navigate to the authorization URL
authorization_url, state = oauth2.authorization_url(authorization_base_url)

print('Please go to this URL to authorize the app:', authorization_url)

# Step 2: Obtain the authorization code (you can find it in the 'code' URL parameter)
# In real use cases, you might implement a small web server to capture this
authorization_code = input('Paste authorization code here: ')

# Step 3: Exchange the authorization code for an access token
token = oauth2.fetch_token(access_token_url,
                        code=authorization_code,
                        client_secret=client_secret,
                        include_client_id=True)

# Print the access and refresh tokens for verification (or use it to request user data)
# If your access token expires, you can request a new one using the refresh token
print(f"Access Token: {token.get('access_token')}")
print(f"Refresh Token: {token.get('refresh_token')}")

# Step 4: Use the access token to make authenticated requests
response = oauth2.get('https://forge-allura.apache.org/user')
print('User data:', response.json())

Refreshing Access Tokens

A new access token can be requested once it expires. The following example demonstrates how can the refresh token obtained in the previous code sample be used to generate a new access token:

from requests_oauthlib import OAuth2Session

# Set up your client credentials
client_id = 'YOUR_CLIENT_ID'
client_secret = 'YOUR_CLIENT_SECRET'
refresh_token = 'YOUR_REFRESH_TOKEN'
access_token = 'YOUR_ACCESS_TOKEN'
access_token_url = 'https://forge-allura.apache.org/rest/oauth2/token'

# Step 1: Create an OAuth2 session by also passing token information
token = dict(access_token=access_token, token_type='Bearer', refresh_token=refresh_token)
oauth2 = OAuth2Session(client_id=client_id, token=token)

# Step 2: Request for a new token
extra = dict(client_id=client_id, client_secret=client_secret)
refreshed_token = oauth2.refresh_token(access_token_url, **extra)

# You can inspect the response object to get the new access and refresh tokens
print(f"Access Token: {token.get('access_token')}")
print(f"Refresh Token: {token.get('refresh_token')}")

PKCE support

PKCE (Proof Key for Code Exchange) is an extension to the authorization code flow to prevent CSRF and authorization code injection attacks. It mitigates the risk of the authorization code being intercepted by a malicious entity during the exchange from the authorization endpoint to the token endpoint.

To make use of this security extension, you must generate a string known as a "code verifier", which is a random string using the characters A-Z, a-z, 0-9 and the special characters -._~ and it should be between 43 and 128 characters long.

Once the string has been created, perform a SHA256 hash on it and encode the resulting value as a Base-

You can use the following example to generate a valid code verifier and code challenge:

import hashlib
import base64
import os


# Generate a code verifier (random string)
def generate_code_verifier(length=64):
    return base64.urlsafe_b64encode(
      os.urandom(length)).decode('utf-8').rstrip('=')


# Generate a code challenge (SHA-256)
def generate_code_challenge(verifier):
    digest = hashlib.sha256(verifier.encode('utf-8')).digest()
    return base64.urlsafe_b64encode(digest).decode('utf-8').rstrip('=')


code_verifier = generate_code_verifier()
code_challenge = generate_code_challenge(code_verifier)

# The code challenge should be sent in the initial authorization request.
print("Code Verifier:", code_verifier)
print("Code Challenge:", code_challenge)

Having generated the codes, you would need to send the code challenge along with the challenge method (in this case S256) as part of the query string in the authorization url, for example:

https://forge-allura.apache.org/auth/oauth2/authorize?client_id=8dca182d3e6fe0cb76b8&response_type=code&code_challenge=G6wIRjEZlvhLsVS0exbID3o4ppUBsjxUBNtRVL8StXo&code_challenge_method=S256

Afterwards, when you request an access token, you must provide the code verifier that derived the code challenge as part of the request's body, otherwise the token request validation will fail:

POST https://forge-allura.apache.org/rest/oauth2/token

{
    "client_id": "8dca182d3e6fe0cb76b8",
    "client_secret": "1c6a2d99db80223590dd12cc32dfdb8a0cc2e9a38620e05c16076b2872110688b9c1b17db63bb7c3",
    "code": "Gvw53xmSBFZYBy0xdawm0qSX0cqhHs",
    "code_verifier": "aEyhTs4BfWjZ7g5HT0o7Hu24p6Qw6TxotdX8_G20NN9J1lXIfSnNr3b6jhOUZe5ZWkP5ADCEzlWABUHSPXslgQ",
    "grant_type": "authorization_code"
}

Permission checks

The has_access API can be used to run permission checks. It is available on a neighborhood, project and tool level.

It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool.

It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.

DOAP (Description of a Project) API

DOAP is an RDF/XML specification for "Description of a Project"

Project information is available in DOAP format with additional custom RDF fields at /rest/p/{project}?doap

This is separate from the normal JSON API at /rest/p/{project}

List user tools

List tools (e.g. "git" repos) that the current user is associated with

path Parameters
tool_type
required
string
header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{}

Neighborhood has_access

Endpoints Permissions can be checked at three levels:

  1. Neighborhood: /rest/p/has_access
  2. Project: /rest/p/project_name/has_access
  3. Tool: /rest/p/project_name/mount_point/has_access

It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.

E.g.: GET /rest/p/test/wiki/has_access?user=admin1&perm=create returns { result: true } GET /rest/p/test/wiki/has_access?user=user01&perm=create returns { result: false }

path Parameters
neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
perm
required
string
Default: "read"
Enum: "read" "admin" "create" "update" "register"
user
required
string

The username to check

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Add project

path Parameters
neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

Request Body schema: application/json
string

Responses

Request samples

Content type
application/json
{
  • "name": "Template Test 1",
  • "shortname": "template-test-1",
  • "summary": "My summary.",
  • "description": "My description.",
  • "admin": "admin1",
  • "external_homepage": "http://wwww.example.com/test",
  • "labels": [
    ],
  • "trove_audiences": [
    ],
  • "trove_licenses": [
    ],
  • "awards": [ ],
  • "tool_data": {
    },
}

Get project

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

Responses

Response samples

Content type
application/json
{
  • "status": "active",
  • "preferred_support_tool": "",
  • "preferred_support_url": "",
  • "labels": [ ],
  • "private": false,
  • "creation_date": "2013-02-12T00:00:00.000Z",
  • "socialnetworks": [
    ],
  • "tools": [
    ],
  • "categories": {
    },
  • "_id": "511aa1d46d19cd14f9060c67",
  • "name": "Apache Allura™",
  • "video_url": "www.youtube.com/embed/va9WPbKAI9U?rel=0",
  • "screenshots": [ ],
  • "summary": "Forge software for hosting software projects",
  • "short_description": "Apache Allura is an open source implementation of a software \"forge\", a web site that manages source code repositories, bug reports, discussions, wiki pages, blogs and more for any number of individual projects.",
  • "moved_to_url": "",
  • "shortname": "allura",
  • "developers": [],
  • "external_homepage": "http://allura.apache.org/"
}

Project has_access

Endpoints Permissions can be checked at three levels:

  1. Neighborhood: /rest/p/has_access
  2. Project: /rest/p/project_name/has_access
  3. Tool: /rest/p/project_name/mount_point/has_access

It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.

E.g.: GET /rest/p/test/wiki/has_access?user=admin1&perm=create returns { result: true } GET /rest/p/test/wiki/has_access?user=user01&perm=create returns { result: false }

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
perm
required
string
Default: "read"
Enum: "read" "admin" "create" "update"
user
required
string

The username to check

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project scm tool

path Parameters
scm_tool
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{}

Project wiki

path Parameters
wiki
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "pages": [
    ]
}

Project wiki title

returns a JSON representation of a page

path Parameters
title
required
string
wiki
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "related_artifacts": [
    ],
  • "attachments": [ ],
  • "title": "Extensions",
  • "text": "The following extensions for Allura are available as separate packages:\r\n\r\nType | Title | License | Notes\r\n----- | ------------- | ----- | Notes\r\nTool | [ForgeHg](http://pypi.python.org/pypi/ForgeHg) | GPLv2 | Maintained by the Allura developers.<br> Separate package due to Hg GPL license.\r\nTool | [Pastebin](https://sourceforge.net/p/forgepastebin/) | Apache&nbsp;2 | Maintained by the Allura developers.<br> Example of writing a simple tool.\r\nTool | [Donay Incentify](http://docs.donay.com/display/Dosense/Installing+Incentify+in+Allura) | Apache 2\r\nTool | [Bitergia metrics](https://github.com/Bitergia/AlluraBitergiaMetrics) | Apache 2\r\nTool | [Perforce SCM](https://sourceforge.net/p/p4allura/allura-fork/ci/master/tree/ForgeP4/)\r\nTool | [Django Allura](https://github.com/rick446/DjangoAllura)\r\nImporter | [Google Code Wiki Importer](http://pypi.python.org/pypi/googlecodewikiimporter/) | GPLv3 | Maintained by the Allura developers.<br> Separate package due to `html2text` GPL.\r\nImporter | [Trac Wiki Importer](http://pypi.python.org/pypi/tracwikiimporter/) | GPLv3 | Maintained by the Allura developers.<br> Separate package due to `html2text` GPL.\r\nImporter | [Mediawiki data importer](http://pypi.python.org/pypi/mediawikiimporter/) | GPLv3 | Maintained by the Allura developers.<br> Separate package due to `html2text` GPL.\r\nExternal Integration | [TeamCity](https://github.com/Vampire/teamcity-sourceforge) | Apache 2 | Targeted at SourceForge.net but APIs are the same, so base domain could be changed to any Allura host.\r\n",
  • "labels": [ ],
  • "discussion_thread": {
    },
  • "mod_date": "2015-07-07T17:30:01.607Z",
  • "_id": "523332d96d19cd54e569322b",
}

Project update wiki title

Creates or updates the titled page.

path Parameters
title
required
string
wiki
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
text
string

Page text.

labels
string

Comma-separated list of page labels.

Responses

Project wiki has_access

Endpoints Permissions can be checked at three levels:

  1. Neighborhood: /rest/p/has_access
  2. Project: /rest/p/project_name/has_access
  3. Tool: /rest/p/project_name/mount_point/has_access

It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.

E.g.: GET /rest/p/test/wiki/has_access?user=admin1&perm=create returns { result: true } GET /rest/p/test/wiki/has_access?user=user01&perm=create returns { result: false }

path Parameters
wiki
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
perm
required
string
Default: "read"
Enum: "admin" "configure" "moderate" "post" "unmoderated_post" "read" "create" "delete" "edit"
user
required
string

The username to check

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project tracker

Get a list of tickets

path Parameters
tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
page
integer
Default: 0

Skip over a number of elements by specifying a starting page

limit
integer
Default: 25

Limit the number of elements on the response "page"

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "tickets": [
    ],
  • "count": 3662,
  • "milestones": [
    ],
  • "tracker_config": {
    },
  • "limit": 5,
  • "saved_bins": [
    ],
  • "page": 0
}

Project tracker tickerNumber

path Parameters
ticketNumber
required
string

Get a details of a ticket.

tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "ticket": {
    }
}

Project tracker tickerNumber save

path Parameters
ticketNumber
required
string

Get a details of a ticket.

tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: multipart/form-data
ticket_form.summary
string

Ticket title

ticket_form.description
string

ticket description

ticket_form.status
string

ticket status

ticket_form.assigned_to
string

username of ticket assignee

ticket_form.labels
string

comma-separated list of ticket labels

ticket_form.attachment
string <binary>

(optional) attachment

ticket_form.custom_fields._any-field-name
string

Starts with underscore, and must conform to the custom fields set up for this tracker. "true" or "false" values will work for boolean custom fields.

ticket_form.private
string

if the ticket is private or not ("true" or "false")

ticket_form.discussion_disabled
string

if comments may be posted on the ticket ("true" or "false")

Responses

Project tracker new

path Parameters
tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: multipart/form-data
ticket_form.summary
string

Ticket title

ticket_form.description
string

ticket description

ticket_form.status
string

ticket status

ticket_form.assigned_to
string

username of ticket assignee

ticket_form.labels
string

comma-separated list of ticket labels

ticket_form.attachment
string <binary>

(optional) attachment

ticket_form.custom_fields._any-field-name
string

Starts with underscore, and must conform to the custom fields set up for this tracker. "true" or "false" values will work for boolean custom fields.

ticket_form.private
string

if the ticket is private or not ("true" or "false")

ticket_form.discussion_disabled
string

if comments may be posted on the ticket ("true" or "false")

Responses

Project tracker discuss thread threadId

returns summary information about a thread, including the posts in a thread

path Parameters
threadId
required
string
tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
page
integer
Default: 0

Skip over a number of elements by specifying a starting page

limit
integer
Default: 25

Limit the number of elements on the response "page"

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project tracker discuss thread threadId slug

returns detailed information about a post

path Parameters
slug
required
string
threadId
required
string
tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project tracker discuss thread threadId slug reply

path Parameters
slug
required
string
threadId
required
string
tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
required
text
required
string

the text of the reply

Responses

Project tracker discuss thread threadId new

path Parameters
threadId
required
string
tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
required
text
required
string

The text of the new post

Responses

Project tracker has_access

Endpoints Permissions can be checked at three levels:

  1. Neighborhood: /rest/p/has_access
  2. Project: /rest/p/project_name/has_access
  3. Tool: /rest/p/project_name/mount_point/has_access

It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.

E.g.: GET /rest/p/test/wiki/has_access?user=admin1&perm=create returns { result: true } GET /rest/p/test/wiki/has_access?user=user01&perm=create returns { result: false }

path Parameters
tracker
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
perm
required
string
Default: "read"
Enum: "admin" "configure" "moderate" "post" "unmoderated_post" "read" "create" "delete" "update" "save_searches"
user
required
string

The username to check

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project discussion

Returns a list of forums, including name, description, num_topics, and last_post details

path Parameters
discussion
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
page
integer
Default: 0

Skip over a number of elements by specifying a starting page

limit
integer
Default: 25

Limit the number of elements on the response "page"

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "count": 3,
  • "forums": [
    ],
  • "limit": 25,
  • "page": 0
}

Project discussion forum

returns a limited list of topics in the forum, with fields for subject, num_replies, API URL, and last_post To view more than 100 threads, or 100 posts in a thread, use the pagination support of the API by adding ?page=1 etc. to the URL.

path Parameters
forum
required
string
discussion
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
page
integer
Default: 0

Skip over a number of elements by specifying a starting page

limit
integer
Default: 25

Limit the number of elements on the response "page"

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "topic": {
    },
  • "count": 2,
  • "limit": 25,
  • "page": 0
}

Project discussion thread

returns a list of posts in the thread, with fields for author, text, and timestamp. Nested posts (i.e. a reply to a post) can be determined by the slug structure. For example, "slug": "0a0b/9f00" is a reply to the post with "slug": "0a0b"

path Parameters
thread
required
string
forum
required
string
discussion
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
page
integer
Default: 0

Skip over a number of elements by specifying a starting page

limit
integer
Default: 25

Limit the number of elements on the response "page"

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project discussion has_access

Endpoints Permissions can be checked at three levels:

  1. Neighborhood: /rest/p/has_access
  2. Project: /rest/p/project_name/has_access
  3. Tool: /rest/p/project_name/mount_point/has_access

It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.

E.g.: GET /rest/p/test/wiki/has_access?user=admin1&perm=create returns { result: true } GET /rest/p/test/wiki/has_access?user=user01&perm=create returns { result: false }

path Parameters
discussion
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
perm
required
string
Default: "read"
Enum: "admin" "configure" "moderate" "post" "unmoderated_post" "read"
user
required
string

The username to check

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project blog

Returns a list of posts, including title and API url.

path Parameters
blog
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{}

Project blog new post

Creates a new blog post.

path Parameters
blog
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
title
string

The title of the post.

text
string

The text of the post.

labels
string

Labels of the post -- comma seperated strings

state
string

Draft or published.

Responses

Project update blog post

Updates an existing blog post.

path Parameters
year
required
number
month
required
string
title
required
string
blog
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
title
string

The title of the post.

text
string

The text of the post.

labels
string

Labels of the post -- comma seperated strings

state
string

Draft or published.

Responses

Project get blog post

path Parameters
year
required
number
month
required
string
title
required
string
blog
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{}

Project blog has_access

Endpoints Permissions can be checked at three levels:

  1. Neighborhood: /rest/p/has_access
  2. Project: /rest/p/project_name/has_access
  3. Tool: /rest/p/project_name/mount_point/has_access

It is only available to users that have 'admin' permission for corresponding neighborhood/project/tool. It requires user and perm parameters and will return JSON dict with result key, which contains boolean value, indicating if given user has perm permission to the neighborhood/project/tool.

E.g.: GET /rest/p/test/wiki/has_access?user=admin1&perm=create returns { result: true } GET /rest/p/test/wiki/has_access?user=user01&perm=create returns { result: false }

path Parameters
blog
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
perm
required
string
Default: "read"
Enum: "admin" "configure" "moderate" "post" "unmoderated_post" "read" "write"
user
required
string

The username to check

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project Admin Export

Submits an export job

400 Bad Request: tools parameter not provided or is invalid 503 Service Unavailable: an export job is already running 200 OK: job submitted. Body will be: {"status": "in progress", "filename": FILENAME}

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project Admin Export status

Returns status: busy or ready

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project list webhooks

Returns the list of webhooks

path Parameters
tool
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
page
integer
Default: 0

Skip over a number of elements by specifying a starting page

limit
integer
Default: 25

Limit the number of elements on the response "page"

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{}

Project create new webhook

Create a new webhook.

path Parameters
type
required
string
Value: "repo-push"

Allura supports one type of webhook for the moment - repo-push, triggered when a repository receives new commits. It is supported for Git, Mercurial and SVN repositories.

tool
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
required
url
required
string

The url to call when the the webhook is triggered.

Responses

Project get webhook

View a webhook

path Parameters
id
required
string

Unique identifier for a webhook.

type
required
string
Value: "repo-push"

Allura supports one type of webhook for the moment - repo-push, triggered when a repository receives new commits. It is supported for Git, Mercurial and SVN repositories.

tool
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{}

Project update webhook

Update an existing webhook

path Parameters
id
required
string

Unique identifier for a webhook.

type
required
string
Value: "repo-push"

Allura supports one type of webhook for the moment - repo-push, triggered when a repository receives new commits. It is supported for Git, Mercurial and SVN repositories.

tool
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
required
url
required
string

The url to call when the the webhook is triggered.

secret
string

Optionally supply your own secret.

Note: DO NOT ever expose your secret!

Responses

Project delete webhook

Delete an existing webhook

path Parameters
id
required
string

Unique identifier for a webhook.

type
required
string
Value: "repo-push"

Allura supports one type of webhook for the moment - repo-push, triggered when a repository receives new commits. It is supported for Git, Mercurial and SVN repositories.

tool
required
string
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project Admin Install Tool

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
required
tool
required
string

Tool name that you want to install.

mount_point
required
string

The section of the url relative to your project. For example: /p/your_project/{mount_point}

mount_label
required
string

How your tool will be displayed in your project (like a "nice name" for the tool).

order
string

"first", "last", or "alpha_tool" for position with respect to existing tools (or existing tools of the same type for "alpha_tool")

Responses

Project Admin Mount Order

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
1
string

Mount point name for the first position.

2
string

Mount point name for the second position.

3
string

Mount point name for the third position.

4...
string

Etc.

Responses

Project Adming Configure Tool Grouping

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Request Body schema: application/x-www-form-urlencoded
grouping_threshold
number

Value for the grouping threshold.

Responses

Project Admin Installable Tools

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Project Admin Options

path Parameters
project
required
string([a-zA-Z0-9-]+)

The Project short name.

neighborhood
required
string

Allura has two default neighborhoods: “Projects” /p and “Users” /u. More information can be found here

query Parameters
mount_point
required
string

The mount point to specify which tool.

header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Get Username

path Parameters
username
required
string
header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "status": "active",
  • "preferred_support_tool": "",
  • "preferred_support_url": "",
  • "labels": [ ],
  • "private": false,
  • "creation_date": "2014-12-12T00:00:00.000Z",
  • "socialnetworks": [
    ],
  • "tools": [
    ],
  • "categories": {
    },
  • "_id": "548b2d136d19cd59705380a6",
  • "name": "u/heiths",
  • "icon_url": null,
  • "video_url": "",
  • "screenshots": [ ],
  • "summary": "",
  • "short_description": null,
  • "moved_to_url": "",
  • "shortname": "u/heiths",
  • "developers": [],
  • "external_homepage": ""
}

Get profile

path Parameters
username
required
string
header Parameters
Authorization
required
string^Bearer [0-9a-f]+$

Optional. Authenticate yourselve with a token from https://forge-allura.apache.org/auth/oauth/ Use it here like: Bearer 5d79e800a36bf602314d

Responses

Response samples

Content type
application/json
{
  • "username": "heiths",
  • "name": "Heith Seewald",
  • "localization": {
    },
  • "skills": [
    ],
  • "webpages": [ ],
  • "joined": "2014-12-12T17:59:47.000Z",
  • "socialnetworks": [
    ],
  • "telnumbers": [ ],
  • "sex": "Male",
  • "availability": [
    ],
  • "projects": [
    ],
  • "skypeaccount": null
}

Get Notification

query Parameters
cookie
required
string

site-notification cookie value

url
required
string

page where notification will be shown

tool_name
required
string

tool's name for current page

Responses