A Project is a long-running development activity. The Project API allows you to create, view and manage all the projects owned by the authenticated user. All the vocabulary used in the project representations is described here.
- List projects
- Create a project
- Get a project
- Update a project
- Delete a project
- Add label to a project
List projects owned by the authenticated user.
GET /projects| Name | Type | In | Required | Description |
|---|---|---|---|---|
accept |
string | header | no | Setting to application/vnd.daw+json is recommended. |
page |
integer | query | no | Page number of the results to fetch. Default: 0 |
Status: 200 OK {
"class": [ "project", "collection" ],
"properties": {
"pageIndex": 0,
"pageSize": 1,
"collectionSize": 1
},
"entities": [
{
"class": [ "project" ],
"rel": [ "item" ],
"properties": {
"id": 1,
"name": "DAW Project",
"description": "DAW Project description"
},
"links": [
{ "rel": [ "self" ], "href": "/projects/1" }
]
},
{
"class": [ "user" ],
"rel": [ "author" ],
"properties": {
"id": "cf128ed3-0d65-42d9-8c96-8ff2e05b3d08",
"name": "José Bonifácio",
"email": "joca@gmail.com"
},
"links": [
{ "rel": [ "self" ], "href": "/user" }
]
}
],
"actions": [
{
"name": "create-project",
"title": "Create a project",
"method": "POST",
"href": "/projects",
"type": "application/json",
"properties": [
{ "name": "name", "type": "string" },
{ "name": "description", "type": "string" },
{ "name": "labels", "type": "array", "itemsType": "string" },
{ "name": "states", "type": "array", "itemsType": "string" },
{ "name": "statesTransitions", "type": "array", "itemsType": "string" },
{ "name": "initialState", "type": "string"}
]
}
],
"links": [
{ "rel": [ "self" ], "href": "/projects?page=0" }
]
}Status: 400 Bad RequestStatus: 401 UnauthorizedCreate a new project.
POST /projects| Name | Type | In | Required | Description |
|---|---|---|---|---|
accept |
string | header | no | Setting to application/vnd.daw+json is recommended. |
content-type |
string | header | yes | Set to application/json. |
name |
string | body | yes | Unique project name. |
description |
string | body | yes | Project description. |
states |
array of strings | body | yes | Possible states for all of the project's issues. |
initialState |
string | body | yes | Initial state for all of the project's issues. |
statesTransitions |
array of strings | body | yes | Each pair of entries in the array should be a state transition. |
labels |
array of strings | body | yes | Possible labels for all of the project's issues. |
{
"name": "DAW Project",
"description": "DAW Project description",
"labels": ["exploration", "new-functionality"],
"states": ["todo", "wip", "closed", "archived"],
"initialState": "todo",
"statesTransitions": ["todo", "wip", "wip", "closed", "closed", "archived"]
}Status: 201 Created
Location: /projects/{projectId}{
"class": [ "project" ],
"properties": {
"id": 1,
"name": "DAW Project",
"description": "DAW Project description",
"labels": [
{ "id": 1, "name": "exploration" },
{ "id": 2, "name": "new-functionality" }
],
"states": [
{ "id": 1, "name": "todo" },
{ "id": 2, "name": "wip" },
{ "id": 3, "name": "closed" },
{ "id": 4, "name": "archived" }
],
"initialState": { "id": 1, "name": "todo" },
"statesTransitions": [
{ "id": 1, "name": "todo" },
{ "id": 2, "name": "wip" },
{ "id": 2, "name": "wip" },
{ "id": 3, "name": "closed" },
{ "id": 3, "name": "closed" },
{ "id": 4, "name": "archived" }
]
},
"entities": [
{
"class": [ "user" ],
"rel": [ "author" ],
"properties": {
"id": "cf128ed3-0d65-42d9-8c96-8ff2e05b3d08",
"name": "José Bonifácio",
"email": "joca@gmail.com"
},
"links": [
{ "rel": [ "self" ], "href": "/user" }
]
}
],
"links": [
{ "rel": [ "self" ], "href": "/projects/1" }
]
}Status: 400 Bad RequestStatus: 401 UnauthorizedGet a certain project.
GET /projects/{projectId}| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId |
integer | path | yes | Identifier of the project. |
accept |
string | header | no | Setting to application/vnd.daw+json is recommended. |
page |
integer | query | no | Page number of the results to fetch. Default: 0 |
Status: 200 OK {
"class": [ "project" ],
"properties": {
"id": 1,
"name": "DAW Project",
"description": "DAW Project description"
},
"entities": [
{
"class": [ "issue", "collection" ],
"rel": [ "project-issues" ],
"properties": {
"pageIndex": 0,
"pageSize": 1,
"collectionSize": 1
},
"entities": [
{
"class": [ "issue" ],
"rel": [ "item" ],
"properties": {
"id": 1,
"name": "Issue1",
"labels": ["new-functionality"],
"state": "closed"
},
"links": [
{ "rel": [ "self" ], "href": "/projects/1/issues/1" }
]
}
],
"actions": [
{
"name": "create-issue",
"title": "Create an issue",
"method": "POST",
"href": "/projects/1/issues",
"type": "application/json",
"properties": [
{ "name": "name", "type": "string" },
{ "name": "description", "type": "string" },
{ "name": "labels", "type": "array", "itemsType": "number", "required": false }
]
}
],
"links": [
{ "rel": [ "self" ], "href": "/projects/1/issues?page=0" }
]
},
{
"class": [ "user" ],
"rel": [ "author" ],
"properties": {
"id": "cf128ed3-0d65-42d9-8c96-8ff2e05b3d08",
"name": "José Bonifácio",
"email": "joca@gmail.com"
},
"links": [
{ "rel": [ "self" ], "href": "/user" }
]
}
],
"actions": [
{
"name": "delete-project",
"title": "Delete project",
"method": "DELETE",
"href": "/projects/1"
},
{
"name": "edit-project",
"title": "Edit project",
"method": "PUT",
"href": "/projects/1",
"type": "application/json",
"properties": [
{ "name": "name", "type": "string" },
{ "name": "description", "type": "string" }
]
}
],
"links": [
{ "rel": [ "self" ], "href": "/projects/1" },
]
}Status: 400 Bad RequestStatus: 401 UnauthorizedStatus: 404 Not FoundUpdate the characterization of a certain project.
PUT /projects/{projectId}| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId |
integer | path | yes | Identifier of the project. |
accept |
string | header | no | Setting to application/vnd.daw+json is recommended. |
content-type |
string | header | yes | Set to application/json. |
name |
string | body | no | New name for the project. |
description |
string | body | no | New description for the project. |
Notice: At least one of the body parameters should be inserted.
Status: 200 OK {
"class": [ "project" ],
"properties": {
"id": 1,
"name": "DAW Project updated",
"description": "DAW Project description updated"
},
"entities": [
{
"class": [ "user" ],
"rel": [ "author" ],
"properties": {
"id": "cf128ed3-0d65-42d9-8c96-8ff2e05b3d08",
"name": "José Bonifácio",
"email": "joca@gmail.com"
},
"links": [
{ "rel": [ "self" ], "href": "/user" }
]
}
],
"links": [
{ "rel": [ "self" ], "href": "/projects/1" }
]
}Status: 400 Bad RequestStatus: 401 UnauthorizedStatus: 404 Not FoundDelete a certain project.
DELETE /projects/{projectId}| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId |
integer | path | yes | Identifier of the project. |
accept |
string | header | no | Setting to application/vnd.daw+json is recommended. |
Status: 200 OK {
"class": [ "project" ],
"properties": {
"id": 1,
"name": "DAW Project",
"description": "DAW Project description"
},
"entities": [
{
"class": [ "user" ],
"rel": [ "author" ],
"properties": {
"id": "cf128ed3-0d65-42d9-8c96-8ff2e05b3d08",
"name": "José Bonifácio",
"email": "joca@gmail.com"
},
"links": [
{ "rel": [ "self" ], "href": "/user" }
]
}
],
"links": [
{ "rel": [ "self" ], "href": "/projects/1" },
{ "rel": [ "projects" ], "href": "/projects" }
]
}Status: 400 Bad RequestStatus: 401 UnauthorizedStatus: 404 Not FoundAdd a new label to a certain project.
PUT /projects/{projectId}/labels| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId |
integer | path | yes | Identifier of the project. |
accept |
string | header | no | Setting to application/vnd.daw+json is recommended. |
content-type |
string | header | yes | Set to application/json. |
labels |
array of strings | body | yes | New labels to add to the project. |
Status: 200 OK{
"class": [ "project" ],
"properties": {
"id": 1,
"name": "DAW Project",
"description": "DAW Project description",
"labels": [
{ "id": 1, "name": "exploration" },
{ "id": 2, "name": "new-functionality" },
{ "id": 3, "name": "new-label" }
]
},
"entities": [
{
"class": [ "user" ],
"rel": [ "author" ],
"properties": {
"id": "cf128ed3-0d65-42d9-8c96-8ff2e05b3d08",
"name": "José Bonifácio",
"email": "joca@gmail.com"
},
"links": [
{ "rel": [ "self" ], "href": "/user" }
]
}
],
"links": [
{ "rel": [ "self" ], "href": "/projects/1" }
]
}Status: 400 Bad RequestStatus: 401 UnauthorizedStatus: 404 Not Found| Name | Type | Description |
|---|---|---|
id |
integer | Unique and stable identifier of the project. |
name |
string | Unique name of the project. |
description |
string | Description of the project. |
labels |
array of objects | Possible labels for all the project issues. The objects are composed by two properties: the id and the name of the label. |
states |
array of objects | Possible states for all the project issues. The objects are composed by two properties: the id and the name of the state. |
initialState |
integer | Initial state for all the project issues. The integer correspond to the state id. |
statesTransitions |
array of integers | Each pair of entries in the array is a state transition, in which the integers correspond to the states ids. |
| Name | Description |
|---|---|
project-issues |
Set of issues that belong to a project. |
projects |
Representation of all the projects owned by the authenticated user. |
The documentation for the media-type, classes, standard link relations and generic errors used in the representations are described here.