All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GroupsCreateGroup | Post /api/manage/v1/Groups | Create a new user group |
GroupsDeleteGroup | Delete /api/manage/v1/Groups/{id} | Delete group by identifier |
GroupsGetGroup | Get /api/manage/v1/Groups/{id} | Gets group by identifier |
GroupsGetGroupList | Get /api/manage/v1/Groups | Returns a list of current user's groups<br /> This method will return following data about groups : <br /> Id, Name, Created time (UTC), Edited time (UTC), creator id, <br /> editor id, subscription id |
GroupsGetPermissions | Get /api/manage/v1/Groups/{id}/permissions | Gets group permissions by identifier |
GroupsRenameGroup | Put /api/manage/v1/Groups/{id}/rename | Rename group by identifier |
GroupsUpdatePermissions | Post /api/manage/v1/Groups/{id}/permissions | Update permissions |
GroupVM GroupsCreateGroup(ctx).CreateGroupVM(createGroupVM).Execute()
Create a new user group
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
createGroupVM := *openapiclient.NewCreateGroupVM("Name_example", "T_example") // CreateGroupVM | Model for creating (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.GroupsCreateGroup(context.Background()).CreateGroupVM(createGroupVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GroupsCreateGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GroupsCreateGroup`: GroupVM
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GroupsCreateGroup`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGroupsCreateGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createGroupVM | CreateGroupVM | Model for creating |
- 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]
GroupsDeleteGroup(ctx, id).Execute()
Delete group by identifier
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
id := "id_example" // string | Identifier of group
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GroupsAPI.GroupsDeleteGroup(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GroupsDeleteGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Identifier of group |
Other parameters are passed through a pointer to a apiGroupsDeleteGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupVM GroupsGetGroup(ctx, id).Execute()
Gets group by identifier
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
id := "id_example" // string | Identifier of group
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.GroupsGetGroup(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GroupsGetGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GroupsGetGroup`: GroupVM
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GroupsGetGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Identifier of group |
Other parameters are passed through a pointer to a apiGroupsGetGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupsVM GroupsGetGroupList(ctx).Skip(skip).Take(take).Execute()
Returns a list of current user's groups
This method will return following data about groups :
Id, Name, Created time (UTC), Edited time (UTC), creator id,
editor id, subscription id
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
skip := int32(56) // int32 | How many groups need to skip (optional) (default to 0)
take := int32(56) // int32 | How many groups need to take (optional) (default to 10)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.GroupsGetGroupList(context.Background()).Skip(skip).Take(take).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GroupsGetGroupList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GroupsGetGroupList`: GroupsVM
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GroupsGetGroupList`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGroupsGetGroupListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
skip | int32 | How many groups need to skip | [default to 0] |
take | int32 | How many groups need to take | [default to 10] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupPermissionsVM GroupsGetPermissions(ctx, id).Execute()
Gets group permissions by identifier
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
id := "id_example" // string | Identifier of group
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.GroupsGetPermissions(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GroupsGetPermissions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GroupsGetPermissions`: GroupPermissionsVM
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GroupsGetPermissions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Identifier of group |
Other parameters are passed through a pointer to a apiGroupsGetPermissionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupVM GroupsRenameGroup(ctx, id).RenameGroupVM(renameGroupVM).Execute()
Rename group by identifier
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
id := "id_example" // string | Identifier of group
renameGroupVM := *openapiclient.NewRenameGroupVM("Name_example", "T_example") // RenameGroupVM | Model for renaming
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.GroupsRenameGroup(context.Background(), id).RenameGroupVM(renameGroupVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GroupsRenameGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GroupsRenameGroup`: GroupVM
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GroupsRenameGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Identifier of group |
Other parameters are passed through a pointer to a apiGroupsRenameGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
renameGroupVM | RenameGroupVM | Model for renaming |
- 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]
GroupsUpdatePermissions(ctx, id).UpdateGroupPermissionsVM(updateGroupPermissionsVM).Execute()
Update permissions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
id := "id_example" // string |
updateGroupPermissionsVM := *openapiclient.NewUpdateGroupPermissionsVM(*openapiclient.NewGroupPermissionsCRUDVM("T_example"), openapiclient.GroupAdministrate(0), "T_example") // UpdateGroupPermissionsVM | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GroupsAPI.GroupsUpdatePermissions(context.Background(), id).UpdateGroupPermissionsVM(updateGroupPermissionsVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GroupsUpdatePermissions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiGroupsUpdatePermissionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateGroupPermissionsVM | UpdateGroupPermissionsVM | |
(empty response body)
- 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]