Skip to content

Latest commit

 

History

History
219 lines (141 loc) · 7.07 KB

DsyncApi.md

File metadata and controls

219 lines (141 loc) · 7.07 KB

\DsyncApi

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.

ListDirectorySyncGroups

ListDirectorySyncGroups200Response ListDirectorySyncGroups(ctx, organizationId).Execute()

Lists the groups exposed to the synced Directory on an organization.

Example

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

Path Parameters

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

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

Name Type Description Notes

Return type

ListDirectorySyncGroups200Response

Authorization

user-internal

HTTP request headers

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

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

SetupDirectorySync

SetupDirectorySync200Response SetupDirectorySync(ctx, organizationId).Execute()

Set up Directory Sync in an organization.

Example

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

Path Parameters

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

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

Name Type Description Notes

Return type

SetupDirectorySync200Response

Authorization

user-internal

HTTP request headers

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

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

SyncDirectorySyncGroupsToTeams

SyncDirectorySyncGroupsToTeams200Response SyncDirectorySyncGroupsToTeams(ctx, organizationId).SyncDirectorySyncGroupsToTeamsRequest(syncDirectorySyncGroupsToTeamsRequest).Execute()

Syncs a list of group/team unique identifiers pairs together.

Example

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

Path Parameters

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

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

Name Type Description Notes

syncDirectorySyncGroupsToTeamsRequest | SyncDirectorySyncGroupsToTeamsRequest | |

Return type

SyncDirectorySyncGroupsToTeams200Response

Authorization

user-internal

HTTP request headers

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

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