Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.19 KB

enterprise.md

File metadata and controls

43 lines (28 loc) · 1.19 KB

Enterprise API

Back to the navigation

Provides information about a GitHub Enterprise installation. Wraps GitHub Enterprise API.

Configuration

In order to configure the client to point to a GitHub Enterprise installation, do the following:

<?php

// This file is generated by Composer
require_once 'vendor/autoload.php';

$client = new \Github\Client();

// Set the URL of your GitHub Enterprise installation
$client->setEnterpriseUrl('https://ghe.host');

// Use the client as you would ordinarily
$repositories = $client->api('user')->repositories('ornicar');

Authentication

The Admin Stats, License, and User Administration API endpoints are only accessible to GitHub Enterprise site administrators. The Management Console API endpoints are only accessible via the Management Console password.

User Administration

Suspend a user (Enterprise only)

Requires authentication.

$client->api('enterprise')->userAdmin()->suspend('ornicar');

Unsuspend a user (Enterprise only)

Requires authentication.

$client->api('enterprise')->userAdmin()->unsuspend('ornicar');