Skip to content

REST: Projects related api

azhuchkov edited this page Nov 26, 2012 · 15 revisions

Project related api

List projects

Path: /rest/projects

Type: GET ` Parameters:

Name Type Value Mandatory Description
sorting string name, ~name no Sorting by entity field value. By default ordering direction is ascending. Use prefix '~' to produce result in descending order.

Example results:

[{"id":1,"name":"asd","description":"asd","projectManager":"asd"}]

Create project

Path: /rest/projects

Type: POST

Example results:

Error on creation (common result object):

{
    "isSuccess": false,
    "isNotFound": false,
    "variablesErrors" : {"fieldName": "Error message"},
    "compoundServiceErrors" : ["Error message 1", "Error message 2"]
}

Successful creation:

{
    "isSuccess": true,
    "result" : {
        "id": 1,
        "name" : "asd!",
        "description":"asd",
        "projectManager": "asd"
    }
}

Input data:

{"name":"asd!","description":"asd","projectManager":"asd"}

Request body consists form a single JSON map contains the following entries:

Entry name Type Mandatory Description
name String Y Name of the project
description String В Description of the project
projectManager String(for now) Y Person responsible for the project

Delete project

Path: /rest/projects/(projectId)

Type: DELETE

Example results: None

Update project

Path: /rest/projects/(projectId)

Type: PUT

Example results:

Error on update (common result object):

{
    "isSuccess": false,
    "isNotFound": false,
    "variablesErrors" : {"fieldName": "Error message"},
    "compoundServiceErrors" : ["Error message 1", "Error message 2"]
}

Successful creation:

{
    "isSuccess": true,
    "result" : {
        "id": 1,
        "name" : "asd!",
        "description":"asd",
        "projectManager": "asd"
    }
}

Request body:

Input data:

{"id":4,"name":"asd!","description":"asd","projectManager":"asd"}

Request body consists form a single JSON map contains the following entries:

Entry name Type Mandatory Description
id int Y Id of the project
name String Y Name of the project
description String Y Description of the project
projectManager String Y Person responsible for the project
Clone this wiki locally