https://github.com/virtomize/confluence-go-api
Rest api implementation in golang of atlassian's confluence wiki
https://github.com/virtomize/confluence-go-api
api-client client-library confluence golang golang-library
Last synced: about 2 months ago
JSON representation
Rest api implementation in golang of atlassian's confluence wiki
- Host: GitHub
- URL: https://github.com/virtomize/confluence-go-api
- Owner: Virtomize
- License: mit
- Created: 2018-06-15T08:46:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-20T07:52:15.000Z (6 months ago)
- Last Synced: 2025-04-04T09:04:10.121Z (about 2 months ago)
- Topics: api-client, client-library, confluence, golang, golang-library
- Language: Go
- Homepage:
- Size: 127 KB
- Stars: 135
- Watchers: 3
- Forks: 59
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# confluence-go-api
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VBXHBYFU44T5W&source=url)
[](https://godoc.org/github.com/virtomize/confluence-go-api)
[](https://goreportcard.com/report/github.com/virtomize/confluence-go-api)
[](https://github.com/virtomize/confluence-go-api/blob/master/LICENSE)
[](https://magefile.org)is a [Confluence](https://www.atlassian.com/software/confluence) REST API client implementation written in [GOLANG](https://golang.org).
## Supported Features
- get, update, delete content
- get, update, delete content templates and blueprints
- get comments, attachments, children of content objects, history, watchers
- get, add ,delete labels
- get user information
- search using [CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/)If you miss some feature implementation, feel free to open an issue or send pull requests. I will take look as soon as possible.
## Donation
If this project helps you, feel free to give us a cup of coffee :).[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VBXHBYFU44T5W&source=url)
## Installation
If you already installed GO on your system and configured it properly than its simply:
```
go get github.com/virtomize/confluence-go-api
```If not follow [these instructions](https://golang.org/doc/install)
## Usage
### Simple example
```
package mainimport (
"fmt"
"log""github.com/virtomize/confluence-go-api"
)func main() {
// initialize a new api instance
api, err := goconfluence.NewAPI("https://.atlassian.net/wiki/rest/api", "", "")
if err != nil {
log.Fatal(err)
}// get current user information
currentUser, err := api.CurrentUser()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", currentUser)
}
```### Using a Personal Access Token
To generate a confluence personal access token (PAT) see this article: [using personal access tokens](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html). Only set the token in the NewAPI function
```
api, err := goconfluence.NewAPI("https://.atlassian.net/wiki/rest/api", "", "")
```### Advanced examples
see [examples](https://github.com/virtomize/confluence-go-api/tree/master/examples) for some more usage examples
## Code Documentation
You find the full [code documentation here](https://godoc.org/github.com/virtomize/confluence-go-api).
The Confluence API documentation [can be found here](https://docs.atlassian.com/ConfluenceServer/rest/6.9.1/).
## Contribution
Thank you for participating to this project.
Please see our [Contribution Guidlines](https://github.com/virtomize/confluence-go-api/blob/master/CONTRIBUTING.md) for more information.### Pre-Commit
This repo uses [pre-commit hooks](https://pre-commit.com/). Please install pre-commit and do `pre-commit install`
### Conventional Commits
Format commit messaged according to [Conventional Commits standard](https://www.conventionalcommits.org/en/v1.0.0/).
### Semantic Versioning
Whenever you need to version something make use of [Semantic Versioning](https://semver.org).