All URIs are relative to https://api.opal.dev/v1
| Method | HTTP request | Description |
|---|---|---|
| GetRemoteUsers | Get /users/remote_users | |
| GetUserTags | Get /users/{user_id}/tags | |
| GetUsers | Get /users | |
| User | Get /user |
PaginatedRemoteUsersList GetRemoteUsers(ctx).ThirdPartyProvider(thirdPartyProvider).UserId(userId).RemoteId(remoteId).Cursor(cursor).PageSize(pageSize).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
thirdPartyProvider := []openapiclient.ThirdPartyProviderEnum{openapiclient.ThirdPartyProviderEnum("AUTH0")} // []ThirdPartyProviderEnum | Filter remote users by their third party provider. (optional)
userId := []string{"Inner_example"} // []string | Filter remote users by their user ID. (optional)
remoteId := []string{"Inner_example"} // []string | Filter remote users by their remote ID. (optional)
cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional)
pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.GetRemoteUsers(context.Background()).ThirdPartyProvider(thirdPartyProvider).UserId(userId).RemoteId(remoteId).Cursor(cursor).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetRemoteUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRemoteUsers`: PaginatedRemoteUsersList
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetRemoteUsers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetRemoteUsersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| thirdPartyProvider | []ThirdPartyProviderEnum | Filter remote users by their third party provider. | |
| userId | []string | Filter remote users by their user ID. | |
| remoteId | []string | Filter remote users by their remote ID. | |
| cursor | string | The pagination cursor value. | |
| pageSize | int32 | Number of results to return per page. Default is 200. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TagsList GetUserTags(ctx, userId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
userId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the user whose tags to return.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.GetUserTags(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetUserTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUserTags`: TagsList
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetUserTags`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userId | string | The ID of the user whose tags to return. |
Other parameters are passed through a pointer to a apiGetUserTagsRequest 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]
PaginatedUsersList GetUsers(ctx).Cursor(cursor).PageSize(pageSize).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional)
pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.GetUsers(context.Background()).Cursor(cursor).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUsers`: PaginatedUsersList
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetUsers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetUsersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | string | The pagination cursor value. | |
| pageSize | int32 | Number of results to return per page. Default is 200. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User User(ctx).UserId(userId).Email(email).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
userId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The user ID of the user. (optional)
email := "johndoe@domain.org" // string | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.User(context.Background()).UserId(userId).Email(email).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.User``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `User`: User
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.User`: %v\n", resp)
}Other parameters are passed through a pointer to a apiUserRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | string | The user ID of the user. | |
| string | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]