-
Notifications
You must be signed in to change notification settings - Fork 10
REST: Projects related api
bugzmanov edited this page Aug 1, 2012
·
15 revisions
Path: /rest/projects
Type: GET
Example results:
[{"id":1,"name":"asd","description":"asd","projectManager":"asd"}]
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 |
Path: /rest/projects/(projectId)
Type: DELETE
Example results: None
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 |