Page cover

๐Ÿ–‡๏ธTypes

This resource represents issue link types. Use it to get, create, update, and delete link issue types as well as get lists of all link issue types.

GET /rest/api/{2-3}/issueLinkType

Returns a list of all issue link types, the method returns the following information:

package main

import (
	"context"
	"github.com/ctreminiom/go-atlassian/v2/jira/v2"
	"log"
	"os"
)

func main() {

	var (
		host  = os.Getenv("HOST")
		mail  = os.Getenv("MAIL")
		token = os.Getenv("TOKEN")
	)

	atlassian, err := v2.New(nil, host)
	if err != nil {
		log.Fatal(err)
	}

	atlassian.Auth.SetBasicAuth(mail, token)

	types, response, err := atlassian.Issue.Link.Type.Gets(context.Background())
	if err != nil {
		log.Fatal(err)
	}

	log.Println("HTTP Endpoint Used", response.Endpoint)

	for _, value := range types.IssueLinkTypes {
		log.Println(value)
	}

}

POST /rest/api/{2-3}/issueLinkType

Creates an issue link type. Use this operation to create descriptions of the reasons why issues are linked.

The issue link type consists of a name and descriptions for a link's inward and outward relationships, the method returns the following information:

GET /rest/api/{2-3}/issueLinkType/{issueLinkTypeId}

Returns an issue link type, the method returns the following information:

PUT /rest/api/{2-3}/issueLinkType/{issueLinkTypeId}

Updates an issue link type, the method returns the following information:

DELETE /rest/api/{2-3}/issueLinkType/{issueLinkTypeId}

Deletes an issue link type, the method returns the following information:

Last updated

Was this helpful?