report

package
v0.1.0-beta.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(credential azcore.TokenCredential, endpoint *string, options *azcore.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • endpoint - pass nil to accept the default values.
  • options - pass nil to accept the default values.

func NewClientFactoryWithClient

func NewClientFactoryWithClient(client fabric.Client) *ClientFactory

NewClientFactoryWithClient creates a new instance of ClientFactory with sharable Client. The Client will be propagated to any client created from this factory.

  • client - Client created in the containing module: github.com/microsoft/fabric-sdk-go/fabric

func (*ClientFactory) NewItemsClient

func (c *ClientFactory) NewItemsClient() *ItemsClient

NewItemsClient creates a new instance of ItemsClient.

type CreateReportRequest

type CreateReportRequest struct {
	// REQUIRED; The report public definition.
	Definition *Definition

	// REQUIRED; The report display name. The display name must follow naming rules according to item type.
	DisplayName *string

	// The report description. Maximum length is 256 characters.
	Description *string
}

CreateReportRequest - Create report request payload.

func (CreateReportRequest) MarshalJSON

func (c CreateReportRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CreateReportRequest.

func (*CreateReportRequest) UnmarshalJSON

func (c *CreateReportRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CreateReportRequest.

type Definition

type Definition struct {
	// REQUIRED; A list of definition parts.
	Parts []DefinitionPart

	// The format of the item definition.
	Format *string
}

Definition - Report public definition object. Refer to this article [/rest/api/fabric/articles/item-management/definitions/report-definition] for more details on how to craft a report public definition.

func (Definition) MarshalJSON

func (d Definition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Definition.

func (*Definition) UnmarshalJSON

func (d *Definition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Definition.

type DefinitionPart

type DefinitionPart struct {
	// The report part path.
	Path *string

	// The report part payload.
	Payload *string

	// The payload type.
	PayloadType *PayloadType
}

DefinitionPart - Report definition part object.

func (DefinitionPart) MarshalJSON

func (d DefinitionPart) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefinitionPart.

func (*DefinitionPart) UnmarshalJSON

func (d *DefinitionPart) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefinitionPart.

type DefinitionResponse

type DefinitionResponse struct {
	// READ-ONLY; Report public definition object. Refer to this article [/rest/api/fabric/articles/item-management/definitions/report-definition]
	// for more details on how to craft a report public definition.
	Definition *Definition
}

DefinitionResponse - Report public definition response.

func (DefinitionResponse) MarshalJSON

func (d DefinitionResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DefinitionResponse.

func (*DefinitionResponse) UnmarshalJSON

func (d *DefinitionResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DefinitionResponse.

type ItemType

type ItemType string

ItemType - The type of the item. Additional item types may be added over time.

const (
	// ItemTypeDashboard - PowerBI dashboard.
	ItemTypeDashboard ItemType = "Dashboard"
	// ItemTypeDataPipeline - A data pipeline.
	ItemTypeDataPipeline ItemType = "DataPipeline"
	// ItemTypeDatamart - PowerBI datamart.
	ItemTypeDatamart ItemType = "Datamart"
	// ItemTypeEnvironment - An environment.
	ItemTypeEnvironment ItemType = "Environment"
	// ItemTypeEventhouse - An eventhouse.
	ItemTypeEventhouse ItemType = "Eventhouse"
	// ItemTypeEventstream - An eventstream.
	ItemTypeEventstream ItemType = "Eventstream"
	// ItemTypeGraphQLAPI - An API for GraphQL item.
	ItemTypeGraphQLAPI ItemType = "GraphQLApi"
	// ItemTypeKQLDashboard - A KQL dashboard.
	ItemTypeKQLDashboard ItemType = "KQLDashboard"
	// ItemTypeKQLDatabase - A KQL database.
	ItemTypeKQLDatabase ItemType = "KQLDatabase"
	// ItemTypeKQLQueryset - A KQL queryset.
	ItemTypeKQLQueryset ItemType = "KQLQueryset"
	// ItemTypeLakehouse - A lakehouse.
	ItemTypeLakehouse ItemType = "Lakehouse"
	// ItemTypeMLExperiment - A machine learning experiment.
	ItemTypeMLExperiment ItemType = "MLExperiment"
	// ItemTypeMLModel - A machine learning model.
	ItemTypeMLModel ItemType = "MLModel"
	// ItemTypeMirroredDatabase - A mirrored database.
	ItemTypeMirroredDatabase ItemType = "MirroredDatabase"
	// ItemTypeMirroredWarehouse - A mirrored warehouse.
	ItemTypeMirroredWarehouse ItemType = "MirroredWarehouse"
	// ItemTypeNotebook - A notebook.
	ItemTypeNotebook ItemType = "Notebook"
	// ItemTypePaginatedReport - PowerBI paginated report.
	ItemTypePaginatedReport ItemType = "PaginatedReport"
	// ItemTypeReflex - A Reflex.
	ItemTypeReflex ItemType = "Reflex"
	// ItemTypeReport - PowerBI report.
	ItemTypeReport ItemType = "Report"
	// ItemTypeSQLEndpoint - An SQL endpoint.
	ItemTypeSQLEndpoint ItemType = "SQLEndpoint"
	// ItemTypeSemanticModel - PowerBI semantic model.
	ItemTypeSemanticModel ItemType = "SemanticModel"
	// ItemTypeSparkJobDefinition - A spark job definition.
	ItemTypeSparkJobDefinition ItemType = "SparkJobDefinition"
	// ItemTypeWarehouse - A warehouse.
	ItemTypeWarehouse ItemType = "Warehouse"
)

func PossibleItemTypeValues

func PossibleItemTypeValues() []ItemType

PossibleItemTypeValues returns the possible values for the ItemType const type.

type ItemsClient

type ItemsClient struct {
	// contains filtered or unexported fields
}

ItemsClient contains the methods for the Items group. Don't use this type directly, use a constructor function instead.

func (*ItemsClient) BeginCreateReport

func (client *ItemsClient) BeginCreateReport(ctx context.Context, workspaceID string, createReportRequest CreateReportRequest, options *ItemsClientBeginCreateReportOptions) (*runtime.Poller[ItemsClientCreateReportResponse], error)

BeginCreateReport - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. This API requires a definition [/rest/api/fabric/articles/item-management/definitions/report-definition]. PERMISSIONS THE CALLER MUST HAVE CONTRIBUTOR OR HIGHER WORKSPACE ROLE. REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All LIMITATIONS * To create a report item, the user must have the appropriate license. For more information see: Microsoft Fabric license types [/fabric/enterprise/licenses#microsoft-fabric-license-types]. MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • createReportRequest - Create item request payload.
  • options - ItemsClientBeginCreateReportOptions contains the optional parameters for the ItemsClient.BeginCreateReport method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/report"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := report.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewItemsClient().BeginCreateReport(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", report.CreateReportRequest{
		Description: to.Ptr("A report description."),
		Definition: &report.Definition{
			Parts: []report.DefinitionPart{
				{
					Path:        to.Ptr("definition.pbir"),
					Payload:     to.Ptr("ew0KICAidmVyc2lvbiI..sYVN0eWxlTGl2ZSINCiAgICB9DQogIH0NCn0="),
					PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
				},
				{
					Path:        to.Ptr("report.json"),
					Payload:     to.Ptr("ewogICJjb25maWciOiA..3aWR0aCI6IDEyODAuMDAKICAgIH0KICBdCn0="),
					PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
				},
				{
					Path:        to.Ptr(".platform"),
					Payload:     to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="),
					PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
				}},
		},
		DisplayName: to.Ptr("Report 1"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ItemsClient) BeginGetReportDefinition

func (client *ItemsClient) BeginGetReportDefinition(ctx context.Context, workspaceID string, reportID string, options *ItemsClientBeginGetReportDefinitionOptions) (*runtime.Poller[ItemsClientGetReportDefinitionResponse], error)

BeginGetReportDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. When you get a report's public definition, the sensitivity label is not a part of the definition. PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All LIMITATIONS This API is blocked for a report with an encrypted sensitivity label. MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • reportID - The report ID.
  • options - ItemsClientBeginGetReportDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetReportDefinition method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/report"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := report.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewItemsClient().BeginGetReportDefinition(ctx, "6e335e92-a2a2-4b5a-970a-bd6a89fbb765", "cfafbeb1-8037-4d0c-896e-a46fb27ff229", &report.ItemsClientBeginGetReportDefinitionOptions{Format: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DefinitionResponse = report.DefinitionResponse{
	// 	Definition: &report.Definition{
	// 		Parts: []report.DefinitionPart{
	// 			{
	// 				Path: to.Ptr("report.json"),
	// 				Payload: to.Ptr("QmFzZTY0U3RyaW5n"),
	// 				PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
	// 			},
	// 			{
	// 				Path: to.Ptr("definition.pbir"),
	// 				Payload: to.Ptr("QW5vdGhlckJhc2U2NFN0cmluZw"),
	// 				PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
	// 			},
	// 			{
	// 				Path: to.Ptr(".platform"),
	// 				Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="),
	// 				PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
	// 		}},
	// 	},
	// }
}
Output:

func (*ItemsClient) BeginUpdateReportDefinition

func (client *ItemsClient) BeginUpdateReportDefinition(ctx context.Context, workspaceID string, reportID string, updateReportDefinitionRequest UpdateReportDefinitionRequest, options *ItemsClientBeginUpdateReportDefinitionOptions) (*runtime.Poller[ItemsClientUpdateReportDefinitionResponse], error)

BeginUpdateReportDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. Updating the report's definition, does not affect its sensitivity label. PERMISSIONS The API caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • reportID - The report ID.
  • updateReportDefinitionRequest - Update report definition request payload.
  • options - ItemsClientBeginUpdateReportDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateReportDefinition method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/report"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := report.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewItemsClient().BeginUpdateReportDefinition(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", report.UpdateReportDefinitionRequest{
		Definition: &report.Definition{
			Parts: []report.DefinitionPart{
				{
					Path:        to.Ptr("report.json"),
					Payload:     to.Ptr("QmFzZTY0U3RyaW5n"),
					PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
				},
				{
					Path:        to.Ptr("definition.pbir"),
					Payload:     to.Ptr("QW5vdGhlckJhc2U2NFN0cmluZw"),
					PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
				},
				{
					Path:        to.Ptr(".platform"),
					Payload:     to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="),
					PayloadType: to.Ptr(report.PayloadTypeInlineBase64),
				}},
		},
	}, &report.ItemsClientBeginUpdateReportDefinitionOptions{UpdateMetadata: to.Ptr(true)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ItemsClient) CreateReport

func (client *ItemsClient) CreateReport(ctx context.Context, workspaceID string, createReportRequest CreateReportRequest, options *ItemsClientBeginCreateReportOptions) (ItemsClientCreateReportResponse, error)

CreateReport - returns ItemsClientCreateReportResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].

This API requires a definition [/rest/api/fabric/articles/item-management/definitions/report-definition].

PERMISSIONS THE CALLER MUST HAVE CONTRIBUTOR OR HIGHER WORKSPACE ROLE. REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All

LIMITATIONS

  • To create a report item, the user must have the appropriate license. For more information see: Microsoft Fabric license types [/fabric/enterprise/licenses#microsoft-fabric-license-types].

MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.

| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |

INTERFACE Generated from API version v1

  • workspaceID - The workspace ID.
  • createReportRequest - Create item request payload.
  • options - ItemsClientBeginCreateReportOptions contains the optional parameters for the ItemsClient.BeginCreateReport method.

func (*ItemsClient) DeleteReport

func (client *ItemsClient) DeleteReport(ctx context.Context, workspaceID string, reportID string, options *ItemsClientDeleteReportOptions) (ItemsClientDeleteReportResponse, error)

DeleteReport - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • reportID - The report ID.
  • options - ItemsClientDeleteReportOptions contains the optional parameters for the ItemsClient.DeleteReport method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/report"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := report.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewItemsClient().DeleteReport(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ItemsClient) GetReport

func (client *ItemsClient) GetReport(ctx context.Context, workspaceID string, reportID string, options *ItemsClientGetReportOptions) (ItemsClientGetReportResponse, error)

GetReport - PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES Report.Read.All or Report.ReadWrite.All or Item.Read.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • reportID - The report ID.
  • options - ItemsClientGetReportOptions contains the optional parameters for the ItemsClient.GetReport method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/report"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := report.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewItemsClient().GetReport(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Report = report.Report{
	// 	Type: to.Ptr(report.ItemTypeReport),
	// 	Description: to.Ptr("A report description."),
	// 	DisplayName: to.Ptr("Report 1"),
	// 	ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"),
	// 	WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"),
	// }
}
Output:

func (*ItemsClient) GetReportDefinition

func (client *ItemsClient) GetReportDefinition(ctx context.Context, workspaceID string, reportID string, options *ItemsClientBeginGetReportDefinitionOptions) (ItemsClientGetReportDefinitionResponse, error)

GetReportDefinition - returns ItemsClientGetReportDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].

When you get a report's public definition, the sensitivity label is not a part of the definition.

PERMISSIONS The caller must have contributor or higher workspace role.

REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All

LIMITATIONS This API is blocked for a report with an encrypted sensitivity label.

MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.

| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |

INTERFACE Generated from API version v1

  • workspaceID - The workspace ID.
  • reportID - The report ID.
  • options - ItemsClientBeginGetReportDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetReportDefinition method.

func (*ItemsClient) ListReports

func (client *ItemsClient) ListReports(ctx context.Context, workspaceID string, options *ItemsClientListReportsOptions) ([]Report, error)

ListReports - returns array of Report from all pages. This API supports pagination [/rest/api/fabric/articles/pagination].

PERMISSIONS The caller must have viewer or higher workspace role.

REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All

MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.

| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |

INTERFACE Generated from API version v1

  • workspaceID - The workspace ID.
  • options - ItemsClientListReportsOptions contains the optional parameters for the ItemsClient.NewListReportsPager method.

func (*ItemsClient) NewListReportsPager

func (client *ItemsClient) NewListReportsPager(workspaceID string, options *ItemsClientListReportsOptions) *runtime.Pager[ItemsClientListReportsResponse]

NewListReportsPager - This API supports pagination [/rest/api/fabric/articles/pagination]. PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE

Generated from API version v1

  • workspaceID - The workspace ID.
  • options - ItemsClientListReportsOptions contains the optional parameters for the ItemsClient.NewListReportsPager method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/report"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := report.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewItemsClient().NewListReportsPager("cfafbeb1-8037-4d0c-896e-a46fb27ff229", &report.ItemsClientListReportsOptions{ContinuationToken: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.Reports = report.Reports{
		// 	Value: []report.Report{
		// 		{
		// 			Type: to.Ptr(report.ItemTypeReport),
		// 			Description: to.Ptr("A report description."),
		// 			DisplayName: to.Ptr("Report Name 1"),
		// 			ID: to.Ptr("3546052c-ae64-4526-b1a8-52af7761426f"),
		// 			WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"),
		// 	}},
		// }
	}
}
Output:

func (*ItemsClient) UpdateReport

func (client *ItemsClient) UpdateReport(ctx context.Context, workspaceID string, reportID string, updateReportRequest UpdateReportRequest, options *ItemsClientUpdateReportOptions) (ItemsClientUpdateReportResponse, error)

UpdateReport - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • reportID - The report ID.
  • updateReportRequest - Update report request payload.
  • options - ItemsClientUpdateReportOptions contains the optional parameters for the ItemsClient.UpdateReport method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/report"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := report.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewItemsClient().UpdateReport(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff211", "5b218778-e7a5-4d73-8187-f10824047721", report.UpdateReportRequest{
		Description: to.Ptr("A new description for report."),
		DisplayName: to.Ptr("Report's New name"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Report = report.Report{
	// 	Type: to.Ptr(report.ItemTypeReport),
	// 	Description: to.Ptr("A new description for report."),
	// 	DisplayName: to.Ptr("Report's New name"),
	// 	ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047721"),
	// 	WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff211"),
	// }
}
Output:

func (*ItemsClient) UpdateReportDefinition

func (client *ItemsClient) UpdateReportDefinition(ctx context.Context, workspaceID string, reportID string, updateReportDefinitionRequest UpdateReportDefinitionRequest, options *ItemsClientBeginUpdateReportDefinitionOptions) (ItemsClientUpdateReportDefinitionResponse, error)

UpdateReportDefinition - returns ItemsClientUpdateReportDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].

Updating the report's definition, does not affect its sensitivity label.

PERMISSIONS The API caller must have contributor or higher workspace role.

REQUIRED DELEGATED SCOPES Report.ReadWrite.All or Item.ReadWrite.All

MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.

| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |

INTERFACE Generated from API version v1

  • workspaceID - The workspace ID.
  • reportID - The report ID.
  • updateReportDefinitionRequest - Update report definition request payload.
  • options - ItemsClientBeginUpdateReportDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateReportDefinition method.

type ItemsClientBeginCreateReportOptions

type ItemsClientBeginCreateReportOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

ItemsClientBeginCreateReportOptions contains the optional parameters for the ItemsClient.BeginCreateReport method.

type ItemsClientBeginGetReportDefinitionOptions

type ItemsClientBeginGetReportDefinitionOptions struct {
	// The format of the report public definition.
	Format *string

	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

ItemsClientBeginGetReportDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetReportDefinition method.

type ItemsClientBeginUpdateReportDefinitionOptions

type ItemsClientBeginUpdateReportDefinitionOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string

	// When set to true and the .platform file is provided as part of the definition, the item's metadata is updated using the
	// metadata in the .platform file
	UpdateMetadata *bool
}

ItemsClientBeginUpdateReportDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateReportDefinition method.

type ItemsClientCreateReportResponse

type ItemsClientCreateReportResponse struct {
	// A report object.
	Report
}

ItemsClientCreateReportResponse contains the response from method ItemsClient.BeginCreateReport.

type ItemsClientDeleteReportOptions

type ItemsClientDeleteReportOptions struct {
}

ItemsClientDeleteReportOptions contains the optional parameters for the ItemsClient.DeleteReport method.

type ItemsClientDeleteReportResponse

type ItemsClientDeleteReportResponse struct {
}

ItemsClientDeleteReportResponse contains the response from method ItemsClient.DeleteReport.

type ItemsClientGetReportDefinitionResponse

type ItemsClientGetReportDefinitionResponse struct {
	// Report public definition response.
	DefinitionResponse
}

ItemsClientGetReportDefinitionResponse contains the response from method ItemsClient.BeginGetReportDefinition.

type ItemsClientGetReportOptions

type ItemsClientGetReportOptions struct {
}

ItemsClientGetReportOptions contains the optional parameters for the ItemsClient.GetReport method.

type ItemsClientGetReportResponse

type ItemsClientGetReportResponse struct {
	// A report object.
	Report
}

ItemsClientGetReportResponse contains the response from method ItemsClient.GetReport.

type ItemsClientListReportsOptions

type ItemsClientListReportsOptions struct {
	// A token for retrieving the next page of results.
	ContinuationToken *string
}

ItemsClientListReportsOptions contains the optional parameters for the ItemsClient.NewListReportsPager method.

type ItemsClientListReportsResponse

type ItemsClientListReportsResponse struct {
	// A list of reports.
	Reports
}

ItemsClientListReportsResponse contains the response from method ItemsClient.NewListReportsPager.

type ItemsClientUpdateReportDefinitionResponse

type ItemsClientUpdateReportDefinitionResponse struct {
}

ItemsClientUpdateReportDefinitionResponse contains the response from method ItemsClient.BeginUpdateReportDefinition.

type ItemsClientUpdateReportOptions

type ItemsClientUpdateReportOptions struct {
}

ItemsClientUpdateReportOptions contains the optional parameters for the ItemsClient.UpdateReport method.

type ItemsClientUpdateReportResponse

type ItemsClientUpdateReportResponse struct {
	// A report object.
	Report
}

ItemsClientUpdateReportResponse contains the response from method ItemsClient.UpdateReport.

type PayloadType

type PayloadType string

PayloadType - The type of the definition part payload. Additional payload types may be added over time.

const (
	// PayloadTypeInlineBase64 - Inline Base 64.
	PayloadTypeInlineBase64 PayloadType = "InlineBase64"
)

func PossiblePayloadTypeValues

func PossiblePayloadTypeValues() []PayloadType

PossiblePayloadTypeValues returns the possible values for the PayloadType const type.

type Report

type Report struct {
	// REQUIRED; The item type.
	Type *ItemType

	// The item description.
	Description *string

	// The item display name.
	DisplayName *string

	// READ-ONLY; The item ID.
	ID *string

	// READ-ONLY; The workspace ID.
	WorkspaceID *string
}

Report - A report object.

func (Report) MarshalJSON

func (r Report) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Report.

func (*Report) UnmarshalJSON

func (r *Report) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Report.

type Reports

type Reports struct {
	// REQUIRED; A list of reports.
	Value []Report

	// The token for the next result set batch. If there are no more records, it's removed from the response.
	ContinuationToken *string

	// The URI of the next result set batch. If there are no more records, it's removed from the response.
	ContinuationURI *string
}

Reports - A list of reports.

func (Reports) MarshalJSON

func (r Reports) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Reports.

func (*Reports) UnmarshalJSON

func (r *Reports) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Reports.

type UpdateReportDefinitionRequest

type UpdateReportDefinitionRequest struct {
	// REQUIRED; Report public definition object. Refer to this article [/rest/api/fabric/articles/item-management/definitions/report-definition]
	// for more details on how to craft a report public definition.
	Definition *Definition
}

UpdateReportDefinitionRequest - Update report public definition request payload.

func (UpdateReportDefinitionRequest) MarshalJSON

func (u UpdateReportDefinitionRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateReportDefinitionRequest.

func (*UpdateReportDefinitionRequest) UnmarshalJSON

func (u *UpdateReportDefinitionRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReportDefinitionRequest.

type UpdateReportRequest

type UpdateReportRequest struct {
	// The report description. Maximum length is 256 characters.
	Description *string

	// The report display name. The display name must follow naming rules according to item type.
	DisplayName *string
}

UpdateReportRequest - Update report request.

func (UpdateReportRequest) MarshalJSON

func (u UpdateReportRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateReportRequest.

func (*UpdateReportRequest) UnmarshalJSON

func (u *UpdateReportRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReportRequest.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL