All URIs are relative to https://api.opal.dev/v1
Method | HTTP request | Description |
---|---|---|
CreateOwner | Post /owners | |
DeleteOwner | Delete /owners/{owner_id} | |
GetOwner | Get /owners/{owner_id} | |
GetOwnerUsers | Get /owners/{owner_id}/users | |
GetOwners | Get /owners | |
SetOwnerUsers | Put /owners/{owner_id}/users | |
UpdateOwners | Put /owners |
Owner CreateOwner(ctx).CreateOwnerInfo(createOwnerInfo).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
createOwnerInfo := *openapiclient.NewCreateOwnerInfo("API Owner", []string{"UserIds_example"}) // CreateOwnerInfo |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OwnersApi.CreateOwner(context.Background()).CreateOwnerInfo(createOwnerInfo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.CreateOwner``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateOwner`: Owner
fmt.Fprintf(os.Stdout, "Response from `OwnersApi.CreateOwner`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateOwnerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createOwnerInfo | CreateOwnerInfo |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteOwner(ctx, ownerId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ownerId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the owner.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OwnersApi.DeleteOwner(context.Background(), ownerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.DeleteOwner``: %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. | |
ownerId | string | The ID of the owner. |
Other parameters are passed through a pointer to a apiDeleteOwnerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Owner GetOwner(ctx, ownerId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ownerId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The ID of the owner.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OwnersApi.GetOwner(context.Background(), ownerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.GetOwner``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOwner`: Owner
fmt.Fprintf(os.Stdout, "Response from `OwnersApi.GetOwner`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerId | string | The ID of the owner. |
Other parameters are passed through a pointer to a apiGetOwnerRequest 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]
UserList GetOwnerUsers(ctx, ownerId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ownerId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the owner.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OwnersApi.GetOwnerUsers(context.Background(), ownerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.GetOwnerUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOwnerUsers`: UserList
fmt.Fprintf(os.Stdout, "Response from `OwnersApi.GetOwnerUsers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerId | string | The ID of the owner. |
Other parameters are passed through a pointer to a apiGetOwnerUsersRequest 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]
PaginatedOwnersList GetOwners(ctx).Cursor(cursor).PageSize(pageSize).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
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.OwnersApi.GetOwners(context.Background()).Cursor(cursor).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.GetOwners``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOwners`: PaginatedOwnersList
fmt.Fprintf(os.Stdout, "Response from `OwnersApi.GetOwners`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetOwnersRequest 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]
UserList SetOwnerUsers(ctx, ownerId).UserIDList(userIDList).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ownerId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the owner.
userIDList := *openapiclient.NewUserIDList([]string{"UserIds_example"}) // UserIDList |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OwnersApi.SetOwnerUsers(context.Background(), ownerId).UserIDList(userIDList).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.SetOwnerUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetOwnerUsers`: UserList
fmt.Fprintf(os.Stdout, "Response from `OwnersApi.SetOwnerUsers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerId | string | The ID of the owner. |
Other parameters are passed through a pointer to a apiSetOwnerUsersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
userIDList | UserIDList | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateOwnerInfoList UpdateOwners(ctx).UpdateOwnerInfoList(updateOwnerInfoList).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
updateOwnerInfoList := *openapiclient.NewUpdateOwnerInfoList([]openapiclient.UpdateOwnerInfo{*openapiclient.NewUpdateOwnerInfo("f454d283-ca87-4a8a-bdbb-df212eca5353")}) // UpdateOwnerInfoList | Owners to be updated
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OwnersApi.UpdateOwners(context.Background()).UpdateOwnerInfoList(updateOwnerInfoList).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.UpdateOwners``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateOwners`: UpdateOwnerInfoList
fmt.Fprintf(os.Stdout, "Response from `OwnersApi.UpdateOwners`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdateOwnersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
updateOwnerInfoList | UpdateOwnerInfoList | Owners to be updated |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]