Skip to content

Latest commit

 

History

History
493 lines (324 loc) · 12.7 KB

TenantsApi.md

File metadata and controls

493 lines (324 loc) · 12.7 KB

\TenantsApi

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.

CreateTenant

Tenant CreateTenant(ctx).TenantCreate(tenantCreate).Execute()

Creates a new tenant.

Example

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)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
tenantCreate TenantCreate

Return type

Tenant

Authorization

No authorization required

HTTP request headers

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

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

DeleteTenant

DeleteTenant(ctx, id).Execute()

Deletes a tenant by id.

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

GetTenant

Tenant GetTenant(ctx, id).Execute()

Returns a tenant by id.

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

Return type

Tenant

Authorization

No authorization required

HTTP request headers

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

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

GetTenantByExternalId

Tenant GetTenantByExternalId(ctx, externalId).ShowImage(showImage).Execute()

Returns a tenant by externalId.

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
externalId string

Other Parameters

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

Name Type Description Notes

showImage | bool | | [default to false]

Return type

Tenant

Authorization

No authorization required

HTTP request headers

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

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

GetTenantsList

[]Tenant GetTenantsList(ctx).Ids(ids).ShowImage(showImage).Execute()

Returns a list of tenants.

Example

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)
}

Path Parameters

Other Parameters

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]

Return type

[]Tenant

Authorization

No authorization required

HTTP request headers

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

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

GetTenantsPage

TenantsPage GetTenantsPage(ctx).Page(page).PageSize(pageSize).ParentId(parentId).ShowImage(showImage).SortBy(sortBy).SortOrder(sortOrder).Execute()

Returns a page of tenants.

Example

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)
}

Path Parameters

Other Parameters

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"]

Return type

TenantsPage

Authorization

No authorization required

HTTP request headers

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

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

UpdateTenant

Tenant UpdateTenant(ctx, id).TenantUpdate(tenantUpdate).Execute()

Updates a tenant by id.

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

tenantUpdate | TenantUpdate | |

Return type

Tenant

Authorization

No authorization required

HTTP request headers

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

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