Issue

Issue object:

  • id – integer
  • title – string
  • content – string
  • tags – array of string
  • author – null / user object
  • votes – integer
  • ncomments – integer
  • ctime – string: iso8601 datetime
  • mtime – string: iso8601 datetime or null if not modified since creation
  • user_vote – 0, 1 or -1: the current vote of the requesting user
  • views – integer: number of views
  • popularity – float
Role Permission
Authenticated create
Owner update
Authenticated comment
Authenticated vote

Issue-list

GET /api/issues

Returns list of issues

Query Parameters:
 
  • limit (optional) – integer, 0 ≤ x ≤ 1000, default = 100
  • offset (optional) – integer, 0 ≤ x, default = 0
  • ordering (optional) – popularity or latest, default = 'popularity'
POST /api/issues

requires permission: create

create a issue, returns the created issue object on success

Request JSON Object:
 
  • content – string, length ≤ 30000
  • is_anonymous – boolean
  • tags – array of [string, length ≤ 30]
  • title – string, length ≤ 80

Issue-object

Issue of the id

GET /api/issues/{id}

returns the issue object

PUT /api/issues/{id}

requires permission: update

update the issue

returns the updated issue object on success

Request JSON Object:
 
  • content (optional) – string, length ≤ 30000
  • is_anonymous (optional) – boolean
  • tags (optional) – array of [string, length ≤ 30]
  • title (optional) – string, length ≤ 80

Issue-vote

Entity representing the user’s vote of the issue

GET /api/issues/{id}/vote

requires permission: vote

Returns the current vote

{"value": 1}

value may be either -1, 0 or 1

PUT /api/issues/{id}/vote

requires permission: vote

vote up:

{"value": 1}

vote down:

{"value": -1}
Response JSON Object:
 
  • votes – on a success vote, the updated vote count is returned
Request JSON Object:
 
  • value1 or -1
DELETE /api/issues/{id}/vote

requires permission: vote

unvote

no body required

Response JSON Object:
 
  • votes – on a success unvote, the updated vote count is returned

Issue-comment

Comments for the issue

GET /api/issues/{id}/comments

returns the list of comments of the object.

they are ordered by ctime, oldest first.

{
    "data": [
        {
            "id": 10,
            "parent": {
                "id": 100
            },
            "author": "user object",
            "content": "comment content"
        }
    ]
}
Query Parameters:
 
  • limit (optional) – integer, 0 ≤ x ≤ 1000, default = 100
  • offset (optional) – integer, 0 ≤ x, default = 0
POST /api/issues/{id}/comments

requires permission: comment

post a comment to the object

{
    "content": "lorem ipsum ..."
}
Request JSON Object:
 
  • content – string, length ≤ 2000