Skip to content

Description of end points

ejasarevic edited this page Mar 24, 2015 · 27 revisions

Scrummer API documentation

/api/sessions

Description: Authenticates the user
Method: POST
Input parameters: email, password
Output Session key which is used to sign the other requests


/api/users

Description: New user creation.
Method: POST
Input parameters: firstname, lastname, email, username, password, password_confirmation. Username and email needs to be unique.
Output: Message "User created."


/api/users/:id

Description: Update of user info except password.
Method: PUT
Input parameters: id, firstname, lastname, email, username. Username and email needs to be unique.
Output: Message "User successfully updated."


/api/users/:id/change_password

Description: Change password.
Method: PUT
Input parameters: id, old_password, password, password_confirmation
Output: Message "Password successfully changed."


/api/users/:id

Description: User can deactivate account. IS_ACTIVE field will be set on FALSE.
Method: DELETE
Input parameters: id
Output: Message "You are deactivated."


/api/projects/:project_id/members

Description: Get all members on specified project.
Method: GET
Input parameters: project_id
Output: JSON representation

{
    "document": {
        "users": [
            {
                "id": ?,
                "lastname": ?,
                "email": ?,
                "firstname": ?,
                "username": ?,
                "is_active": ?
            }
        ]
    },
    "status": {
        "message": ?,
        "exception_message": ?,
        "stacktrace": ?
    }
}

/api/projects/:project_id/members

Description: Add new member on specified project.
Method: POST
Input parameters: project_id, id (user_id) Output: Message "Member added."


/api/projects/:project_id/members/search

Description: Search available users (not-members on specified project) by username. Client sends keyword and sever return all users whose username contains keyword. Method: GET
Input parameters: project_id, keyword
Output: JSON representation

{
    "document": {
        "users": [
            {
                "id": ?,
                "lastname": ?,
                "email": ?,
                "firstname": ?,
                "username": ?,
                "is_active": ?
            }
        ]
    },
    "status": {
        "message": ?,
        "exception_message": ?,
        "stacktrace": ?
    }
}

/api/projects/:project_id/members/:id

Description: Remove member from specified project.
Method: DELETE
Input parameters: project_id, id
Output: Message "Member deleted."


/api/projects/:id/board

Description Gets the active sprint of the project with with the id :id, with the tickets and user stories associated with that sprint.
Method: GET
Input parameters: id of project
Output: Board object consisted of active sprint, tickets and user stories attached to it, grouped by ticket status ('to do', 'in progress', 'done'...)


/api/dashboard

Description: Get all dashboard data for current user. Dashboard contains all notifications (adjusted representation) and assigned projects for user.
Method: GET
Input parameters: NONE
Output: JSON representation

{
    "document": {
        "dashboard": {
            "content": [
                {
                    "project": ?,
                    "content": ?,
                    "url": ?
                }
            ],
            "projects": [
                ?
            ]
        }
    },
    "status": {
        "message": ?,
        "exception_message": ?,
        "stacktrace": ?
    }
}

api/tickets/:ticket_id/comments

Description: List all comment that are connected to specific ticket

Method: GET

Input parameters: ticket_id

Output: JSON representation

{
    "document": {
        "comments": [
            {
                "id": ?,
                "user_id": ?,
                "ticket_id": ?,
                "content": ?,
                "created_at": ?,
                "updated_at": ?
            }
        ]
    },
    "status": {
        "message": ?,
        "exception_message": ?,
        "stacktrace": ?
    }
}

api/tickets/:ticket_id/comments

Description: Creates comment connected to specific user and ticket

Method: POST

Input parameters: ticket_id,user_id,content

Output: Message "Comment created."


api/tickets/:ticket_id/comments/:id

Description: Shows specific comment

Method: GET

Input parameters: ticket_id,id

Output: JSON representation

{
    "document": {
        "foundedComment": {
            "id":?,
            "user_id":?,
            "ticket_id":?,
            "content":?,
            "created_at":?,
            "updated_at":?
        }
    },
    "status": {
        "message": "OK",
        "exception_message": null,
        "stacktrace": null
    }
}

api/tickets/:ticket_id/comments/:id

Description: Updates comment

Method: PUT/PATCH

Input parameters: ticket_id,id

Output: Message "Comment successfully edited."


api/tickets/:ticket_id/comments/:id

Description: Deletes comment

Method: DELETE

Input parameters: ticket_id,id

Output: Message "Comment deleted."


api/users/:user_id/comments

Description: Creates comment connected to specific user and ticket

Method: POST

Input parameters: ticket_id,user_id,content

Output: Message "Comment created."


api/users/:user_id/comments

Description: List all comments that are connected to specific user

Method: GET

Input parameters: user_id

Output: JSON representation

{
    "document": {
        "comments": [
            {
                "id": ?,
                "user_id": ?,
                "ticket_id": ?,
                "content": ?,
                "created_at": ?,
                "updated_at": ?
            }
        ]
    },
    "status": {
        "message": ?,
        "exception_message": ?,
        "stacktrace": ?
    }
}

api/users/:user_id/comments/:id

Description: Shows specific comment

Method: GET

Input parameters: user_id,id

Output: JSON representation

{
    "document": {
        "foundedComment": {
            "id":?,
            "user_id":?,
            "ticket_id":?,
            "content":?,
            "created_at":?,
            "updated_at":?
        }
    },
    "status": {
        "message": "OK",
        "exception_message": null,
        "stacktrace": null
    }
}

api/users/:user_id/comments/:id

Description: Updates comment

Method: PUT/PATCH

Input parameters: user_id,id

*Output: Message "Comment successfully edited."


api/users/:user_id/comments/:id

Description: Deletes comment

Method: DELETE

Input parameters: ticket_id,id

Output: Message "Comment deleted."


api/projects/:project_id/backlogs

Description: Shows all sprints, user stories connected to one project

Method: GET

Input parameters: project_id

Output: JSON representation

{
    "document": {
        "user_stories": [
            {
                "id": ?,
                "name": ?,
                "description": ?,
                "tickets": []
            }
        ],
        "sprints": [
            {
                "id": ?,
                "name": ?,
                "start_date": ?,
                "end_date": ?
            }
        ]
    },
    "status": {
        "message": "OK",
        "exception_message": null,
        "stacktrace": null
    }
}

/api/projects

Description: Creates new project.

Method: POST

Input parameters: NONE

Output: Message "Project added."


/api/projects

Description: Service that shows all projects.

Method: GET

Input parameters: NONE

Output: JSON representation

{
    "document": {
        "projects": [
            {
                "id": ?,
                "name": ?,
                "code_name": ?,
                "description": ?,
                "created_at": ?,
                "updated_at": ?
            }
        ]
    },
    "status": {
        "message": "OK",
        "exception_message": null,
        "stacktrace": null
    }
}

/api/projects/:project_id

Description: Service that shows project specified by project_id

Method: GET

Input parameters: project_id

Output: JSON representation

{
    "document": {
        "foundedProjects": {
            "id": ?,
            "name": ?,
            "code_name": ?,
            "description": ?,
            "created_at": ?,
            "updated_at": ?
        }
    },
    "status": {
        "message": "OK",
        "exception_message": null,
        "stacktrace": null
    }
}

/api/projects/:project_id

Description: Service that deletes project specified by project_id

Method: DELETE

Input parameters: project_id

Output: Message "Project deleted."


/api/projects/:project_id

Description: Service that updates project specified by project_id

Method: PUT

Input parameters: project_id, name, code_name, description

Output: Message "Project successfully edited."


/api/projects/:project_id/tickets

Description: Creates new ticket in project specified by project_id parameter

Method: POST

Input parameters: project_id, seq, description, estimate, type_id

Output: Message "Ticket added."


/api/projects/:project_id/tickets

Description: List of all tickets in project specified by project_id parameter.

Method: GET

Input parameters: project_id

Output: JSON representation

{
    "document": {
        "tickets": [
            {
                "id": ?,
                "seq": ?,
                "description": ?,
                "type_id": ?,
                "project_id": ?,
                "created_at": ?,
                "updated_at": ?
            }
        ]
    },
    "status": {
        "message": "OK",
        "exception_message": null,
        "stacktrace": null
    }
}

/api/projects/:project_id/tickets/:ticket_id

Description: Shows specific ticket

Method: GET

Input parameters: project_id, ticket_id

Output: JSON representation

{
    "document": {
        "foundedTicket": [
            {
                "id": ?,
                "seq": ?,
                "description": ?,
                "type_id": ?,
                "project_id": ?,
                "created_at": ?,
                "updated_at": ?
            }
        ]
    },
    "status": {
        "message": "OK",
        "exception_message": null,
        "stacktrace": null
    }
}

/api/projects/:project_id/tickets/:ticket_id

Description: Updates specific ticket

Method: PUT

Input parameters: project_id, ticket_id, seq, description, estimate, type_id

Output: Message "Ticket successfully edited."


/api/projects/:project_id/tickets/:ticket_id

Description: Deletes specific ticket

Method: DELETE

Input parameters: project_id, ticket_id

Output: Message "Ticket deleted."


Clone this wiki locally