Skip to content

Latest commit

 

History

History
633 lines (414 loc) · 19.7 KB

SubscriptionsAPI.md

File metadata and controls

633 lines (414 loc) · 19.7 KB

\SubscriptionsAPI

All URIs are relative to http://localhost

Method HTTP request Description
SubscriptionsGetDefaultPermissions Get /api/manage/v1/Subscriptions/{subscriptionId}/defaultPermissions Get subscription's default permissions for new entities
SubscriptionsGetMyPermissions Get /api/manage/v1/Subscriptions/{subId}/mypermissions Get user's permissions for a subscription by id
SubscriptionsGetPermissions Get /api/manage/v1/Subscriptions/{id}/permissions Get permissions for a subscription by id
SubscriptionsGetSubscription Get /api/manage/v1/Subscriptions/{id} Returns the subscription by id
SubscriptionsGetSubscriptions Get /api/manage/v1/Subscriptions Returns a list of all subscriptions of current user
SubscriptionsRenameSubscription Put /api/manage/v1/Subscriptions/{subscriptionId}/rename Rename subscription
SubscriptionsUpdateDefaultPermissions Put /api/manage/v1/Subscriptions/{subscriptionId}/defaultPermissions Change subscription's default permissions for new entities
SubscriptionsUpdateLocale Put /api/manage/v1/Subscriptions/{subscriptionId}/Locale Update subscription's default locale
SubscriptionsUpdatePermissions Post /api/manage/v1/Subscriptions/{id}/permissions Update permissions

SubscriptionsGetDefaultPermissions

DefaultPermissionsVM SubscriptionsGetDefaultPermissions(ctx, subscriptionId).Execute()

Get subscription's default permissions for new entities

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	subscriptionId := "subscriptionId_example" // string | id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsGetDefaultPermissions(context.Background(), subscriptionId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsGetDefaultPermissions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsGetDefaultPermissions`: DefaultPermissionsVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsGetDefaultPermissions`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subscriptionId string id

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsGetDefaultPermissionsRequest struct via the builder pattern

Name Type Description Notes

Return type

DefaultPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsGetMyPermissions

MyPermissionsVM SubscriptionsGetMyPermissions(ctx, subId).Execute()

Get user's permissions for a subscription by id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	subId := "subId_example" // string | subscription id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsGetMyPermissions(context.Background(), subId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsGetMyPermissions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsGetMyPermissions`: MyPermissionsVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsGetMyPermissions`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subId string subscription id

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsGetMyPermissionsRequest struct via the builder pattern

Name Type Description Notes

Return type

MyPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsGetPermissions

SubscriptionPermissionsVM SubscriptionsGetPermissions(ctx, id).Execute()

Get permissions for a subscription by id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsGetPermissions(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsGetPermissions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsGetPermissions`: SubscriptionPermissionsVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsGetPermissions`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsGetPermissionsRequest struct via the builder pattern

Name Type Description Notes

Return type

SubscriptionPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsGetSubscription

SubscriptionVM SubscriptionsGetSubscription(ctx, id).Execute()

Returns the subscription by id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	id := "id_example" // string | Identifier of subscription

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsGetSubscription(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsGetSubscription``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsGetSubscription`: SubscriptionVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsGetSubscription`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Identifier of subscription

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsGetSubscriptionRequest struct via the builder pattern

Name Type Description Notes

Return type

SubscriptionVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsGetSubscriptions

SubscriptionsVM SubscriptionsGetSubscriptions(ctx).Skip(skip).Take(take).Execute()

Returns a list of all subscriptions of current user

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	skip := int32(56) // int32 | Variable for pagination, defautl value is 0 (optional) (default to 0)
	take := int32(56) // int32 | Variable for pagination, default value is 10 (optional) (default to 10)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsGetSubscriptions(context.Background()).Skip(skip).Take(take).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsGetSubscriptions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsGetSubscriptions`: SubscriptionsVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsGetSubscriptions`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsGetSubscriptionsRequest struct via the builder pattern

Name Type Description Notes
skip int32 Variable for pagination, defautl value is 0 [default to 0]
take int32 Variable for pagination, default value is 10 [default to 10]

Return type

SubscriptionsVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsRenameSubscription

SubscriptionVM SubscriptionsRenameSubscription(ctx, subscriptionId).RenameSubscriptionVM(renameSubscriptionVM).Execute()

Rename subscription

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	subscriptionId := "subscriptionId_example" // string | id
	renameSubscriptionVM := *openapiclient.NewRenameSubscriptionVM("Name_example", "T_example") // RenameSubscriptionVM | rename VM

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsRenameSubscription(context.Background(), subscriptionId).RenameSubscriptionVM(renameSubscriptionVM).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsRenameSubscription``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsRenameSubscription`: SubscriptionVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsRenameSubscription`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subscriptionId string id

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsRenameSubscriptionRequest struct via the builder pattern

Name Type Description Notes

renameSubscriptionVM | RenameSubscriptionVM | rename VM |

Return type

SubscriptionVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsUpdateDefaultPermissions

DefaultPermissionsVM SubscriptionsUpdateDefaultPermissions(ctx, subscriptionId).UpdateDefaultPermissionsVM(updateDefaultPermissionsVM).Execute()

Change subscription's default permissions for new entities

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	subscriptionId := "subscriptionId_example" // string | id
	updateDefaultPermissionsVM := *openapiclient.NewUpdateDefaultPermissionsVM("T_example") // UpdateDefaultPermissionsVM | update default permissions VM

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsUpdateDefaultPermissions(context.Background(), subscriptionId).UpdateDefaultPermissionsVM(updateDefaultPermissionsVM).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsUpdateDefaultPermissions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsUpdateDefaultPermissions`: DefaultPermissionsVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsUpdateDefaultPermissions`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subscriptionId string id

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsUpdateDefaultPermissionsRequest struct via the builder pattern

Name Type Description Notes

updateDefaultPermissionsVM | UpdateDefaultPermissionsVM | update default permissions VM |

Return type

DefaultPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsUpdateLocale

SubscriptionVM SubscriptionsUpdateLocale(ctx, subscriptionId).UpdateSubscriptionLocaleVM(updateSubscriptionLocaleVM).Execute()

Update subscription's default locale

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	subscriptionId := "subscriptionId_example" // string | id
	updateSubscriptionLocaleVM := *openapiclient.NewUpdateSubscriptionLocaleVM("Locale_example", "T_example") // UpdateSubscriptionLocaleVM | update VM

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SubscriptionsAPI.SubscriptionsUpdateLocale(context.Background(), subscriptionId).UpdateSubscriptionLocaleVM(updateSubscriptionLocaleVM).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsUpdateLocale``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SubscriptionsUpdateLocale`: SubscriptionVM
	fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.SubscriptionsUpdateLocale`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subscriptionId string id

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsUpdateLocaleRequest struct via the builder pattern

Name Type Description Notes

updateSubscriptionLocaleVM | UpdateSubscriptionLocaleVM | update VM |

Return type

SubscriptionVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SubscriptionsUpdatePermissions

SubscriptionsUpdatePermissions(ctx, id).UpdateSubscriptionPermissionsVM(updateSubscriptionPermissionsVM).Execute()

Update permissions

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	id := "id_example" // string | 
	updateSubscriptionPermissionsVM := *openapiclient.NewUpdateSubscriptionPermissionsVM(*openapiclient.NewSubscriptionPermissionsCRUDVM("T_example"), openapiclient.SubscriptionAdministrate(0), "T_example") // UpdateSubscriptionPermissionsVM |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.SubscriptionsAPI.SubscriptionsUpdatePermissions(context.Background(), id).UpdateSubscriptionPermissionsVM(updateSubscriptionPermissionsVM).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.SubscriptionsUpdatePermissions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiSubscriptionsUpdatePermissionsRequest struct via the builder pattern

Name Type Description Notes

updateSubscriptionPermissionsVM | UpdateSubscriptionPermissionsVM | |

Return type

(empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]