๐Introduction
Last updated
Last updated
go-atlassian is a Go library that provides a simple and convenient way to interact with various Atlassian products' REST APIs. Atlassian is a leading provider of software and tools for software development, project management, and collaboration. Some of the products that go-atlassian supports include Jira, Confluence, Jira Service Management, and more.
The go-atlassian library is designed to simplify the process of building Go applications that interact with Atlassian products. It provides a set of functions and data structures that can be used to easily send HTTP requests to the Atlassian APIs, parse the responses, and work with the data returned.
Easy-to-use functions and data structures that abstract away much of the complexity of working with the APIs.
Comprehensive support for various Atlassian products' APIs.
Support for common operations like creating, updating, and deleting entities in Atlassian products.
Active development and maintenance by the community, with regular updates and bug fixes.
Comprehensive documentation and examples to help developers get started with using the library.
If you do not have Go installed yet, you can find installation instructions here. Please note that the package requires Go version 1.17 or later for module support.
To pull the most recent version of go-atlassian, use go get
.
Then import the package into your project as you normally would. You can import the following packages:
Module | Path | URL's |
---|---|---|
Jira v2 |
| |
Jira v3 |
| |
Jira Software Agile |
| |
Jira Service Management |
| |
Jira Assets |
| |
Confluence |
| |
Confluence v2 |
| |
Admin Cloud |
|
Before using the go-atlassian package, you need to have an Atlassian API key. If you do not have a key yet, you can sign up here.
Create a client with your instance host and access token to start communicating with the Atlassian API's. In this example, we're going to instance a new Confluence Cloud client.
If you need to use a preconfigured HTTP client, simply pass its address to the New
function.
For detailed examples and usage of the go-atlassian library, please refer to our Cookbook. This section provides step-by-step guides and code samples for common tasks and scenarios.
The library uses the services interfaces to provide a modular and flexible way to interact with Atlassian products' REST APIs. It defines a set of services interfaces that define the functionality of each API, and then provides implementations of those interfaces that can be used to interact with the APIs.
Each service interface includes a set of methods that correspond to the available endpoints in the corresponding API. For example, the IssueService
interface includes methods like Create
, Update
, and Get
that correspond to the POST
, PUT
, and GET
endpoints in the Jira Issues API.
Behind the scenes, the Create
method on the IssueService
interface is implemented by the issueService.Create
function in the go-atlassian library. This function sends an HTTP request to the relevant endpoint in the Jira Issues API, using the credentials and configuration provided by the client, and then parses the response into a usable format.
Here's a little example about how to get the issue transitions using the Issue service.
The rest of the service functions work much the same way; they are concise and behave as you would expect. The documentation contains several examples on how to use each service function.
If you would like to contribute to this project, please adhere to the following guidelines.
Submit an issue describing the problem.
Fork the repo and add your contribution.
Follow the basic Go conventions found here.
Create a pull request with a description of your changes.
Again, contributions are greatly appreciated!
The project was created with the purpose to provide a unique point to provide an interface for interacting with Atlassian products.
This module is highly inspired by the Go library https://github.com/andygrunwald/go-jira but focused on Cloud solutions.
The library shares many similarities with go-jira, including its use of service interfaces to define the functionality of each API, its modular and flexible approach to working with Atlassian products' API's. However, go-atlassian also adds several new features and improvements that are not present in go-jira.
Despite these differences, go-atlassian remains heavily inspired by go-jira, and many of the core design principles and patterns used in go-jira can be found in go-atlassian as well.
Copyright ยฉ 2024 Carlos Treminio. This project is MIT licensed.
We would like to extend our sincere thanks to the following sponsors for their generous support:
Atlassian for providing us Atlassian Admin/Jira/Confluence Standard licenses.
GitBook for providing us non-profit / open-source plan so hence I would like to express my thanks here.