The Jira Cloud platform REST API
generated from the following openapi spec:
- v2: swagger spec
- v3: swagger spec
Jira Cloud platform REST API documentation
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>io.coscene</groupId>
<artifactId>jira-openapi-java-client</artifactId>
<version>${jiraClientVersion}</version>
</dependency>
Add this dependency to your project's build file:
repositories {
maven {
name = "jira-java-openapi-client"
url = uri("https://maven.pkg.github.com/coscene-io/jira-openapi-java-client")
credentials {
// Github username
username = ghUsername
// Github PAT
password = ghPassword
}
content {
includeGroup "io.coscene"
}
}
}
dependencies {
implementation "io.coscene:jira-openapi-java-client:${jiraClientVersion}"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/jira-openapi-java-client-${version}.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import io.coscene.jira.client.v3.ApiClient;
import io.coscene.jira.client.v3.ApiException;
import io.coscene.jira.client.v3.Configuration;
import io.coscene.jira.client.v3.auth.*;
import org.openapitools.client.models.*;
import io.coscene.jira.client.v3.api.AnnouncementBannerApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-domain.atlassian.net");
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
AnnouncementBannerApi apiInstance = new AnnouncementBannerApi(defaultClient);
try {
AnnouncementBannerConfiguration result = apiInstance.getBanner();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementBannerApi#getBanner");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Authentication schemes defined for the API:
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://auth.atlassian.com/authorize
- Scopes:
- read:jira-user: View user information in Jira that you have access to, including usernames, email addresses, and avatars.
- read:jira-work: Read project and issue data. Search for issues and objects associated with issues (such as attachments and worklogs).
- write:jira-work: Create and edit issues in Jira, post comments, create worklogs, and delete issues.
- manage:jira-project: Create and edit project settings and create new project-level objects, for example, versions, components.
- manage:jira-configuration: Configure Jira settings that require the Jira administrators permission, for example, create projects and custom fields, view workflows, manage issue link types.
- manage:jira-webhook: Manage Jira webhooks. Enables an OAuth app to register and unregister dynamic webhooks in Jira. It also provides for fetching of registered webhooks.
- read:application-role:jira: View application roles.
- read:audit-log:jira: View audit logs.
- read:avatar:jira: View system and custom avatars.
- write:avatar:jira: Create and update system and custom avatars.
- delete:avatar:jira: Delete system and custom avatars.
- read:project.avatar:jira: Read project avatars.
- write:project.avatar:jira: Create and update project avatars.
- delete:project.avatar:jira: Delete project avatars.
- read:dashboard:jira: View dashboards.
- write:dashboard:jira: Create and update dashboards.
- delete:dashboard:jira: Delete dashboards.
- read:dashboard.property:jira: View dashboard properties.
- write:dashboard.property:jira: Create and update dashboard properties.
- delete:dashboard.property:jira: Delete dashboard properties.
- read:filter:jira: View filters.
- write:filter:jira: Create and update filters.
- delete:filter:jira: Delete filters.
- read:filter.column:jira: View filter columns.
- write:filter.column:jira: Create and update filter columns.
- delete:filter.column:jira: Delete filter columns.
- read:filter.default-share-scope:jira: View filter default share scopes.
- write:filter.default-share-scope:jira: Create and update filter default share scopes.
- read:group:jira: View user groups.
- write:group:jira: Create and update user groups.
- delete:group:jira: Delete user groups.
- read:license:jira: View licenses.
- read:issue:jira: View issues.
- write:issue:jira: Create and update issues.
- delete:issue:jira: Delete issues.
- read:issue-meta:jira: View issue meta.
- send:notification:jira: Send notifications.
- read:attachment:jira: View issue attachments.
- write:attachment:jira: Create and update issue attachments.
- delete:attachment:jira: Delete issue attachments.
- read:comment:jira: View issue comments.
- write:comment:jira: Create and update issue comments.
- delete:comment:jira: Delete issue comments.
- read:comment.property:jira: View issue comment properties.
- write:comment.property:jira: Create and update issue comment properties.
- delete:comment.property:jira: Delete issue comment properties.
- read:field:jira: View fields.
- write:field:jira: Create and update fields.
- delete:field:jira: Delete fields.
- read:field.default-value:jira: View field default values.
- write:field.default-value:jira: Create and update field default values.
- read:field.option:jira: View field options.
- write:field.option:jira: Create and update field options.
- delete:field.option:jira: Delete field options.
- read:field-configuration-scheme:jira: View field configuration schemes.
- write:field-configuration-scheme:jira: Create and update field configuration schemes.
- delete:field-configuration-scheme:jira: Delete field configuration schemes.
- read:custom-field-contextual-configuration:jira: Read custom field contextual configurations.
- write:custom-field-contextual-configuration:jira: Save custom field contextual configurations.
- read:field-configuration:jira: Read field configurations.
- write:field-configuration:jira: Save field configurations.
- delete:field-configuration:jira: Delete field configurations.
- read:field.options:jira: Read field options.
- read:issue-link:jira: View issue links.
- write:issue-link:jira: Create and update issue links.
- delete:issue-link:jira: Delete issue links.
- read:issue-link-type:jira: View issue link types.
- write:issue-link-type:jira: Create and update issue link types.
- delete:issue-link-type:jira: Delete issue link types.
- read:notification-scheme:jira: View notification schemes.
- read:priority:jira: View priorities.
- read:issue.property:jira: View issue properties.
- write:issue.property:jira: Create and update issue properties.
- delete:issue.property:jira: Delete issue properties.
- read:issue.remote-link:jira: View issue remote links.
- write:issue.remote-link:jira: Create and update issue remote links.
- delete:issue.remote-link:jira: Delete issue remote links.
- read:resolution:jira: View resolutions.
- read:issue-details:jira: View issue details.
- read:issue-security-scheme:jira: View issue security schemes.
- read:issue-type:jira: View issue types.
- write:issue-type:jira: Create and update issue types.
- delete:issue-type:jira: Delete issue types.
- read:issue-type-scheme:jira: View issue type schemes.
- write:issue-type-scheme:jira: Create and update issue type schemes.
- delete:issue-type-scheme:jira: Delete issue type schemes.
- read:issue-type-screen-scheme:jira: View issue type screen schemes.
- write:issue-type-screen-scheme:jira: Create and update issue type screen schemes.
- delete:issue-type-screen-scheme:jira: Delete issue type screen schemes.
- read:issue-type.property:jira: View issue type properties.
- write:issue-type.property:jira: Create and update issue type properties.
- delete:issue-type.property:jira: Delete issue type properties.
- read:issue.watcher:jira: View issue watchers.
- write:issue.watcher:jira: Create and update issue watchers.
- read:issue-worklog:jira: View issue worklogs.
- write:issue-worklog:jira: Create and update issue worklogs.
- delete:issue-worklog:jira: Delete issue worklogs.
- read:issue-worklog.property:jira: View issue worklog properties.
- write:issue-worklog.property:jira: Create and update issue worklog properties.
- delete:issue-worklog.property:jira: Delete issue worklog properties.
- read:issue-field-values:jira: View issue field valueses.
- read:issue-security-level:jira: View issue security levels.
- read:issue-status:jira: View issue statuses.
- read:issue-type-hierarchy:jira: Read issue type hierarchies.
- read:issue.changelog:jira: View issue changelogs.
- read:issue.transition:jira: View issue transitions.
- read:issue.vote:jira: View issue votes.
- write:issue.vote:jira: Create and update issue votes.
- read:issue.votes:jira: View issue voteses.
- read:issue-event:jira: Read issue events.
- read:jira-expressions:jira: View jira expressions.
- read:user:jira: View users.
- read:user.columns:jira: View user columnses.
- read:label:jira: View labels.
- read:permission:jira: View permissions.
- write:permission:jira: Create and update permissions.
- delete:permission:jira: Delete permissions.
- read:permission-scheme:jira: View permission schemes.
- write:permission-scheme:jira: Create and update permission schemes.
- delete:permission-scheme:jira: Delete permission schemes.
- read:project:jira: View projects.
- write:project:jira: Create and update projects.
- delete:project:jira: Delete projects and their details, such as issue types, project lead, and avatars.
- read:project-category:jira: View project categories.
- write:project-category:jira: Create and update project categories.
- delete:project-category:jira: Delete project categories.
- read:project.component:jira: View project components.
- write:project.component:jira: Create and update project components.
- delete:project.component:jira: Delete project components.
- read:project.property:jira: View project properties.
- write:project.property:jira: Create and update project properties.
- delete:project.property:jira: Delete project properties.
- read:project-role:jira: View project roles.
- write:project-role:jira: Create and update project roles.
- delete:project-role:jira: Delete project roles.
- read:project-version:jira: View project versions.
- write:project-version:jira: Create and update project versions.
- delete:project-version:jira: Delete project versions.
- read:project.feature:jira: Read project features.
- write:project.feature:jira: Save project features.
- read:screen:jira: View screens.
- write:screen:jira: Create and update screens.
- delete:screen:jira: Delete screens.
- read:screen-scheme:jira: View screen schemes.
- write:screen-scheme:jira: Create and update screen schemes.
- delete:screen-scheme:jira: Delete screen schemes.
- read:screen-field:jira: View screen fields.
- read:screen-tab:jira: View screen tabs.
- write:screen-tab:jira: Create and update screen tabs.
- delete:screen-tab:jira: Delete screen tabs.
- read:screenable-field:jira: View screenable fields.
- write:screenable-field:jira: Create and update screenable fields.
- delete:screenable-field:jira: Delete screenable fields.
- read:issue.time-tracking:jira: View issue time trackings.
- write:issue.time-tracking:jira: Create and update issue time trackings.
- read:user.property:jira: View user properties.
- write:user.property:jira: Create and update user properties.
- delete:user.property:jira: Delete user properties.
- read:webhook:jira: View webhooks.
- write:webhook:jira: Create and update webhooks.
- delete:webhook:jira: Delete webhooks.
- read:workflow:jira: View workflows.
- write:workflow:jira: Create and update workflows.
- delete:workflow:jira: Delete workflows.
- read:workflow-scheme:jira: View workflow schemes.
- write:workflow-scheme:jira: Create and update workflow schemes.
- delete:workflow-scheme:jira: Delete workflow schemes.
- read:status:jira: View statuses.
- read:workflow.property:jira: View workflow properties.
- write:workflow.property:jira: Create and update workflow properties.
- delete:workflow.property:jira: Delete workflow properties.
- delete:async-task:jira: Delete asynchronous task.
- read:instance-configuration:jira: View instance configurations.
- write:instance-configuration:jira: Create and update instance configurations.
- read:jql:jira: View JQL.
- validate:jql:jira: Validate JQL.
- read:project-type:jira: View project types.
- read:project.email:jira: View project emails.
- write:project.email:jira: Create and update project emails.
- read:role:jira: View roles.
- read:user-configuration:jira: View user configurations.
- write:user-configuration:jira: Create and update user configurations.
- delete:user-configuration:jira: Delete user configurations.
- Type: HTTP basic authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to
avoid any potential issues.