public class ProjectApi extends Object
| Constructor and Description |
|---|
ProjectApi(org.everit.http.restclient.RestClient restClient) |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Single<ProjectIdentifiers> |
createProject(ProjectInputBean projectInputBean,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Create project
Creates a project based on a project type template, as shown in the following table: Project Type Key Project Template Key
business com.atlassian.jira-core-project-templates:jira-core-simplified-content-management, com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval, com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking, com.atlassian.jira-core-project-templates:jira-core-simplified-process-control, com.atlassian.jira-core-project-templates:jira-core-simplified-procurement, com.atlassian.jira-core-project-templates:jira-core-simplified-project-management, com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment, com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking service_desk com.atlassian.servicedesk:simplified-it-service-desk, com.atlassian.servicedesk:simplified-internal-service-desk, com.atlassian.servicedesk:simplified-external-service-desk software com.pyxis.greenhopper.jira:gh-simplified-agility-kanban, com.pyxis.greenhopper.jira:gh-simplified-agility-scrum, com.pyxis.greenhopper.jira:gh-simplified-basic, com.pyxis.greenhopper.jira:gh-simplified-kanban-classic, com.pyxis.greenhopper.jira:gh-simplified-scrum-classic The project types are available according to the installed Jira features as follows: Jira Core, the default, enables business projects. |
io.reactivex.Single<Avatar> |
createProjectAvatar(String projectIdOrKey,
Object body,
Optional<Integer> x,
Optional<Integer> y,
Optional<Integer> size,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Load project avatar
Loads an avatar for a project.
|
io.reactivex.Completable |
deleteProject(String projectIdOrKey,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Delete project
Deletes a project.
|
io.reactivex.Completable |
deleteProjectAvatar(String projectIdOrKey,
Long id,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Delete project avatar
Deletes a custom avatar from a project.
|
io.reactivex.Single<ProjectAvatars> |
getAllProjectAvatars(String projectIdOrKey,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get all project avatars
Returns all project avatars, grouped by system and custom avatars.
|
io.reactivex.Single<List<Project>> |
getAllProjects(Optional<String> expand,
Optional<Integer> recent,
Optional<List<String>> properties,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deprecated.
|
io.reactivex.Single<List<IssueTypeWithStatus>> |
getAllStatuses(String projectIdOrKey,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get all statuses for project
Returns the valid statuses for a project.
|
io.reactivex.Single<Project> |
getProject(String projectIdOrKey,
Optional<String> expand,
Optional<List<String>> properties,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get project
Returns the project details for a project.
|
io.reactivex.Single<List<Component>> |
getProjectComponents(String projectIdOrKey,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get project components
Returns all components in a project.
|
io.reactivex.Single<PageBeanComponentWithIssueCount> |
getProjectComponentsPaginated(String projectIdOrKey,
Optional<Long> startAt,
Optional<Integer> maxResults,
Optional<String> orderBy,
Optional<String> query,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get project components paginated
Returns a paginated representation of all components in a project.
|
io.reactivex.Single<List<Version>> |
getProjectVersions(String projectIdOrKey,
Optional<String> expand,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get project versions
Returns all versions in a project.
|
io.reactivex.Single<PageBeanVersion> |
getProjectVersionsPaginated(String projectIdOrKey,
Optional<Long> startAt,
Optional<Integer> maxResults,
Optional<String> orderBy,
Optional<String> query,
Optional<String> status,
Optional<String> expand,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get project versions paginated
Returns a paginated representation of all versions in a project.
|
io.reactivex.Single<PageBeanProject> |
searchProjects(Optional<Long> startAt,
Optional<Integer> maxResults,
Optional<String> orderBy,
Optional<String> query,
Optional<String> typeKey,
Optional<Long> categoryId,
Optional<String> searchBy,
Optional<String> action,
Optional<String> expand,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Get projects paginated
Returns projects visible to the user.
|
io.reactivex.Single<Project> |
updateProject(String projectIdOrKey,
ProjectInputBean projectInputBean,
Optional<String> expand,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Update project
Updates the project details of a project.
|
io.reactivex.Single<Object> |
updateProjectAvatar(String projectIdOrKey,
Avatar avatar,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Set project avatar
Sets the avatar displayed for a project.
|
io.reactivex.Single<Project> |
updateProjectType(String projectIdOrKey,
String newProjectTypeKey,
Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deprecated.
|
public io.reactivex.Single<ProjectIdentifiers> createProject(ProjectInputBean projectInputBean, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Creates a project based on a project type template, as shown in the following table:
| Project Type Key | Project Template Key |
|---|---|
business | com.atlassian.jira-core-project-templates:jira-core-simplified-content-management, com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval, com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking, com.atlassian.jira-core-project-templates:jira-core-simplified-process-control, com.atlassian.jira-core-project-templates:jira-core-simplified-procurement, com.atlassian.jira-core-project-templates:jira-core-simplified-project-management, com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment, com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking |
service_desk | com.atlassian.servicedesk:simplified-it-service-desk, com.atlassian.servicedesk:simplified-internal-service-desk, com.atlassian.servicedesk:simplified-external-service-desk |
software | com.pyxis.greenhopper.jira:gh-simplified-agility-kanban, com.pyxis.greenhopper.jira:gh-simplified-agility-scrum, com.pyxis.greenhopper.jira:gh-simplified-basic, com.pyxis.greenhopper.jira:gh-simplified-kanban-classic, com.pyxis.greenhopper.jira:gh-simplified-scrum-classic |
The project types are available according to the installed Jira features as follows:
business projects.service_desk projects.software projects.To determine which features are installed, go to Jira settings > Apps > Manage apps and review the System Apps list. To add JIRA Software or JIRA Service Desk into a JIRA instance, use Jira settings > Apps > Finding new apps. For more information, see Managing add-ons.
Permissions required: Administer Jira global permission.
projectInputBean - The JSON representation of the project being created.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<Avatar> createProjectAvatar(String projectIdOrKey, Object body, Optional<Integer> x, Optional<Integer> y, Optional<Integer> size, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Loads an avatar for a project.
Specify the avatar's local file location in the body of the request. Also, include the following headers:
X-Atlassian-Token: no-check To prevent XSRF protection blocking the request, for more information see Special Headers.Content-Type: image/image type Valid image types are JPEG, GIF, or PNG.For example:
curl --request POST
--user email@example.com:<api_token>
--header 'X-Atlassian-Token: no-check'
--header 'Content-Type: image/< image_type>'
--data-binary "<@/path/to/file/with/your/avatar>"
--url 'https://your-domain.atlassian.net/rest/api/3/project/{projectIdOrKey}/avatar2'
The avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image.
The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size.
After creating the avatar use Set project avatar to set it as the project's displayed avatar.
Permissions required: Administer projects project permission.
projectIdOrKey - The ID or (case-sensitive) key of the project.
(required)body - (required)x - The X coordinate of the top-left corner of the crop region.
(optional, default to 0)y - The Y coordinate of the top-left corner of the crop region.
(optional, default to 0)size - The length of each side of the crop region.
(optional)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Completable deleteProject(String projectIdOrKey, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deletes a project.
Permissions required: Administer Jira global permission.
projectIdOrKey - The project ID or project key (case sensitive).
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Completable deleteProjectAvatar(String projectIdOrKey, Long id, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deletes a custom avatar from a project. Note that system avatars cannot be deleted.
Permissions required: Administer projects project permission.
projectIdOrKey - The project ID or (case-sensitive) key.
(required)id - The ID of the avatar.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<ProjectAvatars> getAllProjectAvatars(String projectIdOrKey, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns all project avatars, grouped by system and custom avatars.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for the project.
projectIdOrKey - The ID or (case-sensitive) key of the project.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
@Deprecated public io.reactivex.Single<List<Project>> getAllProjects(Optional<String> expand, Optional<Integer> recent, Optional<List<String>> properties, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns all projects visible to the user. Deprecated, use Get projects paginated that supports search and pagination.
This operation can be accessed anonymously.
Permissions required: Projects are returned only where the user has Browse Projects or Administer projects project permission for the project.
expand - Use expand to include additional information in the response. This parameter accepts multiple values separated by a comma:
description Returns the project description.issueTypes Returns all issue types associated with the project.lead Returns information about the the project lead.projectKeys Returns all project keys associated with the project.recent - Returns the user's most recently accessed projects. You may specify the number of results to return up to a maximum of 20. If access is anonymous, then the recently accessed projects are based on the current HTTP session.
(optional)properties - A comma-separated list of project properties to return for the project.
(optional, default to new ArrayList<>())restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<IssueTypeWithStatus>> getAllStatuses(String projectIdOrKey, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns the valid statuses for a project. The statuses are grouped by issue type, as each project has a set of valid issue types and each issue type has a set of valid statuses.
This operation can be accessed anonymously.
Permissions required: Browse Projects project permission for the project.
projectIdOrKey - The project ID or project key (case sensitive).
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<Project> getProject(String projectIdOrKey, Optional<String> expand, Optional<List<String>> properties, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns the project details for a project.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission for the project.
projectIdOrKey - The project ID or project key (case sensitive).
(required)expand - Use expand to include additional information in the response. This parameter accepts multiple values separated by a comma. Note that the project description, issue types, and project lead are included in all responses by default:
description The project description.issueTypes The issue types associated with the project.lead The project lead.projectKeys All project keys associated with the project.issueTypeHierarchy The project issue type hierarchy.properties - A comma-separated list of project properties to return for the project.
(optional, default to new ArrayList<>())restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<Component>> getProjectComponents(String projectIdOrKey, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns all components in a project. See the Get project components paginated resource if you want to get a full list of components with pagination.
This operation can be accessed anonymously.
Permissions required: Browse Projects project permission for the project.
projectIdOrKey - The project ID or project key (case sensitive).
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<PageBeanComponentWithIssueCount> getProjectComponentsPaginated(String projectIdOrKey, Optional<Long> startAt, Optional<Integer> maxResults, Optional<String> orderBy, Optional<String> query, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a paginated representation of all components in a project. See the Get project components resource if you want to get a full list of versions without pagination.
This operation can be accessed anonymously.
Permissions required: Browse Projects project permission for the project.
projectIdOrKey - The project ID or project key (case sensitive).
(required)startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0l)maxResults - The maximum number of items to return per page. The maximum is 50.
orderBy - Order the results by a field:
description Sorts components in alphabetical order by description.issueCount Sorts components by the count of issues associated with the component in ascending order.lead Sorts by the project lead's user key in alphabetical order.name Sorts components in alphabetical order by component name.query - Filter the results using a literal string. Components with a matching name or description are returned (case insensitive).
restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<List<Version>> getProjectVersions(String projectIdOrKey, Optional<String> expand, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns all versions in a project. The response is not paginated. Use Get project versions paginated if you want to get the versions in a project with pagination.
This operation can be accessed anonymously.
Permissions required: Browse Projects project permission for the project.
projectIdOrKey - The project ID or project key (case sensitive).
(required)expand - Use expand to include additional information in the response. This parameter accepts multiple values separated by a comma:
operations Returns actions that can be performed on the specified version.restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<PageBeanVersion> getProjectVersionsPaginated(String projectIdOrKey, Optional<Long> startAt, Optional<Integer> maxResults, Optional<String> orderBy, Optional<String> query, Optional<String> status, Optional<String> expand, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns a paginated representation of all versions in a project. See the Get project versions resource if you want to get a full list of versions without pagination.
This operation can be accessed anonymously.
Permissions required: Browse Projects project permission for the project.
projectIdOrKey - The project ID or project key (case sensitive).
(required)startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0l)maxResults - The maximum number of items to return per page. The maximum is 50.
orderBy - Order the results by a field:
description Sorts versions in alphabetical order by description.name Sorts versions in alphabetical order by version name.releaseDate Sorts versions in order by release date, starting with the oldest date. Versions with no release date are listed last.sequence Sorts versions by the order of appearance in the user interface.startDate Sorts versions in order by start date, starting with the oldest date. Versions with no start date are listed last.query - Filter the results using a literal string. Versions with matching name or description are returned (case insensitive).
status - A comma-separated list of status values used to filter the results by version status. The status values are released, unreleased, and archived.
expand - Use expand to include additional information in the response. This parameter accepts multiple values separated by a comma:
issuesstatus Returns the number of issues in each status category for each version.operations Returns actions that can be performed on the specified version.restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<PageBeanProject> searchProjects(Optional<Long> startAt, Optional<Integer> maxResults, Optional<String> orderBy, Optional<String> query, Optional<String> typeKey, Optional<Long> categoryId, Optional<String> searchBy, Optional<String> action, Optional<String> expand, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Returns projects visible to the user.
This operation can be accessed anonymously.
Permissions required: Projects are returned only where the user has Browse Projects project permission for the project.
startAt - The index of the first item to return in a page of results (page offset).
(optional, default to 0l)maxResults - The maximum number of items to return per page. The maximum is 50.
orderBy - Order the results by a field. If the orderBy field is not set, then projects are listed in ascending order by project key:
category Sorts projects in order by project category. A complete list of category IDs is found using the Get all project categories operation.key Sorts projects in order by project key.name Sorts projects in alphabetical order by project name.owner Sorts projects in order by the project lead.query - Filter the results using a literal string. Projects with a matching key or name are returned (case insensitive).
typeKey - Orders results by the project type. This parameter accepts multiple values separated by a comma. Valid values are business, service_desk, and software.
categoryId - The ID of the project's category. A complete list of category IDs is found using the Get all project categories operation.
(optional)searchBy - (optional, default to "key, name")action - Filter results by projects for which the user can:
view the project, meaning that they have one of the following permissions:
browse the project, meaning that they have the Browse projects project permission for the project.
edit the project, meaning that they have one of the following permissions:
expand - Use expand to include additional information in the response. This parameter accepts multiple values separated by a comma:
description Returns the project description.projectKeys Returns all project keys associated with a project.lead Returns information about the the project lead.issueTypes Returns all issue types associated with the project.url Returns the URL associated with the project.restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<Project> updateProject(String projectIdOrKey, ProjectInputBean projectInputBean, Optional<String> expand, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Updates the project details of a project.
All parameters are optional in the body of the request.
Permissions required: Administer Jira global permission.
projectIdOrKey - The project ID or project key (case sensitive).
(required)projectInputBean - The project details to be updated.
(required)expand - Use expand to include additional information in the response. This parameter accepts multiple values separated by a comma. Note that the project description, issue types, and project lead are included in all responses by default:
description The project description.issueTypes The issue types associated with the project.lead The project lead.projectKeys All project keys associated with the project.restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
public io.reactivex.Single<Object> updateProjectAvatar(String projectIdOrKey, Avatar avatar, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Sets the avatar displayed for a project.
Use Load project avatar to store avatars against the project, before using this operation to set the displayed avatar.
Permissions required: Administer projects project permission.
projectIdOrKey - The ID or (case-sensitive) key of the project.
(required)avatar - (required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
@Deprecated public io.reactivex.Single<Project> updateProjectType(String projectIdOrKey, String newProjectTypeKey, Optional<org.everit.http.restclient.RestRequestEnhancer> restRequestEnhancer)
Deprecated, this feature is no longer supported and no alternatives are available, see Convert project to a different template or type. Updates a project type. The project type can be updated for classic projects only, project type cannot be updated for next-gen projects.
Permissions required: Administer Jira global permission.
projectIdOrKey - The project ID or project key (case sensitive).
(required)newProjectTypeKey - The key of the new project type.
(required)restRequestEnhancer - Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.
Copyright © 2011–2021 Everit Kft.. All rights reserved.