# \GitSyncApi

All URIs are relative to */api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_from_workspace**](GitSyncApi.md#delete_from_workspace) | **DELETE** /w/{workspace}/github_app/installation/{installation_id} | Delete a GitHub installation from a workspace
[**export_installation**](GitSyncApi.md#export_installation) | **GET** /w/{workspace}/github_app/export/{installationId} | Export GitHub installation JWT token
[**get_ghes_config**](GitSyncApi.md#get_ghes_config) | **GET** /github_app/ghes_config | Get GHES app config
[**get_global_connected_repositories**](GitSyncApi.md#get_global_connected_repositories) | **GET** /github_app/connected_repositories | get connected repositories
[**ghes_installation_callback**](GitSyncApi.md#ghes_installation_callback) | **POST** /w/{workspace}/github_app/ghes_installation_callback | GHES installation callback
[**import_installation**](GitSyncApi.md#import_installation) | **POST** /w/{workspace}/github_app/import | Import GitHub installation from JWT token
[**install_from_workspace**](GitSyncApi.md#install_from_workspace) | **POST** /w/{workspace}/github_app/install_from_workspace | Install a GitHub installation from another workspace



## delete_from_workspace

> delete_from_workspace(workspace, installation_id)
Delete a GitHub installation from a workspace

Removes a GitHub installation from the specified workspace. Requires admin privileges.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**installation_id** | **i64** | The ID of the GitHub installation to delete | [required] |

### Return type

 (empty response body)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## export_installation

> models::ExportInstallation200Response export_installation(workspace, installation_id)
Export GitHub installation JWT token

Exports the JWT token for a specific GitHub installation in the workspace

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**installation_id** | **i32** |  | [required] |

### Return type

[**models::ExportInstallation200Response**](exportInstallation_200_response.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_ghes_config

> models::GetGhesConfig200Response get_ghes_config()
Get GHES app config

Returns the GitHub Enterprise Server app configuration (without private key) for constructing the installation URL

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::GetGhesConfig200Response**](getGhesConfig_200_response.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_global_connected_repositories

> Vec<models::GithubInstallationsInner> get_global_connected_repositories(page)
get connected repositories

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**page** | Option<**i32**> | Page number for pagination (default 1) |  |[default to 1]

### Return type

[**Vec<models::GithubInstallationsInner>**](GithubInstallations_inner.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## ghes_installation_callback

> ghes_installation_callback(workspace, ghes_installation_callback_request)
GHES installation callback

Register a self-managed GitHub App installation from GitHub Enterprise Server

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**ghes_installation_callback_request** | [**GhesInstallationCallbackRequest**](GhesInstallationCallbackRequest.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## import_installation

> import_installation(workspace, import_installation_request)
Import GitHub installation from JWT token

Imports a GitHub installation from a JWT token exported from another instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**import_installation_request** | [**ImportInstallationRequest**](ImportInstallationRequest.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## install_from_workspace

> install_from_workspace(workspace, install_from_workspace_request)
Install a GitHub installation from another workspace

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**install_from_workspace_request** | [**InstallFromWorkspaceRequest**](InstallFromWorkspaceRequest.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

