
๐คSharing
This resource represents options for sharing filters. Use it to get share scopes as well as add and remove share scopes from filters.
Get default share scope
GET /rest/api/3/filter/defaultShareScope
Returns the default sharing settings for new filters and dashboards for a user, the method returns the following information:
package main
import (
"context"
_ "github.com/ctreminiom/go-atlassian/v2/jira/v3"
"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 {
return
}
atlassian.Auth.SetBasicAuth(mail, token)
scope, response, err := atlassian.Filter.Share.Scope(context.Background())
if err != nil {
if response != nil {
log.Println("Response HTTP Response", response.Bytes.String())
}
return
}
log.Println("Response HTTP Code", response.Code)
log.Println("HTTP Endpoint Used", response.Endpoint)
log.Println("Scope", scope)
}Get share permissions
PUT /rest/api/3/filter/defaultShareScope
Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as global share permission, the method returns the following information:
Add share permission
POST /rest/api/3/filter/{id}/permission
Add a share permissions to a filter. If you add global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter, the method returns the following information:
Get share permission
GET /rest/api/3/filter/{id}/permission
Returns share permission for a filter. A filter can be shared with groups, projects, all logged-in users, or the public.
Sharing with all logged-in users or the public is known as global share permission, the method returns the following information:
Delete share permission
DELETE /rest/api/3/filter/{id}/permission/{permissionId}
Deletes share permission from a filter.
Set default share scope
PUT /rest/api/3/filter/defaultShareScope
Sets the default sharing for new filters and dashboards for a user.
Last updated
Was this helpful?