All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateTenant | Post /idm/api/v8/tenants | Creates a new tenant. |
DeleteTenant | Delete /idm/api/v8/tenants/{id} | Deletes a tenant by id. |
GetTenant | Get /idm/api/v8/tenants/{id} | Returns a tenant by id. |
GetTenantByExternalId | Get /idm/api/v8/tenants/externalId/{externalId} | Returns a tenant by externalId. |
GetTenantsList | Get /idm/api/v8/tenants/list | Returns a list of tenants. |
GetTenantsPage | Get /idm/api/v8/tenants | Returns a page of tenants. |
UpdateTenant | Put /idm/api/v8/tenants/{id} | Updates a tenant by id. |
Tenant CreateTenant(ctx).TenantCreate(tenantCreate).Execute()
Creates a new tenant.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
tenantCreate := *openapiclient.NewTenantCreate("Name_example") // TenantCreate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TenantsApi.CreateTenant(context.Background()).TenantCreate(tenantCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TenantsApi.CreateTenant``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateTenant`: Tenant
fmt.Fprintf(os.Stdout, "Response from `TenantsApi.CreateTenant`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateTenantRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
tenantCreate | TenantCreate |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteTenant(ctx, id).Execute()
Deletes a tenant by id.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TenantsApi.DeleteTenant(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TenantsApi.DeleteTenant``: %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 apiDeleteTenantRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tenant GetTenant(ctx, id).Execute()
Returns a tenant by id.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TenantsApi.GetTenant(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TenantsApi.GetTenant``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTenant`: Tenant
fmt.Fprintf(os.Stdout, "Response from `TenantsApi.GetTenant`: %v\n", resp)
}
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 apiGetTenantRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tenant GetTenantByExternalId(ctx, externalId).ShowImage(showImage).Execute()
Returns a tenant by externalId.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
externalId := "externalId_example" // string |
showImage := true // bool | (optional) (default to false)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TenantsApi.GetTenantByExternalId(context.Background(), externalId).ShowImage(showImage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TenantsApi.GetTenantByExternalId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTenantByExternalId`: Tenant
fmt.Fprintf(os.Stdout, "Response from `TenantsApi.GetTenantByExternalId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
externalId | string |
Other parameters are passed through a pointer to a apiGetTenantByExternalIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
showImage | bool | | [default to false]
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Tenant GetTenantsList(ctx).Ids(ids).ShowImage(showImage).Execute()
Returns a list of tenants.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ids := []string{"Inner_example"} // []string |
showImage := true // bool | (optional) (default to false)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TenantsApi.GetTenantsList(context.Background()).Ids(ids).ShowImage(showImage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TenantsApi.GetTenantsList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTenantsList`: []Tenant
fmt.Fprintf(os.Stdout, "Response from `TenantsApi.GetTenantsList`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetTenantsListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
ids | []string | ||
showImage | bool | [default to false] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TenantsPage GetTenantsPage(ctx).Page(page).PageSize(pageSize).ParentId(parentId).ShowImage(showImage).SortBy(sortBy).SortOrder(sortOrder).Execute()
Returns a page of tenants.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
page := int32(0) // int32 |
pageSize := int32(10) // int32 |
parentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional)
showImage := true // bool | (optional) (default to false)
sortBy := "name" // string | (optional)
sortOrder := "sortOrder_example" // string | (optional) (default to "asc")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TenantsApi.GetTenantsPage(context.Background()).Page(page).PageSize(pageSize).ParentId(parentId).ShowImage(showImage).SortBy(sortBy).SortOrder(sortOrder).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TenantsApi.GetTenantsPage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTenantsPage`: TenantsPage
fmt.Fprintf(os.Stdout, "Response from `TenantsApi.GetTenantsPage`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetTenantsPageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
page | int32 | ||
pageSize | int32 | ||
parentId | string | ||
showImage | bool | [default to false] | |
sortBy | string | ||
sortOrder | string | [default to "asc"] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tenant UpdateTenant(ctx, id).TenantUpdate(tenantUpdate).Execute()
Updates a tenant by id.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
tenantUpdate := *openapiclient.NewTenantUpdate("Name_example") // TenantUpdate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TenantsApi.UpdateTenant(context.Background(), id).TenantUpdate(tenantUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TenantsApi.UpdateTenant``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateTenant`: Tenant
fmt.Fprintf(os.Stdout, "Response from `TenantsApi.UpdateTenant`: %v\n", resp)
}
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 apiUpdateTenantRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
tenantUpdate | TenantUpdate | |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]