All URIs are relative to https://localhost:8080
Method | HTTP request | Description |
---|---|---|
CreateUserGroup | Post /api/usergroups | Create user group. |
DeleteUserGroup | Delete /api/usergroups/{groupId} | Delete user group. |
GetUserGroup | Get /api/usergroups/{groupId} | Get user group details. |
ListUserGroups | Get /api/usergroups | List user groups. |
UpdateUserGroup | Put /api/usergroups/{groupId} | Update user group. |
ApiResponse CreateUserGroup(ctx).UserGroup(userGroup).Execute()
Create user group.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/TykTechnologies/dashboard-sdk"
)
func main() {
userGroup := *openapiclient.NewUserGroup() // UserGroup | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserGroupAPI.CreateUserGroup(context.Background()).UserGroup(userGroup).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserGroupAPI.CreateUserGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateUserGroup`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `UserGroupAPI.CreateUserGroup`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateUserGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
userGroup | UserGroup |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiResponse DeleteUserGroup(ctx, groupId).Execute()
Delete user group.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/TykTechnologies/dashboard-sdk"
)
func main() {
groupId := "6649fd535715ec4c96cbef39" // string | ID of the group you want to delete.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserGroupAPI.DeleteUserGroup(context.Background(), groupId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserGroupAPI.DeleteUserGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteUserGroup`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `UserGroupAPI.DeleteUserGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | ID of the group you want to delete. |
Other parameters are passed through a pointer to a apiDeleteUserGroupRequest 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]
UserGroup GetUserGroup(ctx, groupId).Execute()
Get user group details.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/TykTechnologies/dashboard-sdk"
)
func main() {
groupId := "6649fd535715ec4c96cbef39" // string | ID of the group you want to fetch.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserGroupAPI.GetUserGroup(context.Background(), groupId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserGroupAPI.GetUserGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUserGroup`: UserGroup
fmt.Fprintf(os.Stdout, "Response from `UserGroupAPI.GetUserGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | ID of the group you want to fetch. |
Other parameters are passed through a pointer to a apiGetUserGroupRequest 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]
UserGroups ListUserGroups(ctx).P(p).Execute()
List user groups.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/TykTechnologies/dashboard-sdk"
)
func main() {
p := int32(1) // int32 | Use p query parameter to say which page you want returned. Send number less than 0 to return all items. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserGroupAPI.ListUserGroups(context.Background()).P(p).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserGroupAPI.ListUserGroups``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListUserGroups`: UserGroups
fmt.Fprintf(os.Stdout, "Response from `UserGroupAPI.ListUserGroups`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListUserGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
p | int32 | Use p query parameter to say which page you want returned. Send number less than 0 to return all items. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiResponse UpdateUserGroup(ctx, groupId).UserGroup(userGroup).Execute()
Update user group.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/TykTechnologies/dashboard-sdk"
)
func main() {
groupId := "6649fd535715ec4c96cbef39" // string | ID of the group you want to update.
userGroup := *openapiclient.NewUserGroup() // UserGroup | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserGroupAPI.UpdateUserGroup(context.Background(), groupId).UserGroup(userGroup).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserGroupAPI.UpdateUserGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateUserGroup`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `UserGroupAPI.UpdateUserGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | ID of the group you want to update. |
Other parameters are passed through a pointer to a apiUpdateUserGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
userGroup | UserGroup | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]