Projects
This chapter focuses on project administration.
Bind custom field to project
A POST to /projects/{id}/custom-fields/{entity-type} bind custom field with the given id to given entity for given project.
HTTP request
POST /api/rest/latest/projects/14/custom-fields/REQUIREMENT_FOLDER HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
cufId=80
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
entity to bind (PROJECT,REQUIREMENT_FOLDER,CAMPAIGN_FOLDER,TESTCASE_FOLDER,CUSTOM_REPORT_FOLDER,CUSTOM_REPORT_PROJECT,TEST_CASE,TEST_STEP,CAMPAIGN,ITERATION,TEST_SUITE,REQUIREMENT_VERSION,EXECUTION,EXECUTION_STEP) |
Request parameters
| Parameter | Description |
|---|---|
|
the id of the custom-fields |
HTTP response
HTTP/1.1 200 OK
Unbind custom field to project
A DELETE to /projects/{id}/custom-fields/{entity-type} unbind custom field with the given id to given entity for given project.
HTTP request
DELETE /api/rest/latest/projects/14/custom-fields/REQUIREMENT_FOLDER HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
entity to bind (PROJECT,REQUIREMENT_FOLDER,CAMPAIGN_FOLDER,TESTCASE_FOLDER,CUSTOM_REPORT_FOLDER,CUSTOM_REPORT_PROJECT,TEST_CASE,TEST_STEP,CAMPAIGN,ITERATION,TEST_SUITE,REQUIREMENT_VERSION,EXECUTION,EXECUTION_STEP) |
Request parameters
| Parameter | Description |
|---|---|
|
the id of the custom-fields |
HTTP response
HTTP/1.1 204 No Content
Bind info list to project
A POST to projects/{id}/info-lists/{list-type} bind the info list with the given id to the given project.
HTTP request
POST /api/rest/latest/projects/14/info-lists/requirement-category HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
infolist-id=1
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
type of list to bind. list-type have 3 values : requirement-category, test-case-nature ou test-case-type |
Request parameters
| Parameter | Description |
|---|---|
|
the id of the info list |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 58
"infolist '1' bind to project 14 for requirement-category"
Bind milestones to a project
A POST to /projects/{id}/milestones associate a project with one or more milestones with the list of element IDs given in the request parameters.
To consult the milestones just follow the link "milestones".
HTTP request
POST /api/rest/latest/projects/14/milestones HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
milestoneIds=1
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Request parameters
| Parameter | Description |
|---|---|
|
the ids of the milestones |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 426
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"milestones" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/milestones"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to milestones associated with the project |
Get all milestones bound to a project
A GET to /projects/{id}/milestones to find all the milestones that are linked to a project
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/14/milestones HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
HTTP response
HTTP/1.1 200 OK
Content-Length: 1388
Content-Type: application/json;charset=UTF-8
{
"_embedded" : {
"milestones" : [ {
"_type" : "milestone",
"id" : 11,
"label" : "Milestone 1",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : null,
"description" : "example of milestone creation",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/11"
}
}
}, {
"_type" : "milestone",
"id" : 12,
"label" : "Milestone 2",
"status" : "PLANNED",
"end_date" : "2020-03-19T00:23:45.000+0000",
"range" : null,
"description" : "example of milestone creation number 2 ",
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+0000",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+0000",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/milestones/12"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/milestones?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Bind a bug tracker to a project
A POST to /projects/{id}/bug-trackers associate a project with the bug-tracker with the given id.
HTTP request
POST /api/rest/latest/projects/14/bug-trackers HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
bugtrackerId=1
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Request parameters
| Parameter | Description |
|---|---|
|
the id of the bug-tracker |
HTTP response
HTTP/1.1 200 OK
Content-Length: 419
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"bug-tracker" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the project |
|
|
the type of the entity |
|
|
the name of the project |
|
|
the label of the project |
|
|
the description of the project |
|
|
whether the project is active or not |
|
|
the attachments of the project |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the bug tracker of this project |
Unbind a bug tracker from a project
A DELETE to /projects/{id}/bug-tracker dissociate the project with given id from its bug tracker.
HTTP request
DELETE /api/rest/latest/projects/14/bug-tracker HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
}
Links
| Relation | Description |
|---|---|
|
link to this project |
Get the bug tracker bound to a project
A GET to projects/{id}/bug-trackers to find the bug-tracker linked to a project.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/1/bug-trackers HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
HTTP response
HTTP/1.1 200 OK
Content-Length: 325
Content-Type: application/json;charset=UTF-8
{
"_type" : "bug-tracker",
"id" : 3,
"name" : "bugtracker3",
"url" : "url3",
"kind" : "kind3",
"iframe_friendly" : false,
"authentication_policy" : "USER",
"authentication_protocol" : "BASIC_AUTH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/bug-trackers/3"
}
}
}
Bind a scm repository to a project
A POST to /projects/{id}/scm-repository associate the project with given id to the scm repository given as parameter.
HTTP request
POST /api/rest/latest/projects/14/scm-repository HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
scmRepositoryId=11
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Request parameters
| Parameter | Description |
|---|---|
|
the id of the scm repository |
HTTP response
HTTP/1.1 200 OK
Content-Length: 427
Content-Type: application/json;charset=UTF-8
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"scm-repository" : {
"href" : "http://localhost:8080/api/rest/latest/scm-repositories/11"
}
}
}
Links
| Relation | Description |
|---|---|
|
link to this project |
|
link to the scm repository of this project |
Unbind a scm repository from a project
A DELETE to /projects/{id}/scm-repository dissociate the project with given id from its scm repository.
HTTP request
DELETE /api/rest/latest/projects/14/scm-repository HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320
{
"_type" : "project",
"id" : 14,
"description" : "<p>This project is the main sample project</p>",
"label" : "Main Sample Project",
"name" : "sample project",
"active" : true,
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
}
}
}
Links
| Relation | Description |
|---|---|
|
link to this project |
Get project automation configuration
A GET to projects/{id}/automation-conf to find a project automation configuration.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
GET /api/rest/latest/projects/1/automation-conf HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 354
{
"_type" : "project-automation-configuration",
"bdd_implementation_technology" : "ROBOT",
"bdd_implementation_language" : "ENGLISH",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1/automation-conf"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this configuration |
|
link to the project |
Modify project automation configuration
A PATCH to projects/{id}/automation-conf modifies the automation configuration of the projet with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
HTTP request
PATCH /api/rest/latest/projects/1/automation-conf HTTP/1.1
Accept: application/json
Content-Length: 142
Content-Type: application/json
Host: localhost:8080
{
"_type" : "project-automation-configuration",
"bdd_implementation_technology" : "CUCUMBER",
"bdd_implementation_language" : "GERMAN"
}
Request fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 356
{
"_type" : "project-automation-configuration",
"bdd_implementation_technology" : "CUCUMBER",
"bdd_implementation_language" : "GERMAN",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1/automation-conf"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the technology used to implement bdd tests |
|
|
the language used to implement bdd tests |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this configuration |
|
link to the project |
Enable or disable plugin of project
A POST to projects/{id}/plugin/{pluginId}/activate activates or deactivates the plugin with the given id.
HTTP request
POST /api/rest/latest/projects/14/plugins/squash.tm.plugin.jirasync/activate?enabled=false&saveConfig=false HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
enabled=false&saveConfig=false
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the string corresponding to the id of the plugin to activate or deactivate |
Request parameters
| Parameter | Description |
|---|---|
|
true to activate the plugin, false to deactivate it |
|
only relevant when deactivating a plugin, set it to true if you want to keep your configuration |
HTTP response
HTTP/1.1 204 No Content