# GitHub Copilot

> Manage GitHub Copilot seats and retrieve billing, configuration and usage report links.

App · 21 actions. Web page: https://docs.lodol.com/docs/integrations/github-copilot

## Actions

### Assign seats to teams

Assign seats to teams.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Selected teams (`selected_teams`, list, required): List of team names within the organization to which to grant access to GitHub Copilot.

**Outputs**

- `data` (object): The total number of seats created for members of the specified team(s).

**Example output**

```json
{
  "data": {
    "seats_created": 1
  }
}
```

### Assign seats to users

Assign seats to users.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Selected usernames (`selected_usernames`, list, required): The usernames of the organization members to be granted access to GitHub Copilot.

**Outputs**

- `data` (object): The total number of seats created for the specified user(s).

**Example output**

```json
{
  "data": {
    "seats_created": 1
  }
}
```

### Cancel team seats

Cancel team seats.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Selected teams (`selected_teams`, list, required): The names of teams from which to revoke access to GitHub Copilot.

**Outputs**

- `data` (object): The total number of seats set to "pending cancellation" for members of the specified team(s).

**Example output**

```json
{
  "data": {
    "seats_cancelled": 1
  }
}
```

### Cancel user seats

Cancel user seats.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Selected usernames (`selected_usernames`, list, required): The usernames of the organization members for which to revoke access to GitHub Copilot.

**Outputs**

- `data` (object): The total number of seats set to "pending cancellation" for the specified users.

**Example output**

```json
{
  "data": {
    "seats_cancelled": 1
  }
}
```

### Get enterprise daily repository usage report

Get enterprise daily repository usage report.

**Inputs**

- Enterprise (`enterprise`, text): Enterprise URL name. Leave empty to use the enterprise saved on this connection.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get enterprise daily usage report

Get enterprise daily usage report.

**Inputs**

- Enterprise (`enterprise`, text): Enterprise URL name. Leave empty to use the enterprise saved on this connection.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get enterprise daily user usage report

Get enterprise daily user usage report.

**Inputs**

- Enterprise (`enterprise`, text): Enterprise URL name. Leave empty to use the enterprise saved on this connection.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get enterprise daily user-team usage report

Get enterprise daily user-team usage report.

**Inputs**

- Enterprise (`enterprise`, text): Enterprise URL name. Leave empty to use the enterprise saved on this connection.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get enterprise latest 28-day usage report

Get enterprise latest 28-day usage report.

**Inputs**

- Enterprise (`enterprise`, text): Enterprise URL name. Leave empty to use the enterprise saved on this connection.

**Outputs**

- `data` (object): Links to download the latest Copilot usage metrics report for an enterprise/organization.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_end_day": "example",
    "report_start_day": "example"
  }
}
```

### Get enterprise latest 28-day user usage report

Get enterprise latest 28-day user usage report.

**Inputs**

- Enterprise (`enterprise`, text): Enterprise URL name. Leave empty to use the enterprise saved on this connection.

**Outputs**

- `data` (object): Links to download the latest Copilot usage metrics report for an enterprise/organization.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_end_day": "example",
    "report_start_day": "example"
  }
}
```

### Get organization billing

Get organization billing.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.

**Outputs**

- `data` (object): Information about the seat breakdown and policies set for an organization with a Copilot Business or Copilot Enterprise subscription.

**Example output**

```json
{
  "data": {
    "cli": "enabled",
    "ide_chat": "enabled",
    "plan_type": "business",
    "platform_chat": "enabled",
    "public_code_suggestions": "allow",
    "seat_breakdown": {
      "active_this_cycle": 1,
      "added_this_cycle": 1,
      "inactive_this_cycle": 1,
      "pending_cancellation": 1,
      "pending_invitation": 1,
      "total": 1
    },
    "seat_management_setting": "assign_all"
  }
}
```

### Get organization daily repository usage report

Get organization daily repository usage report.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get organization daily usage report

Get organization daily usage report.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get organization daily user usage report

Get organization daily user usage report.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get organization daily user-team usage report

Get organization daily user-team usage report.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Day (`day`, date, required): The day to request data for, in `YYYY-MM-DD` format.

**Outputs**

- `data` (object): Links to download the Copilot usage metrics report for an enterprise/organization for a specific day.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_day": "example"
  }
}
```

### Get organization latest 28-day usage report

Get organization latest 28-day usage report.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.

**Outputs**

- `data` (object): Links to download the latest Copilot usage metrics report for an enterprise/organization.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_end_day": "example",
    "report_start_day": "example"
  }
}
```

### Get organization latest 28-day user usage report

Get organization latest 28-day user usage report.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.

**Outputs**

- `data` (object): Links to download the latest Copilot usage metrics report for an enterprise/organization.

**Example output**

```json
{
  "data": {
    "download_links": [],
    "report_end_day": "example",
    "report_start_day": "example"
  }
}
```

### List my organizations

List my organizations. Returns one page; use its continuation fields to request the next page.

**Inputs**

- Per page (`per_page`, number): The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `30`.
- Page (`page`, number): The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `1`.

**Outputs**

- `data` (list): Returned value.

**Example output**

```json
{
  "data": []
}
```

### List organization members

List organization members.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Filter (`filter`, text): Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only members with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. These options are only available for organization owners. One of: `2fa_disabled` (2fa disabled), `2fa_insecure` (2fa insecure), `all`. Default: `all`.
- Role (`role`, text): Filter members returned by their role. One of: `all`, `admin`, `member`. Default: `all`.
- Per page (`per_page`, number): The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `30`.
- Page (`page`, number): The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `1`.

**Outputs**

- `data` (list): Returned value.

**Example output**

```json
{
  "data": []
}
```

### List organization seats

List organization seats. Returns one page; use its continuation fields to request the next page.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Page (`page`, number): The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `1`.
- Per page (`per_page`, number): The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `50`.

**Outputs**

- `data` (object): Returned value.

**Example output**

```json
{
  "data": {
    "seats": [],
    "total_seats": 1
  }
}
```

### List organization teams

List organization teams.

**Inputs**

- Organization (`org`, text, required): The organization name. The name is not case sensitive.
- Per page (`per_page`, number): The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `30`.
- Page (`page`, number): The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).". Default: `1`.
- Team type (`team_type`, text): Filter team results by their type. For more information, see "[What kind of team should I use?](https://docs.github.com/admin/concepts/enterprise-fundamentals/teams-in-an-enterprise#what-kind-of-team-should-i-use)". One of: `all`, `enterprise`, `organization`. Default: `all`.

**Outputs**

- `data` (list): Returned value.

**Example output**

```json
{
  "data": []
}
```
