Skip to content
utkuozdemir edited this page Apr 16, 2014 · 6 revisions

Authentication method

Basic authentication is used. Provide your username & password in each request.

Services

Service URL: /rest/task/list/all
Method: GET
Description: Verifies the user's username & password, returns all tasks of the user (TaskDto list).
Sample response:

[
    {
        "id": "ad84e6b8-f8b2-40f7-b36e-e9aceb9b4dd6",
        "name": "taskName",
        "description": "description",
        "priority": 50,
        "owner": "utkuozdemir@gmail.com",
        "assignee": null,
        "createDate": 1394006188000,
        "dueDate": 1411246800000,
        "parentTaskId": null,
        "attachments": [
            {
                "id": "5c5c0ed9-53b6-4673-aeb8-2c30003aeecc",
                "name": "my_entity",
                "description": "my_entity",
                "type": "bean",
                "taskId": "ad84e6b8-f8b2-40f7-b36e-e9aceb9b4dd6",
                "url": null
            }
        ]
    }
]

Service URL: /rest/task/list/queue
Method: GET
Description: Verifies the user's username & password, returns the tasks in the queue for the current user (TaskDto list).
Sample response:

[
    {
        "id": "ad84e6b8-f8b2-40f7-b36e-e9aceb9b4dd6",
        "name": "taskName",
        "description": "description",
        "priority": 50,
        "owner": "utkuozdemir@gmail.com",
        "assignee": null,
        "createDate": 1394006188000,
        "dueDate": 1411246800000,
        "parentTaskId": null,
        "attachments": [
            {
                "id": "5c5c0ed9-53b6-4673-aeb8-2c30003aeecc",
                "name": "my_entity",
                "description": "my_entity",
                "type": "bean",
                "taskId": "ad84e6b8-f8b2-40f7-b36e-e9aceb9b4dd6",
                "url": null
            }
        ]
    }
]

Service URL: /rest/task/detail/{taskId}
Method: GET
Description: Verifies the user's username & password, returns the details of the task with id (TaskDto).
Sample response:

{
    "id": "ad84e6b8-f8b2-40f7-b36e-e9aceb9b4dd6",
    "name": "taskName",
    "description": "description",
    "priority": 50,
    "owner": "utkuozdemir@gmail.com",
    "assignee": null,
    "createDate": 1394006188000,
    "dueDate": 1411246800000,
    "parentTaskId": null,
    "attachments": [
        {
            "id": "5c5c0ed9-53b6-4673-aeb8-2c30003aeecc",
            "name": "my_entity",
            "description": "my_entity",
            "type": "bean",
            "taskId": "ad84e6b8-f8b2-40f7-b36e-e9aceb9b4dd6",
            "url": null
        }
    ]
}

Service URL: /rest/task/create
Method: POST
Parameter: task details (TaskDto).
Description: Verifies the user's username & password, creates a task with given object (TaskDto), returns the id of the created task (String).
Sample Request:

{
        "id": null,
        "name": "taskName",
        "description": "description",
        "priority": 50,
        "owner": "utkuozdemir@gmail.com",
        "assignee": null,
        "createDate": 1394006188000,
        "dueDate": 1411246800000,
        "parentTaskId": null,
        "attachments": [
            {
                "id": "5c5c0ed9-53b6-4673-aeb8-2c30003aeecc",
                "name": "my_entity",
                "description": "my_entity",
                "type": "bean",
                "taskId": "ad84e6b8-f8b2-40f7-b36e-e9aceb9b4dd6",
                "url": null
            }
        ]
}

Sample response:

132a8fdf-a467-11e3-9146-6036dd4bab72

Service URL: /rest/task/claim
Method: POST
Parameter: task id (String).
Description: Verifies the user's username & password, claims the task to the user, returns boolean success status.
Sample response:

true

Service URL: /rest/task/approve
Method: POST
Parameter: task id (String).
Description: Verifies the user's username & password, approves the approval on the task, returns boolean success status.
Sample response:

true

Service URL: /rest/task/decline
Method: POST
Parameter: task rejection dto (TaskRejectionDto).
Description: Verifies the user's username & password, declines the approval on the task with a given reason, returns boolean success status.
Sample response:

true

Service URL: /rest/task/complete
Method: POST
Parameter: task id (String).
Description: Verifies the user's username & password, completes the task with given id, returns boolean success status.
Sample response:

true

Service URL: /rest/task/events/{taskId}
Method: GET
Description: Verifies the user's username & password, returns the events of the task with given id (EventDto list).
Sample response:

[
    {
        "action": "AddUserLink",
        "message": "sample@email.com_|_assignee",
        "userId": "sample@email.com",
        "createDate": 1396862033000,
        "taskId": "11ff18e0-bac9-4987-a7d2-af55f7a6297d"
    },
    {
        "action": "AddUserLink",
        "message": "osman@osman.com_|_assignee",
        "userId": "sample@email.com",
        "createDate": 1396856030000,
        "taskId": "11ff18e0-bac9-4987-a7d2-af55f7a6297d"
    },
    {
        "action": "AddGroupLink",
        "message": "null_|_assignee",
        "userId": "sample@email.com",
        "createDate": 1396856024000,
        "taskId": "11ff18e0-bac9-4987-a7d2-af55f7a6297d"
    },
    {
        "action": "AddGroupLink",
        "message": "null_|_assignee",
        "userId": "sample@email.com",
        "createDate": 1396526959000,
        "taskId": "11ff18e0-bac9-4987-a7d2-af55f7a6297d"
    },
    {
        "action": "AddGroupLink",
        "message": "null_|_assignee",
        "userId": "sample@email.com",
        "createDate": 1396526727000,
        "taskId": "11ff18e0-bac9-4987-a7d2-af55f7a6297d"
    },
    {
        "action": "AddGroupLink",
        "message": "null_|_assignee",
        "userId": "sample@email.com",
        "createDate": 1396280012000,
        "taskId": "11ff18e0-bac9-4987-a7d2-af55f7a6297d"
    }
]

l

Clone this wiki locally