
๐Scheme
Gets Workflows Schemes
package main
import (
"context"
"fmt"
v3 "github.com/ctreminiom/go-atlassian/v2/jira/v3"
"log"
"os"
)
func main() {
var (
host = os.Getenv("HOST")
mail = os.Getenv("MAIL")
token = os.Getenv("TOKEN")
)
instance, err := v3.New(nil, host)
if err != nil {
log.Fatal(err)
}
instance.Auth.SetBasicAuth(mail, token)
instance.Auth.SetUserAgent("curl/7.54.0")
workflowSchemes, response, err := instance.Workflow.Scheme.Gets(context.Background(), 0, 50)
if err != nil {
if response != nil {
log.Println(response.Bytes.String())
log.Println(response.Code)
}
log.Fatal(err)
}
for _, workflowScheme := range workflowSchemes.Values {
fmt.Println(workflowScheme.Name)
fmt.Println(workflowScheme.Description)
fmt.Println(workflowScheme.ID)
fmt.Println(workflowScheme.Self)
fmt.Println(workflowScheme.DefaultWorkflow)
}
fmt.Println(workflowSchemes.IsLast)
}Create Workflows Scheme
Get Workflow Scheme
Update Workflow Scheme
Delete Workflow Scheme
Get Workflow Schemes Associations
Assign Workflow Scheme
Last updated
Was this helpful?