All URIs are relative to https://api.gitbook.com/v1
Method | HTTP request | Description |
---|---|---|
ListDirectorySyncGroups | Get /orgs/{organizationId}/dsync/groups | Lists the groups exposed to the synced Directory on an organization. |
SetupDirectorySync | Post /orgs/{organizationId}/dsync | Set up Directory Sync in an organization. |
SyncDirectorySyncGroupsToTeams | Post /orgs/{organizationId}/dsync/teams | Syncs a list of group/team unique identifiers pairs together. |
ListDirectorySyncGroups200Response ListDirectorySyncGroups(ctx, organizationId).Execute()
Lists the groups exposed to the synced Directory on an organization.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
organizationId := "organizationId_example" // string | The unique id of the organization
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DsyncApi.ListDirectorySyncGroups(context.Background(), organizationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DsyncApi.ListDirectorySyncGroups``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDirectorySyncGroups`: ListDirectorySyncGroups200Response
fmt.Fprintf(os.Stdout, "Response from `DsyncApi.ListDirectorySyncGroups`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | The unique id of the organization |
Other parameters are passed through a pointer to a apiListDirectorySyncGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
ListDirectorySyncGroups200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetupDirectorySync200Response SetupDirectorySync(ctx, organizationId).Execute()
Set up Directory Sync in an organization.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
organizationId := "organizationId_example" // string | The unique id of the organization
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DsyncApi.SetupDirectorySync(context.Background(), organizationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DsyncApi.SetupDirectorySync``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetupDirectorySync`: SetupDirectorySync200Response
fmt.Fprintf(os.Stdout, "Response from `DsyncApi.SetupDirectorySync`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | The unique id of the organization |
Other parameters are passed through a pointer to a apiSetupDirectorySyncRequest 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]
SyncDirectorySyncGroupsToTeams200Response SyncDirectorySyncGroupsToTeams(ctx, organizationId).SyncDirectorySyncGroupsToTeamsRequest(syncDirectorySyncGroupsToTeamsRequest).Execute()
Syncs a list of group/team unique identifiers pairs together.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GitbookIO/go-gitbook"
)
func main() {
organizationId := "organizationId_example" // string | The unique id of the organization
syncDirectorySyncGroupsToTeamsRequest := *openapiclient.NewSyncDirectorySyncGroupsToTeamsRequest([]openapiclient.SyncDirectorySyncGroupsToTeamsRequestToSyncInner{*openapiclient.NewSyncDirectorySyncGroupsToTeamsRequestToSyncInner("GroupId_example")}) // SyncDirectorySyncGroupsToTeamsRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DsyncApi.SyncDirectorySyncGroupsToTeams(context.Background(), organizationId).SyncDirectorySyncGroupsToTeamsRequest(syncDirectorySyncGroupsToTeamsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DsyncApi.SyncDirectorySyncGroupsToTeams``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SyncDirectorySyncGroupsToTeams`: SyncDirectorySyncGroupsToTeams200Response
fmt.Fprintf(os.Stdout, "Response from `DsyncApi.SyncDirectorySyncGroupsToTeams`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | The unique id of the organization |
Other parameters are passed through a pointer to a apiSyncDirectorySyncGroupsToTeamsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
syncDirectorySyncGroupsToTeamsRequest | SyncDirectorySyncGroupsToTeamsRequest | |
SyncDirectorySyncGroupsToTeams200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]