Skip to content

Latest commit

 

History

History
782 lines (488 loc) · 22.1 KB

File metadata and controls

782 lines (488 loc) · 22.1 KB

\ClientRoleMappingsAPI

All URIs are relative to https://keycloak.example.com/admin/realms

Method HTTP request Description
DeleteGroupRoleMappingsClient Delete /{realm}/groups/{id}/role-mappings/clients/{client}
DeleteUserRoleMappingsClient Delete /{realm}/users/{id}/role-mappings/clients/{client}
GetGroupRoleMappingsClient Get /{realm}/groups/{id}/role-mappings/clients/{client}
GetGroupRoleMappingsClientAvailable Get /{realm}/groups/{id}/role-mappings/clients/{client}/available
GetGroupRoleMappingsClientComposite Get /{realm}/groups/{id}/role-mappings/clients/{client}/composite
GetUserRoleMappingsClient Get /{realm}/users/{id}/role-mappings/clients/{client}
GetUserRoleMappingsClientAvailable Get /{realm}/users/{id}/role-mappings/clients/{client}/available
GetUserRoleMappingsClientComposite Get /{realm}/users/{id}/role-mappings/clients/{client}/composite
PostGroupRoleMappingsClient Post /{realm}/groups/{id}/role-mappings/clients/{client}
PostUserRoleMappingsClient Post /{realm}/users/{id}/role-mappings/clients/{client}

DeleteGroupRoleMappingsClient

DeleteGroupRoleMappingsClient(ctx, realm, id, client).RoleRepresentation(roleRepresentation).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 
	roleRepresentation := *openapiclient.NewRoleRepresentation() // RoleRepresentation | RoleRepresentation (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ClientRoleMappingsAPI.DeleteGroupRoleMappingsClient(context.Background(), realm, id, client).RoleRepresentation(roleRepresentation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ClientRoleMappingsAPI.DeleteGroupRoleMappingsClient``: %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.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

roleRepresentation | RoleRepresentation | RoleRepresentation |

Return type

(empty response body)

Authorization

access_token

HTTP request headers

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

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

DeleteUserRoleMappingsClient

DeleteUserRoleMappingsClient(ctx, realm, id, client).RoleRepresentation(roleRepresentation).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 
	roleRepresentation := *openapiclient.NewRoleRepresentation() // RoleRepresentation | RoleRepresentation (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ClientRoleMappingsAPI.DeleteUserRoleMappingsClient(context.Background(), realm, id, client).RoleRepresentation(roleRepresentation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ClientRoleMappingsAPI.DeleteUserRoleMappingsClient``: %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.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

roleRepresentation | RoleRepresentation | RoleRepresentation |

Return type

(empty response body)

Authorization

access_token

HTTP request headers

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

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

GetGroupRoleMappingsClient

[]RoleRepresentation GetGroupRoleMappingsClient(ctx, realm, id, client).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

Return type

[]RoleRepresentation

Authorization

access_token

HTTP request headers

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

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

GetGroupRoleMappingsClientAvailable

[]RoleRepresentation GetGroupRoleMappingsClientAvailable(ctx, realm, id, client).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

Return type

[]RoleRepresentation

Authorization

access_token

HTTP request headers

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

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

GetGroupRoleMappingsClientComposite

[]RoleRepresentation GetGroupRoleMappingsClientComposite(ctx, realm, id, client).BriefRepresentation(briefRepresentation).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 
	briefRepresentation := "briefRepresentation_example" // string | if false, return roles with their attributes (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ClientRoleMappingsAPI.GetGroupRoleMappingsClientComposite(context.Background(), realm, id, client).BriefRepresentation(briefRepresentation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ClientRoleMappingsAPI.GetGroupRoleMappingsClientComposite``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetGroupRoleMappingsClientComposite`: []RoleRepresentation
	fmt.Fprintf(os.Stdout, "Response from `ClientRoleMappingsAPI.GetGroupRoleMappingsClientComposite`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

briefRepresentation | string | if false, return roles with their attributes |

Return type

[]RoleRepresentation

Authorization

access_token

HTTP request headers

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

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

GetUserRoleMappingsClient

[]RoleRepresentation GetUserRoleMappingsClient(ctx, realm, id, client).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

Return type

[]RoleRepresentation

Authorization

access_token

HTTP request headers

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

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

GetUserRoleMappingsClientAvailable

[]RoleRepresentation GetUserRoleMappingsClientAvailable(ctx, realm, id, client).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

Return type

[]RoleRepresentation

Authorization

access_token

HTTP request headers

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

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

GetUserRoleMappingsClientComposite

[]RoleRepresentation GetUserRoleMappingsClientComposite(ctx, realm, id, client).BriefRepresentation(briefRepresentation).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 
	briefRepresentation := "briefRepresentation_example" // string | if false, return roles with their attributes (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ClientRoleMappingsAPI.GetUserRoleMappingsClientComposite(context.Background(), realm, id, client).BriefRepresentation(briefRepresentation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ClientRoleMappingsAPI.GetUserRoleMappingsClientComposite``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetUserRoleMappingsClientComposite`: []RoleRepresentation
	fmt.Fprintf(os.Stdout, "Response from `ClientRoleMappingsAPI.GetUserRoleMappingsClientComposite`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

briefRepresentation | string | if false, return roles with their attributes |

Return type

[]RoleRepresentation

Authorization

access_token

HTTP request headers

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

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

PostGroupRoleMappingsClient

PostGroupRoleMappingsClient(ctx, realm, id, client).RoleRepresentation(roleRepresentation).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 
	roleRepresentation := *openapiclient.NewRoleRepresentation() // RoleRepresentation | RoleRepresentation (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ClientRoleMappingsAPI.PostGroupRoleMappingsClient(context.Background(), realm, id, client).RoleRepresentation(roleRepresentation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ClientRoleMappingsAPI.PostGroupRoleMappingsClient``: %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.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

roleRepresentation | RoleRepresentation | RoleRepresentation |

Return type

(empty response body)

Authorization

access_token

HTTP request headers

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

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

PostUserRoleMappingsClient

PostUserRoleMappingsClient(ctx, realm, id, client).RoleRepresentation(roleRepresentation).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	realm := "realm_example" // string | realm name (not id!)
	id := "id_example" // string | 
	client := "client_example" // string | 
	roleRepresentation := *openapiclient.NewRoleRepresentation() // RoleRepresentation | RoleRepresentation (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ClientRoleMappingsAPI.PostUserRoleMappingsClient(context.Background(), realm, id, client).RoleRepresentation(roleRepresentation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ClientRoleMappingsAPI.PostUserRoleMappingsClient``: %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.
realm string realm name (not id!)
id string
client string

Other Parameters

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

Name Type Description Notes

roleRepresentation | RoleRepresentation | RoleRepresentation |

Return type

(empty response body)

Authorization

access_token

HTTP request headers

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

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